Add ';;' operator, more windows decls

This commit is contained in:
Krzosa Karol
2022-06-14 20:12:52 +02:00
parent 6e56b789e9
commit 107c8435b7
3 changed files with 55 additions and 9 deletions

View File

@@ -302,10 +302,18 @@ lex__stream(Lexer *lexer){
case ';' : {
Token semi = token_make(lexer);
Token *last = lex_last_indent_token(s);
semi.kind = SAME_SCOPE;
semi.indent = last->indent;
lex_advance(s);
array->add(semi);
if(lexc(s) == ';'){
lex_advance(s);
semi.kind = OPEN_SCOPE;
semi.indent = last->indent + 2; // @todo: proper detection of indentation
array->add(semi);
s->indent_stack.add(array->last());
} else{
semi.kind = SAME_SCOPE;
array->add(semi);
}
} break;
case '\n':{