Commit graph

277 commits

Author SHA1 Message Date
Ayaz
e5eb9c9f1c
Merge pull request #3052 from rtfeldman/build-encode
Encode/JSON in standard library typechecks
2022-05-19 21:16:59 -04:00
Ayaz Hafiz
fcf464e9da
Parse has-derived clauses 2022-05-19 18:29:31 -04:00
Ayaz Hafiz
0c5e903d2a
Make spaces before ability are recorded 2022-05-19 18:21:45 -04:00
Folkert
1a49930d1d
simplifications 2022-05-15 22:00:47 +02:00
Folkert
f92a8e900d
binary operation bitmask 2022-05-15 21:34:43 +02:00
Richard Feldman
85e7969c2d
Replace references to "global tag" with "tag" 2022-04-25 17:04:34 -04:00
Ayaz Hafiz
1ed9cf551a
Remove private tags from Ast 2022-04-25 11:20:37 -04:00
Ayaz Hafiz
67eb4b9faa
Remove private tags from idents 2022-04-25 11:13:30 -04:00
Joshua Warner
b1e3913041 Allow parsing if as part of the right-hand-side of a binary expression 2022-04-24 09:56:53 -07:00
Kevin Gillette
cd8ab753e3
remove %% operator 2022-04-18 19:15:14 -06:00
Ayaz Hafiz
233ea23979
Revert "Detect outdents too far"
This reverts commit 1c2ca2e3f5ae12d114cc72970035caf937d6e413.
2022-04-14 10:47:20 -04:00
Ayaz Hafiz
dc2d9ceeac
Detect outdents too far 2022-04-14 10:47:20 -04:00
Ayaz Hafiz
0c21821b04
Make sure outdented records parse 2022-04-14 09:31:55 -04:00
Ayaz Hafiz
66ec1b4a84 Basic canonicalization and error checking for abilities 2022-04-07 17:21:17 -04:00
Ayaz Hafiz
a3ac68a41f
Split up Defs into TypeDef and ValueDef
Just a refactoring PR. This is useful because during canonicalization
we always process type defs first, then value defs. With abilities this
distinction continues to grow; in that case, we have patterns associated
with types that we want to process before patterns from values.
2022-04-06 22:18:57 -04:00
Ayaz Hafiz
bd8333ebb1
Parse multiple abilities behind each other 2022-04-06 11:20:51 -04:00
Ayaz Hafiz
2dc0445f46
s/AbilityDemand/AbilityMember
This is a better name
2022-04-06 11:20:34 -04:00
ayazhafiz
84c7c49110 Fix parse error 2022-03-12 23:55:33 -06:00
Richard Feldman
da64cc0a1d
cargo fmt 2022-03-12 23:43:45 -05:00
ayazhafiz
d92a5b9424 Reporting for abilities parsing 2022-03-12 22:08:01 -06:00
ayazhafiz
d7abc3897b Parse abilities 2022-03-12 21:29:06 -06:00
Brendan Hansknecht
f7c0e2ef19 Merge remote-tracking branch 'origin/trunk' into single-quote-literal 2022-02-24 10:13:39 -08:00
ayazhafiz
6b53692aac Canonicalize opaque types 2022-02-20 13:47:01 -05:00
ayazhafiz
6104a27b45 Parse opaque references 2022-02-19 21:30:42 -05:00
ayazhafiz
a38f1d1e8d Fmt and clippy 2022-02-19 20:54:21 -05:00
ayazhafiz
3c10ad2a9f Test for opaque definitions 2022-02-19 20:51:12 -05:00
ayazhafiz
fa24e51593 Parse opaque types 2022-02-19 18:38:31 -05:00
ayazhafiz
8ce81e4607 AliasHeader -> TypeHeader 2022-02-19 17:51:56 -05:00
Joshua Warner
f440d53e7b Refactor: introduce trait SpaceProblem to remove a bunch of redundant args in ::Space errors 2022-02-15 20:48:04 -08:00
ayazhafiz
a6f7579c07 Parse and expand numeric bounds in canonicalization pass 2022-02-01 22:50:46 -05:00
ayazhafiz
9f72b2710f Run linter 2022-02-01 22:49:52 -05:00
ayazhafiz
e03592930f Typecheck numeric literals with suffixes in expressions
Part of #2350
2022-02-01 22:49:50 -05:00
ayazhafiz
320827167f Parse number literal width suffixes
Supports [u,i][8,16,32,64,128] and [nat,dec]

Part of #2350
2022-02-01 22:48:48 -05:00
Jan Van Bruggen
1e9d2d1239 Remove accidental trailing spaces 2022-01-18 22:25:46 -07: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
a13c474f6b Remove line tracking in parser 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
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
Joshua Warner
22e2545fd6 format 2021-12-22 20:46:42 -08:00
Joshua Warner
f170509bf1 rename col -> column 2021-12-22 20:37:40 -08:00
Joshua Warner
4d7070ce3b Always combine line,column into Position 2021-12-22 20:32:46 -08:00