Skip to content
Merged
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
13 changes: 1 addition & 12 deletions parser/src/main/java/dev/cel/parser/Lexer.java
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@ private void consumeWhitespaceAndComments() {
case '\n':
case ' ':
case '\r':
case 11: // \v
case '\t':
position++;
break;
Expand Down Expand Up @@ -589,18 +588,12 @@ private Token consumeNumericLiteral() {
}
} else {
advance(1);
if (c == '0' && consume('x')) {
if (c == '0' && (consume('x') || consume('X'))) {
if (!consumeHexDigits()) {
return setError(
start, position, "integral literal missing digits after hexadecimal separator");
}
TokenType tokenType = consumeIntegralSuffix();
if (consumeIf(Lexer::isIdentTrailing)) {
return setError(
start,
position,
tokenType.getSymbol() + " literal has unexpected trailing characters");
}
return makeToken(tokenType, start, position);
}
consumeDigits();
Expand All @@ -622,10 +615,6 @@ && isDigit(content.get(position + 1))) {
}
}
TokenType tokenType = floatingPoint ? TokenType.FLOAT : consumeIntegralSuffix();
if (consumeIf(Lexer::isIdentTrailing)) {
return setError(
start, position, tokenType.getSymbol() + " literal has unexpected trailing characters");
}
return makeToken(tokenType, start, position);
}

Expand Down
Loading
Loading