diff options
author | 2021-05-03 22:37:28 -0700 | |
---|---|---|
committer | 2021-05-03 22:37:28 -0700 | |
commit | ea84c6dc3cad821fbaaa60e314c088c422200d34 (patch) | |
tree | 52da138c360637e5dbe4408560a189e431e2349a /src/js_lexer_tables.zig | |
parent | ca2a3f69ffdfd59900ead5af8c93d46d55af5187 (diff) | |
download | bun-ea84c6dc3cad821fbaaa60e314c088c422200d34.tar.gz bun-ea84c6dc3cad821fbaaa60e314c088c422200d34.tar.zst bun-ea84c6dc3cad821fbaaa60e314c088c422200d34.zip |
it works???
Former-commit-id: e03438383341c065f7793c2d24b8cb0a0f316990
Diffstat (limited to 'src/js_lexer_tables.zig')
-rw-r--r-- | src/js_lexer_tables.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/js_lexer_tables.zig b/src/js_lexer_tables.zig index 7a1bf705e..ef4b13e8c 100644 --- a/src/js_lexer_tables.zig +++ b/src/js_lexer_tables.zig @@ -536,9 +536,15 @@ pub const TypescriptStmtKeyword = enum { pub const JSXEntityMap = std.StringHashMap(CodePoint); pub var jsxEntity: JSXEntityMap = undefined; +var has_loaded_jsx_map = false; // There's probably a way to move this to comptime pub fn initJSXEntityMap() !void { + if (has_loaded_jsx_map) { + return; + } + + has_loaded_jsx_map = true; jsxEntity = JSXEntityMap.init(alloc.dynamic); // return jsxEntity; jsxEntity.ensureCapacity(255) catch unreachable; |