OLD | NEW |
1 part of layout; | |
2 | |
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
6 | 4 |
7 /** | 5 /** |
8 * Base class for simple recursive descent parsers. | 6 * Base class for simple recursive descent parsers. |
9 * Handles the lower level stuff, i.e. what a scanner/tokenizer would do. | 7 * Handles the lower level stuff, i.e. what a scanner/tokenizer would do. |
10 */ | 8 */ |
11 class _Parser { | 9 class _Parser { |
12 static const WHITESPACE = ' \r\n\t'; | 10 static const WHITESPACE = ' \r\n\t'; |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 String toString() { | 477 String toString() { |
480 String location; | 478 String location; |
481 if (_offset < _source.length) { | 479 if (_offset < _source.length) { |
482 location = 'location: ${_source.substring(_offset)}'; | 480 location = 'location: ${_source.substring(_offset)}'; |
483 } else { | 481 } else { |
484 location = 'end of input'; | 482 location = 'end of input'; |
485 } | 483 } |
486 return 'SyntaxErrorException: $_message at $location'; | 484 return 'SyntaxErrorException: $_message at $location'; |
487 } | 485 } |
488 } | 486 } |
OLD | NEW |