File tree Expand file tree Collapse file tree 6 files changed +123
-1
lines changed Expand file tree Collapse file tree 6 files changed +123
-1
lines changed Original file line number Diff line number Diff line change 466
466
branch = master
467
467
update = none
468
468
ignore = dirty
469
+ [submodule "repos/arduino "]
470
+ path = repos/arduino
471
+ url = https://github.com/ObserverOfTime/tree-sitter-arduino
472
+ branch = master
473
+ update = none
474
+ ignore = dirty
Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
3
## Unreleased
4
+ - Add ` Arduino ` support
4
5
5
6
## 0.12.65 - 2023-10-10
6
7
- Fix ` HLSL ` highlighting
Original file line number Diff line number Diff line change
1
+ ; inherits: cpp
2
+
3
+ ((identifier) @function.builtin
4
+ (#any-of? @function.builtin
5
+ ; Digital I/O
6
+ "digitalRead"
7
+ "digitalWrite"
8
+ "pinMode"
9
+ ; Analog I/O
10
+ "analogRead"
11
+ "analogReference"
12
+ "analogWrite"
13
+ ; Zero, Due & MKR Family
14
+ "analogReadResolution"
15
+ "analogWriteResolution"
16
+ ; Advanced I/O
17
+ "noTone"
18
+ "pulseIn"
19
+ "pulseInLong"
20
+ "shiftIn"
21
+ "shiftOut"
22
+ "tone"
23
+ ; Time
24
+ "delay"
25
+ "delayMicroseconds"
26
+ "micros"
27
+ "millis"
28
+ ; Math
29
+ "abs"
30
+ "constrain"
31
+ "map"
32
+ "max"
33
+ "min"
34
+ "pow"
35
+ "sq"
36
+ "sqrt"
37
+ ; Trigonometry
38
+ "cos"
39
+ "sin"
40
+ "tan"
41
+ ; Characters
42
+ "isAlpha"
43
+ "isAlphaNumeric"
44
+ "isAscii"
45
+ "isControl"
46
+ "isDigit"
47
+ "isGraph"
48
+ "isHexadecimalDigit"
49
+ "isLowerCase"
50
+ "isPrintable"
51
+ "isPunct"
52
+ "isSpace"
53
+ "isUpperCase"
54
+ "isWhitespace"
55
+ ; Random Numbers
56
+ "random"
57
+ "randomSeed"
58
+ ; Bits and Bytes
59
+ "bit"
60
+ "bitClear"
61
+ "bitRead"
62
+ "bitSet"
63
+ "bitWrite"
64
+ "highByte"
65
+ "lowByte"
66
+ ; External Interrupts
67
+ "attachInterrupt"
68
+ "detachInterrupt"
69
+ ; Interrupts
70
+ "interrupts"
71
+ "noInterrupts"
72
+ ))
73
+
74
+ ((identifier) @type.builtin
75
+ (#any-of? @type.builtin
76
+ "Serial"
77
+ "SPI"
78
+ "Stream"
79
+ "Wire"
80
+ "Keyboard"
81
+ "Mouse"
82
+ "String"
83
+ ))
84
+
85
+ ((identifier) @constant.builtin
86
+ (#any-of? @constant.builtin
87
+ "HIGH"
88
+ "LOW"
89
+ "INPUT"
90
+ "OUTPUT"
91
+ "INPUT_PULLUP"
92
+ "LED_BUILTIN"
93
+ ))
94
+
95
+ (function_definition
96
+ (function_declarator
97
+ declarator: (identifier) @function.builtin )
98
+ (#any-of? @function.builtin "loop" "setup"))
99
+
100
+ (call_expression
101
+ function: (primitive_type) @function.builtin )
102
+
103
+ (call_expression
104
+ function: (identifier) @constructor
105
+ (#any-of? @constructor "SPISettings" "String"))
106
+
107
+ (declaration
108
+ (type_identifier) @type.builtin
109
+ (function_declarator
110
+ declarator: (identifier) @constructor )
111
+ (#eq? @type.builtin "SPISettings"))
Original file line number Diff line number Diff line change @@ -247,7 +247,8 @@ infrequent (grammar-only changes). It is different from the version of
247
247
" List of suffixes for shared libraries that define tree-sitter languages." )
248
248
249
249
(defconst tree-sitter-langs--langs-with-deps
250
- '( cpp
250
+ '( arduino
251
+ cpp
251
252
commonlisp
252
253
hlsl
253
254
glsl
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ See `tree-sitter-langs-repos'."
101
101
'((ada-mode . ada)
102
102
(agda-mode . agda)
103
103
(agda2-mode . agda)
104
+ (arduino-mode . arduino)
104
105
(fasm-mode . asm)
105
106
(masm-mode . asm)
106
107
(nasm-mode . asm)
@@ -220,6 +221,7 @@ Return nil if there are no bundled patterns."
220
221
; ; TODO: Make this less ad-hoc.
221
222
(dolist (sym (cons lang-symbol
222
223
(pcase lang-symbol
224
+ ('arduino '(cpp c))
223
225
('cpp '(c))
224
226
('hlsl '(cpp c))
225
227
('typescript '(javascript))
You can’t perform that action at this time.
0 commit comments