Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Add public access to a SourceFile's code units #93

Merged
merged 4 commits into from
Apr 5, 2023

Conversation

nex3
Copy link
Member

@nex3 nex3 commented Mar 20, 2023

This makes it possible to efficiently reparse information from around
a FileSpan, such as to expand it through surrounding whitespace
characters. Otherwise, a caller would have to call getText() which
can be very expensive in a tight loop.

This makes it possible to efficiently reparse information from around
a `FileSpan`, such as to expand it through surrounding whitespace
characters. Otherwise, a caller would have to call `getText()` which
can be very expensive in a tight loop.
@kevmoo kevmoo requested a review from devoncarew March 20, 2023 23:25
Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

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

lgtm (after updating from master)

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Devon Carew <[email protected]>
@devoncarew devoncarew merged commit 905a167 into dart-lang:master Apr 5, 2023
@nex3 nex3 deleted the source-file-code-units branch April 6, 2023 00:49
mosuem pushed a commit to dart-lang/tools that referenced this pull request Dec 10, 2024
)

* Add public access to a SourceFile's code units

This makes it possible to efficiently reparse information from around
a `FileSpan`, such as to expand it through surrounding whitespace
characters. Otherwise, a caller would have to call `getText()` which
can be very expensive in a tight loop.

* Fix lints

* Update CHANGELOG.md

Co-authored-by: Devon Carew <[email protected]>

---------

Co-authored-by: Devon Carew <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants