chore: add new tactic syntax kind

This commit is contained in:
Leonardo de Moura 2020-09-28 14:58:31 -07:00
parent 29e4137e17
commit cb55ffae94
2 changed files with 4 additions and 1 deletions

View file

@ -74,7 +74,6 @@ def matchAlts : Parser := group $ withPosition $ (optional "| ") >> sepBy1 match
def withIds : Parser := optional (" with " >> many1 ident')
@[builtinTacticParser] def «injection» := parser! nonReservedSymbol "injection " >> termParser >> withIds
def seq1 := node `Lean.Parser.Tactic.seq $ sepBy1 tacticParser "; " true
@[builtinTacticParser] def paren := parser! "(" >> seq1 >> ")"
@[builtinTacticParser] def nestedTactic := tacticSeqBracketed
@[builtinTacticParser] def orelse := tparser!:2 " <|> " >> tacticParser 1

View file

@ -28,6 +28,10 @@ def tacticSeqBracketed : Parser :=
parser! "{" >> sepBy tacticParser "; " true >> "}"
def tacticSeq :=
nodeWithAntiquot "tacticSeq" `Lean.Parser.Tactic.tacticSeq $ tacticSeqBracketed <|> tacticSeq1Indented
/- Raw sequence for quotation and grouping -/
def seq1 := parser! sepBy1 tacticParser "; " true
end Tactic
def darrow : Parser := " => "