adding code macros
drom opened this issue · 3 comments
drom commented
I noticed that you have set of handy and efficient macros to perform common scan operations here:
https://github.com/nodejs/llparse/tree/master/src/implementation/c/code
I need something similar to mulAdd
but to parse 4-state, variable length numbers.
Do you have and example of adding such macros?
drom commented
Here I am invoking mulAdd
https://github.com/wavedrom/vcd/blob/master/bin/build.js#L242
but want to invoke my code:
https://github.com/wavedrom/vcd/blob/master/vcd_spans.c#L143
indutny commented
You can invoke c-functions this way (with p.code.match(...)
or p.code.value(...)
). Would that help?
drom commented
yes, p.code.value(...)
works!