parser_error 0.0.1 copy "parser_error: ^0.0.1" to clipboard
parser_error: ^0.0.1 copied to clipboard

discontinued
outdatedDart 1 only

Parser error formatter with support for the multiple source code parts.

example/example.dart

import "package:parser_error/parser_error.dart";

void main() {
  var messages = [];
  var message = new ParserErrorMessage("Malformed 'type'", 25, 30);
  messages.add(message);
  message = new ParserErrorMessage("Expected ']' but found '`'", 29, 29);
  messages.add(message);
  var strings = ParserErrorFormatter.format(source, messages);
  print(strings.join("\n"));
  throw new FormatException();
}

String source = '''
#if defined(FOO)
typedef int[`
#endif
''';
2
likes
0
pub points
82%
popularity

Publisher

unverified uploader

Parser error formatter with support for the multiple source code parts.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

text

More

Packages that depend on parser_error