-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors related to parenthesis matching? #13
Comments
I think it has to do with stripping newlines out. I have a solution to
|
yes, it was the now I am escaping the newlines and unescaping them before interpreting them |
update your package to check |
Thanks Chris, works |
Hi Chris, I'm evaluating the following func from a project I wrote.
The func is syntactically correct and gets interpreted in standard IDE.
When I evaluate it in Atom I get a syntax error: expecting '}'
~readAndRaw = {|sourceName|
var bpm = 60 ;
var grid, maxDur ;
// 1: read and filter
var sourceFile = File(sourceName, "r") ;
var score = sourceFile.readAllString.split($\n)
.collect{|i| i.split($ )}
.select{|i| i.size > 1} ;
sourceFile.close ;
score = score
// comments, any not instr is rejected
.reject{|i| ~instr.includes(i[0].asSymbol).not}
.flop;
// 2: convert data
score = [
score[0].collect{|i|
~instr.indexOf(
i.asSymbol
)}, // names, already clean
score[1].collect{|i|
if (i.includes($/)) {i.interpret.asFloat_4_(60/bpm)}
{i.asFloat}
},
score[2].collect{|i|
if (i.includes($/)) {i.interpret.asFloat_4_(60/bpm)}
{i.asFloat}
},
score[3].asFloat, score[4].asFloat
].flop ;
}
The text was updated successfully, but these errors were encountered: