Skip to content

Commit

Permalink
fix: FunC identifiers recognition now matches actual grammar rules of…
Browse files Browse the repository at this point in the history
… FunC
  • Loading branch information
novusnota committed Aug 10, 2024
1 parent 497f045 commit 9a7d4f7
Show file tree
Hide file tree
Showing 3 changed files with 3,717 additions and 3,740 deletions.
8 changes: 3 additions & 5 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,9 @@ module.exports = grammar({

/* Identifiers */

func_identifier: ($) =>
seq($._func_identifier_letter, repeat($._func_identifier_part)),

_func_identifier_part: ($) => choice($._func_identifier_letter, /[0-9]/),
_func_identifier_letter: (_) => choice(/[a-zA-Z_'?!&]/, /::/),
func_identifier: ($) => choice($._func_plain_id, $._func_quoted_id),
_func_quoted_id: (_) => /[\.\~]?\`[^\n\`]+\`/,
_func_plain_id: (_) => /[\.\~]?[^\s\(\)\[\]\,\.\;\~]+/,

identifier: (_) => /[a-zA-Z_][a-zA-Z0-9_]*/,

Expand Down
41 changes: 10 additions & 31 deletions src/grammar.json

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

Loading

0 comments on commit 9a7d4f7

Please sign in to comment.