Class: Loxxy::Ast::LoxThisExpr

Inherits:
LoxNode
  • Object
show all
Defined in:
lib/loxxy/ast/lox_this_expr.rb

Overview

A node in a parse tree that represents the occurrence of 'this' keyword.

Instance Attribute Summary

Attributes inherited from LoxNode

#position

Instance Method Summary collapse

Methods inherited from LoxNode

#accept, #done!, #initialize

Methods included from ASTVisitee

#define_accept, #snake_case

Constructor Details

This class inherits a constructor from Loxxy::Ast::LoxNode

Instance Method Details

#nameString

Duck-typing: behaves like a LoxVarExpr

Returns:

  • (String)

    return the this keyword



11
12
13
# File 'lib/loxxy/ast/lox_this_expr.rb', line 11

def name
  'this'
end