Sha256: 0c0c93389ad84d4dc8a9feba182fece227ca501aa4967a7bebda5f2c43410622

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

# frozen_string_literal: true

module Parser
  # Parser metadata
  module Meta

    # All node types that parser can produce. Not all parser versions
    # will be able to produce every possible node.
    NODE_TYPES =
      %w(
        true false nil int float str dstr
        sym dsym xstr regopt regexp array splat
        pair kwsplat hash irange erange self
        lvar ivar cvar gvar const defined? lvasgn
        ivasgn cvasgn gvasgn casgn mlhs masgn
        op_asgn and_asgn ensure rescue arg_expr
        or_asgn back_ref nth_ref
        match_with_lvasgn match_current_line
        module class sclass def defs def_e defs_e undef alias args
        cbase arg optarg restarg blockarg block_pass kwarg kwoptarg
        kwrestarg kwnilarg send csend super zsuper yield block
        and not or if when case while until while_post
        until_post for break next redo return resbody
        kwbegin begin retry preexe postexe iflipflop eflipflop
        shadowarg complex rational __FILE__ __LINE__ __ENCODING__
        ident root lambda indexasgn index procarg0
        restarg_expr blockarg_expr
        objc_kwarg objc_restarg objc_varargs
        numargs numblock forward_args forwarded_args
        case_match in_match in_pattern
        match_var pin match_alt match_as match_rest
        array_pattern match_with_trailing_comma array_pattern_with_tail
        hash_pattern const_pattern if_guard unless_guard match_nil_pattern
        empty_else
      ).map(&:to_sym).to_set.freeze

  end # Meta
end # Parser

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
parser-2.7.1.2 lib/parser/meta.rb