in client/src/lang/parser.ts [91:112]
private expr(): CqlExpr {
const tokenType = this.peek().tokenType;
switch (tokenType) {
case TokenType.LEFT_BRACKET:
return new CqlExpr(this.group());
case TokenType.STRING:
return new CqlExpr(this.str());
case TokenType.CHIP_KEY_POSITIVE:
case TokenType.CHIP_KEY_NEGATIVE: {
return new CqlExpr(this.field());
}
case TokenType.AND:
case TokenType.OR: {
throw this.error(
`An \`${tokenType.toString()}\` keyword must have a search term before and after it, e.g. \`this ${tokenType.toString()} that\`.`
);
}
default: {
throw this.unexpectedTokenError();
}
}
}