-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #31 Moves parsing of block comments from external scanner into grammar itself PlusCal P and C syntax both implemented, aliased to have the same rule names to simplify queries Added tests for new PlusCal rules Added queries for PlusCal highlighting Added queries to implement locals highlighting in Neovim
- Loading branch information
Showing
25 changed files
with
758,669 additions
and
666,055 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
; Scopes | ||
[ | ||
(bounded_quantification) | ||
(function_definition) | ||
(lambda) | ||
(module) | ||
(module_definition) | ||
(pcal_algorithm) | ||
(pcal_macro) | ||
(pcal_procedure) | ||
(pcal_with) | ||
(unbounded_quantification) | ||
] @scope | ||
|
||
; Definitions | ||
(constant_declaration (identifier) @definition.constant) | ||
(function_definition name: (identifier) @definition.operator) | ||
(lambda (identifier) @definition.parameter) | ||
(operator_definition name: (identifier) @definition.operator) | ||
(operator_definition parameter: (identifier) @definition.parameter) | ||
(pcal_macro_decl parameter: (identifier) @definition.parameter) | ||
(pcal_proc_var_decl (identifier) @definition.parameter) | ||
(pcal_var_decl (identifier) @definition.variable) | ||
(pcal_with (identifier) @definition.parameter) | ||
(quantifier_bound (identifier) @definition.parameter) | ||
(quantifier_bound (tuple_of_identifiers (identifier) @definition.parameter)) | ||
(variable_declaration (identifier) @definition.variable) | ||
|
||
; Builtin variables | ||
(pcal_algorithm_body | ||
[ | ||
(_ (identifier_ref) @definition.builtin_variable) | ||
(_ (_ (identifier_ref) @definition.builtin_variable)) | ||
(_ (_ (_ (identifier_ref) @definition.builtin_variable))) | ||
(_ (_ (_ (_ (identifier_ref) @definition.builtin_variable)))) | ||
(_ (_ (_ (_ (_ (identifier_ref) @definition.builtin_variable))))) | ||
] | ||
(#vim-match? @definition.builtin_variable "^(self|pc|stack)$") | ||
) |
Oops, something went wrong.