feat: implement scientific notation parsing for number literals in wren compiler
Add support for parsing scientific notation (e.g., 2.55e2, -2.55e-2) in the readNumber function of wren_compiler.c. The implementation handles optional negative exponents, validates that exponent digits follow 'e'/'E', and emits a lex error for unterminated scientific notation. Also adds comprehensive test cases covering valid scientific literals, missing exponents, floating exponents, missing fractional parts, and multiple exponents.
This commit is contained in:
@@ -13,4 +13,5 @@ Raymond Sohn <raymondsohn@gmail.com>
|
||||
Thorbjørn Lindeijer <bjorn@lindeijer.nl>
|
||||
Patricio Mac Adden <patriciomacadden@gmail.com>
|
||||
Evan Hahn <me@evanhahn.com>
|
||||
Starbeamrainbowlabs <contact@starbeamrainbowlabs.com>
|
||||
Starbeamrainbowlabs <contact@starbeamrainbowlabs.com>
|
||||
Alexander Roper <minirop@gmail.com>
|
||||
Reference in New Issue
Block a user