Getting rid of globals
This commit is contained in:
@@ -192,10 +192,10 @@ token_make(Core_Ctx *lexer){
|
||||
|
||||
CORE_Static Token *
|
||||
lex_last_indent_token(Lex_Stream *s){
|
||||
if(s->indent_stack.len > 0){
|
||||
if (s->indent_stack.len > 0) {
|
||||
return *s->indent_stack.last();
|
||||
}
|
||||
return &token_null;
|
||||
return &pctx->same_scope_token;
|
||||
}
|
||||
|
||||
CORE_Static B32
|
||||
@@ -594,7 +594,7 @@ lex_restream(Core_Ctx *lexer, String istream, String file){
|
||||
|
||||
Scratch_Scope _scope(lexer->scratch);
|
||||
lexer->stream.indent_stack.allocator = lexer->scratch;
|
||||
lexer->stream.indent_stack.add(&token_null);
|
||||
lexer->stream.indent_stack.add(&lexer->same_scope_token);
|
||||
lex__stream(lexer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user