Compile string, working on scopes

This commit is contained in:
Krzosa Karol
2022-05-25 15:17:08 +02:00
parent b945f3affd
commit f4c05923c9
9 changed files with 125 additions and 136 deletions

View File

@@ -272,6 +272,7 @@ lex_parse_string(Lex_Stream *s, Token *t, U8 c){
function void
lex__stream(Intern_Table *table, Array<Token> *array, Lex_Stream *s){
while(lexc(s)){
while(lexc(s) == '\r') lex_advance(s);
Token t = {};
t.str = lexcp(s);
@@ -307,7 +308,7 @@ lex__stream(Intern_Table *table, Array<Token> *array, Lex_Stream *s){
t.kind = TK_Semicolon;
}break;
case ' ' : s->stream.str -= 1;
case '\r': case ' ' : s->stream.str -= 1;
case '\n': {
t.kind = TK_NewLine;
if(lexc(s) == '\r')