sorcerer icon indicating copy to clipboard operation
sorcerer copied to clipboard

Unary negative literals should not be be reported as subexpressions

Open jimweirich opened this issue 11 years ago • 0 comments

sexp = Ripper::SexpBuilder.parse("a + -1")
Sorcerer.subexpressions(sexp)

Currently returns

   ["a + -1", "a", "-1"]

It should return

   ["a + -1", "a"]

(same for -1.0 as well)

jimweirich avatar Jul 19 '13 02:07 jimweirich