Leonardo de Moura
6d8058034a
chore: basic conv mode parsers
2021-09-01 15:35:32 -07:00
Leonardo de Moura
d67c633ca1
feat: allow user to set "behavior" at declare_syntax_cat
2021-09-01 13:28:12 -07:00
Leonardo de Moura
56961060d4
fix: use rawIdent at eraseAttr parser
...
Reason: some attribute names are also keywords (e.g., `instance`).
2021-08-31 15:07:21 -07:00
Sebastian Ullrich
e632c14f3f
chore: align stx precedence in syntax to the new one in macro
2021-08-24 10:11:12 -07:00
Leonardo de Moura
79e6732fc6
fix: update tokenTable at withNamespace parser combinator
...
It also moves `withOpen` and `withOpenDecl` applications to simplify
their definitions and make sure we do not need to reset the cache.
2021-08-23 09:41:36 -07:00
Leonardo de Moura
7edc42fdfc
fix: scoped command after open command
...
The issue was reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Ending.20a.20command
2021-08-23 08:29:30 -07:00
Leonardo de Moura
d93c4317d1
feat: add withOpenDecl and withOpen parsers
...
It allow us to process `open .. in ..` while parsing.
This is useful for activating a scoped parser while parsing.
TODO: `openOnly` and `openHiding`, these two cases are rarely used
with `open .. in ..`
closes #529
2021-08-22 20:50:35 -07:00
Leonardo de Moura
54316fabb4
feat: add nonrec parser
2021-08-21 16:39:18 -07:00
Leonardo de Moura
519bb1e7d4
feat: add open scoped parser
2021-08-21 07:06:50 -07:00
Sebastian Ullrich
9c15f94be3
perf: do not use parsers from the current stage inside quotations by default
2021-08-12 07:51:50 -07:00
Sebastian Ullrich
20accf5105
feat: revise macro parameter syntax
2021-08-12 07:48:42 -07:00
Leonardo de Moura
09c2b668e6
feat: allow multiple sources in the structure instance parser
...
This commit also fixes some macros, and make sure the elaborator still
works, but it does not support multiple sources yet.
2021-08-11 13:07:56 -07:00
Leonardo de Moura
3293e9ef08
chore: fix module comments, they must occur after the imports
2021-08-06 14:02:42 -07:00
Leonardo de Moura
5796b93134
fix: support for /-! at whitespace
2021-08-06 13:52:32 -07:00
Leonardo de Moura
8d5964ce19
feat: add module doc parser
2021-08-06 13:17:56 -07:00
Leonardo de Moura
257e38394f
feat: add strict implicit binder annotation
2021-08-03 19:10:51 -07:00
Leonardo de Moura
c913886938
chore: add private annotations
2021-08-03 18:15:39 -07:00
Leonardo de Moura
f9672fe4c6
feat: add optional visibitily modifier to initialize and builtin_initialize commands
2021-08-03 14:37:22 -07:00
Daniel Selsam
6940166db4
chore: rebase and rm rawPos
2021-08-03 09:13:18 +02:00
Daniel Selsam
89364b802b
feat: top-down heuristic delaboration
2021-08-03 09:13:18 +02:00
Leonardo de Moura
bba9353619
fix: make sure isDefEqOffset does not expose kernel nat literals
...
This issue is similar to a bug where `isDefEqOffset` was exposing
`Nat.add` when processing `HAdd.hAdd`.
Fixes #561
The example at issue #561 is now working, but we may have other places
where raw literals are being accidentally exposed.
2021-08-02 11:27:00 -07:00
Sebastian Ullrich
32bea73708
fix: ensure hygiene of double-quoted names
...
Fixes #586
2021-07-30 07:17:50 -07:00
Leonardo de Moura
fb3ea8109f
fix: structure instance parser
2021-07-27 12:54:17 -07:00
Wojciech Nawrocki
cfb5d34dd3
fix: parser arity
2021-07-24 10:45:28 +02:00
Wojciech Nawrocki
4a3c172ac9
feat: parametrised deriving handlers
2021-07-24 10:45:28 +02:00
Sebastian Ullrich
5866e2bbb7
chore: use register_parser_alias where possible
...
Fixes #494
2021-07-22 16:28:06 +02:00
Sebastian Ullrich
42e681a5a6
fix: make unterminated comments consume all input
...
Fixes #549
2021-07-22 15:55:12 +02:00
Sebastian Ullrich
8637220927
fix: make precedence mandatory for mixfix commands
...
Resolves #577
2021-07-19 13:18:58 -07:00
Wojciech Nawrocki
a8d599a955
fix: typo
2021-07-15 21:57:55 +02:00
Leonardo de Moura
f4a7ffd8c8
chore: fix codebase and tests
2021-06-29 17:14:52 -07:00
Leonardo de Moura
90a79a0b06
chore: remove command universes
...
Now, `universe` may declare many universes. The goal is to make it
consistent with the `variable` command
2021-06-29 17:01:07 -07:00
Sebastian Ullrich
3f4ab0a2af
feat: implement elab_rules
...
TODO: infer category from quotation type
2021-06-21 10:17:26 -07:00
Sebastian Ullrich
9101c9d5da
feat: support docstrings on syntax/macro/...
2021-06-21 10:17:26 -07:00
Sebastian Ullrich
619873c842
feat: make System.FilePath opaque
2021-05-28 14:19:59 +02:00
Sebastian Ullrich
e918e39ed0
feat: have: remove unnecessary whitespace check and allow name- and type-less have
2021-05-25 14:25:14 +02:00
Leonardo de Moura
8b4cdcfddd
chore: fix mutable variable shadowing
2021-05-22 19:24:41 -07:00
Sebastian Ullrich
5b6051b15e
feat: revise have syntax
2021-05-20 15:17:36 -07:00
Sebastian Ullrich
23f0c1051c
feat: improve ToString/Quote Name
2021-05-19 09:34:01 +02:00
Leonardo de Moura
3b7bcdc449
feat: add endPos field to SourceInfo.original
...
We need an update stage0 before we use it.
2021-05-17 14:32:58 -07:00
Leonardo de Moura
71cd067e94
feat: add helper command
2021-05-13 22:10:35 -07:00
Sebastian Ullrich
baa2781eb0
chore: remove built-in emptyC syntax/elaborator
2021-05-06 22:07:03 +02:00
Leonardo de Moura
e8aa02cd51
feat: closes #415
2021-05-03 18:04:01 -07:00
Leonardo de Moura
f8ac5d25dd
feat: add notation for helper elaboration function
...
This similar to `binrel%` but for binary operators.
See issue #382
2021-04-30 17:14:17 -07:00
tydeu
44f45f426c
feat: add scoped macro_rules ( #432 )
2021-04-30 09:05:09 +02:00
Sebastian Ullrich
f0960b7f89
fix: ignore antiquotations outside quotations
2021-04-29 13:33:48 +02:00
Sebastian Ullrich
73cf3533a1
fix: count quotation depth in parser correctly
2021-04-29 13:33:48 +02:00
Sebastian Ullrich
8119daeb18
feat: syntax & attribute for double-quoted quotations
2021-04-27 16:38:37 -07:00
Daniel Fabian
0238bf8c33
refactor: use Ordering inside of rbmap instead of lt.
2021-04-27 07:58:58 -07:00
Sebastian Ullrich
53b0e7dde8
fix: ban tabs
...
Fixes #339
2021-04-25 19:55:15 -07:00
Sebastian Ullrich
01f6cece2f
chore: fix parser error message
2021-04-24 21:48:12 +02:00