From 5d29fdaa42c638e9420bd3111fb15f3594342354 Mon Sep 17 00:00:00 2001 From: "John Hodge (bugs)" Date: Sun, 14 Dec 2014 10:03:30 +0800 Subject: Parse working, starting on conversion --- main.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 34c7e0a4..f3349257 100644 --- a/main.cpp +++ b/main.cpp @@ -4,13 +4,24 @@ using namespace std; -extern void Parse_Crate(::std::string mainfile); +extern AST::Crate Parse_Crate(::std::string mainfile); +extern void ResolvePaths(AST::Crate& crate); +/// main! int main(int argc, char *argv[]) { try { - Parse_Crate("samples/1.rs"); + AST::Crate crate = Parse_Crate("samples/1.rs"); + + // Resolve names into absolute? + ResolvePaths(crate); + + // Flatten modules into "mangled" set + + // Typecheck / type propagate module (type annotations of all values) + + // Convert structures to C structures / tagged enums } catch(const ParseError::Base& e) { -- cgit v1.2.3