-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
New Language: Keepalived configure file #2417
Conversation
…g detection, and added corresponding unit test.
… in `inside` object, Fix relational tests.
… `greedy` property to `true`
…ass` token (3) add `tag`, `selector-list`, `combinator` token
…`tag` behind the `n-th` token to avoid problem.
…est every character.
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.
Thank you for this language definition @dev-itsheng!
I left you a few comments. Do you plan to include booleans as well?
I accepted all the suggestions and fixed them. In addition, I also did:
|
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.
Thanks for the great work @dev-itsheng!
I looked over it again and left you some comments.
Make property token to two alphabetical sorting arrays, because the too long regex will make a error.
What do mean you by that? What error did you get?
Now our regex tooling can work its magic. This will make it easier to maintain the regex in the long run.
JS File Size Changes (gzipped)A total of 2 files have changed, with a combined diff of +2.25 KB (+91.0%).
|
I quickly updated and finished the PR. |
Thank you for contributing @dev-itsheng! |
Keepalived is a load balancing tools, it has a configure grammar which like Nginx but not same:
So I collect all of properties from its document and write some token like
ip
,path
which hasalias
pattern of commonly token name.But the rule could not exactly right, because its document has also bug. In fact, I have made some PR to its GitHub repo with the wrong I found, There are still some errors that I did not find. Once found, I will update this language syntax and send PR to the that repo.
By the way, I think the nginx language could be rewrite like this. It is not C-Like grammar and could make lot of bugs in display. Maybe in next PR I will do it.