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

added: rule to objectpascal lexer #888

Merged
merged 4 commits into from Nov 23, 2023
Merged

Conversation

codiacdev
Copy link
Contributor

I found another valid compiler directive that is not used very often, but I just wanted to add it for the sake of completeness.

I did what I could and now have to leave this as is.
It works very well and btw I'm very happy with my less now too....

@codiacdev
Copy link
Contributor Author

@alecthomas I've put together two styles that go well with the objectpascal language, one light and one dark.
I called them chromapascal-light and chromapascal-dark. Basicly I took the github and monokai styles, added the missing token types used for the objectpascal lexer and adjusted the colors so they fit well with the objectpascal language and work well enough with other languages that at least it doesn't hurt your eyes too much.

I know that the topic of "styles" is difficult. First of all, it's an absolute question of taste anyway and then all languages have their own peculiarities, so it is difficult to define a style that suits everything. (The standard output of the command line tool without specifiing a style works very well in that matter).

So before I open a pull request or add it here, I wanted to ask whether this is at all welcomed.

For me/us it's not really necessary as we have our own styles and design everything ourselves. But if you only use the command line tool, it might be more convenient to use a predefined style optimized for the language.

So before I add styles here, I just wanted to ask what you think.

Another thing I just remembered:
There is a comment in the types.go file in the StandardTypes map:

// I have no idea what this is used for...
// Escape:     "esc",

It's just a guess, but I think this is used for highlighting escaped characters like \n etc...

@codiacdev
Copy link
Contributor Author

@alecthomas Sorry, I forgot to mention 'objectpascal lexer' in my commit message...

@alecthomas alecthomas merged commit d9f6ed6 into alecthomas:master Nov 23, 2023
2 checks passed
@alecthomas
Copy link
Owner

alecthomas commented Nov 23, 2023

Styles are welcome, I'm happy to add any really.

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

2 participants