get basic wiring of a value through the compiler

This commit is contained in:
Brendan Hansknecht 2023-03-22 22:26:02 -07:00
parent 5354637cec
commit f4411afbbc
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
8 changed files with 22 additions and 5 deletions

View file

@ -263,6 +263,9 @@ pub enum Expr<'a> {
Tuple(Collection<'a, &'a Loc<Expr<'a>>>),
// The name of a file to be ingested directly into a variable.
IngestedFile(StrLiteral<'a>),
// Lookups
Var {
module_name: &'a str, // module_name will only be filled if the original Roc code stated something like `5 + SomeModule.myVar`, module_name will be blank if it was `5 + myVar`
@ -1469,6 +1472,9 @@ impl<'a> Malformed for Expr<'a> {
Str(inner) => inner.is_malformed(),
// TODO: what is the scope of Malformed? Would this not being a real file make it malformed?
IngestedFile(inner) => inner.is_malformed(),
RecordAccess(inner, _) |
TupleAccess(inner, _) => inner.is_malformed(),