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

Unified Diff: pkg/analyzer/lib/src/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 | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/dart/ast/utilities.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/ast/ast.dart
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 4d388d218c492ab67c070c3d67224a5976100891..ea03506e262b26d0a0101352bcb31b0555938398 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -8174,7 +8174,13 @@ class PartOfDirectiveImpl extends DirectiveImpl implements PartOfDirective {
Token ofKeyword;
/**
- * The name of the library that the containing compilation unit is part of.
+ * The URI of the library that the containing compilation unit is part of.
+ */
+ StringLiteralImpl _uri;
+
+ /**
+ * The name of the library that the containing compilation unit is part of, or
+ * `null` if no name was given (typically because a library URI was provided).
*/
LibraryIdentifier _libraryName;
@@ -8194,9 +8200,11 @@ class PartOfDirectiveImpl extends DirectiveImpl implements PartOfDirective {
List<Annotation> metadata,
this.partKeyword,
this.ofKeyword,
+ StringLiteralImpl uri,
LibraryIdentifierImpl libraryName,
this.semicolon)
: super(comment, metadata) {
+ _uri = _becomeParentOf(uri);
_libraryName = _becomeParentOf(libraryName);
}
@@ -8225,6 +8233,14 @@ class PartOfDirectiveImpl extends DirectiveImpl implements PartOfDirective {
}
@override
+ StringLiteral get uri => _uri;
+
+ @override
+ void set uri(StringLiteral uri) {
+ _uri = _becomeParentOf(uri as AstNodeImpl);
+ }
+
+ @override
dynamic/*=E*/ accept/*<E>*/(AstVisitor/*<E>*/ visitor) =>
visitor.visitPartOfDirective(this);
@@ -8232,6 +8248,7 @@ class PartOfDirectiveImpl extends DirectiveImpl implements PartOfDirective {
void visitChildren(AstVisitor visitor) {
super.visitChildren(visitor);
_libraryName?.accept(visitor);
+ _uri?.accept(visitor);
}
}
« no previous file with comments | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/dart/ast/utilities.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698