Sha256: 8964102c243206a638f66af2974de2ec495a7940645dd292b36e767e5b9e9e62

Contents?: true

Size: 834 Bytes

Versions: 8

Compression:

Stored size: 834 Bytes

Contents

# frozen_string_literal: true

require_relative 'lox_node'

module Loxxy
  module Ast
    class LoxGetExpr < LoxNode
      # @return [Ast::LoxNode] the object to which the property belongs to
      attr_accessor :object

      # @return [String] Name of an object property
      attr_reader :property

      # @param aPosition [Rley::Lexical::Position] Position of the entry in the input stream.
      # @param aPropertyName [String] Name of an object property
      def initialize(aPosition, aPropertyName)
        super(aPosition)
        @property = aPropertyName
      end

      # Part of the 'visitee' role in Visitor design pattern.
      # @param visitor [ASTVisitor] the visitor
      def accept(visitor)
        visitor.visit_get_expr(self)
      end

      alias callee= object=
    end # class
  end # module
end # module

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
loxxy-0.2.02 lib/loxxy/ast/lox_get_expr.rb
loxxy-0.2.01 lib/loxxy/ast/lox_get_expr.rb
loxxy-0.2.00 lib/loxxy/ast/lox_get_expr.rb
loxxy-0.1.17 lib/loxxy/ast/lox_get_expr.rb
loxxy-0.1.16 lib/loxxy/ast/lox_get_expr.rb
loxxy-0.1.15 lib/loxxy/ast/lox_get_expr.rb
loxxy-0.1.14 lib/loxxy/ast/lox_get_expr.rb
loxxy-0.1.13 lib/loxxy/ast/lox_get_expr.rb