Sam Mohr
fe1b6d71fc
Update from PR comments
2024-07-07 18:33:20 -07:00
Sam Mohr
f415017c90
Implement new builder syntax alongside old one
2024-07-07 03:28:59 -07:00
Anton-4
f8432f7510
fmt
2024-06-22 20:09:15 +02:00
Anton-4
ab217ede3f
Merge remote-tracking branch 'upstream/main' into unmacro_parsers
2024-06-22 20:02:30 +02:00
Agus Zubiaga
e5a09b5de6
Parse module params in import
2024-05-09 07:42:07 -03:00
Agus Zubiaga
5b1a3c8f03
Parse params in module header
...
module {echo, read} -> [menu]
Formatter isn't implemented yet.
2024-05-09 07:27:43 -03:00
Agus Zubiaga
f81985533c
Report import lowercase alias
2024-05-06 23:16:18 -03:00
Agus Zubiaga
bfb77b78cb
Report import ending syntax error
2024-05-06 22:22:00 -03:00
Agus Zubiaga
fe2eb0f0a5
Parse optional ingested file annotation
2024-05-05 16:55:36 -03:00
Agus Zubiaga
8dedd9f03c
New app
header syntax
...
Implements the new app header syntax as discussed in Zulip [1].
app [main] {
cli: platform "../platform/main.roc",
json: "../json/main.roc"
}
Old headers still parse and are automatically upgraded to the new
syntax by the formatter.
[1] 418444862
2024-05-01 10:49:01 -03:00
Jackson Wambolt
f44064e946
Fix failing parser doctests
2024-04-22 20:03:05 -05:00
Jackson Wambolt
f001cf98e6
Clarify doc for indented_seq
...
Previously said that `indented_seq` was similar to `and`, but it's more
like `skip_first`. `and` returns a tuple of both parsers' outputs, but
`indented_seq` only returns the output of the second parser, just like
`skip_first`.
2024-04-22 20:03:05 -05:00
Jackson Wambolt
dd2c786eb9
Un-macro collection_trailing_sep_e
2024-04-22 20:03:05 -05:00
Jackson Wambolt
1c916202e7
Un-macro collection_inner
2024-04-22 20:03:05 -05:00
Jackson Wambolt
02c98f7519
Un-macro either
2024-04-22 20:03:05 -05:00
Jackson Wambolt
2f776f366f
Un-macro one_or_more
2024-04-22 20:03:04 -05:00
Jackson Wambolt
f88e46fc32
Un-macro zero_or_more
2024-04-22 20:03:04 -05:00
Jackson Wambolt
a9724dda5e
Un-macro map_with_arena
2024-04-22 20:03:04 -05:00
Jackson Wambolt
f6c977fb96
Un-macro succeed
...
This implementation requires that the type of the value impls `Clone`,
which means the function version of `succeed` cannot be used to succeed
with values of non-`Clone` types.
If this becomes an issue, we could either bring back the macro version,
or create a new `succeed_with` function that takes a `Fn() -> T`
argument. `succeed_with` could then be used to succeed with values that
aren't `Clone` by creating the value on-demand each time the parser is
run.
2024-04-22 20:03:04 -05:00
Jackson Wambolt
5c0b2a0938
Un-macro loc
2024-04-22 20:03:04 -05:00
Jackson Wambolt
3394aab650
Un-macro map
2024-04-22 20:03:04 -05:00
Jackson Wambolt
41d7d02e2a
Un-macro add
2024-04-22 20:03:03 -05:00
Jackson Wambolt
64290a8cf6
Un-macro absolute_indented_seq
2024-04-22 20:03:03 -05:00
Jackson Wambolt
1b4b0a0aa1
Un-macro indented_seq
2024-04-22 20:03:03 -05:00
Jackson Wambolt
60fa7ebe9e
Un-macro between
2024-04-22 20:03:03 -05:00
Jackson Wambolt
8a144149e2
Un-macro skip_first
2024-04-22 20:03:03 -05:00
Jackson Wambolt
e8ae2e12f8
Un-macro skip_second
2024-04-22 20:03:00 -05:00
Agus Zubiaga
d5a38a26db
Merge branch 'main' into inline-imports
2024-04-20 12:01:11 -03:00
Luke Boswell
ca01913ab3
add EExpr error for unexpected comma
2024-04-02 20:48:13 +11:00
Anton-4
59ab438c1e
misc improvements
2024-03-26 16:38:09 +01:00
Trevor Settles
ef68183a92
switched error then succeess cases
2024-03-24 20:13:58 -06:00
Trevor Settles
ab744a883a
combined examples and increased consistency
2024-03-24 15:13:31 -06:00
Trevor Settles
aa3a7c2ab0
combined error and sucdcess examples
2024-03-24 11:03:12 -06:00
Trevor Settles
fedc0f5dfb
removed and linted unused example imports
2024-03-19 20:47:44 -06:00
Trevor Settles
5660de93e0
removed one_of_with_error
2024-03-16 15:02:09 -06:00
Trevor Settles
fd8c13010a
added links in docs
2024-03-14 15:32:04 -06:00
Trevor Settles
c4172be7ce
fixed type parser -> parsers
2024-03-14 11:35:59 -06:00
Trevor Settles
bf96a59bbc
example and docs for backtrackable
2024-03-14 11:26:23 -06:00
Trevor Settles
3ebaa592f6
function versions for loc
and map_with_arena
macros
2024-03-14 11:19:18 -06:00
Trevor Settles
8ae0d99707
example for between
2024-03-14 11:10:28 -06:00
Trevor Settles
805ca70f75
example and docs for either
2024-03-13 22:10:35 -06:00
Trevor Settles
5714db6528
example and docs for debug
2024-03-13 21:58:45 -06:00
Trevor Settles
956bfdfde0
aero_or_more and one_or_more
2024-03-13 21:21:51 -06:00
Trevor Settles
2fc7b939da
example and docs for map
2024-03-13 14:04:20 -06:00
Trevor Settles
6db6629417
examples and docs for word2 and word3
2024-03-12 21:18:30 -06:00
Trevor Settles
b6d5425f6e
examples and docs for word1_indent
2024-03-12 20:42:35 -06:00
Trevor Settles
7884d92e29
example and docs for word1
2024-03-12 20:11:17 -06:00
Trevor Settles
47b537c278
added example for one_of_with_error
2024-03-12 15:43:08 -06:00
Trevor Settles
b146030fff
docs and examples for one_of
2024-03-12 15:03:14 -06:00
Trevor Settles
09dbc93b7d
docs and example for and
2024-03-10 21:38:17 -06:00