android-components / mozilla.components.lib.jexl.ast / AstNode

# AstNode

`data class AstNode` (source)

A node of the abstract syntax tree.

This class has a lot of properties because it needs to represent all types of nodes (See AstType). It should be possible to make this much simpler by creating a dedicated class for each type.

### Constructors

<init> | `AstNode(type: AstType, value: Any? = null, operator: String? = null, left: AstNode? = null, right: AstNode? = null, from: AstNode? = null, relative: Boolean = false, subject: AstNode? = null, name: String? = null, expression: AstNode? = null, test: AstNode? = null, consequent: AstNode? = null, alternate: AstNode? = null, arguments: MutableList<AstNode> = mutableListOf())` A node of the abstract syntax tree.

### Properties

alternate | `var alternate: AstNode?`
arguments | `val arguments: MutableList<AstNode>`
consequent | `var consequent: AstNode?`
expression | `var expression: AstNode?`
from | `var from: AstNode?`
left | `var left: AstNode?`
name | `var name: String?`
operator | `val operator: String?`
relative | `var relative: Boolean`
right | `var right: AstNode?`
subject | `var subject: AstNode?`
test | `var test: AstNode?`
type | `val type: AstType`
value | `var value: Any?`

### Functions

equals | `fun equals(other: Any?): Boolean`
toString | `fun toString(): String`