Commit graph

106 commits

Author SHA1 Message Date
Leonardo de Moura
d7537f252a chore: remove unnecessay parser/elab 2021-09-02 17:29:32 -07:00
Leonardo de Moura
2166057d47 chore: add elab_stx_quot for conv 2021-09-01 15:56:14 -07:00
Leonardo de Moura
6d8058034a chore: basic conv mode parsers 2021-09-01 15:35:32 -07:00
Leonardo de Moura
1be41f2adb chore: fix stdlib 2021-08-06 12:58:58 -07:00
Sebastian Ullrich
98634b5554 fix: $(_):ident is not an infallible pattern 2021-07-22 16:52:06 +02:00
Sebastian Ullrich
eb1e285e26 chore: style 2021-06-21 10:17:26 -07:00
Sebastian Ullrich
cc2f483951 chore: note on previous commit 2021-06-10 18:25:39 +02:00
Sebastian Ullrich
e4bf5977d9 fix: syntax pattern match against multiple identifiers 2021-06-10 18:15:40 +02:00
Leonardo de Moura
8b4cdcfddd chore: fix mutable variable shadowing 2021-05-22 19:24:41 -07:00
Sebastian Ullrich
7c3101a51c chore: produce more efficient/pp-able array code from quotations 2021-05-19 09:52:35 +02:00
Sebastian Ullrich
088774536e fix: syntax match: do not discard other patterns after splices 2021-05-07 16:08:10 +02:00
Leonardo de Moura
dd325cfffc fix: getHeadInfo ==> getHeadInfo?
The generated code was not producing compilation errors because we
have a coercion from `A` to `Option A`
2021-05-04 16:46:41 -07:00
Leonardo de Moura
78a2de4241 feat: better error recovery for match syntax 2021-05-02 17:00:35 -07:00
Leonardo de Moura
59b1f8c143 chore: avoid match_syntax in error messages 2021-05-02 17:00:35 -07:00
Sebastian Ullrich
ad7ee2c81b fix: disable quotation precheck if hygiene is false 2021-04-27 16:38:37 -07:00
Sebastian Ullrich
8119daeb18 feat: syntax & attribute for double-quoted quotations 2021-04-27 16:38:37 -07:00
Leonardo de Moura
3a80e87793 chore: #405 step 1 2021-04-22 20:03:48 -07:00
Leonardo de Moura
f6651605d0 chore: remove unnecessary modification, fun syntax is not a binder 2021-04-15 12:38:48 -07:00
Leonardo de Moura
dbc84c502c chore: make sure we don't lift methods over binders 2021-04-15 12:06:46 -07:00
Sebastian Ullrich
1e61b7db89 fix: partial syntax tree panic
Fixes #391
2021-04-12 18:33:39 +02:00
Leonardo de Moura
ca314f1aa4 refactor: add helper functions for match syntax elaborator 2021-04-06 19:02:03 -07:00
Leonardo de Moura
9fa89a73df feat: add helper functions for syntax match
Motivation: improve error recovery.
2021-04-05 18:38:57 -07:00
Sebastian Ullrich
dbefb7dd5f feat: support $_ antiquotations in match 2021-03-23 19:07:42 +01:00
Leonardo de Moura
04e3f21783 chore: add OptionM monad
Motivation: `Option` is data, `OptionM` is control.
2021-03-20 17:50:45 -07:00
Sebastian Ullrich
54405c4543 fix: automatically wrap many/sepBy items in null nodes where necessary 2021-03-19 15:15:55 +01:00
Leonardo de Moura
12aa5cc461 chore: avoid ! in keywords 2021-03-13 17:24:27 -08:00
Leonardo de Moura
be841a7cad chore: throwError! => throwError, throwErrorAt! => throwErrorAt
@Kha I marked the corresponding methods as `protected`.
I currently can't stand `throw_error`, and I am optimistic about
server highlighting feature you are working on :)
2021-03-11 11:59:45 -08:00
Leonardo de Moura
e7140959c4 chore: add elaborator for let_fun and let_delayed 2021-03-11 10:40:25 -08:00
Leonardo de Moura
68143ca8ba chore: trace[...]! ==> trace[...]
@Kha I think this one is a good change, there is no real reason for
using the `!` suffix here.
2021-03-10 18:44:43 -08:00
Sebastian Ullrich
8320ab6177 fix: syntax match: check identifiers (using strict equality) 2021-02-11 17:50:05 +01:00
Sebastian Ullrich
811b90dd0e feat: option for disabling hygiene
/cc @leodemoura
2021-01-29 15:26:06 +01:00
Sebastian Ullrich
446f953461 feat: allow hygienic capture of section variables in quotations 2021-01-24 11:46:04 -08:00
Leonardo de Moura
0672247ce8 chore: make comments VS Code friendly 2021-01-15 13:53:37 -08:00
Sebastian Ullrich
d1ff0991f4 fix: copy position for identifiers in quotations, not just for atoms 2021-01-15 16:27:59 +01:00
Sebastian Ullrich
bbafd80322 chore: token antiquotations: return/take full Syntax (but only use head info of it)
/cc @leodemoura
2020-12-26 23:54:46 +01:00
Sebastian Ullrich
82497e3bcf fix: non-atomic identifiers in antiquotation splices 2020-12-25 22:58:33 +01:00
Sebastian Ullrich
c3c27f8dd3 feat: lift restriction on number of antiquotations in splice
/cc @leodemoura
2020-12-25 18:41:03 +01:00
Leonardo de Moura
79c15de131 fix: if-then-else is not builtin notation 2020-12-24 08:02:59 -08:00
Sebastian Ullrich
93518d4e42 perf: let*-bind syntax match RHSs before duplicating them 2020-12-22 17:25:46 +01:00
Sebastian Ullrich
07c7638fd7 feat: token source info antiquotations tk%$id
/cc @leodemoura
2020-12-22 13:11:04 +01:00
Sebastian Ullrich
cf7f60b470 feat: attach getRef position to symbols from quotations
/cc @leodemoura
2020-12-21 16:24:39 +01:00
Sebastian Ullrich
c54f9dd8c8 feat: "slice" patterns [$x, $y, $zs,*, $w] in syntax match
/cc @leodemoura
2020-12-21 15:29:46 +01:00
Sebastian Ullrich
a56fd6a8c0 chore: Quotation: minor comments fixes 2020-12-20 16:46:03 +01:00
Sebastian Ullrich
fdbec9101f fix: pattern reordering in syntax match 2020-12-20 13:52:25 +01:00
Sebastian Ullrich
efc2b79aba feat: as patterns in syntax match
@leodemoura no problem using the new architecture :)
2020-12-19 22:03:37 +01:00
Sebastian Ullrich
5b06e1011f fix: completely refactor syntax match handling, introduce "undecided" patterns to resolve complex cases 2020-12-19 22:03:37 +01:00
Sebastian Ullrich
94cfff5118 refactor: simplify syntax match logic 2020-12-18 17:05:20 +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
16747d3986 chore: remove attrParam syntax category 2020-12-15 21:47:24 -08:00