Remove commented out code
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
parent
8d666c0308
commit
24967b3eb7
@ -352,8 +352,6 @@ generate_llvm :: proc(ctx: LLVMContextRef, mod: LLVMModuleRef, builder: LLVMBuil
|
||||
|
||||
struct_value := g_last_alloca
|
||||
|
||||
//struct_value := LLVMBuildAlloca(builder, struct_type, "structini")
|
||||
//struct_value := LLVMConstNamedStruct(struct_type, raw_data(struct_values[:]), len(struct_values))
|
||||
struct_values := [dynamic]LLVMValueRef{}
|
||||
for &field, i in node.children[:] {
|
||||
field_value := generate_llvm_expression(ctx, mod, builder, field)
|
||||
@ -916,7 +914,5 @@ generate_llvm :: proc(ctx: LLVMContextRef, mod: LLVMModuleRef, builder: LLVMBuil
|
||||
}
|
||||
|
||||
generate_llvm_scope(ctx, mod, builder, main_function, node, &scope_number)
|
||||
//basic_block := LLVMAppendBasicBlockInContext(ctx, main_function, "end")
|
||||
//LLVMPositionBuilderAtEnd(builder, basic_block)
|
||||
LLVMBuildRet(builder, LLVMConstInt(int_32_type, 0, LLVMBool(1)))
|
||||
}
|
||||
|
@ -41,16 +41,13 @@ main :: proc() {
|
||||
if msg.level == .Error || msg.level == .Fatal {
|
||||
contains_errors = true
|
||||
}
|
||||
//fmt.printf("%s\n", msg)
|
||||
}
|
||||
if contains_errors {
|
||||
os.exit(1)
|
||||
}
|
||||
}
|
||||
//node_print(ast)
|
||||
clear(&g_message_list)
|
||||
type_check(ast, nil)
|
||||
//node_print(ast)
|
||||
if len(g_message_list) > 0 {
|
||||
contains_errors := false
|
||||
for &msg in g_message_list {
|
||||
@ -58,15 +55,12 @@ main :: proc() {
|
||||
if msg.level == .Error || msg.level == .Fatal {
|
||||
contains_errors = true
|
||||
}
|
||||
//fmt.printf("%s\n", msg)
|
||||
}
|
||||
if contains_errors {
|
||||
os.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
node_print(ast)
|
||||
|
||||
name: string
|
||||
if handle == os.stdin {
|
||||
name = "stdin"
|
||||
|
@ -312,17 +312,6 @@ type_check :: proc(ast: ^Node, parent_ast: ^Node) {
|
||||
clear(&ast.children)
|
||||
ast^ = child
|
||||
return
|
||||
|
||||
//if ast.children[0].return_type == nil {
|
||||
// append(
|
||||
// &g_message_list,
|
||||
// message_create(.Error, fmt.aprintf("Field access return type is nil"), ast.children[0].range),
|
||||
// )
|
||||
// break
|
||||
//}
|
||||
|
||||
//lhs := ast.children[0].children[0]
|
||||
//rhs := ast.children[0].children[1]
|
||||
}
|
||||
|
||||
type := scope_variable_lookup(ast.children[0].value.([dynamic]u8))
|
||||
|
Loading…
x
Reference in New Issue
Block a user