502 Commits

Author SHA1 Message Date
259c9f8bb6 repline: update Crossterm dependency to 0.29.0 2025-07-18 05:40:20 -04:00
c9ffeaddce conlang: bump version number to 0.0.10 2025-07-18 05:37:23 -04:00
12daf35c07 .gitignore: Ignore cl-typeck table dumpfile 2025-07-18 05:37:09 -04:00
6a0607b93a sample-code: Add a super hacky format-string implementation using eval and fmt builtins 2025-07-18 05:36:38 -04:00
4f40bd4f99 sample-code: Remove "Student" function from match_test 2025-07-18 05:35:57 -04:00
2f94ddd23f repline: QoL improvement: inserting newline works! 2025-07-18 05:35:00 -04:00
0f9044bb3e stdlib: Inference engine caught some type errors! Also added some hot garbage. 2025-07-18 05:34:03 -04:00
8732cca3f9 cl-typeck: Get some serious type inference going! 2025-07-18 05:30:23 -04:00
74220d3bff cl-lexer: Add base-36 literals, lmao 2025-07-18 05:29:31 -04:00
8b0a122dfc cl-interpret: Environment/stack overhaul + Ref patterns 2025-07-18 05:29:10 -04:00
e165e029dc cl-embed: Calculator example update! 2025-07-18 05:26:39 -04:00
148ef34a01 ast: add gens for ty and impl, raw ptr types, make fn return value non-optional 2025-07-18 05:25:35 -04:00
6ba62ac1c4 repline: Refactor for fewer redraws and more user control.
Definitely has bugs, but eh!
2025-06-17 00:43:21 -04:00
ae026420f1 conlang: Fix rustdoc warnings 2025-06-17 00:43:21 -04:00
d80f2f6315 cl-embed/examples: rename conculator back to calculator, since MI searches by path 2025-05-19 01:23:23 +00:00
89ed9b2a39 test.cl: Never-like enums tempermanently(?) removed 2025-05-18 11:51:22 -04:00
47608668fa cl-embed: Add an example, and a new sample-code (same file) 2025-05-18 11:50:33 -04:00
6ce27c522f cl-embed: Create an (unstable) API for embedding Conlang in your projects! 2025-05-18 11:49:43 -04:00
233e4dab4e visit: docs cleanup 2025-05-18 11:48:22 -04:00
f95c6ee239 cl-interpret: Add convenience function for binding variables 2025-05-18 11:48:04 -04:00
964917d2f0 cl-interpret: let now returns bool
This makes debugging monumentally harder, but it's SO NEAT and instantly adds `if let`/`while let` and `let chaining`
2025-05-18 11:47:13 -04:00
6bb855cff7 cl-parser: semantics changes
allow let in conditionals (restricts init of let to non-assignment)

allow semicolons after items at file scope
2025-05-18 11:44:44 -04:00
124bb2f680 cl-interpret: Builtins! builtins(), chars(str), and panic(msg) 2025-05-18 11:42:33 -04:00
08b5937fc2 cl-typeck: Twiddle with infer (maybe this will help fix the weird behavior?) 2025-05-18 11:39:54 -04:00
ccfa4c7723 cl-interpret: copy-capture closures 2025-05-18 11:30:17 -04:00
d3e20e53d0 cl-interpret: Unit tests for while-else control flow 2025-05-18 04:01:50 -04:00
e08bf57dc1 cl-typeck: Give inference its own result type 2025-05-18 04:01:13 -04:00
a5590168ee cl-parser: Misc cleanup 2025-05-18 04:00:43 -04:00
3e2063835b cl-parser: Dedicated parsing logic for patterns! 2025-05-18 04:00:00 -04:00
e6156343c3 cl-ast: Add inline closure expressions 2025-05-18 03:57:20 -04:00
6c6d2d04a7 cl-ast: Remove variantkind, as it was redundant 2025-05-17 21:28:12 -04:00
a023551d9f repline: Change newline behavior when not at end of input
TODO: This screws with the naming convention of home()/end()
2025-05-17 20:32:24 -04:00
dc1c9bdd6d stdlib: Add map* for Option and Result 2025-05-05 05:32:23 -04:00
c5e817f1e5 cl-ast: Rearrange 2025-05-05 05:26:43 -04:00
6108d66b0a stdlib: Add Option and Result types 2025-05-05 04:55:17 -04:00
09fdb14d79 cl-typeck: Progress population and categorization 2025-05-05 04:54:33 -04:00
4228324ab3 cl-typeck: With super semantics redone, search within self for items 2025-05-05 04:20:40 -04:00
f5f905cd70 cl-ast: more generic impls for weight_of
TODO: get rid of weight_of
2025-05-05 04:19:23 -04:00
883387aaf1 yaml: formatting 2025-05-05 04:18:49 -04:00
2d706ff582 desugar: Add primitive constant folding 2025-05-05 04:18:16 -04:00
cd2e3c3e32 cl-parser: change match parse slightly 2025-05-05 04:16:37 -04:00
8c23aea4af to_c: oops 2025-05-05 04:14:30 -04:00
d6c0a6cf1b cl-ast: Allow c-like enums to take an expr 2025-05-05 02:22:50 -04:00
fc80be5fcc conlang: Remove "self" keyword 2025-05-05 02:20:47 -04:00
7c2dd1468b cl-ast: Finally figure out how visit and walk are supposed to work 2025-05-05 00:24:52 -04:00
4747b65414 stdlib: Add Result and Option types
Since the type checker sucks less now, we can think about maybe
adding some features to the language.

...At some point I'd like to have the type checker clean up
the index map.
2025-04-22 08:00:59 -04:00
8ff17fd475 cl-ast: Add syntax support for generics 2025-04-22 07:22:44 -04:00
681fbc88d3 cl-typeck: More type inference
- Renamed "intrinsic" -> "primitive"
  - I thought it was funny, but it's just annoying.
- Rename "Uninferred" -> "Inferred"
  - It's a concrete type, but an inferred one.
- Add lifetimes to the Entry API
- Categorize does not care about recursive types. You can't have a recursive AST.
- Added helpful constructors to the inference engine
- Added some overloadable operators to the inference engine
  - These are a MAJOR work in progress
- Reorganized the Inference implementation file by functionality.

stdlib:
- Updated standard library.
2025-04-22 06:33:57 -04:00
7cf485fade cl-typeck/infer: Fix some inference errors
yay yippee type checking and inference woohoo
i am very tired
2025-04-21 05:37:34 -04:00
3b96833fcb cl-typeck: Early type inference for let 2025-04-21 04:52:59 -04:00