diff options
author | yui-knk <spiketeika@gmail.com> | 2024-02-02 20:53:37 +0900 |
---|---|---|
committer | Yuichiro Kaneko <spiketeika@gmail.com> | 2024-02-03 09:15:41 +0900 |
commit | 68b57ceb4610b424401706777c2d17cd8572a977 (patch) | |
tree | 73035d1fd2ee49fc2955b4ff832a9e1330a1ff9e /parse.y | |
parent | 90ae8eaecae00eabd2d7dc8ec7ee1afc53a6bd9d (diff) |
Use bool to check ascii only in parse_ident
No need to use ENC_CODERANGE to record ascii only or not.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -10647,13 +10647,13 @@ static enum yytokentype parse_ident(struct parser_params *p, int c, int cmd_state) { enum yytokentype result; - int mb = ENC_CODERANGE_7BIT; + bool is_ascii = true; const enum lex_state_e last_state = p->lex.state; ID ident; int enforce_keyword_end = 0; do { - if (!ISASCII(c)) mb = ENC_CODERANGE_UNKNOWN; + if (!ISASCII(c)) is_ascii = false; if (tokadd_mbchar(p, c) == -1) return 0; c = nextc(p); } while (parser_is_identchar(p)); @@ -10707,7 +10707,7 @@ parse_ident(struct parser_params *p, int c, int cmd_state) } #endif - if (mb == ENC_CODERANGE_7BIT && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) { + if (is_ascii && (!IS_lex_state(EXPR_DOT) || enforce_keyword_end)) { const struct kwtable *kw; /* See if it is a reserved word. */ |