Closed
Description
After using getChildren on a node, which consists of a list and a location, I would expect to get the list with the following statements:
list[value] nodes = getChildren(statement);
list[value] nodesList = nodes[0];
Output of nodes[0]
[if(methodCall(false,"isNull",[],src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1566,8,<42,5>,<42,13>),typ=unresolved()),return(number("0",src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1583,1,<42,22>,<42,23>),typ=unresolved()),src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1576,9,<42,15>,<42,24>)),src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1563,22,<42,2>,<42,24>)),declarationStatement(variables(int(),[variable("i",0,infix(number("1",src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1597,1,<43,10>,<43,11>),typ=unresolved()),"+",number("1",src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1601,1,<43,14>,<43,15>),typ=unresolved()),src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1597,5,<43,10>,<43,15>),typ=unresolved()),src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1593,9,<43,6>,<43,15>))]),src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1589,14,<43,2>,<43,16>)),return(methodCall(false,simpleName("Math",src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1620,4,<44,15>,<44,19>),typ=unresolved()),"toDegrees",[methodCall(false,simpleName("param1",src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1636,6,<44,31>,<44,37>),typ=unresolved()),"getDouble",[],src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1636,18,<44,31>,<44,49>),typ=unresolved())],src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1620,36,<44,15>,<44,51>),typ=unresolved()),src=|project://smallsql/src/smallsql/database/ExpressionFunctionDegrees.java|(1613,44,<44,8>,<44,52>))]
type of nodes[0]
list(adt("Statement",[]))
I would expect this to be a list of nodes, but this seems to be a list[value]. I am trying to write a iterator over the list, but I constantly get parse errors, because this is not a list? I am also not able to use size() over the list, because there is no function with a corresponding parameter type.
Activity