From cd0ef127df56861b431159fac78b87232ae9ec93 Mon Sep 17 00:00:00 2001 From: Christopher Wells Date: Sat, 4 Nov 2023 23:06:09 -0700 Subject: [PATCH] Add support for -= operator --- tree-sitter-quickbms/grammar.js | 1 + tree-sitter-quickbms/test/corpus/math.bms | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tree-sitter-quickbms/grammar.js b/tree-sitter-quickbms/grammar.js index 1e07aa7..95315ba 100644 --- a/tree-sitter-quickbms/grammar.js +++ b/tree-sitter-quickbms/grammar.js @@ -278,6 +278,7 @@ module.exports = grammar({ operation: $ => choice( "=", "+=", + "-=", "/=", "^=", "*", diff --git a/tree-sitter-quickbms/test/corpus/math.bms b/tree-sitter-quickbms/test/corpus/math.bms index ab0397b..7706382 100644 --- a/tree-sitter-quickbms/test/corpus/math.bms +++ b/tree-sitter-quickbms/test/corpus/math.bms @@ -20,6 +20,8 @@ math BYTESWAP << 4 math BYTESWAP2 >> 4 math BYTESWAP + BYTESWAP2 +math ZSIZE -= 8 + -------------------------------------------------------------------------------- (source_file @@ -97,4 +99,9 @@ math BYTESWAP + BYTESWAP2 (math) (identifier) (operation) - (identifier))) + (identifier)) + (math_statement + (math) + (identifier) + (operation) + (integer_literal)))