Repository navigation
fix(lexer): scientific notation without a decimal point (1e6, 2E-3, 1E+3) - #98
Merged
Merged
Conversation
1e6 lexed as Int("1e") + Int("6"), and the "e" suffix desugared to
[unit 1 :e] -> runtime error "unknown unit: e". Add a Float rule for
digits+exponent that wins by longest match; unit suffixes still work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ecto
added a commit
to muni-works/vcad
that referenced
this pull request
Nov 8, 2026
…attern aliases
From fuzzing create_cad_loon in the Mac app:
- union/intersection/difference are variadic (n >= 1), subject-last fold;
[difference A B] = B - A is unchanged and now documented in lib.loon.
- cube/cylinder/sphere/cone (and -n forms) reject non-positive or
non-finite dimensions instead of silently abs()-ing (-10 -> 10) or
building zero-volume parts; a cone may have one zero radius, not both.
- Argument type errors name the stdlib function and argument position
("translate: argument 4 expected Solid, got number 3") and, when the
call site is unique in the source, its line/col.
- linear_pattern / circular_pattern aliases for the kebab-case forms.
- Scientific-notation test added (ignored until the loon-lang rev bump
for ecto/loon#98).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ecto
added a commit
to muni-works/vcad
that referenced
this pull request
Nov 8, 2026
…tion) Bumps the root Cargo.toml rev + Cargo.lock and un-ignores scientific_notation_literals_are_numbers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1e6lexed asInt("1e")+Int("6"); theesuffix then desugared to[unit 1 :e]→ runtime "unknown unit: e" (found fuzzing vcad'screate_cad_loonwith[cube 1e6 1e6 1e6]).Adds a Float token rule for
digits [eE] [+-]? digits (suffix)?, which wins over the Int unit-suffix rule by longest match. Unit suffixes (10mm,2.5in,90deg,1e3mm) still desugar to[unit …].Tests:
parse_scientific_notation_without_decimal_point,unit_suffixes_still_desugar.cargo test -p loon-langgreen on Linux (553 lib tests). Note:cargo clippy -p loon-lang -- -D warningsalready fails with 285 errors on origin/main; this PR doesn't change that.🤖 Generated with Claude Code