aboutsummaryrefslogtreecommitdiff
path: root/src/json_parser.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/json_parser.zig')
-rw-r--r--src/json_parser.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/json_parser.zig b/src/json_parser.zig
index d661d0b98..47eeb5669 100644
--- a/src/json_parser.zig
+++ b/src/json_parser.zig
@@ -37,9 +37,11 @@ const Op = js_ast.Op;
const Scope = js_ast.Scope;
const locModuleScope = logger.Loc.Empty;
+const LEXER_DEBUGGER_WORKAROUND = isDebug;
+
fn JSONLikeParser(opts: js_lexer.JSONOptions) type {
return struct {
- const Lexer = js_lexer.NewLexer(opts);
+ const Lexer = js_lexer.NewLexer(if (LEXER_DEBUGGER_WORKAROUND) js_lexer.JSONOptions{} else opts);
lexer: Lexer,
source: *const logger.Source,
@@ -282,7 +284,7 @@ pub fn ParseJSONForBundling(source: *const logger.Source, log: *logger.Log, allo
const result = try parser.parseExpr(false);
return JSONParseResult{
- .tag = if (parser.lexer.is_ascii_only) JSONParseResult.Tag.ascii else JSONParseResult.Tag.expr,
+ .tag = if (!LEXER_DEBUGGER_WORKAROUND and parser.lexer.is_ascii_only) JSONParseResult.Tag.ascii else JSONParseResult.Tag.expr,
.expr = result,
};
}