errorEof function

JSONASTException errorEof(
  1. String input,
  2. List tokenList,
  3. Settings settings
)

Implementation

JSONASTException errorEof(
    String input, List<dynamic> tokenList, Settings settings) {
  final loc = (tokenList.isNotEmpty
      ? tokenList[tokenList.length - 1].loc.end as Loc
      : Loc(line: 1, column: 1));

  return JSONASTException(
      unexpectedEnd(), input, settings.source, loc.line, loc.column);
}