diff --git a/example.dust b/example.dust index a252616..1e64997 100644 --- a/example.dust +++ b/example.dust @@ -1,12 +1,6 @@ -# Lists are created by grouping items in partheses and separating them with -# commas. +# Comment +(1, 2, 3); -numbers = (1, 2, 3); - -# To access the values in a list, use an integer as an index. - -x = numbers.0; -y = numbers.1; -z = numbers.2; - -assert_equal(x + y, z); +random_integer(); +true; +false; \ No newline at end of file diff --git a/highlights.scm b/highlights.scm index 063a6c1..28f4df8 100644 --- a/highlights.scm +++ b/highlights.scm @@ -1,7 +1,20 @@ +(expression) @expression +(value) @value (comment) @comment (operator) @operator -(identifier) @identifier +(identifier) @constant (value) @value (string) @string -(tool) @function.builtin + +(integer) @number (float) @float + +(yield) @keyword +(chain) @keyword + +(function) @function +(tool) @function.builtin + +(empty) @null +(boolean) @boolean +(list) @list \ No newline at end of file diff --git a/src/grammar.json b/src/grammar.json index 1f9fcb1..85084c7 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -1,5 +1,5 @@ { - "name": "Dust", + "name": "dust", "rules": { "source_file": { "type": "REPEAT", diff --git a/src/parser.c b/src/parser.c index c525245..6311dce 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1356,7 +1356,7 @@ extern "C" { #define extern __declspec(dllexport) #endif -extern const TSLanguage *tree_sitter_Dust(void) { +extern const TSLanguage *tree_sitter_dust(void) { static const TSLanguage language = { .version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT,