diff --git a/core_compiler.cpp b/core_compiler.cpp index 4c0a0ee..7dfc647 100644 --- a/core_compiler.cpp +++ b/core_compiler.cpp @@ -103,7 +103,6 @@ for i in meta.token_simple_expr: // Init types pctx->type__void = {TYPE_VOID}; - // pctx->type__string = {TYPE_STRING, sizeof(String), __alignof(String)}; pctx->type__bool = {TYPE_BOOL, sizeof(bool), __alignof(bool)}; pctx->type__type = {TYPE_TYPE, sizeof(S64), __alignof(S64)}; @@ -132,6 +131,7 @@ for i in meta.token_simple_expr: pctx->type_int = &pctx->type__int; pctx->type_void = &pctx->type__void; + // pctx->type__string = {TYPE_STRING, sizeof(String), __alignof(String)}; // pctx->type_any; // Needs to be inited at runtime pctx->type_type = &pctx->type__type; diff --git a/core_compiler.h b/core_compiler.h index 8655509..cc51196 100644 --- a/core_compiler.h +++ b/core_compiler.h @@ -70,6 +70,7 @@ struct Core_Ctx { F64 start; } time; + int lines_lexed; bool debugger_break_on_compiler_error; diff --git a/core_lexing.cpp b/core_lexing.cpp index cf28301..f72822a 100644 --- a/core_lexing.cpp +++ b/core_lexing.cpp @@ -696,6 +696,7 @@ lex_restream(Core_Ctx *lexer, String istream, String file) { lexer->stream.indent_stack.allocator = lexer->scratch; lexer->stream.indent_stack.add(&lexer->same_scope_token); lex__stream(lexer); + lexer->lines_lexed += lexer->stream.line; } //----------------------------------------------------------------------------- diff --git a/core_main.cpp b/core_main.cpp index 0487c6e..488909b 100644 --- a/core_main.cpp +++ b/core_main.cpp @@ -63,11 +63,6 @@ In the future - [ ] Basic - [ ] Detecting if return was called -- [ ] Builtin data structures - - [ ] Some way to take slice of data - - [ ] Dynamic arrays - - [ ] Hash tables - - [ ] Programming constructs - [ ] Using language construct - [ ] Named loops and breaking out of them @@ -77,8 +72,6 @@ In the future - [ ] Interpreter - [ ] Code generation -- [ ] Parametric Polymorphism - Ideas - [ ] #test construct that would gather all tests and run them on start of program or something - [ ] Inject stack traces into the program @@ -132,6 +125,7 @@ static void compile_file(Allocator *allocator, String filename, U32 compile_flag printf("parsing = %f\n", pctx->time.parsing); printf("typecheck = %f\n", pctx->time.typechecking); printf("generatin = %f\n", pctx->time.code_generation); + printf("lines lexed= %d\n", pctx->lines_lexed); } if (is_flag_set(compile_flags, COMPILE_PRINT_ALLOCATOR_STATS_BEFORE_DESTROY)) {