Class: Maccro::DSL::Expression

Inherits:
Node
  • Object
show all
Defined in:
lib/maccro/dsl/expression.rb

Constant Summary collapse

SUB_TYPES =
[
  Value, Assignment,
  IfExp, UnlessExp, CaseExp,
  # BeginExp, RescueExp,
  AndExp, OrExp,
  CallExp, OperatorCallExp, SafeCallExp, FunctionCallExp, VCallExp,
  SuperExp, YieldExp,
  MatchExp,
  DefineMethod, DefineSingletonMethod,
  Colon2Exp, Colon3Exp, Dot2Exp, Dot3Exp, Flip2Exp, Flip3Exp,
  DefinedExp,
].freeze

Instance Attribute Summary

Attributes inherited from Node

#first_column, #first_lineno, #last_column, #last_lineno, #name

Class Method Summary collapse

Methods inherited from Node

#capture, #children, #initialize, #match?, #to_code_range, #type

Methods included from ASTNodeWrapper

#capture, #children, #match?, #to_code_range

Constructor Details

This class inherits a constructor from Maccro::DSL::Node

Class Method Details

.match?(node) ⇒ Boolean

Returns:

  • (Boolean)


161
162
163
# File 'lib/maccro/dsl/expression.rb', line 161

def self.match?(node)
  SUB_TYPES.any?{|s| s.match?(node) }
end