Gabriel Ebner
7e483d3a0a
feat: support syntax abbreviations in dynamic quotations
2021-12-15 11:17:58 +00:00
Leonardo de Moura
136fab0723
feat: improve error message for let ... ← ... outside of a do
2021-12-14 08:56:22 -08:00
tydeu
d518ba7f08
feat: use BaseIO more in Init.System.IO
2021-12-14 09:33:52 +01:00
Leonardo de Moura
55db56f80d
feat: add noncomputable section parser
2021-12-13 10:35:16 -08:00
Leonardo de Moura
bf3b0c53ad
chore: add helper parser
2021-12-12 08:16:42 -08:00
Leonardo de Moura
b6ef65d8fd
fix: where structure instance parser
...
closes #753
2021-12-12 07:52:52 -08:00
Leonardo de Moura
68bd55af32
chore: fix codebase
2021-12-10 13:12:09 -08:00
Sebastian Ullrich
2a1aee2b7a
feat: record declaration ranges of builtin parsers & elaborators
2021-11-26 17:13:19 +01:00
Sebastian Ullrich
e9f7c88299
feat: record doc strings of builtin parsers & elaborators
2021-11-26 17:13:19 +01:00
Sebastian Ullrich
8176084dcf
refactor: factor out declareBuiltin
2021-11-26 17:13:19 +01:00
Scott Morrison
43315f7f94
fix: correct spacing in the pretty printer
2021-11-23 09:13:31 +01:00
Leonardo de Moura
3c00c3270e
feat: add variant of binrel%
2021-11-09 06:51:54 -08:00
Gabriel Ebner
bfc74decde
feat: add info field to Syntax.node
2021-10-26 20:19:27 +02:00
Leonardo de Moura
e336ff5f93
feat: indentation sensitiviy for macro and elab commands
...
This commit fixes issue reported at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Command.20terminator/near/257674790
2021-10-18 17:16:09 -07:00
Leonardo de Moura
85c49cfeb3
feat: apply termination tactic provided by user
2021-10-03 18:47:52 -07:00
Leonardo de Moura
23740778d4
refactor: termination hints
2021-10-03 18:09:35 -07:00
Leonardo de Moura
d22a42358f
feat: add decreasing_tactic notation
2021-10-03 17:16:29 -07:00
Leonardo de Moura
c24cd877c8
chore: define if-then-else again as a macro
...
We can do it using the new auxiliary notation `let_mvar%` and
`wait_if_type_mvar%`.
2021-10-02 17:30:06 -07:00
Leonardo de Moura
c6dfecb7aa
feat: helper notation for controlling elaboration order
2021-10-02 15:10:27 -07:00
Leonardo de Moura
acd21052c0
chore: remove old notation
2021-10-02 15:06:40 -07:00
Leonardo de Moura
9337498c5b
chore: keywords should be snake_case
2021-10-02 14:54:48 -07:00
Leonardo de Moura
2bc24ff619
chore: let_zeta => let_tmp
2021-09-30 22:19:06 -07:00
Leonardo de Moura
b83facc738
feat: add let_zeta auxiliary parser
2021-09-30 22:08:11 -07:00
Leonardo de Moura
7c0993ae12
chore: add pp annotations to if parser
2021-09-30 20:40:02 -07:00
Leonardo de Moura
698760c5eb
refactor: add if-then-else builtin parser
2021-09-30 19:33:41 -07:00
Leonardo de Moura
200a38e20c
feat: improve letIdLhs parser
...
The extra space is only really needed to distinguish an array update (NIY)
```
let x[i] := ...
```
from a declaration taking an instance argument
```
let f [Monad m] := ...
```
closes #696
2021-09-28 18:10:25 -07:00
Leonardo de Moura
8425a53377
feat: improve termination_by notation
2021-09-22 21:08:01 -07:00
Leonardo de Moura
6211b95e06
feat: add termination_by parser
2021-09-21 13:19:01 -07:00
Sebastian Ullrich
585fba69e8
refactor: remove redundancy from common register_parser_alias case
...
/cc @leodemoura
2021-09-20 13:20:23 +02:00
Leonardo de Moura
f43ab76641
feat: doc string for syntax abbreviations
2021-09-12 18:26:36 -07:00
Leonardo de Moura
53ec43ff9b
refactor: lazy evaluation for >>, <*>, <*, and *>
...
see issue: #617
2021-09-07 17:50:34 -07:00
Leonardo de Moura
3714cf16ec
refactor: lazy evaluation for <|>
...
see #617
2021-09-07 17:06:10 -07:00
Leonardo de Moura
d991c20859
chore: add binop_lazy%
...
This is a gadget for issue #617 .
2021-09-07 13:00:36 -07:00
Leonardo de Moura
bbb74bfd9a
feat: elaborate optional deriving after def
2021-09-03 10:22:17 -07:00
Leonardo de Moura
8a268e184b
feat: update def parser with optional deriving ...
2021-09-03 09:42:17 -07:00
Leonardo de Moura
d7537f252a
chore: remove unnecessay parser/elab
2021-09-02 17:29:32 -07:00
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