feat: antiquoting rawIdent

This commit is contained in:
Sebastian Ullrich 2020-01-06 21:57:01 +01:00 committed by Leonardo de Moura
parent 912011f12f
commit c6100ed25f

View file

@ -1069,7 +1069,7 @@ fun _ c s =>
{ fn := identFn,
info := mkAtomicInfo "ident" }
@[inline] def rawIdent {k : ParserKind} : Parser k :=
@[inline] def rawIdentNoAntiquot {k : ParserKind} : Parser k :=
{ fn := fun _ => rawIdentFn }
def quotedSymbolFn {k : ParserKind} : ParserFn k :=
@ -1755,6 +1755,10 @@ node kind $ try $ dollarSymbol >> checkNoWsBefore "no space before" >>
def ident {k : ParserKind} : Parser k :=
mkAntiquot "ident" `ident <|> identNoAntiquot
-- `ident` and `rawIdent` produce the same syntax tree, so we reuse the antiquotation kind name
def rawIdent {k : ParserKind} : Parser k :=
mkAntiquot "ident" `ident <|> rawIdentNoAntiquot
def fieldIdxFn : BasicParserFn :=
fun c s =>
let iniPos := s.pos;