Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Expression<T>

Expressions are one of the main building blocks of the AST. Whether a logical or mathematical statement, Expressions generally evaluate to a primitive.

Type parameters

  • T

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Private _lws

_lws: string

Accessors

ws

  • get ws(): string
  • set ws(ws: string): void
  • Returns the whitespace preceding the expression

    Returns string

  • Sets the whitespace preceding the expression

    Parameters

    • ws: string

    Returns void

Methods

equals

  • Returns whether the Expression equals another Expression

    Parameters

    • right: Expression<any>

      The right side of the equality

    Returns boolean

Abstract eval

  • eval(context: Scope): T
  • Interface evaluation method for Expressions

    Parameters

    • context: Scope

      The current program context

    Returns T

Abstract toString

  • toString(): string
  • Interface method to return a string representation of the Expression

    Returns string

Generated using TypeDoc