Commit graph

437 commits

Author SHA1 Message Date
Bryce Miller
cb08225bf0
| -> where 2023-06-05 20:19:00 -04:00
Bryce Miller
76551375b9
has -> implements in fn names 2023-05-26 23:25:21 -04:00
Bryce Miller
c68807bc5a
has -> implements in roc code 2023-05-26 20:39:01 -04:00
Bryce Miller
91e37293a2
abilities syntax has -> implements 2023-05-24 21:29:38 -04:00
Agustin Zubiaga
4cd2c957ca
Format multiline reecord builder fields nicely 2023-05-17 12:48:37 -03:00
Agustin Zubiaga
5edcb31f32
Outdentable record builders 2023-05-17 12:21:39 -03:00
Agustin Zubiaga
d1feb00170
Track spaces between : and <- in record builders 2023-05-17 11:49:06 -03:00
Agustin Zubiaga
731cd4257d
Record Builder colon arrow syntax 2023-05-16 22:44:55 -03:00
Agustin Zubiaga
6670fbb1ab Multiple record builder error 2023-05-08 19:26:47 -03:00
Agustin Zubiaga
71c80171d4 Add record builder apply fmt test 2023-05-07 15:56:44 -03:00
Agustin Zubiaga
c2e50a22b6 Record Builder formatting 2023-05-07 15:51:08 -03:00
Anton-4
85dce119c7
downgrade to 1.66.1
going from 1.66.1 to 1.67.1 causes a segemntation fault in a wasm test, I expect because the size of Stmt and Expr have changed with that version.
2023-04-26 20:07:46 +02:00
Brendan Hansknecht
f42f61e271
run a toml formatter and then clean it up a bit 2023-03-06 19:47:57 -08:00
Brendan Hansknecht
4a89bee0a5
centralize package versions except for vendor and excluded 2023-03-06 19:29:09 -08:00
Brendan Hansknecht
5485c8a5b0
update to using workspace package spec 2023-03-06 16:36:18 -08:00
Brendan Hansknecht
43224dcca9
remove less important Cargo.lock files that we probably shouldn't track 2023-03-06 13:01:07 -08:00
Luke Boswell
1590b30b19
Add a lexing-based 'highlight' mode to the parser
basic syntax highlighting

added more syntax highlighting coverage

add example of a markdown table with styling

move FIXED_TOKEN logic into highlight

refactor highlight, add support for backpassing

escape html from source code

fix bug with <pre> tag ordering

refactor out html from roc_parse

remove test, put highlight functionality into separate file

fix typo
2023-02-28 17:03:49 +11:00
Joshua Warner
b5f284cd78
Fix several fmt+parse bugs found by fuzzing 2023-02-19 12:37:33 -08:00
Joshua Warner
2541a09273
Fix formatting of initial newlines in collections
Fixes #5015
2023-02-17 09:08:50 -08:00
Luca Cervello
a4410fe052
fix: add spaces around ? in optional record field 2023-02-08 18:41:22 +01:00
Ayaz
9340a67e87
Merge pull request #4993 from joshuawarner32/tuple-gen-tuple-backend-experiment
Implement mono / code generation for tuples
2023-02-08 10:42:51 -05:00
Joshua Warner
3fee0d3e8f
Fix a bunch of bugs in parsing/formatting found by fuzzing 2023-02-07 20:25:56 -08:00
Joshua Warner
5a6be05ead
implement mono / lowering for tuples 2023-02-07 18:54:50 -08:00
Joshua Warner
31a4eb2bfd
Fix parsing of tuple accessors after an identifier - e.g. myIdent.2 2023-01-30 21:12:01 -08:00
Joshua Warner
a1cd114198
Add a Malformed trait, and assert that 'passing' tests don't produce a malformed result 2023-01-25 21:01:05 -08:00
Anton-4
1f2b39a521
Merge branch 'main' of github.com:roc-lang/roc into rust1_65 2023-01-23 18:27:33 +01:00
Anton-4
bbf35af8fa
Merge branch 'main' into rust1_65
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-01-17 18:14:30 +01:00
Anton-4
a97c53d7ca
1.65 changes and clippy fixes 2023-01-17 18:09:16 +01:00
Joshua Warner
d876abb04b
Fix formatting of backpassing in a nested def with no newline
Fixes #4338
2023-01-16 09:31:08 -08:00
Joshua Warner
3b51d7cd13
Fix multi-backpassing in top-level defs
Fixes #4821
2023-01-15 10:39:21 -08:00
Joshua Warner
0b8e68f70d
Fix approximately a bajillion fmt and parsing bugs
(discovered by fuzzing)

There's more to come, but this seems like a good batch for now.
2023-01-13 18:20:44 -08:00
Joshua Warner
94070e8ba6
Improve parsing of scalar literals
* Unify parsing of string literals and scalar literals, to (e.g.) ensure escapes are handled uniformly. Notably, this makes unicode escapes valid in scalar literals.
* Add a variety of custom error messages about specific failure cases of parsing string/scalar literals. For example, if we're expecting a string (e.g. a package name in the header) and the user tried using single quotes, give a clear message about that.
* Fix formatting of unicode escapes (they previously used {}, now correctly use () to match roc strings)
2023-01-07 15:12:52 -08:00
Joshua Warner
07ebc81cba
Be more lenient with indentation in record parsing
... and extract a shared helper with collection_trailing_sep_e, thereby resolving some inconsistencies with normal collection parsing.

... and delete some dead code while I'm at it
2023-01-02 18:53:15 -08:00
Joshua Warner
0da50a612d
Be more lenient with required indentation in collections
... and also remove a bunch of now-dead errors that can't be triggered.
2023-01-01 17:49:51 -08:00
Folkert
c1c8328e25
update tests 2022-12-30 23:21:41 +01:00
Folkert
e9196f3c0b
parse and format pattern as 2022-12-30 17:50:17 +01:00
Joshua Warner
bfeddc470a
Move syntax tests to a dedicated crate
* test_fmt moves out of fmt crate
* test_parse _mostly_ moves out of parse crate and into `test_snapshots.rs` (some simple tests remain)
* now there's only two fuzz targets, fuzz_expr and fuzz_module, that cover both parsing and formatting
* added a system to auto-add new snapshot entries for new test files
* took some commented-out tests in `test_parse` and converted them to snapshot tests
* moved test_fmt's verification of formatting consistency into test_snapshots
* fixed a huge derp on my part where the fmt fuzzer in #4758 was completely useless (broken by refactoring just prior to submitting the PR)
* fixed a formatting bug found by fuzzing (bound_variable.expr.roc) - that I missed earlier due to ^^^ that derp
* no longer have roc_test_utils as a dependency in fmt - which was causing problems for the wasm build
2022-12-26 22:50:24 -08:00