Leonardo de Moura
13c2a8ff51
chore: remove #lang lean4 header
2020-10-25 09:54:07 -07:00
Leonardo de Moura
af968c60e6
chore: cleanup
2020-10-22 07:32:23 -07:00
Leonardo de Moura
f8971200af
chore: move to new frontend
2020-10-20 17:01:29 -07:00
Sebastian Ullrich
490c482af2
fix: allow [runParserAttributeHooks] on imported declarations, add non-builtin variant
2020-10-20 09:39:50 +02:00
Leonardo de Moura
ef18b0ab49
chore: use [builtinInit]
2020-10-19 14:58:38 -07:00
Leonardo de Moura
84a0cd1f59
feat: add [builtinInit] attribute
2020-10-19 14:51:23 -07:00
Leonardo de Moura
e54a207986
refactor: provide Options to lean_eval_const
...
add `ImportM` monad for `addImportedFn`
cc @Kha
2020-10-19 10:21:38 -07:00
Leonardo de Moura
60e4f4fee1
feat: improve notFollowedBy error messages
2020-10-15 17:01:10 -07:00
Leonardo de Moura
3bd75d51d5
feat: add ParserDescr.noWs
2020-10-09 16:26:49 -07:00
Leonardo de Moura
7013ea4098
feat: add interpolatedStr to ParserDescr and Syntax
2020-10-09 14:04:53 -07:00
Leonardo de Moura
0275d23ad7
fix: ignore $ at notFollowedByCategoryToken when inside quotations
2020-09-26 17:57:26 -07:00
Leonardo de Moura
6892a957d6
feat: trailing ; in indented "do" sequences
...
cc @Kha
2020-09-26 16:08:30 -07:00
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