Sebastian Ullrich
021a823f49
feat: add option printMessageEndPos
2021-01-15 16:27:59 +01:00
Sebastian Ullrich
720f06d251
fix: interpreted bracketedBinder.quot
2021-01-15 14:34:06 +01:00
Leonardo de Moura
308c61027a
feat: save doc strings
...
We can now document `let rec` too.
2021-01-10 07:13:33 -08:00
Leonardo de Moura
f0ac477d2e
feat: add sanity checks
2021-01-01 18:31:28 -08:00
Leonardo de Moura
6aab25b3cc
chore: add missing ppSpace
2020-12-30 11:23:16 -08:00
Leonardo de Moura
bf88656288
feat: add binrel! parser
...
It is a helper macro for using binary relations such as `<` and `>`.
2020-12-29 15:11:28 -08:00
Leonardo de Moura
41308c9848
feat: add parser for annotating terms that should not be indexed
2020-12-28 17:21:33 -08:00
Leonardo de Moura
f53721e1c9
chore: adapt code to previous change
2020-12-23 08:31:20 -08:00
Leonardo de Moura
e74ba14f4c
feat: modify structSimpleBinder parser
...
@Kha It felt odd that we can write
```
map f x := ...
```
in instances, but we had to write
```
map (f x) := ...
```
when setting the field default value in a class.
2020-12-23 08:23:14 -08:00
Leonardo de Moura
78aa3d8e72
chore: use deriving BEq
2020-12-22 18:10:20 -08:00
Leonardo de Moura
7b813622c6
chore: increase precedence of |>, <|, $ parsers
...
@Kha Now, all parsers defined by `Init/Std/Lean` packages have
precedence >= `min` and <= `max`.
The only exception is `<|>` since it is an infix operator sharead with
the tactic DSL.
BTW, the meaning of `f $ a <|> b` changed with this commit.
It was `f (a <|> b)`, and now is `(f a) <|> b`. The problem is that
the precedence of the `$` parser is now greater than the `<|>` parser.
I will try another experiment where I make sure we do not "reuse"
term infix operators in the tactic DSL.
2020-12-22 14:10:07 -08:00
Leonardo de Moura
cc34733e52
fix: update builtin precedences for |>. and macroDollarArg
2020-12-22 14:10:06 -08:00
Leonardo de Moura
7d1e493531
chore: reactivate tactic match and introMatch
2020-12-22 07:15:47 -08:00
Leonardo de Moura
f34bf82e0f
chore: move tactic parsers introMatch and match to Lean/Parser/Tactic
2020-12-22 07:11:06 -08:00
Leonardo de Moura
a05ca020f4
chore: prepare to move tactic match parser back to Lean/Parser/Tactic
2020-12-22 06:52:41 -08:00
Sebastian Ullrich
1c31240ebb
feat: token antiquotations in macro
2020-12-22 13:11:04 +01:00
Sebastian Ullrich
07c7638fd7
feat: token source info antiquotations tk%$id
...
/cc @leodemoura
2020-12-22 13:11:04 +01:00
Leonardo de Moura
0642a62848
chore: prepare to add scoped macro and elab commands
2020-12-21 16:50:29 -08:00
Leonardo de Moura
0083e1996a
fix: scoped tokens
...
Tokens introduced by scoped (local) parsers should be scoped (local).
2020-12-21 13:11:09 -08:00
Leonardo de Moura
4fc06bfcca
feat: add optional (priority := <prio>) to instance command
2020-12-21 10:02:12 -08:00
Leonardo de Moura
43284cc5fa
feat: improve notation for setting parser names and priorities
2020-12-21 09:11:12 -08:00
Sebastian Ullrich
cf73233dd2
refactor: use quotations & implicit token positions from getRef to clean up a bit
2020-12-21 17:32:36 +01:00
Leonardo de Moura
c524bcf2d3
feat: improve universe level pretty printer
2020-12-21 07:34:48 -08:00
Sebastian Ullrich
bc3e9ce961
feat: if let pat ← ...
2020-12-20 23:58:29 +01:00
Sebastian Ullrich
90f747e346
fix: don't change antiquotations semantics in do if
2020-12-20 17:51:37 +01:00
Sebastian Ullrich
eeb0cad29e
feat: if let
...
/cc @leodemoura
2020-12-20 16:46:03 +01:00
Leonardo de Moura
0911936502
feat: parallel for notation
2020-12-19 19:26:53 -08:00
Leonardo de Moura
15335efae2
refactor: move Format to Init package
...
We are going to use it to define `Repr` class.
2020-12-18 11:21:30 -08:00
Sebastian Ullrich
4380d4a9da
feat: parser: store options & pass to evalConst
2020-12-16 23:15:58 +01:00
Sebastian Ullrich
f9dcbbddc4
refactor: remove optional leading pipe from match, use many1Indent instead of sepBy1
2020-12-16 18:27:05 +01:00
Sebastian Ullrich
d22d639fcb
refactor: rename "antiquot scope" ~> "antiquot splice"
2020-12-16 17:44:20 +01:00
Leonardo de Moura
97642bd000
fix: prio issue
2020-12-16 07:44:48 -08:00
Leonardo de Moura
a008816102
chore: remove workaround
2020-12-16 07:34:40 -08:00
Leonardo de Moura
3d5082dde3
feat: simplify Attr.simple parser
2020-12-16 07:29:18 -08:00
Leonardo de Moura
7b67cd2c4a
chore: fix priorities
2020-12-16 07:11:02 -08:00
Leonardo de Moura
e3540a5d8f
chore: remove high builtin parser
...
It doesn't allow us to use `high` at `Prelude.lean` because
the macro expander for it is only defined at `Notation.lean`
2020-12-16 06:42:52 -08:00
Leonardo de Moura
16747d3986
chore: remove attrParam syntax category
2020-12-15 21:47:24 -08:00
Leonardo de Moura
901e58b131
fix: priority
2020-12-15 20:57:00 -08:00
Leonardo de Moura
ed87480093
refactor: move to attr syntax category
2020-12-15 20:22:04 -08:00
Leonardo de Moura
095a27c197
feat: add missing attribute parsers
2020-12-15 20:18:26 -08:00
Leonardo de Moura
eeac7fb9f4
feat: declare builtin attr parsers for builtin attributes
...
@Kha I believe this is the minimal set for covering the attributes we
have right now. The parser `simple` covers most of them, and the
dispatch is performed using the identifier.
Otherwise, the dispatch will be based on the node kind.
The `simple` parser is a bit hackish, but it is quite covenient for
simple attributes that do not require complex parameters.
2020-12-15 17:20:28 -08:00
Leonardo de Moura
6100ed9283
feat: add LeadingIdentBehavior type
...
Different strategies for handling the leading identifier in the
`Pratt` parser loop.
2020-12-15 16:45:14 -08:00
Leonardo de Moura
9e3b3b2495
refactor: move attribute related parsers to separate file
2020-12-15 16:13:11 -08:00
Leonardo de Moura
c9f766af5a
feat: we don't want attribute names as keywords
2020-12-15 15:59:48 -08:00
Leonardo de Moura
3ee6aec466
feat: add attr parser category
2020-12-15 15:44:46 -08:00
Leonardo de Moura
6985223a55
chore: switch to attrParam
2020-12-14 17:52:28 -08:00
Leonardo de Moura
69e8385f8d
refactor: move prioParser to Term.lean
2020-12-14 17:33:38 -08:00
Leonardo de Moura
0004196977
feat: add attrParam builtin parsers
2020-12-14 17:27:28 -08:00
Leonardo de Moura
a3fe907a28
feat: add attrParam syntax category
...
cc @Kha
2020-12-14 16:45:05 -08:00
Leonardo de Moura
abe7481453
feat: elaborate prio DSL
2020-12-14 16:25:10 -08:00