Skip to content

Validate uppercase exponent underscore placement#16777

Open
0xjc65eth wants to merge 1 commit into
argotorg:developfrom
0xjc65eth:fix-uppercase-exponent-underscore
Open

Validate uppercase exponent underscore placement#16777
0xjc65eth wants to merge 1 commit into
argotorg:developfrom
0xjc65eth:fix-uppercase-exponent-underscore

Conversation

@0xjc65eth

Copy link
Copy Markdown
Contributor

Summary

  • reject decimal literals with underscores adjacent to uppercase E exponent markers
  • extend the existing decimal underscore syntax test with 12_E34 and 12E_34

Why
The scanner accepts both e and E exponent markers, but the post-lex underscore checks only searched for _e and e_. This let malformed uppercase forms bypass the same validation applied to lowercase forms.

Testing

  • python3 offset check for the updated syntax test expectations
  • scripts/error_codes.py --check
  • scripts/check_style.sh libsolidity/analysis/SyntaxChecker.cpp test/libsolidity/syntaxTests/parsing/lexer_numbers_with_underscores_decimal_fail.sol
  • git diff --check

Closes #16740.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uppercase E exponent literal evades underscore validation check

2 participants