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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java

Issue 10661022: Issue 3752. Support for @override annotations (as structured doc comments) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java
index 1a0a296f24649c8eeb1d2f4bd7a3370d021c6656..4f81fc84d51e4cec1e244f7a814480867401f9fc 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/formatter/CodeSnippetParsingUtil.java
@@ -13,6 +13,7 @@
*/
package com.google.dart.tools.core.internal.formatter;
+import com.google.common.collect.Sets;
import com.google.dart.compiler.DartCompilationError;
import com.google.dart.compiler.DartCompilerListener;
import com.google.dart.compiler.ast.DartComment;
@@ -20,8 +21,7 @@ import com.google.dart.compiler.ast.DartExpression;
import com.google.dart.compiler.ast.DartMethodDefinition;
import com.google.dart.compiler.ast.DartNode;
import com.google.dart.compiler.ast.DartUnit;
-import com.google.dart.compiler.parser.CommentPreservingParser;
-import com.google.dart.compiler.parser.DartScannerParserContext;
+import com.google.dart.compiler.parser.DartParser;
import com.google.dart.tools.core.DartCore;
import com.google.dart.tools.core.utilities.compiler.DartCompilerUtilities;
@@ -35,7 +35,7 @@ import java.util.Map;
* @deprecated Consider removing this class
*/
@Deprecated
-@SuppressWarnings({"unused", "rawtypes"})
+@SuppressWarnings({"rawtypes"})
public class CodeSnippetParsingUtil {
class RecordedParsingInformation {
public CategorizedProblem[] problems;
@@ -143,8 +143,13 @@ public class CodeSnippetParsingUtil {
compilationResult.problemCount += 1;
}
};
- DartScannerParserContext ctx = new DartScannerParserContext(null, sourceCode, listener);
- CommentPreservingParser parser = new CommentPreservingParser(sourceCode, listener, false);
+ DartParser parser = new DartParser(
+ null,
+ sourceCode,
+ false,
+ Sets.<String> newHashSet(),
+ listener,
+ null);
DartUnit compilationUnit = DartCompilerUtilities.secureParseUnit(parser, null);
if (recordParsingInformation) {
recordedParsingInformation = getRecordedParsingInformation(

Powered by Google App Engine
This is Rietveld 408576698