Luke Boswell
129ca94733
remove unit type from EmptyDefsFinal
2024-04-14 13:45:07 +10:00
Luke Boswell
c32fa5b600
support optional suffied last def
2024-04-14 13:45:06 +10:00
Luke Boswell
8b9e08bd76
WIP try simplification
2024-04-14 13:45:05 +10:00
Luke Boswell
3c3e523b45
add suffixed to Identifer and QualifiedIdentifier
2024-04-14 13:45:00 +10:00
Luke Boswell
0a3b9c34b3
add suffixed:u8 to Expr::Var
2024-04-14 13:45:00 +10:00
Luke Boswell
42fdcb7ff1
Make unit assignment optional for suffixed defs
2024-04-14 13:44:59 +10:00
Jonathan Schear
723c390f52
Treat two hash marks followed by text as a doc comment
2024-03-24 14:31:27 -04:00
Luke Boswell
8bbbd768ec
add snapshot test for suffixed expr
2024-03-15 14:39:21 +11:00
Anton-4
6338e54205
improve wording
2024-01-28 18:33:12 +01:00
Anton-4
30a5a2cfac
change hashtag formatting
2024-01-28 18:15:24 +01:00
Richard Feldman
af8e9c7292
Parse deprecated interpolation syntax differently
2024-01-06 21:49:00 -05:00
JRI98
0599066865
Fix format for the 'as' keyword
2023-12-07 10:46:58 +00:00
Brendan Hansknecht
5e8974177c
avoid bloating parse expr size
2023-12-02 21:18:32 -08:00
Brendan Hansknecht
3966d63e2f
add src and location to dbg
2023-12-02 21:18:31 -08:00
Brendan Hansknecht
1f14aa84a2
misc cleanup suggestions
2023-11-29 21:05:56 -08:00
Brendan Hansknecht
b7f72eff86
add basic Dbg desugaring and LowLevelDbg
2023-11-29 21:05:48 -08:00
Bryce Miller
e463ccf4a6
merge main
2023-06-07 20:36:54 -04:00
Ajai Nelson
2e5fef5231
Improve error messages involving ignored variables
...
Fix #3987
2023-06-06 19:46:15 -04:00
Bryce Miller
46cb45f717
loc_has -> loc_implements
2023-05-20 19:24:08 -04:00
Bryce Miller
10d92bf0f3
ast::ImplementsAbilities::Has ->
...
ast::ImplementsAbilities::Implements
2023-05-20 19:16:13 -04:00
Bryce Miller
4b90948fcf
ast::HasAbilities -> ast::ImplementsAbilities
2023-05-20 19:13:01 -04:00
Bryce Miller
9eb2180a0f
ast::HasAbility -> ast::ImplementsAbility
2023-05-20 08:27:42 -04:00
Bryce Miller
413ccb24ad
ast::HasImpls -> ast::AbilityImpls
2023-05-20 08:24:02 -04:00
Bryce Miller
ebbdae6c28
ast::HasClause -> ast::ImplementsClause
2023-05-20 08:20:44 -04:00
Bryce Miller
64c34a5c6d
ast::Has -> ast::Implements
2023-05-20 08:12:20 -04:00
Agustin Zubiaga
d1feb00170
Track spaces between : and <- in record builders
2023-05-17 11:49:06 -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
c2e50a22b6
Record Builder formatting
2023-05-07 15:51:08 -03:00
Anton-4
9748e4a4dc
many clippy fixes
2023-04-24 16:21:46 +02:00
Anton-4
e784baccce
rust update, nix update, clippy fixes
2023-04-22 14:51:01 +02:00
Brendan Hansknecht
56ed985cc9
pass through correct path and type for ingested file
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
99547086ee
add very rough framework of how the parse might need to change
2023-04-09 14:03:31 -07: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
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
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
Ayaz
dbdf4acdd7
Merge pull request #4758 from joshuawarner32/fuzzing-take-2
...
Add fuzzing for the formatter and fix bugs
2022-12-22 06:35:34 -07:00
Richard Feldman
09764be7c3
Go back to PackageName
2022-12-18 10:11:19 -05:00
Joshua Warner
a046428ce6
Add fuzzing for the formatter and fix bugs
...
This commit adds fuzzing for the (expr) formatter, with the same invariants that we use for fmt tests:
* We start with text, which we parse
* We format the AST, which must succeed
* We parse back the AST and make sure it's identical igoring whitespace+comments
* We format the new AST and assert it's equal to the first formatted version ("idempotency")
Interestingly, while a lot of bugs this found were in the formatter, it also found some parsing bugs.
It then fixes a bunch of bugs that fell out:
* Some small oversights in RemoveSpaces
* Make sure `_a` doesn't parse as an inferred type (`_`) followed by an identifier (parsing bug!)
* Call `extract_spaces` on a parsed expr before matching on it, lest it be Expr::SpaceBefore - when parsing aliases
* A few cases where the formatter generated invalid/different code
* Numerous formatting bugs that caused the formatting to not be idempotent
The last point there is worth talking further about. There were several cases where the old code was trying to enforce strong
opinions about how to insert newlines in function types and defs. In both of those cases, it looked like the goals of
(1) idempotency, (2) giving the user some say in the output, and (3) these strong opinions - were often in conflict.
For these cases, I erred on the side of following the user's existing choices about where to put newlines.
We can go back and re-add this strong opinionation later - but this seemed the right approach for now.
2022-12-17 09:52:09 -08:00
Richard Feldman
ec9cf4efe2
Merge branch 'to' into packages
2022-12-12 01:15:34 -05:00
Richard Feldman
8a9e152a5b
Rename PackageName to PackagePath
2022-12-12 00:41:55 -05:00
Richard Feldman
8a5ddaab2f
Drop imports
from package header
...
That doesn't actually make sense!
2022-12-04 06:26:44 -05:00
Richard Feldman
da595a86b0
Parse package module header
2022-12-04 06:26:44 -05:00
Joshua Warner
2b91af02df
Introduce record!
combinator
...
... and refactor header parser to fully use combinators, in support of future combinator-based superpowers
2022-11-28 20:25:55 -08:00
Ayaz Hafiz
1011ce9fba
Format crash
2022-11-24 14:46:49 -06:00
Ayaz
848c18f996
Merge pull request #4567 from joshuawarner32/tuple-type-annotation
...
Implement tuple type parsing
2022-11-24 14:42:11 -06:00