Sha256: 647a6532fb94bc4d4e77fd27b5087c8da509416f0bd8a58d91f28c6f81215c20

Contents?: true

Size: 455 Bytes

Versions: 17

Compression:

Stored size: 455 Bytes

Contents

# frozen_string_literal: true

require_relative 'lox_node'

module Loxxy
  module Ast
    # A node in a parse tree that represents the occurrence of 'this' keyword.
    class LoxThisExpr < LoxNode
      # Duck-typing: behaves like a LoxVarExpr
      # @return [String] return the this keyword
      def name
        'this'
      end

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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
loxxy-0.4.08 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.4.07 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.4.06 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.4.05 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.4.04 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.4.03 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.4.02 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.4.01 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.4.00 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.3.03 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.3.02 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.3.01 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.3.00 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.2.06 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.2.05 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.2.04 lib/loxxy/ast/lox_this_expr.rb
loxxy-0.2.03 lib/loxxy/ast/lox_this_expr.rb