entryPointCallsFunction static method

bool entryPointCallsFunction(
  1. String source,
  2. String functionName
)

Whether source invokes functionName outside comments.

Implementation

static bool entryPointCallsFunction(String source, String functionName) {
  final stripped = _entryDetectionSource(source);
  return RegExp('\\b${RegExp.escape(functionName)}\\s*\\(')
      .hasMatch(stripped);
}