diff options
author | Michael Davis | 2022-12-20 15:27:51 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-03-14 01:56:49 +0000 |
commit | cdd6c8d91e7b29e9587babce5919af800400f28d (patch) | |
tree | b4a6ca81cdd7884e65f7cfd5029dd545c21511e4 /runtime | |
parent | bb41a283e61e4d6ec7b13909771d0a9e5a759a15 (diff) |
Update Erlang highlights
* Macros that start with underscore were incorrectly marked as
'comment.unused' rather than 'keyword.directive' due to an ordering
issue of those two patterns.
* Recognize escripts as Erlang by the shebang.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/queries/erlang/highlights.scm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/runtime/queries/erlang/highlights.scm b/runtime/queries/erlang/highlights.scm index 3f4ef4cb..741f5e54 100644 --- a/runtime/queries/erlang/highlights.scm +++ b/runtime/queries/erlang/highlights.scm @@ -65,6 +65,16 @@ (function_capture module: (atom) @namespace) (function_capture function: (atom) @function) +; Macros +(macro + "?"+ @constant + name: (_) @constant + !arguments) + +(macro + "?"+ @keyword.directive + name: (_) @keyword.directive) + ; Ignored variables ((variable) @comment.discard (#match? @comment.discard "^_")) @@ -125,16 +135,6 @@ (unary_operator operator: _ @operator) ["/" ":" "->"] @operator -; Macros -(macro - "?"+ @constant - name: (_) @constant - !arguments) - -(macro - "?"+ @keyword.directive - name: (_) @keyword.directive) - ; Comments (tripledot) @comment.discard |