summaryrefslogtreecommitdiff
path: root/src/lparser.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lparser.js')
-rw-r--r--src/lparser.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lparser.js b/src/lparser.js
index 86f32f8..ff809b9 100644
--- a/src/lparser.js
+++ b/src/lparser.js
@@ -84,6 +84,13 @@ class expdesc {
this.t = NaN; /* patch list of 'exit when true' */
this.f = NaN; /* patch list of 'exit when false' */
}
+
+ to(e) { // Copy e content to this, cf. luaK_posfix
+ this.k = e.k;
+ this.u = e.u;
+ this.t = e.t;
+ this.f = e.f;
+ }
}
class FuncState {