WIP : better AST::debug_str()

Now its more contexually rich to the ast type, however I need to hookup tokens from parsing to the AST. There needs to be a way for the debug string to lookup the token and provide the contexual line.
Can either pass it ( TokArray* toks ) from the parser on failure (or `CodeFile`)..
Technically there is more than enough room for another Token* ptr. I could add another and specifiers would still have at minimum 14 slots before needing to extended to next specs.
**************... yeah
This commit is contained in:
2023-09-11 23:22:53 -04:00
parent 9495fc2985
commit 4b48b96a79
22 changed files with 635 additions and 158 deletions

View File

@ -5050,8 +5050,9 @@ CodeType parse_type( bool* typedef_is_function )
using namespace ECode;
CodeType
result = (CodeType) make_code();
result->Type = Typename;
result = (CodeType) make_code();
result->Type = Typename;
result->Token = Context.Scope->Start;
// Need to wait until were using the new parsing method to do this.
String name_stripped = strip_formatting( name, strip_formatting_dont_preserve_newlines );