Skip to content
instance method

Prism::Translation::Parser::Compiler#numeric_negate

numeric_negate(message_loc, receiver)

Negate the value of a numeric node. This is a special case where you have a negative sign on one line and then a number on the next line. In normal Ruby, this will always be a method call. The parser gem, however, marks this as a numeric literal. We have to massage the tree here to get it into the correct form.