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

Introduce custom definition language for monaco editor to get better highlighting in documentation #5

Open
beikov opened this issue Jul 15, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@beikov
Copy link
Member

beikov commented Jul 15, 2020

The syntax highlighting in the function suggestion and hover box are non-optimal i.e. a question mark is treated as invalid token. We need to define a definition language that describes signatures and define a color scheme for that.

The definition language could look like this:

parseDefinition: definition EOF;
definition: functionDefinition | varDefinition;
varDefinition: typeDeclaration identifier;
functionDefinition: typeDeclaration functionName LP functionArguments RP;
functionArguments: (functionArgument (COMMA functionArgument QM?)* (COMMA functionVarArgument)?)?
functionArgument: typeDeclaration identifier;
functionVarArgument: typeDeclaration DOT DOT DOT identifier;
functionName: identifier;
typeDeclaration: identifier (LB identifier RB)?;
@beikov beikov added the enhancement New feature or request label Jul 15, 2020
@beikov beikov self-assigned this Jul 15, 2020
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