mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:59:38 +00:00
Remove unnecessary commentToken parameter
Minor cleanup to the dartdoc parsing API Change-Id: I7aa4c0116277beeef39553f1c133aa1ab8904d61 Reviewed-on: https://dart-review.googlesource.com/68700 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Dan Rubel <danrubel@google.com>
This commit is contained in:
parent
89fd468b89
commit
98cf15cf5b
|
@ -2560,8 +2560,7 @@ class AstBuilder extends StackListener {
|
|||
}
|
||||
|
||||
@override
|
||||
void handleCommentReferenceText(
|
||||
Token commentToken, String referenceSource, int referenceOffset) {
|
||||
void handleCommentReferenceText(String referenceSource, int referenceOffset) {
|
||||
ScannerResult result = scanString(referenceSource);
|
||||
if (result.hasErrors) {
|
||||
handleNoCommentReference();
|
||||
|
@ -2571,7 +2570,7 @@ class AstBuilder extends StackListener {
|
|||
token.offset += referenceOffset;
|
||||
token = token.next;
|
||||
} while (!token.isEof);
|
||||
parser.parseOneCommentReference(commentToken, result.tokens);
|
||||
parser.parseOneCommentReference(result.tokens);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -929,10 +929,8 @@ class ForwardingListener implements Listener {
|
|||
}
|
||||
|
||||
@override
|
||||
void handleCommentReferenceText(
|
||||
Token commentToken, String referenceSource, int referenceOffset) {
|
||||
listener?.handleCommentReferenceText(
|
||||
commentToken, referenceSource, referenceOffset);
|
||||
void handleCommentReferenceText(String referenceSource, int referenceOffset) {
|
||||
listener?.handleCommentReferenceText(referenceSource, referenceOffset);
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -1238,7 +1238,7 @@ class Listener implements UnescapeErrorListener {
|
|||
/// parsed should be discarded, and a new type should be parsed instead.
|
||||
void discardTypeReplacedWithCommentTypeAssign() {}
|
||||
|
||||
/// A single comment reference in [commentToken] has been found where
|
||||
/// A single comment reference has been found
|
||||
/// where [referenceSource] is the text between the `[` and `]`
|
||||
/// and [referenceOffset] is the character offset in the token stream.
|
||||
///
|
||||
|
@ -1246,8 +1246,7 @@ class Listener implements UnescapeErrorListener {
|
|||
/// `parseCommentReferences` method is called. For further processing,
|
||||
/// a listener may scan the [referenceSource] and then pass the resulting
|
||||
/// token stream to the parser's `parseOneCommentReference` method.
|
||||
void handleCommentReferenceText(
|
||||
Token commentToken, String referenceSource, int referenceOffset) {
|
||||
void handleCommentReferenceText(String referenceSource, int referenceOffset) {
|
||||
logEvent("CommentReferenceText");
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ import '../../scanner/token.dart'
|
|||
ASSIGNMENT_PRECEDENCE,
|
||||
BeginToken,
|
||||
CASCADE_PRECEDENCE,
|
||||
DocumentationCommentToken,
|
||||
EQUALITY_PRECEDENCE,
|
||||
Keyword,
|
||||
POSTFIX_PRECEDENCE,
|
||||
|
@ -5954,7 +5953,6 @@ class Parser {
|
|||
// URI in the link text.
|
||||
} else {
|
||||
listener.handleCommentReferenceText(
|
||||
commentToken,
|
||||
comment.substring(referenceStart, index),
|
||||
commentToken.charOffset + referenceStart);
|
||||
++count;
|
||||
|
@ -6006,8 +6004,7 @@ class Parser {
|
|||
///
|
||||
/// This is typically called from the listener's
|
||||
/// `handleCommentReferenceText` method.
|
||||
void parseOneCommentReference(
|
||||
DocumentationCommentToken commentToken, Token token) {
|
||||
void parseOneCommentReference(Token token) {
|
||||
Token begin = token;
|
||||
Token newKeyword = null;
|
||||
if (optional('new', token)) {
|
||||
|
|
Loading…
Reference in a new issue