public void buildStructure(final ErlSource source, final SourceElementBody parentBody) {
List<ASTNode> _forms = this.ast.getForms();
for (final ASTNode node : _forms) {
{
ErlForm _switchResult = null;
String _kind = node.getKind();
boolean _matched = false;
if (!_matched) {
if (Objects.equal(_kind, "attribute")) {
_matched=true;
String _name = node.getName();
_switchResult = new ErlAttribute(source, _name);
}
}
if (!_matched) {
if (Objects.equal(_kind, "function")) {
_matched=true;
String _name_1 = node.getName();
int _arg = node.getArg();
_switchResult = new ErlFunction(source, _name_1, _arg);
}
}
final ErlForm handle = _switchResult;
final SourceElementBody body = new SourceElementBody();
TextRange _pos = node.getPos();
body.setFullRange(_pos);
this.addChild(parentBody, handle, body);
this.complete(body);