Skip to content

Commit

Permalink
literal: None literal
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Sep 2, 2024
1 parent 1ef89a6 commit 6a0e79d
Show file tree
Hide file tree
Showing 6 changed files with 6,663 additions and 7,424 deletions.
3 changes: 2 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module.exports = grammar({

arg_list: $ => comma_sep($.expression),

literal: $ => choice($.number, $.string, $.bool),
literal: $ => choice($.number, $.string, $.bool, $.none),

var_declaration: $ => seq($.identifier, ":", $.type),
assignment: $ => seq(field("left", choice($.var_declaration, $.identifier)), "=", field("right", $.expression)),
Expand All @@ -131,5 +131,6 @@ module.exports = grammar({
number: _ => /\d+/,
string: _ => /"([^"\\]|\\.)*"/,
bool: _ => choice("true", "false", "error"),
none: _ => "none",
},
})
1 change: 1 addition & 0 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@
(string) @string
(number) @number
(bool) @constant.builtin
(none) @constant.builtin
8 changes: 8 additions & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6a0e79d

Please sign in to comment.