Commit graph

561 commits

Author SHA1 Message Date
Anton-4
95cd5ebab3
fixed cli_echo, base64_test 2022-01-30 13:07:52 +01:00
Anton-4
4f186113ae
bugfixes, more tests 2022-01-29 20:32:07 +01:00
Anton-4
76e0f31dec
successful ConsList.roc parse 2022-01-29 14:39:06 +01:00
Anton-4
deb848da2d
fixed complex tag union annotation 2022-01-28 20:35:19 +01:00
Anton-4
2034de30a2 more tests 2022-01-26 20:00:44 +01:00
Anton-4
7e0647802b fixed platform header 2022-01-26 16:50:01 +01:00
Anton-4
b4e2d921b9 fixed wrong apply parsing 2022-01-26 15:20:19 +01:00
Anton-4
8b0c6a77a5 indent bugfixes and more tests 2022-01-25 20:08:29 +01:00
Anton-4
7604a64716 fixed final tokeninzer, added Indent support to peg rules 2022-01-24 20:00:49 +01:00
Anton-4
65a706939c debugging grammar 2022-01-22 18:58:28 +01:00
Anton-4
3047fc6845 grammar progress, made temp tokenizer 2022-01-21 20:32:28 +01:00
Anton-4
495e6b58d4 rust-peg grammar progress 2022-01-21 09:46:45 +01:00
Anton-4
dcbd1fb7f8 peg grammar progress 2022-01-19 19:52:01 +01:00
Anton-4
67e3eaf4cf progress on rust-peg grammar 2022-01-17 20:17:04 +01:00
Anton-4
a51e98fd9a rust-peg grammar progress 2022-01-15 19:47:06 +01:00
Anton-4
38cc6096a8 started on rust-peg grammar 2022-01-14 19:54:39 +01:00
Joshua Warner
d9cfa2b2a5 Remove unused State::fail method 2022-01-03 20:11:01 -08:00
Joshua Warner
352c7979eb Re-enable debug_assert in State::advance 2022-01-03 20:10:53 -08:00
Joshua Warner
f22f96843e Refactor ParseProblem
* Remove the `pos` field, which was always being assigned Position::default()
* Remove one use of this `pos`, by removing the never-used SyntaxError::ConditionFailed variant
* Adjust the other use to do what was probably intended - which is to say, pointing to the beginning of the def with the error
* Rename to FileError, reuse `SourceError` as an inner field, to avoid duplicating the `bytes`
2022-01-03 20:10:50 -08:00
Joshua Warner
650c29de3c Change LineColumn::column to u32 to avoid overflow, and remove LineTooLong error 2022-01-02 21:50:42 -08:00
Joshua Warner
9557c234cb Update recently added tests 2022-01-01 18:20:57 -08:00
Joshua Warner
8092f31a29 fmt 2022-01-01 18:20:05 -08:00
Joshua Warner
f969c7c6d0 Fixup rebase errors 2022-01-01 18:20:05 -08:00
Joshua Warner
5c1084c453 Introduce SourceError to represent an error + original source 2022-01-01 18:20:05 -08:00
Joshua Warner
8d6eb178b1 Fix multiline pattern heuristic 2022-01-01 18:20:05 -08:00
Joshua Warner
e97e5c3bd9 Fixup type annotations 2022-01-01 18:20:05 -08:00
Joshua Warner
cb8cf44596 fmt 2022-01-01 18:20:05 -08:00
Joshua Warner
70156b0a90 Simplify advancing 2022-01-01 18:20:05 -08:00
Joshua Warner
2901549422 Assert new column calculation is correct 2022-01-01 18:20:05 -08:00
Joshua Warner
422cdea112 Track line start separately 2022-01-01 18:20:05 -08:00
Joshua Warner
5ac3394a73 Remove pos tracking 2022-01-01 18:20:05 -08:00
Joshua Warner
08a33aab1b Remove bytes tracking 2022-01-01 18:20:05 -08:00
Joshua Warner
beb0629e05 Track state in whitespace 2022-01-01 18:20:05 -08:00
Joshua Warner
a13c474f6b Remove line tracking in parser 2022-01-01 18:20:05 -08:00
Joshua Warner
8e1241adea Remove line/column fields 2022-01-01 18:20:05 -08:00
Joshua Warner
eb35e9914f Fix tests 2022-01-01 18:20:05 -08:00
Joshua Warner
4b04ec6bbc Add Position::offset, and recompute line/column info based on source 2022-01-01 18:20:05 -08:00
Joshua Warner
443d738f9b Make Position::{line, column} fields private 2022-01-01 18:20:05 -08:00
Joshua Warner
721233f9c8 More incremental changes 2022-01-01 18:20:05 -08:00
Joshua Warner
1b257da356 Make State::xyzlcol a LineColumn, and change everything wanting a Position to use State::pos() instead 2022-01-01 18:20:05 -08:00
Joshua Warner
d2dcb462c7 Rename State::pos -> xyzlcol, temporarily 2022-01-01 18:20:05 -08:00
Joshua Warner
bd7b1e5013 Make Loc::new take Positions 2022-01-01 18:20:05 -08:00
ayazhafiz
0c81302d29 Admit tag destructuring in definitions 2021-12-30 19:50:50 -06:00
Folkert
b924f7e329 use new header type in a spot we missed 2021-12-27 23:58:56 +01:00
Folkert de Vries
bb935948aa
Merge pull request #2276 from rtfeldman/i/2265
Parse "as" aliases into tag/args rather than arbitrary annotations
2021-12-27 20:56:48 +01:00
ayazhafiz
b3ddfa7515 Parse destructured tag annotations as annotations rather than aliases
Closes #178
2021-12-26 16:11:29 -06:00
ayazhafiz
0b6d3d2c55 Promote parse tests 2021-12-26 11:35:10 -06:00
ayazhafiz
b66543dd95 into_iter -> iter 2021-12-26 09:55:27 -06:00
ayazhafiz
966198a6e7 Coalesce inline and normal alias headers
Unifies `As` annotations and `Alias` defs to use a common struct for
defining alias header information, i.e. the name and type variables of
the alias.
2021-12-26 09:37:56 -06:00
ayazhafiz
597a1cef3b Attach location to alias header name 2021-12-26 09:17:27 -06:00