Commit graph

271 commits

Author SHA1 Message Date
Leonardo de Moura
6ca1768957 fix: optional := in the structure command 2020-10-22 04:39:20 -07:00
Leonardo de Moura
ea829b75c0 chore: remove coercions for old frontend 2020-10-21 17:37:35 -07:00
Leonardo de Moura
24d41b9518 chore: move to new frontend 2020-10-21 12:16:30 -07:00
Leonardo de Moura
cb66295149 chore: cleanup 2020-10-21 11:34:44 -07:00
Leonardo de Moura
d25ec3417b chore: remove some [inline] and [specialize] annotations from Parser/Basic 2020-10-21 11:27:18 -07:00
Leonardo de Moura
e5c17463c5 chore: move to new frontend 2020-10-21 10:06:53 -07:00
Leonardo de Moura
1af6f14fa8 chore: move to new frontend 2020-10-21 09:17:02 -07:00
Leonardo de Moura
7966856b32 chore: move to new frontend 2020-10-21 09:13:55 -07:00
Leonardo de Moura
f8971200af chore: move to new frontend 2020-10-20 17:01:29 -07:00
Leonardo de Moura
a052446414 feat: simplify decide! and nativeDecide! macros 2020-10-20 15:08:16 -07:00
Leonardo de Moura
702ceb7a3f fix: return optional result
cc @Kha
2020-10-20 09:33:50 -07:00
Sebastian Ullrich
e8cf086641 fix: synthesize pretty printers early 2020-10-20 09:50:54 +02: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
52e676af83 feat: add builtin_initialize command 2020-10-19 15:02:42 -07: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
c7efb1d37d fix: do notation else if
The following `do` block
```lean
if c_1 then
  action_1
else
  if cond_2 then
    action_2
  action_3
```
was being being parsed as
```lean
if c_1 then
  action_1
else if cond_2 then
  action_2
action_3
```

cc @Kha
2020-10-19 14:29:31 -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
14414e3400 feat: nested do parser 2020-10-15 17:04:35 -07:00
Leonardo de Moura
60e4f4fee1 feat: improve notFollowedBy error messages 2020-10-15 17:01:10 -07:00
Leonardo de Moura
ef01053d58 fix: set mainModuleName in the new frontend 2020-10-15 15:30:03 -07:00
Leonardo de Moura
5d3e08d43a chore: documented modification needed to enable the elaboration of commands containing syntax errors
cc @Kha
2020-10-14 13:20:01 -07:00
Sebastian Ullrich
78ffc72150 chore: remove ppGroups beneficial only for group but not fill 2020-10-14 14:24:47 +02:00
Leonardo de Moura
77ce42548b fix: add nonReservedSymbol 2020-10-13 12:52:18 -07:00
Leonardo de Moura
d2e5c1c300 feat: improve dbgTrace! macro 2020-10-13 12:38:04 -07:00
Leonardo de Moura
39f6aae306 fix: interpolatedStrFn 2020-10-13 12:19:10 -07:00
Leonardo de Moura
63edecf106 feat: expand initialize macro 2020-10-10 08:23:49 -07:00
Leonardo de Moura
698c3db655 chore: take doSeq at initialize 2020-10-10 07:41:44 -07:00
Leonardo de Moura
9538772c1c chore: do not use string interpolation by default at dbgTrace!
It is nice to be able to write `dbgTrace! x` instead of `dbgTrace! "{x}"`
2020-10-09 20:49:39 -07:00
Leonardo de Moura
bca81714fe feat: println! and dbgTrace! macros with string interpolation 2020-10-09 17:19:04 -07:00
Leonardo de Moura
3bd75d51d5 feat: add ParserDescr.noWs 2020-10-09 16:26:49 -07:00
Leonardo de Moura
e021a7d011 chore: remove symbolNoWs
@Kha This is a leftover from the time precedence was associated with
tokens instead of parsers.
2020-10-09 16:17:56 -07:00
Leonardo de Moura
7013ea4098 feat: add interpolatedStr to ParserDescr and Syntax 2020-10-09 14:04:53 -07:00
Leonardo de Moura
36696d726d feat: add String Interpolation 2020-10-09 13:40:35 -07:00
Leonardo de Moura
8a6cb1842f feat: expand doTry
@Kha I did not implement support for reassignments and `continue`,
`break`, `return` inside the `finally` clause. It is doable, but it
feels like unnecessary complexity. We currently don't have any
instance in our code base where this would be useful.
2020-10-08 19:39:36 -07:00
Leonardo de Moura
7f5af84660 chore: add doElem quotation parser 2020-10-08 13:45:53 -07:00
Leonardo de Moura
5d8764dd92 feat: take doElem at doLetArrow and doReassignArrow 2020-10-07 16:49:28 -07:00
Sebastian Ullrich
064c9b2e0b chore: binder spacing 2020-10-07 09:46:47 +02:00
Sebastian Ullrich
21f1a66ceb feat: add & use ppDedent parser combinator 2020-10-07 09:46:47 +02:00
Sebastian Ullrich
88164a5e91 feat: more pp tweaks 2020-10-07 09:44:05 +02:00
Sebastian Ullrich
5d76a981b0 chore: adjust pp spacing 2020-10-07 09:44:04 +02:00
Sebastian Ullrich
bdff53fdf5 feat: use ppLine 2020-10-07 09:43:05 +02:00
Leonardo de Moura
294a750110 feat: expand doMatch 2020-10-06 19:07:47 -07:00
Leonardo de Moura
db5fdd15c4 feat: add let* parser and add some support for it at Binders.lean 2020-10-06 14:42:47 -07:00
Leonardo de Moura
ef2d9b4d59 feat: add ensureExpectedType! parser 2020-10-06 09:31:21 -07:00
Leonardo de Moura
10fc908463 chore: use Tactic.seq1 instead of Tactic.tacticSeq1Indented
Reason: antiquotations.
2020-10-06 08:28:41 -07:00
Leonardo de Moura
c3b0e9936c chore: group many elements 2020-10-06 08:28:40 -07:00
Leonardo de Moura
5c74c408ae chore: remove nodeSepBy1Unbox combinator 2020-10-06 08:28:40 -07:00
Leonardo de Moura
93dc94b3b0 chore: remove nodeSepBy1Unbox hack 2020-10-06 07:22:28 -07:00
Leonardo de Moura
cebadf9efd chore: group many elements
TODO: the parser combinators `many` and `sepBy` should do it.
2020-10-06 06:43:19 -07:00