Commit graph

138 commits

Author SHA1 Message Date
Sebastian Ullrich
80a92cceeb fix: avoid choice nodes with LeadingIdentBehavior.both 2022-06-27 22:37:02 +02:00
Sebastian Ullrich
292d24ba19 feat: always store quoted kind in antiquotation kind 2022-06-27 22:37:02 +02:00
Sebastian Ullrich
b585b2251e fix: adapt to stricter grammar 2022-06-16 23:33:57 +02:00
Leonardo de Moura
e52a7bdf42 feat: let/if indentation in do blocks
closes #1120
2022-06-13 16:18:49 -07:00
Leonardo de Moura
041827bed5 chore: unused variables 2022-06-07 17:54:10 -07:00
Sebastian Ullrich
ae7b895f7a refactor: unname some unused variables 2022-06-07 16:37:45 -07:00
Sebastian Ullrich
ec045bfbb8 feat: $_ antiquotation pattern 2022-06-04 13:57:04 +02:00
Leonardo de Moura
de2e2447d2 chore: style 2022-04-07 17:35:05 -07:00
Sebastian Ullrich
24697026e8 feat: always accept antiquotations, simplify quotDepth code 2022-04-06 19:43:07 +02:00
Leonardo de Moura
fdd1cb5751 chore: remove workarounds for #1090 2022-04-01 11:28:17 -07:00
Leonardo de Moura
799c701f56 fix: inconsistency between syntax and kind names
TODO: remove staging workarounds

see #1090
2022-04-01 11:20:16 -07:00
Leonardo de Moura
68acfc7fb9 chore: prepare for #1090 2022-04-01 11:11:28 -07:00
Leonardo de Moura
3862e7867b refactor: make String.Pos opaque
TODO: this refactoring exposed bugs in `FuzzyMatching` and `Lake`

closes #410
2022-03-20 10:47:13 -07:00
Sebastian Ullrich
c9713b1b69 fix: setExpectedFn 2022-03-02 16:28:53 +01:00
Sebastian Ullrich
ce58ded16f fix: syntax match of literals
Fixes #801
2022-01-29 08:40:03 -08:00
Leonardo de Moura
cf3b8d4eb4 chore: cleanup
Make the code style more uniform.
We still have a lot of leftovers from the old frontend.
2022-01-26 09:18:17 -08:00
Sebastian Ullrich
a0e8c6183b fix: parser should create choice node even on error 2022-01-14 09:18:57 +01:00
Gabriel Ebner
7e483d3a0a feat: support syntax abbreviations in dynamic quotations 2021-12-15 11:17:58 +00:00
tydeu
d518ba7f08 feat: use BaseIO more in Init.System.IO 2021-12-14 09:33:52 +01:00
Leonardo de Moura
68bd55af32 chore: fix codebase 2021-12-10 13:12:09 -08:00
Gabriel Ebner
bfc74decde feat: add info field to Syntax.node 2021-10-26 20:19:27 +02: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
d67c633ca1 feat: allow user to set "behavior" at declare_syntax_cat 2021-09-01 13:28:12 -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
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
Sebastian Ullrich
42e681a5a6 fix: make unterminated comments consume all input
Fixes #549
2021-07-22 15:55:12 +02:00
Leonardo de Moura
f4a7ffd8c8 chore: fix codebase and tests 2021-06-29 17:14:52 -07:00
Leonardo de Moura
8b4cdcfddd chore: fix mutable variable shadowing 2021-05-22 19:24:41 -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
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
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
Leonardo de Moura
a076b5b89e feat: improved error recovery for interpolated strings 2021-04-24 10:24:57 -07:00
Sebastian Ullrich
61f39d6088 chore: Parser.atomic: preserve partial output 2021-04-17 23:44:45 +02:00
Sebastian Ullrich
fd42b111fb chore: always push missing on a parser error 2021-04-17 23:44:43 +02:00
Leonardo de Moura
f13bdd6869 fix: error recovery at sepBy combinator 2021-04-05 18:38:57 -07:00
Sebastian Ullrich
98e1baabbd refactor: make trailingNode clean up after itself
Also resolves an issue with emitting both `left` and a partial tree
containing it
2021-04-05 13:51:03 +02:00
Sebastian Ullrich
6dc3e55c54 fix: longestMatchFn: do not discard partial syntax tree of first overload 2021-04-05 10:00:47 +02:00
Sebastian Ullrich
e5be9e7dd4 chore: helpers for parser debugging 2021-04-05 10:00:47 +02:00
Sebastian Ullrich
d0996fb945 chore: improve EOI error message 2021-04-03 11:56:26 +02:00
Sebastian Ullrich
7bb3d10014 chore: ensure that a failing node parser creates at least one missing 2021-04-01 17:24:50 +02:00
Leonardo de Moura
2837873db5 fix: longestMatch error recovery
@kha When replacing an error with a longer one, we were keeping the
message for the longer error, but losing its node.
2021-03-31 20:09:36 -07:00
Leonardo de Moura
2fc775954c fix: error recovery
@kha We have a few parsers that invoke `tokenFn`, and return error
depending of what is on the top of the stack (e.g., `ident`).
These parsers were not restoring the stack size when reporting errord,
and messing up the error recovery. We never notice the problem because
operators such as <|> restore the stack size, and we were not trying
to elaborate syntacticly incorrect terms.
2021-03-31 17:05:34 -07:00
Sebastian Ullrich
bbf6c717fc feat: introduce arg precedence 2021-03-22 16:33:37 +01:00
Sebastian Ullrich
725c0c1911 chore: implement lhs prec 2021-03-22 16:33:37 +01:00
Sebastian Ullrich
54405c4543 fix: automatically wrap many/sepBy items in null nodes where necessary 2021-03-19 15:15:55 +01:00