Open jnbbender opened 3 years ago
I am using the standard Nearley definition of a Number (see below) but I don't know how Nearley supports ranges. i.e. digits{1,3}
Here's what I'm using for number
number -> digits "." digits {% (data) => Number(data[0] + "." + data[2]) %} // Trying to figure out digits{1,3} "," digits | digits {% (data) => Number(data.join("")) %} digits -> digit {% id %} | digit digits {% (data) => data.join("") %} digit -> [0-9] {% id %}
Thanks
I am using the standard Nearley definition of a Number (see below) but I don't know how Nearley supports ranges. i.e. digits{1,3}
Here's what I'm using for number
Thanks