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

Side by Side Diff: dart/lib/compiler/implementation/scanner/scanner.dart

Issue 10584011: Missing test from CL 10544173. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/tests/language/skip_expression_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // 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
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 interface Scanner { 5 interface Scanner {
6 Token tokenize(); 6 Token tokenize();
7 } 7 }
8 8
9 /** 9 /**
10 * Common base class for a Dart scanner. 10 * Common base class for a Dart scanner.
(...skipping 18 matching lines...) Expand all
29 abstract int get charOffset(); 29 abstract int get charOffset();
30 abstract int get byteOffset(); 30 abstract int get byteOffset();
31 abstract void appendBeginGroup(PrecedenceInfo info, String value); 31 abstract void appendBeginGroup(PrecedenceInfo info, String value);
32 abstract int appendEndGroup(PrecedenceInfo info, String value, int openKind); 32 abstract int appendEndGroup(PrecedenceInfo info, String value, int openKind);
33 abstract void appendGt(PrecedenceInfo info, String value); 33 abstract void appendGt(PrecedenceInfo info, String value);
34 abstract void appendGtGt(PrecedenceInfo info, String value); 34 abstract void appendGtGt(PrecedenceInfo info, String value);
35 abstract void appendGtGtGt(PrecedenceInfo info, String value); 35 abstract void appendGtGtGt(PrecedenceInfo info, String value);
36 36
37 /** 37 /**
38 * We call this method to discard '<' from the "grouping" stack 38 * We call this method to discard '<' from the "grouping" stack
39 * (maintained by subclasses). That we don't create groups for stuff 39 * (maintained by subclasses).
40 * like "a = b < c, d = e > f" is used by 40 *
41 * [PartialParser.skipExpression]. 41 * [PartialParser.skipExpression] relies on the fact that we do not
42 * create groups for stuff like:
43 * [:a = b < c, d = e > f:].
44 *
45 * In other words, this method is called when the scanner recognizes
46 * something which cannot possibly be part of a type
47 * parameter/argument list.
42 */ 48 */
43 abstract void discardOpenLt(); 49 abstract void discardOpenLt();
44 50
45 // TODO(ahe): Move this class to implementation. 51 // TODO(ahe): Move this class to implementation.
46 52
47 Token tokenize() { 53 Token tokenize() {
48 int next = advance(); 54 int next = advance();
49 while (next !== $EOF) { 55 while (next !== $EOF) {
50 next = bigSwitch(next); 56 next = bigSwitch(next);
51 } 57 }
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 charOffset); 780 charOffset);
775 } 781 }
776 } 782 }
777 783
778 class MalformedInputException { 784 class MalformedInputException {
779 final String message; 785 final String message;
780 final position; 786 final position;
781 MalformedInputException(this.message, this.position); 787 MalformedInputException(this.message, this.position);
782 toString() => message; 788 toString() => message;
783 } 789 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/language/skip_expression_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698