Roll engine to 76cb311d9c33720dcd19274228b39ecdbad8d9af (with rolled dart) (#16518)

* Handle error count reported by frontend.

Extend compilation result from single string to a structure(string filename and integer error count).

* Use ?.

* Include engine roll with dart sdk roll.

* parse(onError) -> tryParse

* Make '?? throw' more readable and avoid issue with analyzer

* Fix test so it mocks compiler output including errors count
This commit is contained in:
Alexander Aprelev
2018-04-12 16:28:01 -07:00
committed by Siva
parent c73b8a7cf6
commit e0cd42e4ad
13 changed files with 75 additions and 48 deletions

View File

@@ -197,7 +197,7 @@ class FuchsiaRemoteConnection {
final int lastSpace = trimmed.lastIndexOf(' ');
final String lastWord = trimmed.substring(lastSpace + 1);
if ((lastWord != '.') && (lastWord != '..')) {
final int value = int.parse(lastWord, onError: (_) => null);
final int value = int.tryParse(lastWord);
if (value != null) {
ports.add(value);
}