core/odin: Added new file tag syntax as token. parse_file stores a list of tags that the file tag parser can use later.
This commit is contained in:
1 parent
c24e18bf10
commit
b12d312408
6 files changed
+81
-16
No files matched your search
@@ -77,9 +77,7 @@ 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 a package declaration at the start of the file")
|
||||
} else if pkg.name == "" {
|
||||
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)
|
||||
|
||||
Reference in new issue
Block a user