protected final class MmuTreeWalkerBase.StructBuilder
extends java.lang.Object
Constructor and Description |
---|
MmuTreeWalkerBase.StructBuilder(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
void |
addField(org.antlr.runtime.tree.CommonTree fieldId,
org.antlr.runtime.tree.CommonTree typeId) |
void |
addField(org.antlr.runtime.tree.CommonTree fieldId,
ru.ispras.fortress.expression.Node sizeExpr,
ru.ispras.fortress.expression.Node valueExpr)
Adds a field to Type to be created.
|
Type |
build()
Builds a Type from the collection of fields.
|
public MmuTreeWalkerBase.StructBuilder(java.lang.String id)
public void addField(org.antlr.runtime.tree.CommonTree fieldId, ru.ispras.fortress.expression.Node sizeExpr, ru.ispras.fortress.expression.Node valueExpr) throws SemanticException
fieldId
- Field identifier.sizeExpr
- Field size expression.valueExpr
- Field default value expression (optional, can be null
).SemanticException
- (1) if the size expression is null
, (2) if
the size expression cannot be evaluated to a positive integer value (Java int).public void addField(org.antlr.runtime.tree.CommonTree fieldId, org.antlr.runtime.tree.CommonTree typeId) throws SemanticException
SemanticException
public Type build()