-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Inserting Comments #2311
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
Merged
Merged
Inserting Comments #2311
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
ee9abdb
CommentedTokenTree::Comment case for span comment map implemented
kayagokalp 6b6681a
CommentSpan ordering fix and test added
kayagokalp be4511c
clippy
kayagokalp 9dc606a
Handle in-block and next-to item cases for comment map generation
kayagokalp ddfb007
Comments in between items are added correctly.
kayagokalp fe5c851
remove premature comment addition
kayagokalp 9d48927
Merge branch 'master' into kayagokalp/2224
kayagokalp 06b5968
removed FormatComment trait
kayagokalp d9cb274
rename: get_comment_from_token_stream to collect_comments_from_token_…
kayagokalp d2b61ce
Merge branch 'master' into kayagokalp/2224
kayagokalp 2793a16
Merge branch 'master' into kayagokalp/2224
eureka-cpu bf9dcce
comment ordering corrected
kayagokalp 0f6d01e
Comment handling for inside Struct block implemented
kayagokalp f8774ae
More context collected for whitespace preserving
kayagokalp 3bdc20b
test for comments added
kayagokalp 86b4786
Added forgetten final value for punctuated
kayagokalp d603a8f
removed test since it requires all item types to implement CommentVis…
kayagokalp 934fb84
Until CommentVisitor implemented another check added for tests to pass
kayagokalp e94e123
Merge master
kayagokalp d518b67
CommentVisitor implemented for ItemEnum
kayagokalp 018effd
Add comment test
kayagokalp 6cfc34e
test extended to include enum
kayagokalp 40bb416
CommentVisitor for ItemFn implemendted
kayagokalp be4ed24
Do not search or insert comment between Punctuated's T and P.
kayagokalp 120d601
Literal visitor implemented, pattern visitor updated
kayagokalp 6c34f10
statement visitor implemented
kayagokalp 3f59e9f
Visitor for ItemFn implemented recursively, we can now insert comment…
kayagokalp 68d4f02
comment tests simplified
kayagokalp 0fea7b9
Merge master
kayagokalp f2a3ab1
fix storage initializers for comment handler to parse formatted code …
kayagokalp 8a995f7
clippy
kayagokalp bdcfc4b
Collecting more context for comments
kayagokalp 47bffb3
Added in-between item comments
kayagokalp b4cc1cb
comments inside expr removed since formatter already includes them by…
kayagokalp fd6595e
ItemAbi CommentVisitor implemented
kayagokalp e163d1f
CommentVisitor for ItemConst implemented & removed unnecessary commen…
kayagokalp e452fad
CommentVisitor implemented for ItemStorage, Fixed a bug for Punctuate…
kayagokalp b63c955
CommentVisitor implemented for ItemTrait, Tuple visitor implemented f…
kayagokalp 92d815d
CommentVisitor for ItemImpl implemented
kayagokalp 356d3c2
CommentVisitor implemented for ItemUse
kayagokalp dfcf38a
CommentVisitor for Module implemented, refactoring around add_comments
kayagokalp fdf8d6d
Merge branch 'master' into kayagokalp/comment_inserting
kayagokalp 1c35627
CommentSpan -> ByteSpan renamed
kayagokalp 13b3bec
from_span() removed in favor of From<Span>
kayagokalp 9ae7aa8
Prevent reparsing the unformatted_code as we already did it before fo…
kayagokalp fd62f6d
refactor insert_after_span
kayagokalp 4424ae8
Split test_comments to seperate tests for better visibility, code ref…
kayagokalp c8bc474
removed comments regarding comments inside PathType
kayagokalp 43e7650
Merge branch 'master' into kayagokalp/comment_inserting
kayagokalp 9d6c924
Merge branch 'master' into kayagokalp/comment_inserting
kayagokalp 5328b3d
CommentVisitor -> LeafSpans and comment formatting fix
kayagokalp c118303
fmt fix
kayagokalp 4bdb3b4
Merge branch 'master' into kayagokalp/comment_inserting
mitchmindtree File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.