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

Fix off-by-one issues in TokenTree and TreeCursor #1891

Merged
merged 1 commit into from
Jul 31, 2023

Commits on Jul 31, 2023

  1. Fix off-by-one issues in TokenTree and TreeCursor

    Fixes an issue in TokenTree where if the smithy file was missing a
    trailing newline, any trees containing the last piece of text in
    the file would have an end location of (0, 0). This happened because
    the BR TreeType didn't append any tokens for the EOF case, so the
    BR tree had no end location.
    
    Fixes an issue in TreeCursor::findAt where if you tried to get the
    tree at a location right at the start of a tree, you would get the
    previous tree.
    
    Tests were added for both of these cases in TreeCursorTest.
    milesziemer committed Jul 31, 2023
    Configuration menu
    Copy the full SHA
    ed3cdda View commit details
    Browse the repository at this point in the history