chore(library/init/lean/parser/token): avoid tryView
This commit is contained in:
parent
21f1d231b8
commit
1a6a87d4e2
1 changed files with 3 additions and 3 deletions
|
|
@ -261,9 +261,9 @@ def number.Parser : Parser :=
|
|||
lift $ try $ do {
|
||||
it ← leftOver,
|
||||
stx ← token,
|
||||
some _ ← pure $ tryView number stx | error "" (DList.singleton "number") it,
|
||||
pure stx
|
||||
} <?> "number"
|
||||
if stx.isOfKind number then pure stx
|
||||
else error "" (DList.singleton "number") it
|
||||
}
|
||||
|
||||
instance number.Parser.tokens : Parser.HasTokens (number.Parser : Parser) := default _
|
||||
instance number.Parser.view : Parser.HasView number.View (number.Parser : Parser) :=
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue