aboutsummaryrefslogtreecommitdiff
path: root/src/js_parser.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-14 23:14:45 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-05-14 23:14:45 -0700
commit8cce69e7c28d008c445ff3221e7d1be9b288773a (patch)
tree2f1973602f026a50d9573ee43ba5df1760fa6eab /src/js_parser.zig
parenta425376c3db49d4432e64b1cbf362cc91f39bfce (diff)
downloadbun-8cce69e7c28d008c445ff3221e7d1be9b288773a.tar.gz
bun-8cce69e7c28d008c445ff3221e7d1be9b288773a.tar.zst
bun-8cce69e7c28d008c445ff3221e7d1be9b288773a.zip
wip
Diffstat (limited to 'src/js_parser.zig')
-rw-r--r--src/js_parser.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js_parser.zig b/src/js_parser.zig
index 8a2d01a1c..f01e71bad 100644
--- a/src/js_parser.zig
+++ b/src/js_parser.zig
@@ -11371,7 +11371,7 @@ fn NewParser_(
}
fn parseArrowBody(p: *P, args: []js_ast.G.Arg, data: *FnOrArrowDataParse) !E.Arrow {
- var arrow_loc = p.lexer.loc();
+ const arrow_loc = p.lexer.loc();
// Newlines are not allowed before "=>"
if (p.lexer.has_newline_before) {
@@ -11392,7 +11392,7 @@ fn NewParser_(
data.is_this_disallowed = p.fn_or_arrow_data_parse.is_this_disallowed;
if (p.lexer.token == .t_open_brace) {
- var body = try p.parseFnBody(data);
+ const body = try p.parseFnBody(data);
p.after_arrow_body_loc = p.lexer.loc();
return E.Arrow{ .args = args, .body = body };
}
@@ -20638,7 +20638,7 @@ fn NewParser_(
// Remove the last child from the parent scope
const last = parent.children.len - 1;
if (comptime Environment.allow_assert) assert(parent.children.ptr[last] == to_flatten);
- _ = parent.children.popOrNull();
+ parent.children.len -|= 1;
for (to_flatten.children.slice()) |item| {
item.parent = parent;