simplify log and mt_tweak_color
This commit is contained in:
@@ -65,6 +65,22 @@ void mt_wasm_app(ma_arena_t *arena) {
|
||||
matched = true;
|
||||
}
|
||||
|
||||
if (par->at->inside_macro == false && parser_matchi(par, s8_lit("mt_tweak_color"))) {
|
||||
cg_tweak_t *tweak = ma_push_type(arena, cg_tweak_t);
|
||||
tweak->type = type(v4f32_t);
|
||||
tweak->min = s8_lit("0.0f");
|
||||
tweak->max = s8_lit("1.0f");
|
||||
parser_expect(par, lex_kind_open_paren);
|
||||
tweak->name = parser_expect(par, lex_kind_ident)->string;
|
||||
parser_expect(par, lex_kind_comma);
|
||||
tweak->value = parser_next(par)->string;
|
||||
while (par->at->kind != lex_kind_close_paren && par->at->kind != lex_kind_eof) parser_next(par);
|
||||
lex_t *end = parser_expect(par, lex_kind_close_paren);
|
||||
tweak->value.len = (i64)(end->str - tweak->value.str);
|
||||
SLLQ_APPEND(first_tweak, last_tweak, tweak);
|
||||
matched = true;
|
||||
}
|
||||
|
||||
if (!matched) {
|
||||
parser_next(par);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user