aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/qparser/lexer.ml1
-rw-r--r--lib/qparser/qsp_instruction.mly1
-rw-r--r--lib/qparser/tokens.mly2
-rw-r--r--lib/syntax/t.ml7
4 files changed, 9 insertions, 2 deletions
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
diff --git a/lib/syntax/t.ml b/lib/syntax/t.ml
index ade5e11..7186275 100644
--- a/lib/syntax/t.ml
+++ b/lib/syntax/t.ml
@@ -22,7 +22,12 @@ type boperator =
and uoperator = No | Neg | Add [@@deriving eq, show]
-and assignation_operator = Eq' | Inc (** += *) | Decr (** -= *) | Mult
+and assignation_operator =
+ | Eq'
+ | Inc (** += *)
+ | Decr (** -= *)
+ | Mult
+ | Div_assign
[@@deriving eq, show]
type function_ =