on master help sign in
Update tree-sitter-scheme
bae890dBlaž Hrastnik
languages.toml+1−1
@@ -1583,7 +1583,7 @@ indent = { tab-width = 2, unit = " " }
1583
1583
1584[[grammar]]
1584[[grammar]]
1585name = "scheme"
1585name = "scheme"
1586−source = { git = "https://github.com/6cdh/tree-sitter-scheme", rev = "27fb77db05f890c2823b4bd751c6420378df146b" }
1586+source = { git = "https://github.com/6cdh/tree-sitter-scheme", rev = "c0741320bfca6b7b5b7a13b5171275951e96a842" }
1587
1587
1588[[language]]
1588[[language]]
1589name = "v"
1589name = "v"
runtime/queries/rust/highlights.scm+9−2
@@ -5,8 +5,6 @@
5; overrides are unnecessary.
5; overrides are unnecessary.
6; -------
6; -------
7
7
8−
9−
10; -------
8; -------
11; Types
9; Types
12; -------
10; -------
@@ -241,6 +239,14 @@
241
239
242
240
243
241
242+(attribute
243+ (identifier) @_macro
244+ arguments: (token_tree (identifier) @constant.numeric.integer)
245+ (#eq? @_macro "derive")
246+)
247+@special
248+
249+
244; -------
250; -------
245; Functions
251; Functions
246; -------
252; -------
@@ -271,6 +277,7 @@
271; ---
277; ---
272; Macros
278; Macros
273; ---
279; ---
280+
274(attribute
281(attribute
275 (identifier) @function.macro)
282 (identifier) @function.macro)
276(attribute
283(attribute
runtime/queries/scheme/highlights.scm+27−28
@@ -2,29 +2,40 @@
2(character) @constant.character
2(character) @constant.character
3(boolean) @constant.builtin.boolean
3(boolean) @constant.builtin.boolean
4
4
5−[(string)
5+(string) @string
6− (character)] @string
7
6
8(escape_sequence) @constant.character.escape
7(escape_sequence) @constant.character.escape
9
8
10−[(comment)
9+(comment) @comment.line
11− (block_comment)
10+(block_comment) @comment.block
12− (directive)] @comment
11+(directive) @keyword.directive
13
12
14−[(boolean)
13+; operators
15− (character)] @constant
16
14
17−((symbol) @function.builtin
15+((symbol) @operator
18− (#match? @function.builtin "^(eqv\\?|eq\\?|equal\\?)")) ; TODO
16+ (#match? @operator "^(\\+|-|\\*|/|=|>|<|>=|<=)$"))
19
17
20; keywords
18; keywords
21
19
20+(list
21+ .
22−((symbol) @keyword.conditional
22+ ((symbol) @keyword.conditional
23− (#match? @keyword.conditional "^(if|cond|case|when|unless)$"))
23+ (#match? @keyword.conditional "^(if|cond|case|when|unless)$"
24+ )))
24
25
26+(list
27+ .
25−((symbol) @keyword
28+ (symbol) @keyword
26− (#match? @keyword
29+ (#match? @keyword
27− "^(define|lambda|begin|do|define-syntax|and|or|if|cond|case|when|unless|else|=>|let|let*|let-syntax|let-values|let*-values|letrec|letrec*|letrec-syntax|set!|syntax-rules|identifier-syntax|quote|unquote|quote-splicing|quasiquote|unquote-splicing|delay|assert|library|export|import|rename|only|except|prefix)$"))
30+ "^(define-syntax|let\\*|lambda|λ|case|=>|quote-splicing|unquote-splicing|set!|let|letrec|letrec-syntax|let-values|let\\*-values|do|else|define|cond|syntax-rules|unquote|begin|quote|let-syntax|and|if|quasiquote|letrec|delay|or|when|unless|identifier-syntax|assert|library|export|import|rename|only|except|prefix)$"
31+ ))
32+
33+(list
34+ .
35+ (symbol) @function.builtin
36+ (#match? @function.builtin
37+ "^(caar|cadr|call-with-input-file|call-with-output-file|cdar|cddr|list|open-input-file|open-output-file|with-input-from-file|with-output-to-file|\\*|\\+|-|/|<|<=|=|>|>=|abs|acos|angle|append|apply|asin|assoc|assq|assv|atan|boolean\\?|caaaar|caaadr|caaar|caadar|caaddr|caadr|cadaar|cadadr|cadar|caddar|cadddr|caddr|call-with-current-continuation|call-with-values|car|cdaaar|cdaadr|cdaar|cdadar|cdaddr|cdadr|cddaar|cddadr|cddar|cdddar|cddddr|cdddr|cdr|ceiling|char->integer|char-alphabetic\\?|char-ci<=\\?|char-ci<\\?|char-ci=\\?|char-ci>=\\?|char-ci>\\?|char-downcase|char-lower-case\\?|char-numeric\\?|char-ready\\?|char-upcase|char-upper-case\\?|char-whitespace\\?|char<=\\?|char<\\?|char=\\?|char>=\\?|char>\\?|char\\?|close-input-port|close-output-port|complex\\?|cons|cos|current-error-port|current-input-port|current-output-port|denominator|display|dynamic-wind|eof-object\\?|eq\\?|equal\\?|eqv\\?|eval|even\\?|exact->inexact|exact\\?|exp|expt|floor|flush-output|for-each|force|gcd|imag-part|inexact->exact|inexact\\?|input-port\\?|integer->char|integer\\?|interaction-environment|lcm|length|list->string|list->vector|list-ref|list-tail|list\\?|load|log|magnitude|make-polar|make-rectangular|make-string|make-vector|map|max|member|memq|memv|min|modulo|negative\\?|newline|not|null-environment|null\\?|number->string|number\\?|numerator|odd\\?|output-port\\?|pair\\?|peek-char|positive\\?|procedure\\?|quotient|rational\\?|rationalize|read|read-char|real-part|real\\?|remainder|reverse|round|scheme-report-environment|set-car!|set-cdr!|sin|sqrt|string|string->list|string->number|string->symbol|string-append|string-ci<=\\?|string-ci<\\?|string-ci=\\?|string-ci>=\\?|string-ci>\\?|string-copy|string-fill!|string-length|string-ref|string-set!|string<=\\?|string<\\?|string=\\?|string>=\\?|string>\\?|string\\?|substring|symbol->string|symbol\\?|tan|transcript-off|transcript-on|truncate|values|vector|vector->list|vector-fill!|vector-length|vector-ref|vector-set!|vector\\?|write|write-char|zero\\?)$"
38+ ))
28
39
29; special forms
40; special forms
30
41
@@ -47,26 +58,16 @@
47 .
58 .
48 (list
59 (list
49 (list
60 (list
50− (symbol) @variable))
61+ (symbol) @variable.parameter))
51 (#match? @_f
62 (#match? @_f
52 "^(let|let\\*|let-syntax|let-values|let\\*-values|letrec|letrec\\*|letrec-syntax)$"))
63 "^(let|let\\*|let-syntax|let-values|let\\*-values|letrec|letrec\\*|letrec-syntax)$"))
53
64
54−; operators
55−
56−(list
57− .
58− (symbol) @operator
59− (#match? @operator "^([+*/<>=-]|(<=)|(>=))$"))
60−
61; quote
65; quote
62
66
63−(abbreviation
64− "'" (symbol)) @constant
65−
66(list
67(list
67 .
68 .
68 (symbol) @_f
69 (symbol) @_f
69− (#eq? @_f "quote")) @symbol
70+ (#eq? @_f "quote")) @string.symbol
70
71
71; library
72; library
72
73
@@ -89,12 +90,10 @@
89((symbol) @variable.builtin
90((symbol) @variable.builtin
90 (#eq? @variable.builtin "..."))
91 (#eq? @variable.builtin "..."))
91
92
92−(symbol) @variable
93((symbol) @variable.builtin
93((symbol) @variable.builtin
94 (#eq? @variable.builtin "."))
94 (#eq? @variable.builtin "."))
95
95
96(symbol) @variable
96(symbol) @variable
97
97
98−
99["(" ")" "[" "]" "{" "}"] @punctuation.bracket
98["(" ")" "[" "]" "{" "}"] @punctuation.bracket
100
99