fromAst static method
Implementation
static ListLiteral? fromAst(Map? ast) {
if (ast != null &&
ast['type'] == astNodeNameValue(AstNodeName.ListLiteral)) {
var astElements = ast['elements'];
var items = <Expression>[];
if (astElements is List) {
for (var e in astElements) {
var expression = Expression.fromAst(e);
if (expression != null) {
items.add(expression);
}
}
}
return ListLiteral(items, ast: ast);
}
return null;
}