summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lexer.mll2
-rw-r--r--src/parser.mly6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lexer.mll b/src/lexer.mll
index 7ee37035..e8ee92db 100644
--- a/src/lexer.mll
+++ b/src/lexer.mll
@@ -145,7 +145,7 @@ rule token = parse
| "@" { (At(r"@")) }
| "|" { Bar }
| "^" { (Carrot(r"^")) }
- | ":" { Colon }
+ | ":" { Colon(r ":") }
| "," { Comma }
| "." { Dot }
| "/" { (Div(r "/")) }
diff --git a/src/parser.mly b/src/parser.mly
index c00eddc3..b8b0e43a 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -134,7 +134,7 @@ let star = "*"
%token Div_ Mod Quot Rem
-%token Bar Colon Comma Dot Eof Minus Semi Under
+%token Bar Comma Dot Eof Minus Semi Under
%token Lcurly Rcurly Lparen Rparen Lsquare Rsquare
%token BarBar BarSquare BarBarSquare ColonEq DotDot ColonGt MinusGt LtBar SquareBar SquareBarBar
@@ -145,7 +145,7 @@ let star = "*"
%token <string> String Bin Hex
%token <string> Amp At Carrot Div Eq Excl Gt Lt Plus Star Tilde
-%token <string> AmpAmp CarrotCarrot ColonColon EqDivEq EqEq ExclEq ExclExcl
+%token <string> AmpAmp CarrotCarrot Colon ColonColon EqDivEq EqEq ExclEq ExclExcl
%token <string> GtEq GtEqPlus GtGt GtGtGt GtPlus HashGtGt HashLtLt
%token <string> LtEq LtEqPlus LtGt LtLt LtLtLt LtPlus StarStar TildeCarrot
@@ -207,6 +207,8 @@ id:
{ idl (DeIid("||")) }
| Lparen Deinfix CarrotCarrot Rparen
{ idl (DeIid($3)) }
+ | Lparen Deinfix Colon Rparen
+ { idl (DeIid($3)) }
| Lparen Deinfix ColonColon Rparen
{ idl (DeIid($3)) }
| Lparen Deinfix EqDivEq Rparen