Fix wrong type on Type type, heh
This commit is contained in:
@@ -49,15 +49,6 @@ unique_name(Allocator *allocator, Ast *ast){
|
||||
return result;
|
||||
}
|
||||
|
||||
// @todo: Gen complicated decl
|
||||
//array 10 ( pointer (pointer array 5 int a))
|
||||
// int (*(*(a[5])))[10]
|
||||
//
|
||||
// 1 Get to the bottom
|
||||
// 2 Add variable name
|
||||
// 3 Going backwards add arrays and pointers in parens
|
||||
// 4 Add type name on the left side
|
||||
|
||||
function String
|
||||
string_simple_decl_prefix(Allocator *a, Ast_Type *ast){
|
||||
switch(ast->kind){
|
||||
@@ -200,7 +191,9 @@ gen_value(Token *pos, Value a){
|
||||
case TYPE_STRING:
|
||||
gen("(String){(U8 *)\"%Q\", %d}", a.intern_val, a.intern_val.len);
|
||||
break;
|
||||
CASE_BOOL: a.bool_val ? gen("true"):gen("false"); break;
|
||||
CASE_BOOL: {
|
||||
a.bool_val ? gen("true"):gen("false");
|
||||
}break;
|
||||
CASE_FLOAT: {
|
||||
String postfix = get_type_postfix(type);
|
||||
gen("%f%Q", a.f64_val, postfix);
|
||||
@@ -746,8 +739,8 @@ typedef U64 SizeU;
|
||||
typedef S64 SizeS;
|
||||
typedef float F32;
|
||||
typedef double F64;
|
||||
typedef S32 Bool;
|
||||
typedef S64 Type;
|
||||
typedef S32 Bool;
|
||||
typedef S64 Type;
|
||||
#define true 1
|
||||
#define false 0
|
||||
#define assert(x) do{if(!(x))__debugbreak();}while(0)
|
||||
|
||||
Reference in New Issue
Block a user