lib/dense/parser.rb in dense-1.1.5 vs lib/dense/parser.rb in dense-1.1.6
- old
+ new
@@ -42,10 +42,11 @@
def bend(i); str(nil, i, ']'); end
def bstart(i); str(nil, i, '['); end
def blank(i); str(:blank, i, ''); end
def name(i); rex(:name, i, /[-+%^<>a-zA-Z0-9_\/\\=?!]+/); end
- def off(i); rex(:off, i, /-?\d+/); end
+ def off(i); rex(:off, i, /-?\d+(?=(\.|\[|\z))/); end
+ # positive lookahead so that "0_1_2" is not parsed as "0" and whatever...
def star(i); str(:star, i, '*'); end
def ses(i) # start:end:step
rex(