chore: add new tactic syntax kind
This commit is contained in:
parent
29e4137e17
commit
cb55ffae94
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 := " => "
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue