feat(library/init/lean/parser/parser): notation
This commit is contained in:
parent
43fd0eeb94
commit
0fe8fd1307
1 changed files with 6 additions and 0 deletions
|
|
@ -202,6 +202,9 @@ abbrev TrailingParser := Parser trailing
|
|||
{ info := andthenInfo p.info q.info,
|
||||
fn := andthenFn p.fn q.fn }
|
||||
|
||||
instance hashAndthen {k : ParserKind} : HasAndthen (Parser k) :=
|
||||
⟨andthen⟩
|
||||
|
||||
@[inline] def nodeFn {k : ParserKind} (n : SyntaxNodeKind) (p : ParserFn k) : ParserFn k
|
||||
| a c s :=
|
||||
let iniSz := s.stackSize in
|
||||
|
|
@ -231,6 +234,9 @@ abbrev TrailingParser := Parser trailing
|
|||
{ info := orelseInfo p.info q.info,
|
||||
fn := orelseFn p.fn q.fn }
|
||||
|
||||
instance hashOrelse {k : ParserKind} : HasOrelse (Parser k) :=
|
||||
⟨orelse⟩
|
||||
|
||||
@[noinline] def noFirstTokenInfo (info : ParserInfo) : ParserInfo :=
|
||||
{ updateTokens := info.updateTokens }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue