Sha256: 6552c62b8e1b107442f86437df59733d29b44ee4e09d5488863770fd24b90a84

Contents?: true

Size: 731 Bytes

Versions: 6

Compression:

Stored size: 731 Bytes

Contents

# frozen_string_literal: true

require_relative 'lox_compound_expr'

module Loxxy
  module Ast
    class LoxSetExpr < LoxCompoundExpr
      # @return [Ast::LoxNode] the object to which the property belongs to
      attr_reader :object

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

      # @param aPosition [Rley::Lexical::Position] Position of the entry in the input stream.
      # @param anObject [Ast::LoxNode] The object which the given property is being set
      def initialize(aPosition, anObject)
        super(aPosition, [])
        @object = anObject
      end

      define_accept # Add `accept` method as found in Visitor design pattern
    end # class
  end # module
end # module

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
loxxy-0.3.01 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.3.00 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.2.06 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.2.05 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.2.04 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.2.03 lib/loxxy/ast/lox_set_expr.rb