For from pointer to reference
This commit is contained in:
12
new_lex.cpp
12
new_lex.cpp
@@ -180,8 +180,8 @@ function void
|
||||
lex_set_keywords(Lexer *lexer, Array<String> keywords){
|
||||
Intern_String keyword = {};
|
||||
For(keywords){
|
||||
keyword = intern_string(&lexer->interns, *it);
|
||||
if(it == keywords.begin())
|
||||
keyword = intern_string(&lexer->interns, it);
|
||||
if(&it == keywords.begin())
|
||||
lexer->interns.first_keyword = keyword.str;
|
||||
}
|
||||
lexer->interns.last_keyword = keyword.str;
|
||||
@@ -674,10 +674,10 @@ lex_test(){
|
||||
int ui = 0;
|
||||
S32 i = 0;
|
||||
For(arr){
|
||||
assert(it->kind == kind[i]);
|
||||
assert(string_compare(it->string, strs[i]));
|
||||
if(it->kind == TK_Integer){
|
||||
assert(it->int_val == vals[ui++]);
|
||||
assert(it.kind == kind[i]);
|
||||
assert(string_compare(it.string, strs[i]));
|
||||
if(it.kind == TK_Integer){
|
||||
assert(it.int_val == vals[ui++]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user