mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-31 03:40:08 +00:00
Add @force to foreign import
This commit is contained in:
@@ -410,6 +410,7 @@ Foreign_Import_Decl :: struct {
|
||||
name: ^Ident,
|
||||
collection_name: string,
|
||||
fullpaths: []string,
|
||||
attributes: [dynamic]^Attribute, // dynamic as parsing will add to them lazily
|
||||
comment: ^Comment_Group,
|
||||
}
|
||||
|
||||
|
||||
@@ -827,6 +827,9 @@ parse_attribute :: proc(p: ^Parser, tok: tokenizer.Token, open_kind, close_kind:
|
||||
case ast.Foreign_Block_Decl:
|
||||
if d.docs == nil do d.docs = docs;
|
||||
append(&d.attributes, attribute);
|
||||
case ast.Foreign_Import_Decl:
|
||||
if d.docs == nil do d.docs = docs;
|
||||
append(&d.attributes, attribute);
|
||||
case:
|
||||
error(p, decl.pos, "expected a value or foreign declaration after an attribute");
|
||||
free(attribute);
|
||||
|
||||
Reference in New Issue
Block a user