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.

add unicode escape parsing to parseident

+13 -1
+1 -1
meson.build
··· 74 74 build_date = run_command('date', '+%Y-%m-%d', check: true).stdout().strip() 75 75 76 76 version_conf = configuration_data() 77 - version_conf.set('ANT_VERSION', '0.2.1.0') 77 + version_conf.set('ANT_VERSION', '0.2.1.1') 78 78 version_conf.set('ANT_GIT_HASH', git_hash) 79 79 version_conf.set('ANT_BUILD_DATE', build_date) 80 80
+12
src/ant.c
··· 3600 3600 } 3601 3601 3602 3602 static uint8_t parseident(const char *buf, jsoff_t len, jsoff_t *tlen) { 3603 + if (len == 0) return TOK_ERR; 3604 + 3605 + if (!(buf[0] & 0x80) && buf[0] != '\\' && is_ident_begin(buf[0])) { 3606 + *tlen = 1; 3607 + while (*tlen < len && !(buf[*tlen] & 0x80) && buf[*tlen] != '\\' && is_ident_continue(buf[*tlen])) { 3608 + (*tlen)++; 3609 + } 3610 + if (*tlen >= len || (!is_ident_continue(buf[*tlen]) && buf[*tlen] != '\\' && !(buf[*tlen] & 0x80))) { 3611 + return parsekeyword(buf, *tlen); 3612 + } 3613 + } 3614 + 3603 3615 uint32_t first_cp; 3604 3616 int esc_len = parse_unicode_escape(buf, len, 0, &first_cp); 3605 3617