CertainLach/jrsonnet

Different behaviors from jsonnet: bit operations and unary plus

chestnutprog opened this issue · 0 comments

@chestnutprog ➜ /workspaces/jrsonnet (master) $ jsonnet -e '1<<32'
4294967296
@chestnutprog ➜ /workspaces/jrsonnet (master) $ target/release/jrsonnet -e '1<<32'
1
@chestnutprog ➜ /workspaces/jrsonnet (master) $ jsonnet -e '+1'
1
@chestnutprog ➜ /workspaces/jrsonnet (master) $ target/release/jrsonnet -e '+1'
syntax error: expected one of "(", "[", "{", <identifier>, <number>, <string>, <unary op>, ['"'], ['\''], got "+"
    <cmdline>:1:1

jsonnet use int64 type for bit operations and support unary plus, I think jrsonnet should follow those behaviors.