Using arena as token array, remove arenas idea

This commit is contained in:
Krzosa Karol
2023-02-09 12:36:36 +01:00
parent 5138ba0097
commit 7370e8b716
16 changed files with 295 additions and 407 deletions

View File

@@ -648,5 +648,51 @@ struct Core_Message {
Core_Context *core_create_context(Allocator *allocator);
Array<Token> core_lex_string(Core_Context *ctx, char *string, size_t size);
AST Modification API
AST Query API
Tree walk interpreter / Bytecode interpreter
C code generation backend
Control of compilation with many hooks
Ast tags
* Accessing and modifying the AST
* Using as a scripting language
* Tree walk interp or Bytecode
* Using as a compiler
* C code backend
* C++ code backend ?
* Hooking into raw strings to preprocess
* Hooking into tokens to preprocess
* Hooking into AST to manipulate
* Hooking into Parsing to add syntax sugar
* Hooking into Parsing and typechecking to add language features
* Hooking into typechecking to add for example builtin functions
* Creating a custom code generation backend
* Performing compilation passes multiple times to get some sort of effect
* Accessing the typechecked AST and modifying it then typechecking modifications ??
* Tagging syntax for creating language features
Possible use cases:
I want to use it as a scripting language for my game
It should be able to not leak memory while rerunning scripts contnously
It should allow me to constrain certain features (pointer arithmetic)
It should allow me to add possible functions
I want to use this as a code generation tool
I should be able to access and modify the AST
I should be able to access the tokens for pre processing
I should be able to add my own syntax
I should be albe to add my own features
I should be able to create or modify a code generating back end
Code generation
Making DSLs
*/