Skip to content

Commit

Permalink
small bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
r001 committed Aug 26, 2024
1 parent f5ecaaa commit 025584e
Show file tree
Hide file tree
Showing 4 changed files with 520 additions and 547 deletions.
14 changes: 8 additions & 6 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = grammar({
conflicts: $ => [
[
$.program_name_literal,
$.variable_identifier
$._variable_identifier
]
],

Expand All @@ -44,6 +44,7 @@ module.exports = grammar({
repeat($.import_declaration),
$.program_declaration
),

horizontal_tab: $ => /\t/,

line_feed: $ => /\n/,
Expand Down Expand Up @@ -229,7 +230,8 @@ module.exports = grammar({
)
)
),
variable_identifier: $ => seq(

_variable_identifier: $ => seq(
/[a-z]/,
repeat(
choice(
Expand All @@ -242,7 +244,7 @@ module.exports = grammar({

identifier: $ => choice(
$.constant_identifier,
$.variable_identifier
$._variable_identifier
),


Expand Down Expand Up @@ -554,7 +556,7 @@ module.exports = grammar({
),

variable: $ => prec(2, choice(
$.variable_identifier,
$._variable_identifier,
$.constant_identifier)),

associated_constant: $ => seq(
Expand Down Expand Up @@ -902,7 +904,7 @@ module.exports = grammar({

variable_declaration:$ => seq(
'let',
$.identifier_or_identifiers,
$._identifier_or_identifiers,
':',
$.type,
'=',
Expand All @@ -920,7 +922,7 @@ module.exports = grammar({
';'
),

identifier_or_identifiers:$ => choice(
_identifier_or_identifiers:$ => choice(
$.identifier,
seq(
'(',
Expand Down
1 change: 0 additions & 1 deletion queries/highlights.scm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
(variable_identifier) @variable
(constant_identifier) @constant

[
Expand Down
34 changes: 3 additions & 31 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 025584e

Please sign in to comment.