Skip to content

Fix: allow trailing-dot float literals#111

Open
SavioCodes wants to merge 1 commit into
Slynx-Language:mainfrom
SavioCodes:fix/trailing-dot-floats
Open

Fix: allow trailing-dot float literals#111
SavioCodes wants to merge 1 commit into
Slynx-Language:mainfrom
SavioCodes:fix/trailing-dot-floats

Conversation

@SavioCodes
Copy link
Copy Markdown
Collaborator

Summary

  • allow float literals with a trailing dot such as 0.
  • keep malformed numeric patterns like 4..0 rejected
  • avoid stealing the dot from postfix-style token sequences such as pair.0.age
  • add regression coverage in lexer/parser plus a compileable sample source

Why This Matters

  • trailing-dot floats are a reasonable surface improvement on their own
  • the lexer rule is shaped so it does not paint tuple/postfix parsing into a corner later
  • the PR stays small and focused on lexer/syntax instead of reopening tuple access itself

Validation

  • cargo fmt --all
  • cargo test -p frontend --lib
  • cargo test -p frontend --test parser --no-run
  • cargo test --test trailing_float --no-run
  • cargo test --no-run
  • cargo clippy --all-targets --all-features -- -D warnings
  • git diff --check

Local Note

  • integration test executables are compiled locally with --no-run because this machine blocks some test binaries with Windows App Control (os error 4551)

@SavioCodes
Copy link
Copy Markdown
Collaborator Author

The lexer accepts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant