Skip to content

Commit

Permalink
cleanup preprocess
Browse files Browse the repository at this point in the history
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
  • Loading branch information
Licenser committed May 12, 2021
1 parent aee045b commit 98d4c92
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 307 deletions.
2 changes: 1 addition & 1 deletion tests/script_errors/lexer_triple_colon/error.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Error:
1 | # we can't have triple colons
2 | a:::b()
| ^^^ Found the token `:::` but expected one of `!=`, `%`, `&`, `(`, `)`, `*`, `+`, `,`, `-`, `.`, `.`, `/`, `:`, `::`, `;`, `<`, `<<`, `<=`, `<end-of-stream>`, `==`, `=>`, `>`, `>=`, `>>`, `>>>`, `[`, `]`, `^`, `and`, `case`, `default`, `end`, `of`, `or`, `when`, `xor`, `|`, `}`
| ^^^ Found the token `:::` but expected one of `!=`, `%`, `&`, `(`, `)`, `*`, `+`, `,`, `-`, `.`, `.`, `/`, `:`, `::`, `;`, `<`, `<<`, `<=`, `<end-of-stream>`, `==`, `=>`, `>`, `>=`, `>>`, `>>>`, `[`, `]`, `^`, `and`, `case`, `default`, `end`, `of`, `or`, `when`, `xor`, `}`
| NOTE: Did you mean to use `::`?
10 changes: 5 additions & 5 deletions tremor-script/src/grammar.lalrpop
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ AndExprImut: ImutExprRaw<'input> = {

/// Bitwise or
BitOrExprImut: ImutExprRaw<'input> = {
<o:BinOp<BinBitOr, BitOrExprImut, BitXorExprImut>> => <>,
// <o:BinOp<BinBitOr, BitOrExprImut, BitXorExprImut>> => <>,
BitXorExprImut => <>,
}

Expand Down Expand Up @@ -1243,9 +1243,9 @@ BinXor: BinOpKind = {
BinAnd: BinOpKind = {
"and" => BinOpKind::And,
}
BinBitOr: BinOpKind = {
"|" => BinOpKind::BitOr,
}
// BinBitOr: BinOpKind = {
// "|" => BinOpKind::BitOr,
// }
BinBitXor: BinOpKind = {
"^" => BinOpKind::BitXor,
}
Expand Down Expand Up @@ -1343,7 +1343,7 @@ extern {
">>>" => Token::RBitShiftUnsigned,
"<<" => Token::LBitShift,
"!" => Token::BitNot,
"|" => Token::BitOr,
// "|" => Token::BitOr,
"^" => Token::BitXor,
"&" => Token::BitAnd,
"+" => Token::Add,
Expand Down
Loading

0 comments on commit 98d4c92

Please sign in to comment.