Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: pkg/front_end/lib/src/fasta/parser/parser_error.dart

Issue 2978063002: Move parser helper classes to own files and clean them up. (Closed)
Patch Set: Don't use problems.dart in parser. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 library fasta.parser.parser_error;
6
7 import '../fasta_codes.dart' show Message;
8
9 import '../scanner.dart' show Token;
10
11 class ParserError {
12 /// Character offset from the beginning of file where this error starts.
13 final int beginOffset;
14
15 /// Character offset from the beginning of file where this error ends.
16 final int endOffset;
17
18 final Message message;
19
20 ParserError(this.beginOffset, this.endOffset, this.message);
21
22 ParserError.fromTokens(Token begin, Token end, Message message)
23 : this(begin.charOffset, end.charOffset + end.charCount, message);
24
25 String toString() => "@${beginOffset}: ${message.message}\n${message.tip}";
26 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | pkg/front_end/lib/src/fasta/parser/type_continuation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698