Skip to content

Commit de893b1

Browse files
authored
Merge pull request #16 from joker1007/fix-missing-highlight
fix: fix missing highlight (#15)
2 parents 8d8e65a + 2968cbe commit de893b1

File tree

10 files changed

+5535
-5267
lines changed

10 files changed

+5535
-5267
lines changed

Diff for: grammar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ module.exports = grammar({
126126
symbol_literal: $ => prec.right(choice(
127127
seq(":\"", repeat(choice($.double_quote_string_body, $.escape_sequence)), "\""),
128128
seq(":'", repeat(choice($.single_quote_string_body, $.escape_sequence)), "'"),
129-
seq(/:[a-zA-Z]\w*/),
129+
/:[a-zA-Z]\w*/,
130130
seq(/:[a-zA-Z]\w*/, token.immediate("?")),
131131
seq(/:[a-zA-Z]\w*/, token.immediate("=")),
132-
seq(/:((\.\.)|(\|)|(\^)|(&)|(<=>)|(==)|(===)|(=~)|(>)|(>=)|(<)|(<=)|(\+)|(-)|(\*)|(\/)|(%)|(!)|(!~)|(\*\*)|(<<)|(>>)|(~)|(\+@)|(-@)|(~@)|(\[\])|(\[\]=)|(`))/),
132+
/:((\.\.)|(\|)|(\^)|(&)|(<=>)|(==)|(===)|(=~)|(>)|(>=)|(<)|(<=)|(\+)|(-)|(\*)|(\/)|(%)|(!)|(!~)|(\*\*)|(<<)|(>>)|(~)|(\+@)|(-@)|(~@)|(\[\])|(\[\]=)|(`))/,
133133
)),
134134

135135
integer_literal: $ => /\d(_?\d)*/,

Diff for: queries/highlights.scm

+17
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,24 @@
4848
(method_name
4949
[
5050
(identifier)
51+
(identifier_suffix)
5152
(constant)
53+
(constant_suffix)
5254
(operator)
5355
(setter)
56+
(constant_setter)
57+
] @method))
58+
59+
(attribute_member
60+
(method_name
61+
[
62+
(identifier)
63+
(identifier_suffix)
64+
(constant)
65+
(constant_suffix)
66+
(operator)
67+
(setter)
68+
(constant_setter)
5469
] @method))
5570

5671
[(ivar_name) (cvar_name)] @property
@@ -86,6 +101,8 @@
86101

87102
(type (integer_literal) @number)
88103

104+
(type (record_type key: (record_key) @symbol))
105+
89106
; Annotation
90107
(annotation_text) @attribute
91108

Diff for: src/grammar.json

+5-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: src/node-types.json

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)