From 60b6c798a5eaea46660c3158a4ebfbf9ae67d7ed Mon Sep 17 00:00:00 2001 From: ikarus Date: Wed, 8 May 2024 09:07:53 +0100 Subject: [PATCH] tabs for indentation --- core/odin/parser/parse_files.odin | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/odin/parser/parse_files.odin b/core/odin/parser/parse_files.odin index 9911e3a5f..c1798778b 100644 --- a/core/odin/parser/parse_files.odin +++ b/core/odin/parser/parse_files.odin @@ -39,10 +39,10 @@ collect_package :: proc(path: string) -> (pkg: ^ast.Package, success: bool) { delete(fullpath) return } - if strings.trim_space(string(src)) == "" { - delete(fullpath) - continue - } + if strings.trim_space(string(src)) == "" { + delete(fullpath) + continue + } file := ast.new(ast.File, NO_POS, NO_POS) file.pkg = pkg @@ -76,9 +76,9 @@ parse_package :: proc(pkg: ^ast.Package, p: ^Parser = nil) -> bool { if !parse_file(p, file) { ok = false } - if file.pkg_decl == nil { - error(p, p.curr_tok.pos, "Expected pacakge declaration at the start of the file") - } else if pkg.name == "" { + if file.pkg_decl == nil { + error(p, p.curr_tok.pos, "Expected pacakge declaration at the start of the file") + } else if pkg.name == "" { pkg.name = file.pkg_decl.name } else if pkg.name != file.pkg_decl.name { error(p, file.pkg_decl.pos, "different package name, expected '%s', got '%s'", pkg.name, file.pkg_decl.name)