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

Unified Diff: pkg/analyzer/lib/src/generated/parser.dart

Issue 259773005: New analyzer snapshot. Sorted unit members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_core.dart ('k') | pkg/analyzer/lib/src/generated/scanner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 08c5390b6cf23c67284269835ef3e2e315b1201d..34c3f4f092cc31f32a1f15c2688cd3b8e32ad60b 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -67,80 +67,6 @@ class FinalConstVarOrType {
}
/**
- * Instances of the class `Modifiers` implement a simple data-holder for a method that needs
- * to return multiple values.
- */
-class Modifiers {
- /**
- * The token representing the keyword 'abstract', or `null` if the keyword was not found.
- */
- Token abstractKeyword;
-
- /**
- * The token representing the keyword 'const', or `null` if the keyword was not found.
- */
- Token constKeyword;
-
- /**
- * The token representing the keyword 'external', or `null` if the keyword was not found.
- */
- Token externalKeyword;
-
- /**
- * The token representing the keyword 'factory', or `null` if the keyword was not found.
- */
- Token factoryKeyword;
-
- /**
- * The token representing the keyword 'final', or `null` if the keyword was not found.
- */
- Token finalKeyword;
-
- /**
- * The token representing the keyword 'static', or `null` if the keyword was not found.
- */
- Token staticKeyword;
-
- /**
- * The token representing the keyword 'var', or `null` if the keyword was not found.
- */
- Token varKeyword;
-
- @override
- String toString() {
- JavaStringBuilder builder = new JavaStringBuilder();
- bool needsSpace = _appendKeyword(builder, false, abstractKeyword);
- needsSpace = _appendKeyword(builder, needsSpace, constKeyword);
- needsSpace = _appendKeyword(builder, needsSpace, externalKeyword);
- needsSpace = _appendKeyword(builder, needsSpace, factoryKeyword);
- needsSpace = _appendKeyword(builder, needsSpace, finalKeyword);
- needsSpace = _appendKeyword(builder, needsSpace, staticKeyword);
- _appendKeyword(builder, needsSpace, varKeyword);
- return builder.toString();
- }
-
- /**
- * If the given keyword is not `null`, append it to the given builder, prefixing it with a
- * space if needed.
- *
- * @param builder the builder to which the keyword will be appended
- * @param needsSpace `true` if the keyword needs to be prefixed with a space
- * @param keyword the keyword to be appended
- * @return `true` if subsequent keywords need to be prefixed with a space
- */
- bool _appendKeyword(JavaStringBuilder builder, bool needsSpace, Token keyword) {
- if (keyword != null) {
- if (needsSpace) {
- builder.appendChar(0x20);
- }
- builder.append(keyword.lexeme);
- return true;
- }
- return needsSpace;
- }
-}
-
-/**
* Instances of the class `IncrementalParseDispatcher` implement a dispatcher that will invoke
* the right parse method when re-parsing a specified child of the visited node. All of the methods
* in this class assume that the parser is positioned to parse the replacement for the node. All of
@@ -1420,6 +1346,80 @@ class InsufficientContextException extends IncrementalParseException {
}
/**
+ * Instances of the class `Modifiers` implement a simple data-holder for a method that needs
+ * to return multiple values.
+ */
+class Modifiers {
+ /**
+ * The token representing the keyword 'abstract', or `null` if the keyword was not found.
+ */
+ Token abstractKeyword;
+
+ /**
+ * The token representing the keyword 'const', or `null` if the keyword was not found.
+ */
+ Token constKeyword;
+
+ /**
+ * The token representing the keyword 'external', or `null` if the keyword was not found.
+ */
+ Token externalKeyword;
+
+ /**
+ * The token representing the keyword 'factory', or `null` if the keyword was not found.
+ */
+ Token factoryKeyword;
+
+ /**
+ * The token representing the keyword 'final', or `null` if the keyword was not found.
+ */
+ Token finalKeyword;
+
+ /**
+ * The token representing the keyword 'static', or `null` if the keyword was not found.
+ */
+ Token staticKeyword;
+
+ /**
+ * The token representing the keyword 'var', or `null` if the keyword was not found.
+ */
+ Token varKeyword;
+
+ @override
+ String toString() {
+ JavaStringBuilder builder = new JavaStringBuilder();
+ bool needsSpace = _appendKeyword(builder, false, abstractKeyword);
+ needsSpace = _appendKeyword(builder, needsSpace, constKeyword);
+ needsSpace = _appendKeyword(builder, needsSpace, externalKeyword);
+ needsSpace = _appendKeyword(builder, needsSpace, factoryKeyword);
+ needsSpace = _appendKeyword(builder, needsSpace, finalKeyword);
+ needsSpace = _appendKeyword(builder, needsSpace, staticKeyword);
+ _appendKeyword(builder, needsSpace, varKeyword);
+ return builder.toString();
+ }
+
+ /**
+ * If the given keyword is not `null`, append it to the given builder, prefixing it with a
+ * space if needed.
+ *
+ * @param builder the builder to which the keyword will be appended
+ * @param needsSpace `true` if the keyword needs to be prefixed with a space
+ * @param keyword the keyword to be appended
+ * @return `true` if subsequent keywords need to be prefixed with a space
+ */
+ bool _appendKeyword(JavaStringBuilder builder, bool needsSpace, Token keyword) {
+ if (keyword != null) {
+ if (needsSpace) {
+ builder.appendChar(0x20);
+ }
+ builder.append(keyword.lexeme);
+ return true;
+ }
+ return needsSpace;
+ }
+}
+
+/**
* Instances of the class `Parser` are used to parse tokens into an AST structure.
*/
class Parser {
@@ -7426,25 +7426,6 @@ class Parser {
}
/**
- * Instances of the class `SyntheticKeywordToken` implement a synthetic keyword token.
- */
-class Parser_SyntheticKeywordToken extends KeywordToken {
- /**
- * Initialize a newly created token to represent the given keyword.
- *
- * @param keyword the keyword being represented by this token
- * @param offset the offset from the beginning of the file to the first character in the token
- */
- Parser_SyntheticKeywordToken(Keyword keyword, int offset) : super(keyword, offset);
-
- @override
- Token copy() => new Parser_SyntheticKeywordToken(keyword, offset);
-
- @override
- int get length => 0;
-}
-
-/**
* The enumeration `ParserErrorCode` defines the error codes used for errors detected by the
* parser. The convention for this class is for the name of the error code to indicate the problem
* that caused the error to be generated and for the error message to explain what is wrong and,
@@ -7897,6 +7878,25 @@ class ParserErrorCode extends Enum<ParserErrorCode> implements ErrorCode {
}
/**
+ * Instances of the class `SyntheticKeywordToken` implement a synthetic keyword token.
+ */
+class Parser_SyntheticKeywordToken extends KeywordToken {
+ /**
+ * Initialize a newly created token to represent the given keyword.
+ *
+ * @param keyword the keyword being represented by this token
+ * @param offset the offset from the beginning of the file to the first character in the token
+ */
+ Parser_SyntheticKeywordToken(Keyword keyword, int offset) : super(keyword, offset);
+
+ @override
+ Token copy() => new Parser_SyntheticKeywordToken(keyword, offset);
+
+ @override
+ int get length => 0;
+}
+
+/**
* Instances of the class `ResolutionCopier` copies resolution information from one AST
* structure to another as long as the structures of the corresponding children of a pair of nodes
* are the same.
« no previous file with comments | « pkg/analyzer/lib/src/generated/java_core.dart ('k') | pkg/analyzer/lib/src/generated/scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698