fromAst static method

ForStatement? fromAst(
  1. Map? ast
)

Implementation

static ForStatement? fromAst(Map? ast) {
  if (ast != null &&
      ast['type'] == astNodeNameValue(AstNodeName.ForStatement)) {
    return ForStatement(ForLoopParts.fromAst(ast['forLoopParts']),
        BlockStatement.fromAst(ast['body']),
        ast: ast);
  }
  return null;
}