mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Fix odin version printing
This commit is contained in:
+1
-1
@@ -1166,7 +1166,7 @@ Type *check_get_params(Checker *c, Scope *scope, AstNode *_params, bool *is_vari
|
|||||||
success = false;
|
success = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
type = make_type_generic(c->allocator, 0);
|
type = make_type_generic(c->allocator, 0, str_lit(""));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
type = check_type(c, type_expr);
|
type = check_type(c, type_expr);
|
||||||
|
|||||||
+1
-1
@@ -375,7 +375,7 @@ int main(int arg_count, char **arg_ptr) {
|
|||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
} else if (args[1] == "version") {
|
} else if (args[1] == "version") {
|
||||||
gb_printf("%s version %.*s\n", args[0], LIT(build_context.ODIN_VERSION));
|
gb_printf("%.*s version %.*s\n", LIT(args[0]), LIT(build_context.ODIN_VERSION));
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
usage(args[0]);
|
usage(args[0]);
|
||||||
|
|||||||
+3
-2
@@ -117,7 +117,7 @@ struct TypeRecord {
|
|||||||
|
|
||||||
#define TYPE_KINDS \
|
#define TYPE_KINDS \
|
||||||
TYPE_KIND(Basic, BasicType) \
|
TYPE_KIND(Basic, BasicType) \
|
||||||
TYPE_KIND(Generic, struct{ i64 id; }) \
|
TYPE_KIND(Generic, struct{ i64 id; String name; }) \
|
||||||
TYPE_KIND(Pointer, struct { Type *elem; }) \
|
TYPE_KIND(Pointer, struct { Type *elem; }) \
|
||||||
TYPE_KIND(Atomic, struct { Type *elem; }) \
|
TYPE_KIND(Atomic, struct { Type *elem; }) \
|
||||||
TYPE_KIND(Array, struct { Type *elem; i64 count; }) \
|
TYPE_KIND(Array, struct { Type *elem; i64 count; }) \
|
||||||
@@ -478,9 +478,10 @@ Type *make_type_basic(gbAllocator a, BasicType basic) {
|
|||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
Type *make_type_generic(gbAllocator a, i64 id) {
|
Type *make_type_generic(gbAllocator a, i64 id, String name) {
|
||||||
Type *t = alloc_type(a, Type_Generic);
|
Type *t = alloc_type(a, Type_Generic);
|
||||||
t->Generic.id = id;
|
t->Generic.id = id;
|
||||||
|
t->Generic.name = name;
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user