public class SyntaxTree extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SyntaxTree.Location<T extends Bytecode> |
| Modifier and Type | Field and Description |
|---|---|
static int |
ARGUMENTS |
static int |
BODY |
static int |
CONDITION
Some helpful context to make reading the code using syntax trees simpler.
|
static int |
END |
static int |
ENVIRONMENT |
static int |
FALSEBRANCH |
static int |
LEFTHANDSIDE |
static int |
PARAMETERS |
static int |
RIGHTHANDSIDE |
static int |
START |
static int |
TRUEBRANCH |
static int |
VARIABLE |
| Constructor and Description |
|---|
SyntaxTree(WyilFile.Declaration enclosingDeclaration) |
| Modifier and Type | Method and Description |
|---|---|
WyilFile.Declaration |
getEnclosingDeclaration()
Get the enclosing declaration of this syntax tree.
|
int |
getIndexOf(SyntaxTree.Location<?> location)
Get the index of a given location in this tree.
|
SyntaxTree.Location<?> |
getLocation(int index)
Get the location at a given index in this syntax tree.
|
List<SyntaxTree.Location<?>> |
getLocations() |
SyntaxTree.Location<?>[] |
getLocations(int... indices)
Get the location at a given index in this syntax tree.
|
int |
size()
Returns the number of locations in this syntax tree.
|
public static final int CONDITION
public static final int BODY
public static final int VARIABLE
public static final int TRUEBRANCH
public static final int PARAMETERS
public static final int ARGUMENTS
public static final int LEFTHANDSIDE
public static final int START
public static final int FALSEBRANCH
public static final int RIGHTHANDSIDE
public static final int ENVIRONMENT
public static final int END
public SyntaxTree(WyilFile.Declaration enclosingDeclaration)
public int size()
public SyntaxTree.Location<?> getLocation(int index)
index - --- index of location to returnpublic SyntaxTree.Location<?>[] getLocations(int... indices)
index - --- index of location to returnpublic List<SyntaxTree.Location<?>> getLocations()
public int getIndexOf(SyntaxTree.Location<?> location)
location - public WyilFile.Declaration getEnclosingDeclaration()
Copyright © 2017. All rights reserved.