tmhglnd / mercury-playground

The Mercury live coding environment running in the browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error on hexBeat if argument begins with numbers

lucretiomsp opened this issue · comments

hello, I am trying to use an hexbeat pattern like this:
list bongopattern hexBeat(0000cdef)

and I got
"Could not run because of syntax error"

am I doing something wrong?

commented

Yeah I have to find a way to fix this, thanks for reporting. For now it does work if you provide the hexadecimal value as a string:

list bongopattern hexBeat('0000cdef')
print bongopattern
//=> [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1]

The difference is that the tokenizer sees anything starting with a letter as a string by default, but anything starting with a number should be a number. So forcing it into a string is the best way for now