started to work on modularizing parser code paths

This commit is contained in:
2025-02-19 12:10:11 -05:00
parent 7ea90ef349
commit 26623075ad
10 changed files with 73 additions and 26 deletions

View File

@ -176,3 +176,16 @@ Code untyped_token_fmt( s32 num_tokens, char const* fmt, ... )
return result;
}
Code untyped_toks( TokenSlice tokens )
{
if ( tokens.Num == 0 ) {
log_failure( "untyped_toks: empty token slice" );
return InvalidCode;
}
Code
result = make_code();
result->Type = CT_Untyped;
result->ContentToks = tokens;
return result;
}