Commit Graph

28 Commits

Author SHA1 Message Date
607615db74 Add .cargo/config.toml, so other people can build Conlang 2025-10-20 00:07:20 -04:00
f625e4181f test.sh: add trailing newline. 2025-10-17 07:03:36 -04:00
75048c61c9 dummy.do: Semicolon elision! 2025-10-17 06:57:37 -04:00
db9c75b3c6 ast: formatting; main: explicit verbosity 2025-10-17 06:57:21 -04:00
f05d480b35 test.sh: add test script to quickly parse every file in a directory 2025-10-17 06:26:21 -04:00
6368e68941 doughlang: Preserve errors through entire pipeline
lexer:
- Un-stringify errors
- Reserve more words
- Doc the comments

parser:
- MASSIVE changes to peek, peek_if, next_if, consume_if=>expect.
- Keep track of when EOF is allowable
- TKind is stupidly cheap with >100 niches, so we can fit like 4 of them in a single ParseError lmao
- TODO: make sure EOF/UnexpectedEOF propagation is correct. It seems... Kinda Not correct.
- Add meta-expressions
2025-10-17 06:25:11 -04:00
c8f1f082c4 lexer: Document stuff 2025-10-16 23:08:16 -04:00
70042f4ed0 parser: remove "numeric" module, since (like cl) literals are handled in the lexer. 2025-10-16 22:50:04 -04:00
e1419fa430 doughlang: enums, ref patterns, ref types 2025-10-16 06:53:09 -04:00
6da201f52f parser: skip comments in peek 2025-10-16 06:50:17 -04:00
1998558468 doughlang: "fix" semi elision, add "fully qualified" paths, add proper pattern prec parsing.
This actually gets some old code parsing!
2025-10-16 05:49:02 -04:00
03d9682409 doughlang: let else, fn rety
ast:
- `let Pat (= Expr (else Expr)?)?`,
- `fn (args) -> Ty`, coagulating `do`, `if/while` formatting fixes

parser:
- int cleanup,
- fn rety parsing,
- experimental `for` desugar,
- experimental semicolon elision (TODO: it sucks),
- let-else parsing
- `do` coagulation impl (still not 100% there)

TODO:
- Fix `do` coagulation
- codify `do` elision rules
- `for` needs lib support
  - this is fine because we have no codegen yet
- Ty matching in macro_matcher
  - Or rip out macro_matcher? Who knows what the future holds.
2025-10-16 01:51:14 -04:00
95abb81f4a main: ty parser test mode, visually distinct prompt 2025-10-16 01:38:52 -04:00
f47de24cfb token: reserve "and", "or", "in" as keywords 2025-10-16 01:37:24 -04:00
b5d552376e Move integer and char parsing out of the parser and back into the lexer 2025-10-10 14:45:08 -04:00
0cbb800c19 lexer: Change base36 sigil to tilde, to match Conlang 2025-10-10 13:39:58 -04:00
2c63f1af63 ast: Make struct formatting look cool 2025-10-07 05:43:19 -04:00
4b0f30f78e lexer: Fun little lexer hack to allow trailing commas 2025-10-07 05:42:44 -04:00
222b2d7b98 ast: struct 2025-10-07 05:00:51 -04:00
bcabbcd39d ast: pub, mod, and Ty::Fn parsing 2025-09-30 15:32:20 -04:00
46b17a7eb6 dummy: fn main syntax! yay 2025-09-21 02:58:50 -04:00
8640ec4261 ast: fn main, structification
parser: unified post/infix, context-full grammar
repl: modes
2025-09-21 02:57:20 -04:00
434fa225e7 ast: Fix pattern metaidentifier display 2025-09-21 02:24:43 -04:00
b1619f6e4e parser: allow any token to be a metaidentifier 2025-09-21 02:24:15 -04:00
7b05da1334 do: Elaborate on pattern syntax, add binary as operator 2025-09-16 04:18:12 -04:00
b6949147c4 parser: Refactor coagulated binops as postfix operators
This allows them to intermingle more nicely with `Try`
2025-09-15 10:28:08 -04:00
baf94a9dab matchers: rename to "macro_matchers" 2025-09-15 10:25:50 -04:00
c83218d750 Initial Commit 2025-08-28 02:26:06 -04:00