Skip to content

Commit 8c4ae5a

Browse files
authoredMar 21, 2022
Atmel AVR Assembly: Fixed &= and |= operators (#3395)
1 parent 6a215fe commit 8c4ae5a

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed
 

‎components/prism-asmatmel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ Prism.languages.asmatmel = {
3838
pattern: /\b[acznvshtixy]\b/i,
3939
alias: 'variable'
4040
},
41-
'operator': />>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/,
41+
'operator': />>=?|<<=?|&[&=]?|\|[\|=]?|[-+*/%^!=<>?]=?/,
4242
'punctuation': /[(),:]/
4343
};

‎components/prism-asmatmel.min.js

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

‎tests/languages/asmatmel/operator_feature.test

+44-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
OUT PORTB,x
22
ldi r17,(1<<PD07)
33

4+
+ - * / ^
5+
+= -= *= /= ^=
6+
>> >>= << <<=
7+
& && &= | || |=
8+
< <= > >= != ==
9+
! = ? ?=
10+
411
----------------------------------------------------
512

613
[
@@ -16,7 +23,43 @@ ldi r17,(1<<PD07)
1623
["decimal-number", "1"],
1724
["operator", "<<"],
1825
["constant", "PD07"],
19-
["punctuation", ")"]
26+
["punctuation", ")"],
27+
28+
["operator", "+"],
29+
["operator", "-"],
30+
["operator", "*"],
31+
["operator", "/"],
32+
["operator", "^"],
33+
34+
["operator", "+="],
35+
["operator", "-="],
36+
["operator", "*="],
37+
["operator", "/="],
38+
["operator", "^="],
39+
40+
["operator", ">>"],
41+
["operator", ">>="],
42+
["operator", "<<"],
43+
["operator", "<<="],
44+
45+
["operator", "&"],
46+
["operator", "&&"],
47+
["operator", "&="],
48+
["operator", "|"],
49+
["operator", "||"],
50+
["operator", "|="],
51+
52+
["operator", "<"],
53+
["operator", "<="],
54+
["operator", ">"],
55+
["operator", ">="],
56+
["operator", "!="],
57+
["operator", "=="],
58+
59+
["operator", "!"],
60+
["operator", "="],
61+
["operator", "?"],
62+
["operator", "?="]
2063
]
2164

2265
----------------------------------------------------

0 commit comments

Comments
 (0)