Sha256: 8b96536a266b874f4f752f9130946be5bdc8e272a4c62154ea85bb20ee92385c
Contents?: true
Size: 571 Bytes
Versions: 7
Compression:
Stored size: 571 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 # Part of the 'visitee' role in Visitor design pattern. # @param _visitor [LoxxyTreeVisitor] the visitor def accept(aVisitor) aVisitor.visit_this_expr(self) end end # class end # module end # module
Version data entries
7 entries across 7 versions & 1 rubygems