diff --git a/source/quickjs.c b/source/quickjs.c index 19ceaadf..c7a1d5da 100644 --- a/source/quickjs.c +++ b/source/quickjs.c @@ -1671,11 +1671,6 @@ JSValue JS_GetClassProto(JSContext *ctx, JSClassID class_id) return JS_DupValue(ctx, ctx->class_proto[class_id]); } -typedef enum JSFreeModuleEnum { - JS_FREE_MODULE_ALL, - JS_FREE_MODULE_NOT_RESOLVED, -} JSFreeModuleEnum; - JSContext *JS_DupContext(JSContext *ctx) { ctx->header.ref_count++; @@ -15346,8 +15341,6 @@ typedef struct JSParseState { /* current function code */ JSFunctionDef *cur_func; - BOOL is_module; /* parsing a module */ - BOOL allow_html_comments; BOOL ext_json; /* true if accepting JSON superset */ GetLineColCache get_line_col_cache; } JSParseState; @@ -16255,13 +16248,6 @@ static __exception int next_token(JSParseState *s) p += 2; s->token.val = TOK_MINUS_ASSIGN; } else if (p[1] == '-') { - if (s->allow_html_comments && p[2] == '>' && - (s->got_lf || s->last_ptr == s->buf_start)) { - /* Annex B: `-->` at beginning of line is an html comment end. - It extends to the end of the line. - */ - goto skip_line_comment; - } p += 2; s->token.val = TOK_DEC; } else { @@ -16280,10 +16266,6 @@ static __exception int next_token(JSParseState *s) p += 2; s->token.val = TOK_SHL; } - } else if (s->allow_html_comments && - p[1] == '!' && p[2] == '-' && p[3] == '-') { - /* Annex B: handle `