ASTPlus: The addition of two terms, in an ASTNode.

ASTPlusR Documentation

The addition of two terms, in an ASTNode.

Description

The addition of two terms, in an ASTNode.

The addition of two terms, in an ASTNode.

Format

R6Class object.

Super classes

tangram::ASTNode -> tangram::ASTBranch -> ASTPlus

Public fields

data

Just returns the R6 name 'ASTPlus'

left

The node to the left of this node

right

The node to the right of this node

Methods

Public methods

Inherited methods

Method new()

Construct a new node that represents addition

Usage
ASTPlus$new(left, right)
Arguments
left

(ASTNode) Node on the left side of the addition

right

(ASTNode) Node on the right side of the addition


Method terms()

Returns a vector of the left and right terms

Usage
ASTPlus$terms()

Method string()

A reparsable string representation of this node.

Usage
ASTPlus$string()

Method clone()

The objects of this class are cloneable with this method.

Usage
ASTPlus$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

ASTPlus$new(ASTVariable$new("x"), ASTVariable$new("y"))$string()


spgarbet/tg documentation built on Feb. 21, 2023, 3:35 a.m.