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
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
9557c234cb
Update recently added tests
2022-01-01 18:20:57 -08:00
Joshua Warner
70156b0a90
Simplify advancing
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
721233f9c8
More incremental changes
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 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
2cd5bf8c03
Parse "as" aliases into tag/args rather than arbitrary annotations
2021-12-26 08:44:09 -06:00
Joshua Warner
8b58d5cbc7
Switch to always encoding package names / paths as strings
...
This will simplify parsing and make it possible to have a uniform lexer for the language. Previously unquoted package names were allowed to include '-'s, which aren't valid identifiers.
In the future, we'll distinguish local paths from packages in the package-manager by looking for a ".roc" suffix, which should only be present in local paths.
2021-12-23 20:11:14 -08:00
ayazhafiz
6d9a5b6b0d
Actually add the test files
2021-12-23 19:39:54 -06:00
ayazhafiz
46b4a3e6d5
Add test for nested if parsing
...
Closes #169
It seems the above issue was resolved a long time ago but there wasn't a
test for it
2021-12-23 19:39:54 -06:00
Joshua Warner
090a8923c5
Improve Debug format of Position
2021-12-22 21:09:02 -08:00
Joshua Warner
f19220473a
Rename Located -> Loc
2021-12-22 19:18:22 -08:00
Joshua Warner
7b9c8ed939
Allow function types in records
2021-12-17 15:09:15 -08:00
Joshua Warner
5e7e77dbb1
Add a couple failing parser tests
2021-12-17 15:09:15 -08:00
Joshua Warner
bb5b9677a3
Allow specifying failing parse tests
2021-12-17 15:09:15 -08:00
Joshua Warner
49818343dd
extract state
2021-12-16 17:13:53 -08:00
Joshua Warner
0786e554c6
Extract spacing from parse::header::* items into explicit Spaced enum
2021-12-14 19:53:20 -08:00
Jan Van Bruggen
f6ec1ebad0
Rename base
to pf
in testing snapshots
2021-12-12 17:58:43 -07:00
Jan Van Bruggen
d03a51c75b
Rename base
package to pf
everywhere, to match tutorial
2021-12-12 05:57:39 -07:00
Joshua Warner
fdeafe4bab
Make assert output more understandable
2021-11-30 17:48:24 -08:00
Joshua Warner
7f5b873357
Parse _ in type annotations as an 'Inferred' type
2021-11-17 17:59:40 -08:00
Richard Feldman
1d330d9147
Merge pull request #1982 from rtfeldman/joshuawarner32/parser-snapshot-testing
...
Convert most test_parser tests to "snapshot" tests
2021-11-17 16:01:43 -05:00
Richard Feldman
28273b67da
Merge pull request #1970 from rtfeldman/shrink-call-type
...
Shrink call type
2021-11-15 19:56:21 -08:00
Joshua Warner
c4dd112a25
Allow generating new .result-ast files with ROC_PARSER_SNAPSHOT_TEST_OVERWRITE
2021-11-15 14:00:24 -08:00
Joshua Warner
343a680be9
Fix spelling/formatting/clippy/unused imports
2021-11-14 19:07:05 -08:00
Joshua Warner
76c3212c17
Make Debug for Located print it's value multi-lined if requested (with '{:#?}')
2021-11-14 18:42:39 -08:00
Joshua Warner
ab99abc63d
Remove unused items, add todo for improving formatting
2021-11-14 18:39:51 -08:00
Joshua Warner
cb30d7446b
migrate other module tests
2021-11-14 18:36:54 -08:00
Joshua Warner
a4a244cda0
migrate header + some module tests
2021-11-14 18:36:52 -08:00
Joshua Warner
6465a4031e
delete old tests
2021-11-14 18:34:40 -08:00
Joshua Warner
d661646748
Fix test formatting and actually assert that they pass
2021-11-14 18:31:44 -08:00
Joshua Warner
64ad486c10
automatically export snapshot tests
2021-11-14 18:20:21 -08:00