class Drizzle::AST::Identifier

Overview

Node class representing an Identifier. An identifier is a name, be it for a function, variable, etc

An Identifier is classed as an Expression because of situations such as let x: int = y. In this case, y is an identifier (a variable) that returns a value. We could have separate identifier tokens for left and right sides of an = symbol but that overcomplicates things a bit.

Direct Known Subclasses

Defined in:

drizzle/ast/identifier.cr

Constructors

Instance Method Summary

Instance methods inherited from class Drizzle::AST::Node

literal : String literal, to_s : String to_s

Constructor Detail

def self.new(token, value) #

[View source]

Instance Method Detail

def literal : String #

[View source]
def to_s : String #

[View source]
def token : Drizzle::Token #

The token that caused the generation of this node


[View source]
def value : String #

The value of the identifier

e.g. the name of the function / variable


[View source]