Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cringe/Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public enum TokenType
Statement, // READ OUT, WRITE IN, COME FROM, ABSTAIN FROM, GIVE UP, NEXT, <-, etc.
Separator, // " ' + BY
Var, // . , ; : #
UnaryOp, // & v V ?
UnaryOp, // & v V ? | -
BinaryOp, // $ ~
Sub, // SUB
Word, // any other [a-zA-Z]+ sequence
Expand Down
2 changes: 1 addition & 1 deletion cringe/Tokenizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public Token NextToken()
pos++;
return new Token(TokenType.Var, c.ToString(), startPos);

case '&': case '?':
case '&': case '?': case '|': case '-':
pos++;
return new Token(TokenType.UnaryOp, c.ToString(), startPos);

Expand Down
Loading