parseAction method

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

Parses an event binding (historically called an "action").

// <div (click)="doThing()">
parseAction('doThing()', ...)

Implementation

ASTWithSource parseAction(
  String? input,
  String location,
  List<CompileIdentifierMetadata> exports,
) {
  if (input == null) {
    throw ParseException(
      'Blank expressions are not allowed in event bindings.',
      input,
      location,
    );
  }
  _checkNoInterpolation(input, location);
  return ASTWithSource(
    parseActionImpl(input, location, exports),
    input,
    location,
  );
}