Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write basic parser for comment references #2634

Merged
merged 5 commits into from
May 6, 2021

Conversation

jcollins-g
Copy link
Contributor

@jcollins-g jcollins-g commented May 4, 2021

This is intended to replace the string splits/joins and regular expressions scattered throughout markdown_processor.dart in the new lookup system.

@google-cla google-cla bot added the cla: yes Google CLA check succeeded. label May 4, 2021
@coveralls
Copy link

coveralls commented May 4, 2021

Coverage Status

Coverage increased (+0.2%) to 57.779% when pulling cb826e2 on jcollins-g:commentref-parse into 56fb1da on dart-lang:master.

@jcollins-g jcollins-g marked this pull request as ready for review May 4, 2021 23:31
@jcollins-g jcollins-g requested a review from srawlins May 4, 2021 23:31
Copy link
Member

@srawlins srawlins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Impl and tests lgtm

if (prefixResult.type == _PrefixResultType.parsedConstructorHint) {
children.add(prefixResult.node);
}
// junk / missing we can skip.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure what this comment is referring to, until I read further. Maybe call out _PrefixResultType.junk and _PrefixResultType.missing explicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return;
}

/// Returns true if we started with startChar and ended with endChar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can reference startChar as [startChar] and endChar with [endChar] :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


/// Returns true if we started with startChar and ended with endChar
/// with a matching number of braces.
/// Returns _index to start if returning false.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"startIndex" would be more meaningful than "start" here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rephrased

@jcollins-g jcollins-g merged commit 62e25f1 into dart-lang:master May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Google CLA check succeeded.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants