From f5d06b0e8e6aaaa05100165bfc7873d2a8be859c Mon Sep 17 00:00:00 2001
From: Chimrod <>
Date: Fri, 3 Nov 2023 15:16:21 +0100
Subject: Added the /= operator

---
 lib/qparser/lexer.ml            | 1 +
 lib/qparser/qsp_instruction.mly | 1 +
 lib/qparser/tokens.mly          | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

(limited to 'lib/qparser')

diff --git a/lib/qparser/lexer.ml b/lib/qparser/lexer.ml
index 8f3645c..b133a8e 100644
--- a/lib/qparser/lexer.ml
+++ b/lib/qparser/lexer.ml
@@ -211,6 +211,7 @@ let rec parse_token : Lexbuf.t -> token =
   | "+=" -> INCR
   | "-=" -> DECR
   | "*=" -> MULT_EQUAL
+  | "/=" -> DIV_EQUAL
   | '/' -> DIV
   | '*' -> STAR
   | ':' ->
diff --git a/lib/qparser/qsp_instruction.mly b/lib/qparser/qsp_instruction.mly
index b7d2558..ddcbb8d 100644
--- a/lib/qparser/qsp_instruction.mly
+++ b/lib/qparser/qsp_instruction.mly
@@ -85,6 +85,7 @@ assignation_operator:
     | INCR  { T.Inc  }
     | DECR  { T.Decr }
     | MULT_EQUAL { T.Mult }
+    | DIV_EQUAL { T.Div_assign }
 
 inline_instruction:
     | hd = inline_instruction
diff --git a/lib/qparser/tokens.mly b/lib/qparser/tokens.mly
index 6612351..ddbc4cf 100644
--- a/lib/qparser/tokens.mly
+++ b/lib/qparser/tokens.mly
@@ -4,7 +4,7 @@
 %token PLUS
 %token MINUS
 %token INCR             DECR
-%token MULT_EQUAL
+%token MULT_EQUAL       DIV_EQUAL
 %token STAR
 %token DIV
 %token MOD
-- 
cgit v1.2.3