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

Update LexerUtils.scala #1727

Merged
merged 1 commit into from
Apr 21, 2022
Merged

Update LexerUtils.scala #1727

merged 1 commit into from
Apr 21, 2022

Conversation

kaliGo-Li
Copy link
Contributor

What changes were proposed in this pull request?

  • Finshed changes describe
    Optimized the logic of LexerUtils.scala for blank line judgment.
    When the last word on the previous line of the cursor is ";", the complex judgment logic that follows will no longer be executed.

How was this patch tested?

  • Testing done

截屏2022-03-28 02 56 56

截屏2022-03-28 02 57 06

截屏2022-03-28 02 57 33

There are two states: no code below the cursor and code below the cursor.
If the last word of the line above the cursor is ";", then the semantics of the statement is considered to end, and TokenPos(-1, TokenPosType.NEXT, -1) is returned.

Are there and DOC need to update?

  • Doc is finished

Spark Core Compatibility

@hellozepp
Copy link
Contributor

@kaliGo-Li 请为上述的修改添加详实的单测,确保单测可以覆盖修改内容

@hellozepp hellozepp linked an issue Mar 28, 2022 that may be closed by this pull request
@kaliGo-Li kaliGo-Li force-pushed the CS#1721 branch 3 times, most recently from 8dfde58 to f28df64 Compare March 28, 2022 19:31
@kaliGo-Li kaliGo-Li force-pushed the CS#1721 branch 2 times, most recently from dff2d47 to 9980822 Compare March 30, 2022 06:46
@kaliGo-Li kaliGo-Li force-pushed the CS#1721 branch 2 times, most recently from 16c47ab to 74550e5 Compare March 30, 2022 15:57
Optimized the logic of LexerUtils.scala for blank line judgment.
When the last word on the previous line of the cursor is ";", the complex judgment logic that follows will no longer be executed.

Update LexerUtilsTest

Added unit tests for corresponding optimizations。
And modified an error in the loginfo of the AutoSuggestContext.scala file
@allwefantasy allwefantasy merged commit 7d19d66 into byzer-org:master Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

语法提示优化专项
4 participants