Add TypeOf operator
This commit is contained in:
@@ -38,6 +38,7 @@ keyword_for = l->intern("for"_s);
|
||||
keyword_enum = l->intern("enum"_s);
|
||||
l->interns.first_keyword = keyword_struct.str;
|
||||
l->interns.last_keyword = keyword_enum.str;
|
||||
intern_typeof = l->intern("TypeOf"_s);
|
||||
intern_sizeof = l->intern("SizeOf"_s);
|
||||
intern_len = l->intern("Len"_s);
|
||||
intern_alignof = l->intern("AlignOf"_s);
|
||||
@@ -340,11 +341,11 @@ compile_file(String filename, U32 compile_flags = COMPILE_NULL){
|
||||
|
||||
if(is_flag_set(compile_flags, COMPILE_AND_RUN)){
|
||||
String testing = compile_flags&COMPILE_TESTING ? "testing"_s : ""_s;
|
||||
#if OS_WINDOWS
|
||||
#if OS_WINDOWS
|
||||
String sys = string_fmt(scratch, "a.exe %Q", testing);
|
||||
#else
|
||||
#else
|
||||
String sys = string_fmt(scratch, "./a.out %Q", testing);
|
||||
#endif
|
||||
#endif
|
||||
int result = system((char *)sys.str);
|
||||
assert(result != -1);
|
||||
if(result == 0){
|
||||
|
||||
Reference in New Issue
Block a user