conlang: Add constructor expression for structs!

grammar:
- Add new rules `PathLike`, `Structor`, `Fielder`
- Replace Path with PathLike in Primary expressions

cl-ast:
- Add nodes for Structor and Fielder

cl-parser:
- Add branch to path-expression parsing
- Parse Structor bodies

interpret:
- Add TODO
This commit is contained in:
2024-04-20 15:02:16 -05:00
parent efd442bbfa
commit 5341631781
9 changed files with 129 additions and 5 deletions

View File

@@ -91,6 +91,8 @@ pub enum Parsing {
Unary,
UnaryKind,
Index,
Structor,
Fielder,
Call,
Member,
PathExpr,
@@ -190,6 +192,8 @@ impl Display for Parsing {
Parsing::Unary => "a unary expression",
Parsing::UnaryKind => "a unary operator",
Parsing::Index => "an indexing expression",
Parsing::Structor => "a struct constructor expression",
Parsing::Fielder => "a struct field expression",
Parsing::Call => "a call expression",
Parsing::Member => "a member access expression",
Parsing::PathExpr => "a path",