Commit Graph

24 Commits

Author SHA1 Message Date
e4f270da17 cl-ast: Re-order items for aesthetic reasons 2024-04-18 20:22:08 -05:00
02b775259e cl-ast: Change loop expression to take any expression as its argument, for later desugaring. 2024-04-18 01:53:32 -05:00
00d72b823a conlang: Add unconditional loop expression, for desugaring 2024-04-17 00:29:09 -05:00
eee9e99aed cl-ast: add todo about slice and array type-expressions 2024-04-16 23:46:24 -05:00
f6e44f3773 cl-ast: Print space between items :-) 2024-04-16 23:45:54 -05:00
83694988c3 cl-ast: Let Ty handle the complexities of VariantKind::Tuple's type list 2024-04-16 20:40:02 -05:00
98868d3960 cl-ast: allow TyRef to be mutable
yaml.rs: Print AddrOf and TyRef the same way
2024-04-16 20:35:27 -05:00
75adbd6473 cl-ast: Separate function *signature* from function bindings, for cl-typeck
Note: this breaks cl-typeck
2024-04-16 20:31:23 -05:00
d0ed8309f4 cl-ast: Don't store type metadata in TyTuple. Allow arbitrary TyKind in TyFn args. 2024-04-14 23:16:35 -05:00
f958bbcb79 cl-ast: Hash everything 2024-04-14 23:11:48 -05:00
d07a3e1455 cl-ast: Separate Display impl for Ty and TyKind 2024-04-14 23:10:02 -05:00
89cd1393ed cl-ast: Give Impl/ImplKind some love 2024-04-14 18:01:30 -05:00
6ea99fc6f5 cl-ast: Fix formatting for Index expression 2024-04-13 23:26:06 -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
8dfddb739e cl-ast: Remove unused monovariant MemberKind enum 2024-04-06 01:03:01 -05:00
a036ce260d cl-ast: Add doc comments for every node
This improves the rustdoc output somewhat
2024-04-03 13:19:57 -05:00
4a52d2bc6a conlang: Update type checker
- cl-typeck: Add modules, intrinsic types, unify definition ids
- cl-ast: make attribute lists `Default`
- cl-structures: Add functions to iterate through a pool
- cl-repl: Create an example REPL for the type checker
2024-04-01 05:14:06 -05:00
7b40ddc845 cl-ast: destination side of type alias should be an identifier 2024-04-01 04:20:26 -05:00
bdf0bb68ca cl-ast: improve formatting of enums 2024-04-01 04:18:31 -05:00
8ee318f26b cl-ast: Move ExprKind::Assign outside the box, to be more consistent with other uses of Expr 2024-03-28 16:34:24 -05:00
1eec1b06ce cl-ast: Move matched brace indenter out of ast_impl (it doesn't impl the ast) 2024-03-01 02:44:35 -06:00
c665e52782 all: #![warn(clippy::all)] 2024-02-29 21:04:45 -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