Skip to content

Commit

Permalink
Atmel AVR Assembly: Fixed &= and |= operators (#3395)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Mar 21, 2022
1 parent 6a215fe commit 8c4ae5a
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/prism-asmatmel.js
Expand Up @@ -38,6 +38,6 @@ Prism.languages.asmatmel = {
pattern: /\b[acznvshtixy]\b/i,
alias: 'variable'
},
'operator': />>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/,
'operator': />>=?|<<=?|&[&=]?|\|[\|=]?|[-+*/%^!=<>?]=?/,
'punctuation': /[(),:]/
};
2 changes: 1 addition & 1 deletion components/prism-asmatmel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 44 additions & 1 deletion tests/languages/asmatmel/operator_feature.test
@@ -1,6 +1,13 @@
OUT PORTB,x
ldi r17,(1<<PD07)

+ - * / ^
+= -= *= /= ^=
>> >>= << <<=
& && &= | || |=
< <= > >= != ==
! = ? ?=

----------------------------------------------------

[
Expand All @@ -16,7 +23,43 @@ ldi r17,(1<<PD07)
["decimal-number", "1"],
["operator", "<<"],
["constant", "PD07"],
["punctuation", ")"]
["punctuation", ")"],

["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "^"],

["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "^="],

["operator", ">>"],
["operator", ">>="],
["operator", "<<"],
["operator", "<<="],

["operator", "&"],
["operator", "&&"],
["operator", "&="],
["operator", "|"],
["operator", "||"],
["operator", "|="],

["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "!="],
["operator", "=="],

["operator", "!"],
["operator", "="],
["operator", "?"],
["operator", "?="]
]

----------------------------------------------------
Expand Down

0 comments on commit 8c4ae5a

Please sign in to comment.