-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Shorten Some Commonly Used Method Names. #1075
Conversation
This function encapsulates a common coding pattern in the scanner source. That of a `CanGetCharAtOffset( )` followed by multiple multiple `PeekAheadChar( )` and comparison checks. As a result the scanner source is a bit better to work with.
Renamed PeekAheadCHarAt -> Peek
CanGetCharAtOffset => CanGet(offset As Integer) CanGetChar => CanGet()
@AlekseyTs Do you find this change an improvement? |
I like the idea of renaming. There is one suggestion, "CanGet" should probably be "CanPeek".
Reformatting of conditions from multiple line to a single line fall into the same category, etc. |
@AdamSpeight2008 Can you please update your pull request to address the comments from @AlekseyTs ? |
|
||
InvalidIdentifier = True | ||
End If | ||
If Not IsIdentifierStartCharacter(ch) OrElse (IsConnectorPunctuation(ch) AndAlso Not (CanGet(Here + 1) AndAlso |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please keep the newline after the OrElse
in the condition.
Now I need to scroll right the diff on GitHub to see the end of the proposed line.
If PeekAheadChar(Here) <> PeekAheadChar(FirstDateSeparator) Then | ||
GoTo baddate | ||
End If | ||
If Peek(Here) <> Peek(FirstDateSeparator) Then GoTo baddate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert the formatting change here.
I will not revert the formatting changes. You can submit a PR and I consider it, |
@KevinH-MS
If ... Then
... You read L-R to the There is (currently) isn't any restriction on the width of the source. Also no font size has been specified, or screen width. etc, etc. I tend to make that limit |
@AdamSpeight2008 This PR contains both the desired renames and a number of unrelated formatting changes. We would prefer to have just the renames. You are most welcome to reopen the PR if it has been narrowed to those changes. |
@AdamSpeight2008 |
Implementation of Issue #999
Note: Incudes #1001 (This is where this branch originated)
Note: Builds with Test Failure ##1006