fstirlitz / luaparse

A Lua parser written in JavaScript
https://fstirlitz.github.io/luaparse/
MIT License
459 stars 91 forks source link

Bitwize brackets disappears #93

Closed beluci-dev closed 3 years ago

beluci-dev commented 3 years ago

Well, after some troubles with bitwise, i come to this, a dead end...

Code: local hello = (1 << 1) Result: local b=1<<1

The problem? my brackets! I want them!

i need them to work with a bitwise operation...

Work (Before parse): local b = ((0 << 0) & 0xFF) + ((53 << 8) & 0xFFFF) + ((12 << 16) & 0xFFFFFF) + ((0 << 24) & 0xFFFFFFFF);print('Result: '..b)

Dont Work (After parse): local b=0<<0&0xFF+53<<8&0xFFFF+12<<16&0xFFFFFF+0<<24&0xFFFFFFFF;print(b)

image

fstirlitz commented 3 years ago

You posted this in the wrong project. This is not a minifier.