summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-09-13 12:20:11 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-09-13 12:20:11 +0900
commit6dbf49fdb4a50e006b52fef202f1ec65b8d0e333 (patch)
tree9467cab58fa2ef549d0540d906363089dfda76d3 /mrbgems/mruby-compiler/core/parse.y
parent100eac3fec17e630567f2088c818910fb7f63b64 (diff)
downloadmruby-6dbf49fdb4a50e006b52fef202f1ec65b8d0e333.tar.gz
mruby-6dbf49fdb4a50e006b52fef202f1ec65b8d0e333.zip
parse.y: `cons_free` unused node (empty string node).
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
-rw-r--r--mrbgems/mruby-compiler/core/parse.y12
1 files changed, 12 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index d71e90176..637b04749 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -3326,6 +3326,9 @@ string_fragment : tCHAR
if (intn($3->cdr->cdr) > 0) {
n = push(n, $3);
}
+ else {
+ cons_free($3);
+ }
$$ = new_dstr(p, n);
}
;
@@ -3372,6 +3375,9 @@ xstring : tXSTRING_BEG tXSTRING
if (intn($3->cdr->cdr) > 0) {
n = push(n, $3);
}
+ else {
+ cons_free($3);
+ }
$$ = new_dxstr(p, n);
}
;
@@ -3439,6 +3445,9 @@ words : tWORDS_BEG tSTRING
if (intn($3->cdr->cdr) > 0) {
n = push(n, $3);
}
+ else {
+ cons_free($3);
+ }
$$ = new_words(p, n);
}
;
@@ -3456,6 +3465,9 @@ symbol : basic_symbol
if (intn($4->cdr->cdr) > 0) {
n = push(n, $4);
}
+ else {
+ cons_free($4);
+ }
$$ = new_dsym(p, new_dstr(p, n));
}
;