core build system and array, it compiles!
This commit is contained in:
@@ -196,7 +196,7 @@ token_make(Core_Ctx *lexer) {
|
||||
CORE_Static Token *
|
||||
lex_last_indent_token(Lex_Stream *s) {
|
||||
if (s->indent_stack.len > 0) {
|
||||
return *s->indent_stack.last();
|
||||
return *s->indent_stack.back();
|
||||
}
|
||||
return &pctx->same_scope_token;
|
||||
}
|
||||
@@ -326,7 +326,7 @@ lex__stream(Core_Ctx *lexer) {
|
||||
semi.kind = OPEN_SCOPE;
|
||||
semi.indent = last->indent + 2; // @todo: proper detection of indentation
|
||||
lex_add_token(lexer, &semi);
|
||||
s->indent_stack.add(lexer->tokens.last());
|
||||
s->indent_stack.add(lexer->tokens.back());
|
||||
}
|
||||
else {
|
||||
semi.kind = SAME_SCOPE;
|
||||
@@ -347,7 +347,7 @@ lex__stream(Core_Ctx *lexer) {
|
||||
if (t.indent > last->indent) {
|
||||
t.kind = OPEN_SCOPE;
|
||||
lex_add_token(lexer, &t);
|
||||
s->indent_stack.add(lexer->tokens.last());
|
||||
s->indent_stack.add(lexer->tokens.back());
|
||||
}
|
||||
|
||||
else if (t.indent < last->indent) {
|
||||
|
||||
Reference in New Issue
Block a user