Commit graph

23 commits

Author SHA1 Message Date
Leonardo de Moura
3d6cc2de08 feat: add notFollowedByCategoryToken parser 2020-09-26 15:53:23 -07:00
Leonardo de Moura
b0564a32b9 feat: add AttrM
We are going to use `AttrM` to implement solution 2 described at https://github.com/leanprover/lean4/issues/175
2020-09-21 16:44:20 -07:00
Leonardo de Moura
cab56d1e1b chore: do not invoke the hooks from addImported
@Kha I am working on issue
https://github.com/leanprover/lean4/issues/175

I am using solution 2 described there. The hooks will be at `AttrM`
instead of `CoreM`.

AFAICT code deleted by this commit is not necessary.
2020-09-21 16:28:07 -07:00
Leonardo de Moura
f0ab743ad0 chore: remove temporary workaround 2020-09-19 18:00:45 -07:00
Leonardo de Moura
fe2d3be821 feat: parser priorities 2020-09-19 17:55:17 -07:00
Leonardo de Moura
f679b7d803 feat: add notFollowedBy to syntax 2020-09-19 15:43:44 -07:00
Leonardo de Moura
17d4117637 chore: remove temporary hacks 2020-09-19 14:21:38 -07:00
Leonardo de Moura
71de0c8eb9 chore: rename category syntax to stx
Reason: `syntax` is a keywork. So, we can't write `macro "boo" x:syntax`
2020-09-19 14:11:35 -07:00
Sebastian Ullrich
c4761974b7 fix: runParserCategory: ensure EOI 2020-09-17 08:12:28 -07:00
Leonardo de Moura
5ffbada3df feat: add Lean.MonadEnv, Lean.MonadError, and Lean.MonadOptions
This is the first set of polymorphic methods. I will add more later,
and keep reducing code duplication.

cc @Kha
2020-08-22 16:00:43 -07:00
Leonardo de Moura
916b395d1b chore: cleanup 2020-08-21 09:29:09 -07:00
Sebastian Ullrich
5f30d62d9b feat: [runParserAttributeHooks] 2020-08-21 16:38:41 +02:00
Sebastian Ullrich
14211cc932 refactor: more core 2020-08-21 15:51:37 +02:00
Leonardo de Moura
c55376a1ba chore: more conventional MonadIO 2020-08-20 11:13:10 -07:00
Leonardo de Moura
68a4c145f7 refactor: implement attribute hooks using CoreM
We were using a mix of `IO` and `Except`
2020-08-19 14:44:54 -07:00
Sebastian Ullrich
eeaf20080c refactor: register parenthesizer compiler as hook
/cc @leodemoura
2020-08-18 16:02:33 +02:00
Sebastian Ullrich
58e7af0d7f chore: simplify parser attribute hook registration
It is unlikely to be needed outside the stdlib
2020-08-18 15:52:23 +02:00
Sebastian Ullrich
dab53c4986 feat: add [parserAttributeHook] attribute 2020-08-18 14:41:36 +02:00
Sebastian Ullrich
92162ffb7f feat: check parenthesizer attribute arguments 2020-08-14 19:05:02 +02:00
Sebastian Ullrich
72310a4aee fix: parenthesizer: ParserDescr.parsers should not be assumed to be a registered parser, or even one with a kind 2020-08-14 19:05:02 +02:00
Sebastian Ullrich
46f5670ba3 chore: Lean.Parser.Parser ~> Lean.Parser.Basic 2020-08-13 18:44:13 +02:00
Sebastian Ullrich
a0f825f67f refactor: move Lean.PrettyPrinter.Parenthesizer in between Lean.Parser.Parser and Lean.Parser.Extension 2020-08-13 18:44:13 +02:00
Sebastian Ullrich
f7e004b44a refactor: split Lean.Parser.Parser 2020-08-13 18:44:13 +02:00