Sha256: c78e186e270da64e7cd6e0edd9d9f9f646957fc3a626ba56e7d4380c29bfaa6f
Contents?: true
Size: 720 Bytes
Versions: 28
Compression:
Stored size: 720 Bytes
Contents
# frozen_string_literal: true require_relative 'lox_node' module Loxxy module Ast # This AST node represents a mention of a variable class LoxVariableExpr < LoxNode # @return [String] variable name attr_reader :name # @param aPosition [Rley::Lexical::Position] Position of the entry in the input stream. # @param aName [String] name of the variable def initialize(aPosition, aName) super(aPosition) @name = aName end # Part of the 'visitee' role in Visitor design pattern. # @param visitor [Ast::ASTVisitor] the visitor def accept(visitor) visitor.visit_variable_expr(self) end end # class end # module end # module
Version data entries
28 entries across 28 versions & 1 rubygems