parse static method

MessageWithMetadata parse(
  1. String debugString,
  2. String fileContents,
  3. String name, {
  4. bool addId = false,
})

Implementation

static MessageWithMetadata parse(
  String debugString,
  String fileContents,
  String name, {
  bool addId = false,
}) {
  final node = Parser(name, debugString, fileContents).parse();
  final arguments = <String>[];
  final message =
      parseNode(node, arguments, name, addId) ?? StringMessage('');
  return MessageWithMetadata(message, arguments, name);
}