convertValueToOutputAst function

Expression convertValueToOutputAst(
  1. dynamic value
)

Converts a reference, literal or existing expression to provider value.

Implementation

o.Expression convertValueToOutputAst(dynamic value) {
  if (value is CompileIdentifierMetadata) {
    return o.importExpr(value);
  } else if (value is CompileTokenMetadata) {
    return createDiTokenExpression(value);
  } else if (value is o.Expression) {
    return value;
  } else {
    return o.literal(value);
  }
}