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

Unify command mode parameter syntax #88

Open
elliVM opened this issue Nov 14, 2024 · 0 comments
Open

Unify command mode parameter syntax #88

elliVM opened this issue Nov 14, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@elliVM
Copy link

elliVM commented Nov 14, 2024

Description
Handle parameters using both option value and option=value syntax or chose a unified syntax and use only that

Use case or motivation behind the feature request
Some options require use of = while others only accept without it.

For example in file COMMAND_TERAGREP_MODE.g4 both are present

COMMAND_TERAGREP_MODE_OUTPUT: 'output' -> pushMode(GET_FIELD);
COMMAND_TERAGREP_MODE_REGEX: 'regex' -> pushMode(GET_STRING);
COMMAND_TERAGREP_MODE_ESTIMATES: 'estimates' -> pushMode(GET_FIELD);
COMMAND_TERAGREP_MODE_HEADER: 'header=' -> pushMode(GET_BOOLEAN);
COMMAND_TERAGREP_MODE_SCHEMA: 'schema=' -> pushMode(GET_STRING);

Additional context
allow for both possibly like:
COMMAND_EXAMPLE_MODE: 'value' '='? -> pushMode(GET_STRING)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant