mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Canonicalize ingested files directly instead of creating AST nodes
This commit is contained in:
parent
a832de79d7
commit
7efc7a4a3e
11 changed files with 146 additions and 121 deletions
|
@ -1,5 +1,4 @@
|
|||
use std::fmt::Debug;
|
||||
use std::path::Path;
|
||||
|
||||
use crate::header::{
|
||||
self, AppHeader, HostedHeader, InterfaceHeader, ModuleName, PackageHeader, PlatformHeader,
|
||||
|
@ -391,9 +390,6 @@ pub enum Expr<'a> {
|
|||
// Record Builders
|
||||
RecordBuilder(Collection<'a, Loc<RecordBuilderField<'a>>>),
|
||||
|
||||
// The name of a file to be ingested directly into a variable.
|
||||
IngestedFile(&'a Path, &'a Loc<TypeAnnotation<'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`
|
||||
|
@ -914,7 +910,6 @@ impl<'a, 'b> RecursiveValueDefIter<'a, 'b> {
|
|||
| Str(_)
|
||||
| SingleQuote(_)
|
||||
| AccessorFunction(_)
|
||||
| IngestedFile(_, _)
|
||||
| Var { .. }
|
||||
| Underscore(_)
|
||||
| Crash
|
||||
|
@ -2283,7 +2278,6 @@ impl<'a> Malformed for Expr<'a> {
|
|||
Tag(_) |
|
||||
OpaqueRef(_) |
|
||||
SingleQuote(_) | // This is just a &str - not a bunch of segments
|
||||
IngestedFile(_, _) |
|
||||
EmptyDefsFinal |
|
||||
Crash => false,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue