Removed pipeline and compose operators

This commit is contained in:
Brandon Dyck 2023-06-29 12:54:40 -06:00
parent f1b373c7e6
commit 9b2f0cb968
2 changed files with 3 additions and 14 deletions

View File

@ -104,10 +104,6 @@ public enum TokenType
LessEqual, GreaterEqual,
SingleArrow,
DoubleArrow,
PipeRight,
PipeLeft,
ComposeRight,
ComposeLeft,
If, Then, Else,
When,
Is,
@ -289,6 +285,7 @@ class Scanner
case '.': addToken(TokenType.Period); break;
case '*': addToken(TokenType.Asterisk); break;
case '/': addToken(TokenType.Slash); break;
case '|': addToken(TokenType.Pipe); break;
case '-':
addToken(match('>') ? TokenType.SingleArrow : TokenType.Minus);
break;
@ -304,17 +301,10 @@ class Scanner
TokenType.Equal);
break;
case '<':
addToken(match('=') ? TokenType.LessEqual :
match('<') ? TokenType.ComposeLeft :
match('|') ? TokenType.PipeLeft :
TokenType.Less);
addToken(match('=') ? TokenType.LessEqual : TokenType.Less);
break;
case '>':
addToken(match('=') ? TokenType.GreaterEqual :
match('>') ? TokenType.ComposeRight : TokenType.Greater);
break;
case '|':
addToken(match('>') ? TokenType.PipeRight : TokenType.Pipe);
addToken(match('=') ? TokenType.GreaterEqual : TokenType.Greater);
break;
case '"': stringLiteral(); break;
case '#':

View File

@ -17,7 +17,6 @@ binary -> expression operator expression ;
operator ->
| "==" | "!=" | "<" | "<=" | ">" | ">="
| "+" | "-" | "*" | "/"
| "|>" | "<|" | ">>" | "<<"
| "++" ;
pattern -> "_" | record_pattern | variant_pattern ;
record_pattern -> "{" ( identifier ( "=" pattern )? ( "," identifier ( "=" pattern )? )* ) ( "|" identifier ) "}"