Browse Source

fix: changes ^ to do xor

feature/witness_bin
Kobi Gurkan 5 years ago
parent
commit
b8068e8d05
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      parser/jaz.jison
  2. +1
    -1
      parser/jaz.js

+ 1
- 1
parser/jaz.jison

@ -514,7 +514,7 @@ e12
: e12 '^' e11
{
if (($1.type == "NUMBER") && ($3.type == "NUMBER")) {
$$ = { type: "NUMBER", value: $1.value.or($3.value).and(__MASK__) };
$$ = { type: "NUMBER", value: $1.value.xor($3.value).and(__MASK__) };
} else {
$$ = { type: "OP", op: "^", values: [$1, $3] };
}

+ 1
- 1
parser/jaz.js

@ -361,7 +361,7 @@ break;
case 59:
if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) {
this.$ = { type: "NUMBER", value: $$[$0-2].value.or($$[$0].value).and(__MASK__) };
this.$ = { type: "NUMBER", value: $$[$0-2].value.xor($$[$0].value).and(__MASK__) };
} else {
this.$ = { type: "OP", op: "^", values: [$$[$0-2], $$[$0]] };
}

Loading…
Cancel
Save