Sha256: a77ce6552b9e69a737cee76d1414b5767d7201be3e2f4224af7a9af9f7a9b8f4
Contents?: true
Size: 947 Bytes
Versions: 8
Compression:
Stored size: 947 Bytes
Contents
# frozen_string_literal: true require_relative 'lox_node' module Loxxy module Ast # rubocop: disable Style/AccessorGrouping class LoxFunStmt < LoxNode attr_reader :name attr_reader :params attr_reader :body attr_accessor :is_method # @param aPosition [Rley::Lexical::Position] Position of the entry in the input stream. # @param aName [String] # @param arguments [Array<String>] # @param body [Ast::LoxBlockStmt] def initialize(aPosition, aName, paramList, aBody) super(aPosition) @name = aName.dup @params = paramList @body = aBody @is_method = false end # Part of the 'visitee' role in Visitor design pattern. # @param visitor [Ast::ASTVisitor] the visitor def accept(visitor) visitor.visit_fun_stmt(self) end end # class # rubocop: enable Style/AccessorGrouping end # module end # module
Version data entries
8 entries across 8 versions & 1 rubygems