Commit Graph

25 Commits

Author SHA1 Message Date
a033e9f33b conlang: Enable opt-level 1 in dev profile 2024-05-16 15:07:54 -05:00
a877c0d726 cl-arena: Add arena allocator implementation based HEAVILY on rustc-arena
It seems to pass the most basic of tests in miri (shame it needs the unstable `strict_provenance` feature to do so, but eh.)
2024-04-26 00:02:50 -05:00
f483d690e2 Revert "Cargo.toml: Add documentation key"
This reverts commit 087969e117.
2024-04-22 00:07:44 -05:00
087969e117 Cargo.toml: Add documentation key 2024-04-21 23:49:24 -05:00
90a3818ca0 conlang: Move all cl-libs into the compiler directory 2024-04-19 07:39:23 -05:00
2a62a1c714 repline: Promote to its own crate!
cl-repl: Major refactor based on the design of typeck.rs
2024-04-19 07:30:17 -05:00
fc3cbbf450 Conlang v0.0.5: Pratternization
cl-token:
- Minimize data redundancy by consolidating TokenKind::Literal; TokenData::{String, Identifier}
- Rename Op to Punct

cl-ast:
- Remove ExprKind::{Member, Call} in favor of making them
'binary' operators
- Consolidate boxes (TODO: consolidate more boxes)
- Remove repetition vecs in favor of boxes (this may come with performance tradeoffs!)

cl-lexer:
- Reflect changes from cl-token

cl-interpret, cl-repl/src/examples:
- Reflect changes from cl-ast

cl-parser:
- Switch to Pratt parsing for expressions
  - TODO: Code cleanup
  - TODO: Use total ordering for Precedence instead of binding powers (that's what the binding powers are there for anyway)
- Switch functional parsers to take Punct instead of TokenKind
  - It's not like we need a `for`-separated list
- Remove `binary` macro. No longer needed with precedence climbing.
- Repurpose `operator` macro to produce both the operator and the respective Precedence
- Remove several of the smaller parser functions, since they've been consolidated into the larger `exprkind`
2024-04-13 03:33:26 -05:00
a9b834e012 conlang: bump version number 2024-03-01 03:16:02 -06:00
c7fdeaf37a cl-typeck: Begin work on new type-checker.
Comments in lib.rs outline my current thought processes
2024-03-01 02:49:22 -06:00
276f0b1031 "libconlang": Remove libconlang 2024-03-01 02:38:00 -06:00
50b473cd55 cl-lexer: Move lexer into its own crate 2024-02-29 20:58:50 -06:00
cc281fc6ab cl-parser: Move parser into its own crate 2024-02-29 20:41:07 -06:00
1afde9ce35 cl-ast: Move AST definition into its own crate 2024-02-29 19:49:50 -06:00
6e1d5af134 cl-token: Move token definition into its own crate 2024-02-29 19:36:06 -06:00
69f5035a8b span: Break out into its own crate, to make room for future expansion 2024-02-29 18:31:41 -06:00
421aab3aa2 interpreter: Break out into a separate crate
My editor's performance was tanking because of macro interpreter::builtins::builtin!

Temporary solution: move the interpreter into a separate crate

If I intended to keep the interpreter around, in the long-term, it might be an idea to make a proc-macro for builtin expansion.
However, the only reason I need the macros is because the interpreter's dynamic typing implementation is so half-baked. After I bang out the new type checker/inference engine, I'll have to rewrite the entire interpreter anyway!
2024-02-29 17:51:38 -06:00
862d81a9d4 cl-repl: Rename from cl-frontend.
Also disable escape code printing when debug assertions are off
2024-02-28 05:32:10 -06:00
c4a32895df conlang 0.3.0: Total grammar overhaul
- Rewrote the grammar
- Rewrote the AST
- Rewrote the Parser
- Removed pretty printer (now handled by ast::ast_impl::Pretty, a Writer wrapper)
- Added items, and new keywords to go with them
  - Syntax is ~maybe temporary, based on Rust syntax
2024-01-21 05:32:18 -06:00
79fda16788 cl 0.0.2: MAJOR ERGONOMIC BOOST
Broke frontend into its own library, "cl-frontend"
- Frontend is pretty :D
- Included sample fibonacci implementation

Deprecated conlang::ast::Visitor in favor of bespoke traits
- Rust traits are super cool.
- The Interpreter is currently undergoing a major rewrite

Added preliminary type-path support to the parser
- Currently incomplete: type paths must end in Never..?

Pretty printer is now even prettier
- conlang::ast now exports all relevant AST nodes, since there are no namespace collisions any more
2024-01-04 02:18:09 -06:00
d1b5c48aac constr/lerox: remove 2023-10-26 12:23:26 -05:00
0e1beca43d Cargos.toml: wrong key ("publish") 2023-10-23 23:42:39 -05:00
9196d3b1da Add package metadata 2023-10-23 21:38:06 -05:00
a26a01fc17 constr: Misuse iterators to parse tokens 2023-10-20 15:33:02 -05:00
90ef1f542d lerox: Add lerox, a silly little combinator library 2023-09-22 23:54:09 -05:00
8f66a64924 Initial Commit 2023-09-21 15:41:12 -05:00