lean4-htt/src/Lean/Parser
Robert J. Simmons 2231d9b488
feat: improve error messages for ambiguous 3.toDecmial syntax (#10488)
This PR changes the way that scientific numerals are parsed in order to
give better error messages for (invalid) syntax like `32.succ`.

Example:

```lean4
#check 32.succ
```

Before, the error message is:

```
unexpected identifier; expected command
```

This is because `32.` parses as a complete float, and `#check 32.`
parses as a complete command, so `succ` is being read as the start of a
new command.

With this change, the error message will move from the `succ` token to
the `32` token (which isn't totally ideal from my perspective) but gives
a less misleading error message and corresponding suggestion:

```
unexpected identifier after decimal point; consider parenthesizing the number
```
2025-09-26 01:12:10 +00:00
..
Tactic feat: docstrings with Verso syntax (#10307) 2025-09-10 07:03:57 +00:00
Term chore: cleanup and better docs for #10479 (#10504) 2025-09-23 09:02:07 +00:00
Attr.lean chore: remove syntax for extern arity specifications (#9556) 2025-07-26 00:44:36 +00:00
Basic.lean feat: improve error messages for ambiguous 3.toDecmial syntax (#10488) 2025-09-26 01:12:10 +00:00
Command.lean doc: meta modifier (#10554) 2025-09-25 11:45:54 +00:00
Do.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Extension.lean feat: add unicode(...) parser syntax and pp.unicode option (#10373) 2025-09-14 04:40:03 +00:00
Extra.lean feat: overhaul meta system (#10362) 2025-09-17 21:04:29 +00:00
Level.lean refactor: remove some unnecessary meta imports (#9542) 2025-07-25 15:14:02 +00:00
Module.lean feat: overhaul meta system (#10362) 2025-09-17 21:04:29 +00:00
StrInterpolation.lean feat: docstrings with Verso syntax (#10307) 2025-09-10 07:03:57 +00:00
Syntax.lean feat: enable notationItem in "mixfix" notation commands (#10378) 2025-09-14 18:54:36 +00:00
Tactic.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
Term.lean fix: invalid docstring suggestions for attributes (#10522) 2025-09-23 16:18:21 +00:00
Types.lean feat: add a stop position field to the parser (#10043) 2025-08-23 18:29:51 +00:00