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

Add new features and modify final fields #4646

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

RobEin
Copy link
Contributor

@RobEin RobEin commented Jun 23, 2024

Added method:
getMode()

Added read-only property:
modeStack

Modified fields:
DEFAULT_MODE
MORE
SKIP
DEFAULT_TOKEN_CHANNEL
HIDDEN
MIN_CHAR_VALUE
MAX_CHAR_VALUE

Final fields cannot be used in the case clause of the switch statement.
error message:

"The expression of a constant pattern must be a valid constant."

e.g:
The folowing example does not work with final field but it works with constant field:

switch (curMode) {
  case Lexer.DEFAULT_MODE:
    ...
}

It would be worthwhile to review the other classes in this regard.

Nick Nobles and others added 2 commits June 23, 2024 22:35
Signed-off-by: Nick Nobles <[email protected]>
Signed-off-by: Robert Einhorn <[email protected]>
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.

None yet

1 participant