fromAst static method

StringLiteral? fromAst(
  1. Map? ast
)

Implementation

static StringLiteral? fromAst(Map? ast) {
  if (ast != null &&
      ast['type'] == astNodeNameValue(AstRuntimeNodeName.StringLiteral)) {
    return StringLiteral(ast['value']);
  }
  logDebug(_tag, 'Can not parse ast to StringLiteral');
  return null;
}