Skip to content

Commit c6d1430

Browse files
committed
Drop old cairo grammar, alias to rust for now
1 parent 207829e commit c6d1430

File tree

6 files changed

+9
-102
lines changed

6 files changed

+9
-102
lines changed

languages.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,10 +1700,9 @@ file-types = ["cairo"]
17001700
roots = []
17011701
comment-token = "//"
17021702
indent = { tab-width = 4, unit = " " }
1703-
1704-
[[grammar]]
1705-
name = "cairo"
1706-
source = { git = "https://github.com/archseer/tree-sitter-cairo", rev = "b249662a1eefeb4d71c9529cdd971e74fecc10fe" }
1703+
# auto-format = true
1704+
language-server = { command = "cairo-language-server", args = [] }
1705+
grammar = "rust"
17071706

17081707
[[language]]
17091708
name = "cpon"

runtime/queries/cairo/highlights.scm

Lines changed: 1 addition & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1 @@
1-
(ERROR) @error
2-
3-
((identifier) @constant
4-
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
5-
((identifier_def) @constant
6-
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
7-
8-
((identifier) @namespace
9-
(#match? @namespace "^[A-Z]"))
10-
((identifier_def) @namespace
11-
(#match? @namespace "^[A-Z]"))
12-
13-
(identifier "." @punctuation)
14-
(function_call (identifier) @function)
15-
(func (identifier_def) @function)
16-
17-
(string) @string
18-
(atom_short_string) @string
19-
20-
(code_element_directive) @keyword.directive
21-
"return" @keyword
22-
23-
(number) @constant.numeric
24-
(atom_hex_number) @constant.numeric
25-
26-
(comment) @comment
27-
28-
"*" @special
29-
(type) @type
30-
31-
[
32-
"felt"
33-
; "codeoffset"
34-
] @type.builtin
35-
36-
[
37-
"if"
38-
"else"
39-
"assert"
40-
"with"
41-
"with_attr"
42-
] @keyword.control
43-
44-
[
45-
"from"
46-
"import"
47-
"func"
48-
"namespace"
49-
] @keyword ; keyword.declaration
50-
51-
[
52-
"let"
53-
"const"
54-
"local"
55-
"struct"
56-
"alloc_locals"
57-
"tempvar"
58-
] @keyword
59-
60-
(decorator) @attribute
61-
62-
[
63-
"="
64-
"+"
65-
"-"
66-
"*"
67-
"/"
68-
; "%"
69-
; "!"
70-
; ">"
71-
; "<"
72-
; "\\"
73-
; "&"
74-
; "?"
75-
; "^"
76-
; "~"
77-
"=="
78-
"!="
79-
"new"
80-
] @operator
81-
82-
[
83-
"("
84-
")"
85-
"["
86-
"]"
87-
"{"
88-
"}"
89-
] @punctuation.bracket
90-
91-
[
92-
","
93-
":"
94-
] @punctuation.delimiter
1+
; inherits: rust

runtime/queries/cairo/indents.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
; inherits: rust

runtime/queries/cairo/injections.scm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
((hint) @injection.content
2-
(#set! injection.language "python"))
3-
4-
((comment) @injection.content
1+
([(line_comment) (block_comment)] @injection.content
52
(#set! injection.language "comment"))
3+

runtime/queries/cairo/locals.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
; inherits: rust

runtime/queries/cairo/textobjects.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
; inherits: rust

0 commit comments

Comments
 (0)