mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
wip
This commit is contained in:
parent
9e02537ebb
commit
0a9989e75f
7 changed files with 61 additions and 30 deletions
|
@ -21,6 +21,7 @@ use inkwell::targets::{
|
|||
use std::path::{Path, PathBuf};
|
||||
use target_lexicon::{Architecture, OperatingSystem, Triple, Vendor};
|
||||
|
||||
// TODO how should imported modules factor into this? What if those use builtins too?
|
||||
// TODO this should probably use more helper functions
|
||||
// TODO make this polymorphic in the llvm functions so it can be reused for another backend.
|
||||
#[allow(clippy::cognitive_complexity)]
|
||||
|
@ -110,7 +111,9 @@ pub fn build(
|
|||
}
|
||||
}
|
||||
}
|
||||
InvalidCycle(_, _) => {}
|
||||
InvalidCycle(_, _) | Builtin(_) => {
|
||||
// These can never contain main.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -181,7 +184,7 @@ pub fn build(
|
|||
use roc_can::pattern::Pattern::*;
|
||||
|
||||
match decl {
|
||||
Declare(def) => match def.loc_pattern.value {
|
||||
Declare(def) | Builtin(def) => match def.loc_pattern.value {
|
||||
Identifier(symbol) => {
|
||||
match def.loc_expr.value {
|
||||
Closure(annotation, _, _, loc_args, boxed_body) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue