summaryrefslogtreecommitdiff
path: root/src/lparser.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-02 09:33:31 +0100
committerBenoit Giannangeli <benoit.giannangeli@boursorama.fr>2017-03-02 09:49:35 +0100
commit7ad7432bcf5e0666b719c768c3c0041fbb574feb (patch)
tree92d21ef0c1cbe08e988c0339a51f122c378e52b1 /src/lparser.js
parent5a0db9d250115470589d23cd8ad4b28982cabe06 (diff)
downloadfengari-7ad7432bcf5e0666b719c768c3c0041fbb574feb.tar.gz
fengari-7ad7432bcf5e0666b719c768c3c0041fbb574feb.tar.bz2
fengari-7ad7432bcf5e0666b719c768c3c0041fbb574feb.zip
[Parsing tests] TESTSET
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 {