fix: disallow . immediately after ..
Rejects the following weird example ``` ``` which was being parsed as ``` ```
This commit is contained in:
parent
d7e732e886
commit
e369c3beb6
3 changed files with 4 additions and 1 deletions
|
|
@ -547,7 +547,8 @@ We use them to implement `macro_rules` and `elab_rules`
|
|||
|
||||
def namedArgument := leading_parser (withAnonymousAntiquot := false)
|
||||
atomic ("(" >> ident >> " := ") >> withoutPosition termParser >> ")"
|
||||
def ellipsis := leading_parser (withAnonymousAntiquot := false) ".."
|
||||
def ellipsis := leading_parser (withAnonymousAntiquot := false)
|
||||
".." >> notFollowedBy "." "`.` immediately after `..`"
|
||||
def argument :=
|
||||
checkWsBefore "expected space" >>
|
||||
checkColGt "expected to be indented" >>
|
||||
|
|
|
|||
1
tests/lean/ellipsisProjIssue.lean
Normal file
1
tests/lean/ellipsisProjIssue.lean
Normal file
|
|
@ -0,0 +1 @@
|
|||
#check Nat.add ...succ
|
||||
1
tests/lean/ellipsisProjIssue.lean.expected.out
Normal file
1
tests/lean/ellipsisProjIssue.lean.expected.out
Normal file
|
|
@ -0,0 +1 @@
|
|||
ellipsisProjIssue.lean:1:17: error: unexpected `.` immediately after `..`
|
||||
Loading…
Add table
Reference in a new issue