Compile string, working on scopes
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user