diff options
author | 2021-04-28 21:58:02 -0700 | |
---|---|---|
committer | 2021-04-28 21:58:02 -0700 | |
commit | cabe773a4f0a12e411f9f3c9698da6bbd90ec474 (patch) | |
tree | c20cfd9ba22c4ca999c850edb04012d94d72ccb5 /src/js_lexer_tables.zig | |
parent | 435a6e9b187168d869024d1002951e4bfa76333a (diff) | |
download | bun-cabe773a4f0a12e411f9f3c9698da6bbd90ec474.tar.gz bun-cabe773a4f0a12e411f9f3c9698da6bbd90ec474.tar.zst bun-cabe773a4f0a12e411f9f3c9698da6bbd90ec474.zip |
wip
Former-commit-id: b37acf309c8f42d49dc47eea446f89a3dbe9f6e2
Diffstat (limited to 'src/js_lexer_tables.zig')
-rw-r--r-- | src/js_lexer_tables.zig | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/js_lexer_tables.zig b/src/js_lexer_tables.zig index 0053b7234..4b9977699 100644 --- a/src/js_lexer_tables.zig +++ b/src/js_lexer_tables.zig @@ -231,6 +231,13 @@ pub const PropertyModifierKeyword = enum { }); }; +pub const TypeScriptAccessibilityModifier = std.ComptimeStringMap(u1, .{ + .{ "public", 1 }, + .{ "private", 1 }, + .{ "protected", 1 }, + .{ "readonly", 1 }, +}); + pub const TokenEnumType = std.EnumArray(T, []u8); pub const tokenToString = comptime { @@ -532,6 +539,7 @@ pub var jsxEntity: JSXEntityMap = undefined; pub fn initJSXEntityMap() !void { jsxEntity = JSXEntityMap.init(alloc.dynamic); + // return jsxEntity; jsxEntity.ensureCapacity(255) catch unreachable; jsxEntity.putAssumeCapacity("quot", @as(CodePoint, 0x0022)); @@ -793,14 +801,14 @@ test "tokenToString" { expectString(tokenToString.get(T.t_end_of_file), "end of file"); } -test "jsxEntity" { - try alloc.setup(std.heap.page_allocator); +// test "jsxEntity" { +// try alloc.setup(std.heap.page_allocator); - initJSXEntityMap() catch |err| { - @panic(@errorName(err)); - }; +// initJSXEntityMap() catch |err| { +// @panic(@errorName(err)); +// }; - if (jsxEntity.get("sim")) |v| { - expect(v == 0x223C); - } -} +// if (jsxEntity.get("sim")) |v| { +// expect(v == 0x223C); +// } +// } |