Updated whitespaces...
This commit is contained in:
parent
3e1a87db3d
commit
fc7946133e
@ -2,8 +2,8 @@
|
||||
|
||||
set -xe
|
||||
|
||||
gcc -ansi -Wall -Wextra -Wpedantic -o xighlight xighlight.c
|
||||
clang -ansi -Weverything -o xighlight xighlight.c
|
||||
clang -g -ansi -Weverything -o xighlight xighlight.c
|
||||
gcc -g -ansi -Wall -Wextra -Wpedantic -o xighlight xighlight.c
|
||||
cat xighlight.c | valgrind --show-leak-kinds=all --leak-check=full ./xighlight
|
||||
|
||||
exit
|
||||
|
@ -18,6 +18,7 @@ int main (void) {
|
||||
int length = 0;
|
||||
char * buffer = NULL;
|
||||
|
||||
int whitespace = 0;
|
||||
int preprocessor = 0;
|
||||
int line_comment = 0;
|
||||
int multiline_comment = 0;
|
||||
@ -40,6 +41,7 @@ int main (void) {
|
||||
"char", "short", "int", "long", "signed", "unsigned", "float", "double"
|
||||
};
|
||||
|
||||
syntax_define (& whitespace, 1, 0, " \t\r\n", "", '\0', COLOUR_WHITE, EFFECT_NORMAL);
|
||||
syntax_define (& preprocessor, 0, 0, "#", "\n", '\\', COLOUR_RED, EFFECT_BOLD);
|
||||
syntax_define (& line_comment, 0, 0, "//", "\n", '\0', COLOUR_GREY, EFFECT_BOLD);
|
||||
syntax_define (& multiline_comment, 0, 0, "/*", "*/", '\0', COLOUR_GREY, EFFECT_BOLD);
|
||||
|
Loading…
Reference in New Issue
Block a user