key: fix evalquota for name_map
This commit is contained in:
parent
12ea1bb1e1
commit
8f53700302
1 changed files with 123 additions and 116 deletions
|
@ -259,7 +259,9 @@ pub const right_meta: u21 = 57452;
|
||||||
pub const iso_level_3_shift: u21 = 57453;
|
pub const iso_level_3_shift: u21 = 57453;
|
||||||
pub const iso_level_5_shift: u21 = 57454;
|
pub const iso_level_5_shift: u21 = 57454;
|
||||||
|
|
||||||
pub const name_map = std.ComptimeStringMap(u21, .{
|
pub const name_map = blk: {
|
||||||
|
@setEvalBranchQuota(2000);
|
||||||
|
break :blk std.ComptimeStringMap(u21, .{
|
||||||
// common names
|
// common names
|
||||||
.{ "plus", '+' },
|
.{ "plus", '+' },
|
||||||
.{ "minus", '-' },
|
.{ "minus", '-' },
|
||||||
|
@ -376,6 +378,7 @@ pub const name_map = std.ComptimeStringMap(u21, .{
|
||||||
.{ "iso_level_3_shift", iso_level_3_shift },
|
.{ "iso_level_3_shift", iso_level_3_shift },
|
||||||
.{ "iso_level_5_shift", iso_level_5_shift },
|
.{ "iso_level_5_shift", iso_level_5_shift },
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
test "matches 'a'" {
|
test "matches 'a'" {
|
||||||
const key: Key = .{
|
const key: Key = .{
|
||||||
|
@ -420,3 +423,7 @@ test "matches 'shift+;'" {
|
||||||
};
|
};
|
||||||
try testing.expect(colon.matches(':', .{}));
|
try testing.expect(colon.matches(':', .{}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "name_map" {
|
||||||
|
try testing.expectEqual(insert, name_map.get("insert"));
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue