class Omnium::Parser::AST::UnaryOperator

Unary Operator represents a plus or minus on a number e.g. +1 or -5. That is an operator operating on one operand. @operator represents the unary operator token (plus or minus) and @operand represents another node (number or expression).

Attributes

operand[R]
operator[R]

Public Class Methods

new(operator, operand) click to toggle source
# File lib/omnium/parser/ast/unary_operator.rb, line 12
def initialize(operator, operand)
  @operator = operator
  @operand = operand
end