jmc
jmc copied to clipboard
[BUG] `EVAL` throws errors in macro factories
Describe the bug [A clear and concise description of what the bug is.]
When using #define
, defining another macro factory in terms of EVAL
expressions results in a parsing error.
To Reproduce [Steps to reproduce the behavior]
- Write the following code in a
.hjmc
file:
#define SCALE 480
#bind EVAL
#define Units(x) EVAL((x * SCALE) \ 1)
- Use
jmc compile
- Read the error message that appears in console.
Expected behavior [A clear and concise description of what you expected to happen.]
I expect that the code would compile without error, and that if something like Units(1.5)
appeared in the main code, it would be automatically replaced with 720
Actual behavior
I get the following error.
EvaluationException
Unable to evaluate expression '(x * 480)\1'`
Desktop
- Can replicate on both my 2020 M1 MacBook Air and my 2022 M2 MacBook Air, running MacOS Sonoma