Commit bac035d4 authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur 🏢
Browse files

bug fix operator like =:= are now allowed

parent 44b6de80
......@@ -687,8 +687,8 @@ Scan c0=:'+' input co
Scan c0=:'=' input co
# (eof, c, input) = ReadNormalChar input
| eof = (EqualToken, input)
| c == ':' = (DefinesColonToken, input)
| c == '>' = (DoubleArrowToken, input)
| c == ':' = possibleKeyToken DefinesColonToken [c, c0] co input
| c == '>' = possibleKeyToken DoubleArrowToken [c, c0] co input
| isSpecialChar c = ScanOperator 1 input [c, c0] co
= (EqualToken, charBack input)
Scan c0=:':' input co
......@@ -726,6 +726,13 @@ Scan c input co
| isSpecialChar c = ScanOperator 0 input [c] co
= (ErrorToken ScanErrIllegal, input)
possibleKeyToken :: !Token ![Char] !Context !Input -> (!Token, !Input)
possibleKeyToken token reversedPrefix context input
# (eof, c, input) = ReadNormalChar input
| eof = (token, input)
| isSpecialChar c = ScanOperator 2 input [c : reversedPrefix] context
= (token, charBack input)
new_exp_char ',' = True
new_exp_char '[' = True
new_exp_char '(' = True
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment