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

Unified Diff: pkg/analyzer/lib/dart/ast/ast.dart

Issue 2526063002: Add parser support for using a URI in a part-of directive (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/dart/ast/ast.dart
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index b027e4cab14089edde6ed6282fa13d0f265c30e3..8099a1792ffc9dcd8be472ea3603427e2e0ec406 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -6338,17 +6338,19 @@ abstract class PartOfDirective extends Directive {
/**
* Initialize a newly created part-of directive. Either or both of the
* [comment] and [metadata] can be `null` if the directive does not have the
- * corresponding attribute.
+ * corresponding attribute. Only one of the [uri] and [libraryName] should be
+ * provided.
*/
factory PartOfDirective(
Comment comment,
List<Annotation> metadata,
Token partKeyword,
Token ofKeyword,
+ StringLiteral uri,
LibraryIdentifier libraryName,
Token semicolon) =>
- new PartOfDirectiveImpl(
- comment, metadata, partKeyword, ofKeyword, libraryName, semicolon);
+ new PartOfDirectiveImpl(comment, metadata, partKeyword, ofKeyword, uri,
+ libraryName, semicolon);
/**
* Return the name of the library that the containing compilation unit is part
@@ -6391,6 +6393,20 @@ abstract class PartOfDirective extends Directive {
* Set the semicolon terminating the directive to the given [token].
*/
void set semicolon(Token token);
+
+ /**
+ * Return the URI of the library that the containing compilation unit is part
+ * of, or `null` if no URI was given (typically because a library name was
+ * provided).
+ */
+ StringLiteral get uri;
+
+ /**
+ * Return the URI of the library that the containing compilation unit is part
+ * of, or `null` if no URI was given (typically because a library name was
+ * provided).
+ */
+ void set uri(StringLiteral uri);
}
/**
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698