MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix async function declaration support

+10 -4
+1 -1
meson.build
··· 79 79 build_date = run_command('date', '+%Y-%m-%d', check: true).stdout().strip() 80 80 81 81 version_conf = configuration_data() 82 - version_conf.set('ANT_VERSION', '0.2.2.7') 82 + version_conf.set('ANT_VERSION', '0.2.2.8') 83 83 version_conf.set('ANT_GIT_HASH', git_hash) 84 84 version_conf.set('ANT_BUILD_DATE', build_date) 85 85
+9 -3
src/ant.c
··· 4169 4169 4170 4170 if (depth == 0 && tok == TOK_ASYNC) { 4171 4171 js->consumed = 1; 4172 - if (next(js) == TOK_FUNC) { 4173 - js_func_decl_async(js); 4174 - } 4172 + if (next(js) != TOK_FUNC) goto skip_async; 4173 + jsoff_t func_pos = js->pos; 4174 + js->consumed = 1; 4175 + if (next(js) != TOK_IDENTIFIER) goto skip_async; 4176 + js->pos = func_pos; 4177 + js->tok = TOK_FUNC; 4178 + js->consumed = 0; 4179 + js_func_decl_async(js); 4180 + skip_async: 4175 4181 continue; 4176 4182 } 4177 4183