Import message
This commit is contained in:
@@ -217,6 +217,8 @@ note_struct :: (code_struct: *Code_Struct) {
|
||||
}
|
||||
}
|
||||
|
||||
import: *Message_Import;
|
||||
|
||||
message_loop :: () {
|
||||
while true {
|
||||
message := compiler_wait_for_message();
|
||||
@@ -224,6 +226,12 @@ message_loop :: () {
|
||||
// so that we can look for the data structures we care about; or, when all the code is done
|
||||
// being typechecked, we want to generate our new code.
|
||||
if message.kind == {
|
||||
case .IMPORT; {
|
||||
import := cast(*Message_Import)message;
|
||||
if import.module_name == "Coven" {
|
||||
message = import;
|
||||
}
|
||||
}
|
||||
case .TYPECHECKED;
|
||||
typechecked := cast(*Message_Typechecked) message;
|
||||
for typechecked.structs {
|
||||
@@ -293,7 +301,7 @@ generate_code :: (w: Workspace) {
|
||||
}
|
||||
|
||||
build_string := sprint(INIT_SCENE, builder_to_string(*builder));
|
||||
add_build_string(build_string, w);
|
||||
add_build_string(build_string, w, message);
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user