Home Manual Reference Source Test Repository
public class | source

ASTUtil

Static Method Summary

Static Public Methods
public static

formatBinaryExpressionPart(node: object, parentNode: object, isRightHand: boolean, state: object, traveler: object)

Formats into the output stream a left-hand or right-hand expression node from a binary expression applying the provided operator.

public static

formatSequence(nodes: Array<object>, state: object, traveler: object)

Formats a sequence of nodes.

public static

Returns true if the provided node contains a call expression and false otherwise.

Static Public Methods

public static formatBinaryExpressionPart(node: object, parentNode: object, isRightHand: boolean, state: object, traveler: object) source

Formats into the output stream a left-hand or right-hand expression node from a binary expression applying the provided operator. The isRightHand parameter should be true if the node is a right-hand argument.

Params:

NameTypeAttributeDescription
node object

An AST node.

parentNode object

The AST parent node.

isRightHand boolean

Represents a right-hand target when true.

state object
traveler object

public static formatSequence(nodes: Array<object>, state: object, traveler: object) source

Formats a sequence of nodes.

Params:

NameTypeAttributeDescription
nodes Array<object>

A sequence of AST nodes.

state object
traveler object

public static hasCallExpression(node: object): boolean source

Returns true if the provided node contains a call expression and false otherwise.

Params:

NameTypeAttributeDescription
node object

An AST node.

Return:

boolean