Skip to content

Commit 88e0323

Browse files
authored
chore: remove unneeded special case (#54)
* chore: remove unneeded special case * chore: remove unneeded array
1 parent fb2c48b commit 88e0323

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Parser.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,7 @@ class TokenParser {
147147
}
148148
case Token.TOK_STAR: {
149149
const left: ExpressionNode = { type: 'Identity' };
150-
const right: ExpressionNode =
151-
this.lookahead(0) === Token.TOK_RBRACKET ? left : this.parseProjectionRHS(bindingPower.Star);
152-
return { type: 'ValueProjection', left, right };
150+
return { type: 'ValueProjection', left, right: this.parseProjectionRHS(bindingPower.Star) };
153151
}
154152
case Token.TOK_FILTER:
155153
return this.led(token.type, { type: 'Identity' });
@@ -189,11 +187,9 @@ class TokenParser {
189187
return { type: 'ExpressionReference', child };
190188
}
191189
case Token.TOK_LPAREN: {
192-
const args: ExpressionNode[] = [];
193190
const expression = this.expression(0);
194-
args.push(expression);
195191
this.match(Token.TOK_RPAREN);
196-
return args[0];
192+
return expression;
197193
}
198194
default:
199195
this.errorToken(token);

0 commit comments

Comments
 (0)