diff options
Diffstat (limited to 'nomsu.4.peg')
| -rw-r--r-- | nomsu.4.peg | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nomsu.4.peg b/nomsu.4.peg index e7fc09a..b2e636f 100644 --- a/nomsu.4.peg +++ b/nomsu.4.peg @@ -173,7 +173,9 @@ indented_plain_text (Text): text_interpolation: inline_text_interpolation / ("\" indented_expression (blank_lines =curr_indent "..")?) -number (Number): (("-"? (([0-9]+ "." [0-9]+) / ("." [0-9]+) / "0x" [0-9a-fA-F]+ / ([0-9]+)))-> tonumber) +number (Number): + (&("-"? "0x" [0-9a-fA-F]+) {:hex: '' -> 'yes' :})? + (("-"? (([0-9]+ "." [0-9]+) / ("." [0-9]+) / "0x" [0-9a-fA-F]+ / ([0-9]+)))-> tonumber) -- Variables can be nameless (i.e. just %) and can only contain identifier chars. -- This ensures you don't get weird parsings of `%x+%y` or `%'s thing`. |
