parseInterpolation method

ASTWithSource? parseInterpolation(
  1. String input,
  2. String location,
  3. List<CompileIdentifierMetadata> exports
)

Parses a text interpolation.

// Hello {{place}}!
parseInterpolation('place', ...)

Returns null if there were no interpolations in input.

Implementation

ASTWithSource? parseInterpolation(
  String input,
  String location,
  List<CompileIdentifierMetadata> exports,
) {
  final result = parseInterpolationImpl(input, location, exports);
  if (result == null) {
    return null;
  }
  return ASTWithSource(
    result,
    input,
    location,
  );
}