Skip to content

Commit

Permalink
Add support for -= operator
Browse files Browse the repository at this point in the history
  • Loading branch information
ExcaliburZero committed Nov 5, 2023
1 parent efda849 commit cd0ef12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions tree-sitter-quickbms/grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ module.exports = grammar({
operation: $ => choice(
"=",
"+=",
"-=",
"/=",
"^=",
"*",
Expand Down
9 changes: 8 additions & 1 deletion tree-sitter-quickbms/test/corpus/math.bms
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ math BYTESWAP << 4
math BYTESWAP2 >> 4
math BYTESWAP + BYTESWAP2

math ZSIZE -= 8

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

(source_file
Expand Down Expand Up @@ -97,4 +99,9 @@ math BYTESWAP + BYTESWAP2
(math)
(identifier)
(operation)
(identifier)))
(identifier))
(math_statement
(math)
(identifier)
(operation)
(integer_literal)))

0 comments on commit cd0ef12

Please sign in to comment.