Sha256: 0e9ceae6a4413cd13f8ae1d7e11de9e97bbf4825090d1e6f4982fbbea7d2e525

Contents?: true

Size: 837 Bytes

Versions: 8

Compression:

Stored size: 837 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

      # Part of the 'visitee' role in Visitor design pattern.
      # @param visitor [ASTVisitor] the visitor
      def accept(visitor)
        visitor.visit_set_expr(self)
      end
    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_set_expr.rb
loxxy-0.2.01 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.2.00 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.1.17 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.1.16 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.1.15 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.1.14 lib/loxxy/ast/lox_set_expr.rb
loxxy-0.1.13 lib/loxxy/ast/lox_set_expr.rb