Skip to content

Commit

Permalink
fix: do not ban .. with a . on the next line
Browse files Browse the repository at this point in the history
Without this change,
```lean
example : True := by
  refine' trivial ..
  . trivial
```
is a parse error.
  • Loading branch information
eric-wieser committed Aug 5, 2024
1 parent 1a12f63 commit bb66d4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lean/Parser/Term.lean
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ 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)
".." >> notFollowedBy "." "`.` immediately after `..`"
".." >> notFollowedBy (checkNoWsBefore >> ".") "`.` immediately after `..`"
def argument :=
checkWsBefore "expected space" >>
checkColGt "expected to be indented" >>
Expand Down
3 changes: 3 additions & 0 deletions tests/lean/run/4768.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
example : True := by
refine' trivial ..
. trivial

0 comments on commit bb66d4d

Please sign in to comment.