FunctionCaller constructor

FunctionCaller(
  1. String name,
  2. Contexts context,
  3. int index,
  4. FileInfo currentFileInfo
)

Implementation

factory FunctionCaller(
    String name, Contexts context, int index, FileInfo currentFileInfo) {
  cache ??= FunctionCaller._(context);

  return cache
    ..name = name.toLowerCase()
    ..context = context
    ..index = index
    ..currentFileInfo = currentFileInfo
    ..found = null
    ..customCache = (context.frames != null)
        ? (context.frames[0] as VariableMixin).functionRegistry.get()
        : <FunctionBase>[];
}