parent
48711ce6eb
commit
e7691f37c6
4 changed files with 9 additions and 1 deletions
|
|
@ -788,7 +788,7 @@ syntax inductionAlt := ppDedent(ppLine) inductionAltLHS+ " => " (hole <|> synth
|
|||
After `with`, there is an optional tactic that runs on all branches, and
|
||||
then a list of alternatives.
|
||||
-/
|
||||
syntax inductionAlts := " with" (ppSpace tactic)? withPosition((colGe inductionAlt)+)
|
||||
syntax inductionAlts := " with" (ppSpace colGt tactic)? withPosition((colGe inductionAlt)+)
|
||||
|
||||
/--
|
||||
Assuming `x` is a variable in the local context with an inductive type,
|
||||
|
|
|
|||
5
tests/lean/inductionParse.lean
Normal file
5
tests/lean/inductionParse.lean
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/-! should not parse `done` as part of `induction` -/
|
||||
|
||||
example (a : Nat) : True := by
|
||||
induction a with
|
||||
done
|
||||
1
tests/lean/inductionParse.lean.expected.out
Normal file
1
tests/lean/inductionParse.lean.expected.out
Normal file
|
|
@ -0,0 +1 @@
|
|||
inductionParse.lean:4:18-5:6: error: unexpected identifier; expected '|'
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
/-! should not parse `case` as a `generalizing` variable -/
|
||||
|
||||
example (a b : Nat) : True := by
|
||||
induction a generalizing b
|
||||
case zero => trivial
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue