summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/main.cpp b/src/main.cpp
index df8ca562..4338487c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -120,8 +120,7 @@ int main(int argc, char *argv[])
CompilePhaseV("Resolve", [&]() {
Resolve_Use(crate); // - Absolutise and resolve use statements
Resolve_Index(crate); // - Build up a per-module index of avalable names (faster and simpler later resolve)
- Resolve_Absolutise(crate);
- //Resolve_UfcsPaths(crate);
+ Resolve_Absolutise(crate); // - Convert all paths to Absolute or UFCS, and resolve variables
// OLD resolve code, kinda bad
//ResolvePaths(crate);
@@ -137,31 +136,34 @@ int main(int argc, char *argv[])
hir_crate = LowerHIR_FromAST(mv$( crate ));
});
- // Replace type aliases (`type`) into the actual type
+ // Perform type checking on items
+ // - Replace type aliases (`type`) into the actual type
CompilePhaseV("Resolve Type Aliases", [&]() {
- //
+ //Typecheck_ExpandAliases(hir_crate);
});
-
- // Perform type checking on items
-
- //
// Typecheck / type propagate module (type annotations of all values)
// - Check all generic conditions (ensure referenced trait is valid)
// > Also mark parameter with applicable traits
CompilePhaseV("TypecheckBounds", [&]() {
//Typecheck_GenericBounds(crate);
});
-
- // - Check all generic parameters match required conditions
+ // - Check all generic parameters match required conditions (without doing full typeck)
CompilePhaseV("TypecheckParams", [&]() {
//Typecheck_GenericParams(crate);
});
- // - Typecheck statics and consts
- // - Typecheck + propagate functions
- // > Forward pass first
+ // - Full function typeck
CompilePhaseV("TypecheckExpr", [&]() {
//Typecheck_Expr(crate);
});
+
+ // Expand closures into items
+ CompilePhaseV("Lower Closures", [&]() {
+ //
+ });
+ // Lower expressions into MIR
+ CompilePhaseV("Lower MIR", [&]() {
+ //
+ });
CompilePhaseV("Output", [&]() {
Dump_Rust( FMT(params.outfile << ".rs").c_str(), crate );