import c
This commit is contained in:
11
src/ast.zig
11
src/ast.zig
@@ -68,6 +68,7 @@ pub const Node = struct {
|
||||
tuple_type_expr: TupleTypeExpr,
|
||||
tuple_literal: TupleLiteral,
|
||||
ufcs_alias: UfcsAlias,
|
||||
c_import_decl: CImportDecl,
|
||||
|
||||
pub fn declName(self: Data) ?[]const u8 {
|
||||
return switch (self) {
|
||||
@@ -79,6 +80,7 @@ pub const Node = struct {
|
||||
.union_decl => |d| d.name,
|
||||
.namespace_decl => |d| d.name,
|
||||
.ufcs_alias => |d| d.name,
|
||||
.c_import_decl => |d| d.name,
|
||||
else => null,
|
||||
};
|
||||
}
|
||||
@@ -427,3 +429,12 @@ pub const UfcsAlias = struct {
|
||||
name: []const u8,
|
||||
target: []const u8,
|
||||
};
|
||||
|
||||
pub const CImportDecl = struct {
|
||||
includes: []const []const u8,
|
||||
sources: []const []const u8,
|
||||
defines: []const []const u8,
|
||||
flags: []const []const u8,
|
||||
name: ?[]const u8 = null,
|
||||
bitcode_paths: []const []const u8 = &.{}, // populated during import resolution
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user