monome / maiden

web based editor and repl for norns
GNU General Public License v3.0
47 stars 33 forks source link

maiden script UI flags supported bitwise operators (exception: ~) #123

Closed dndrks closed 6 years ago

dndrks commented 6 years ago

function bget() return(1&2) end : Unexpected symbol '&' near '1' function bget() return(1|2) end : Unexpected symbol '|' near '1' function bget() return(1~2) end : Unexpected symbol '~' near '1' function bget() return(1>>2) end : <expression> expected near '>' function bget() return(1<<2) end : <expression> expected near '<'

function bget() return(~1) end produces no error.

all operations function and scripts compile + run despite these flags.

ngwese commented 6 years ago

i’m assume these errors are just what appears in maiden. the syntax checking/highlighting is for lua 5.2 instead of lua 5.3 which matron is built with.

the flagging of bit wise operations is a know issue which has proven more tricky to address than one would have thought.

related issue: https://github.com/monome/maiden/issues/9

dndrks commented 6 years ago

ah, gotcha! thanks for linking to the known. i’ll close this one out.

ngwese commented 6 years ago

i’ve renamed the original issue in the hope that folks will find it.