Commit graph

224 commits

Author SHA1 Message Date
Ajai Nelson
2e5fef5231
Improve error messages involving ignored variables
Fix #3987
2023-06-06 19:46:15 -04: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
232f5fd84c Take self by value in RecordField::to_* fns 2023-05-13 21:21:12 -03:00
Agustin Zubiaga
4a10ead0e4 Do not use unit for RecordField to_* fn errors 2023-05-13 21:15:54 -03:00
Agustin Zubiaga
f94004d137 Parse builders without backtracking from records 2023-05-13 20:05:42 -03:00
Agustin Zubiaga
d2a57112fd Unapplied record builder error 2023-05-08 20:16:38 -03:00
Agustin Zubiaga
6670fbb1ab Multiple record builder error 2023-05-08 19:26:47 -03:00
Agustin Zubiaga
735721769c Record Builder parsing 2023-05-05 23:26:20 -03:00
Jarl André Hübenthal
8bf888a5e6
chore: replace panic! with internal_error 2023-04-24 10:16:50 +02:00
Brendan Hansknecht
6302a8d4b5
switch from type annotation to type variable 2023-04-09 14:03:33 -07:00
Brendan Hansknecht
56ed985cc9
pass through correct path and type for ingested file 2023-04-09 14:03:32 -07:00
Brendan Hansknecht
0c366949cb
add basic checking for if an ingested file exists 2023-04-09 14:03:32 -07:00
Brendan Hansknecht
f4411afbbc
get basic wiring of a value through the compiler 2023-04-09 14:03:31 -07:00
Brendan Hansknecht
8f238046be
get basic parsing and formatting working 2023-04-09 14:03:31 -07:00
Brendan Hansknecht
99547086ee
add very rough framework of how the parse might need to change 2023-04-09 14:03:31 -07:00
Luke Boswell
2d0bed5634
formatting 2023-03-12 17:11:35 +11:00
Luke Boswell
1e26769313
add support for @,_,* tokens 2023-03-12 17:01:05 +11:00
Luke Boswell
2bed7da218
improve token categories and color scheme 2023-03-10 11:38:42 +11: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
21af20597e
remove unused dependencies 2023-03-06 12:09:00 -08:00
Joshua Warner
2dfe373311
Produce combined tokens directly and add a few operators
This (I believe) brings us in line with the complete set of operators supported in Roc.
2023-03-04 21:42:33 -08:00
Anton-4
cf913814cb
fmt 2023-03-01 19:57:39 +01:00
Luke Boswell
f51aef42bb
add support for slashes 2023-03-01 19:06:15 +11:00
Luke Boswell
c9ffedb483
add ? token 2023-03-01 18:38:16 +11:00
Luke Boswell
5f8629f64e
bug fix for highlighting 2023-03-01 18:00:30 +11: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
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
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
3b51d7cd13
Fix multi-backpassing in top-level defs
Fixes #4821
2023-01-15 10:39:21 -08:00
Ayaz
545e6bc989
Merge pull request #4884 from joshuawarner32/fmt-fuzzing-fixes
Fix approximately a bajillion fmt and parsing bugs
2023-01-14 19:45:30 -06: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
Ayaz
fdb4fe66ee
Merge pull request #4820 from joshuawarner32/remove-parser-generator
Remove accidentally committed parser generator
2023-01-11 23:14:52 -06: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
8305d078a0
add as for list rest patterns 2022-12-30 23:17:29 +01:00
Folkert
aff70bb6bd
refactor PatternAs 2022-12-30 18:22:10 +01:00
Folkert
e9196f3c0b
parse and format pattern as 2022-12-30 17:50:17 +01:00
Joshua Warner
a15e6c5c37
Remove accidentally committed parser generator 2022-12-27 16:55:54 -08:00
Anton-4
c3b0295a92
Merge pull request #4813 from joshuawarner32/test_syntax
Move syntax tests to a dedicated crate
2022-12-27 13:15:01 +01:00
Anton-4
f0ea60df51
use latest cli platform, added wasm repl build test 2022-12-27 11:31:15 +01:00