-
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
adding vhdl language #595
adding vhdl language #595
Conversation
@@ -0,0 +1,24 @@ | |||
Prism.languages.vhdl = { | |||
'comment': /(--[^\r\n]+)/, |
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.
Why not .+
instead of [^\r\n]+
? And there is no need for the parentheses.
Thanks for contributing! Please take a look at my comments ;) |
Thank you for your comments! I made the changes you brought up. Let me know if you see anything else. |
Not sure what you mean here exactly, but strings are processed before numbers, since the |
Alright, this makes sense. Since vhdl-vectors are processed before strings, he wanted to prevent those single-quoted numbers from breaking the highlighting of strings. |
'comment': /--.+/, | ||
// support for all logic vectors | ||
'vhdl-vectors': { | ||
'pattern': /(\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+")/i, |
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.
No need for the enclosing parentheses here.
I added a couple of comments. Apart from them, this looks good to me. |
Made the requested changes. Thanks again! |
LGTM! Please add a minified version? Also, examples in the examples page would be nice, but not required. Thanks for the contribution!! |
If needed, I can merge, build the minified version and add the example given in the first message of this PR, when I get back from work. |
minified and example ready! |
This looks great, thanks. As it looks good to @LeaVerou too, I'll merge now. |
Hello!
I use some hardware description languages in a website of mine and was sad to see they are not supported by Prism. Here is my proposed Prism support for the VHDL language. Let me know if there are any issues!
sample code below borrowed from here