Sha256: 041b5642c2f2bf4070896bb20f772a5ee11f36dab1d590246aa540fe53170b83
Contents?: true
Size: 674 Bytes
Versions: 12
Compression:
Stored size: 674 Bytes
Contents
# frozen_string_literal: true require_relative 'lox_compound_expr' module Loxxy module Ast class LoxReturnStmt < LoxCompoundExpr # @param aPosition [Rley::Lexical::Position] Position of the entry in the input stream. # @param anExpression [Ast::LoxNode] expression to return def initialize(aPosition, anExpression) expr = anExpression || Datatype::Nil.instance super(aPosition, [expr]) end # Part of the 'visitee' role in Visitor design pattern. # @param visitor [Ast::ASTVisitor] the visitor def accept(visitor) visitor.visit_return_stmt(self) end end # class end # module end # module
Version data entries
12 entries across 12 versions & 1 rubygems