mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-03-17 08:16:06 +09:00
basic: adding missing impl of ops: unary NOT and BNOT
This commit is contained in:
@@ -704,6 +704,12 @@ if no arg text were given (e.g. "10 NEXT"), args will have zero length
|
|||||||
"UNARYPLUS" : {f:function(lnum, stmtnum, args) {
|
"UNARYPLUS" : {f:function(lnum, stmtnum, args) {
|
||||||
return oneArgNum(lnum, stmtnum, args, (lh) => +lh);
|
return oneArgNum(lnum, stmtnum, args, (lh) => +lh);
|
||||||
}},
|
}},
|
||||||
|
"UNARYLOGICNOT" : {f:function(lnum, stmtnum, args) {
|
||||||
|
return oneArgNum(lnum, stmtnum, args, (lh) => !(lh));
|
||||||
|
}},
|
||||||
|
"UNARYBNOT" : {f:function(lnum, stmtnum, args) {
|
||||||
|
return oneArgNum(lnum, stmtnum, args, (lh) => ~(lh));
|
||||||
|
}},
|
||||||
"BAND" : {f:function(lnum, stmtnum, args) {
|
"BAND" : {f:function(lnum, stmtnum, args) {
|
||||||
return twoArgNum(lnum, stmtnum, args, (lh,rh) => lh & rh);
|
return twoArgNum(lnum, stmtnum, args, (lh,rh) => lh & rh);
|
||||||
}},
|
}},
|
||||||
|
|||||||
Reference in New Issue
Block a user