Closed ghost closed 2 years ago
This is some of the must disgusting syntax ever seen. Thankfully we have unit tests. It's actually simpler to rewrite this in a manual parser, I think.
That work is merged, can you give it a check? all 10 of the expressions above pass the test.
Most of the deal here is that number parsing is made according to C strtod
rules:
it extracts the largest leading part of the text which looks like a number, ignoring the rest.
The parser then skips any junk that occurs prior to token characters.
As a note: If there exists an even worse syntax, that would be file_read
regarding text files.
This thing extracts either numbers or math-like expressions, of which i've not bothered to do the latter.
seems like it's the only thing in computing that likes left-to-right priority rather than PEMDAS
Great! I checked with the plugin and all above examples are good. That should take care of all typos reaper lets slip through that I could think of. (regarding sliders that is, lets see if there is more :) ).
One small difference still: In jsfx an increment of 0 is a jump between min and max (slider14/15), where in ysfx it's a continuous slider with all values between min and max.
Oh and the scrollbar in the plugin is gone in sliderview.
Oh and the scrollbar in the plugin is gone in sliderview.
This is fixed.
just a heads up that this is currently in the reaper dev branch:
Includes feature branch: JSFX internals overhaul/cleanup/modernization
https://forum.cockos.com/forumdisplay.php?f=37
followed by this (unofficial) announcement:
https://askjf.com/index.php?q=5961s
@mynameismuhl this topic goes on under "Discussions" https://github.com/jpcima/ysfx/discussions/33
Instead of waiting for more typos in other peoples code, I tried to do it all wrong myself and share the results here hoping it is somewhat helpful.
All the following examples compile and show in reaper.
These are 10 identical sliders:
What (i think) i see is
=value
is allowed here).<min,max,increment>
: If field starts with valid value, reaper takes that and ignores the rest."
and'
are a problem if not closed. You can<
multiple times but>
only once. You can't open with<<
.If fields are empty:
Similar for menu slider:
{L,I,S,T}
That's what I found so far.