User Defined language multiple questions
-
Midnight here - unless someone else takes over I will follow up on this tomorrow.
-
Thnks a lot for now.
I tried what you said but I still have problems.-
Only functions defined by ‘to’ are recognized.
-
The function are listed with the arguments in their name. For example :
to playABC s instr beatsPerMinute transposition { if (isNil instr) { instr = 'piano' } if (isNil beatsPerMinute) { beatsPerMinute = 120 } if (isClass instr 'String') { instrument = (newSampledInstrument instr) } (isClass instr 'Array') { instrument = (sampledInstrumentFromSamples instr) } else { return nil } scorePlayer = (newScorePlayer instrument beatsPerMinute) voice = (parse (new 'ABCParser') s) if (notNil transposition) { transpose (new 'ABCParser') voice transposition } addVoice scorePlayer voice playScore scorePlayer return scorePlayer }
Here, the name of the function is just ‘playABC’. Without ‘instr’, ‘beatsPerMinute’ and ‘transposition’.
Thanks a lot for all of this. But don’t hurry to help I won’t be able to answer for two weeks.
-
-
Only functions defined by ‘to’ are recognized.
:-) That’s no wonder as it isn’t included yet. Therefore my statement
The open part is how a class and its methods are defined. Is not part of your sample code. :-)The function are listed with the arguments in their name. For example :
Yes, as I don’t know this language and don’t know how you wanted it to be reported
I used<nameExpr expr=".*" />
which returns the whole line. For example, a change to
<nameExpr expr="\w+" />
would return the first word after to.But don’t hurry to help I won’t be able to answer for two weeks.
No problem. Just respond when you are back to this thread and we can go on.
As said, I need the class and its method definitions as an example.