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

(arduino) Feature: Make a Arduino a pure super-set of the CPP grammar #2183

Closed
joshgoebel opened this issue Oct 12, 2019 · 4 comments
Closed
Assignees
Labels
enhancement An enhancement or new feature

Comments

@joshgoebel
Copy link
Member

joshgoebel commented Oct 12, 2019

This would simplify the grammar... making it really CPP + extra keywords. And right now one has to pick:

  • Do they want CPP highlighting
  • Do they want Arduino highlighting (which is a very light subset of CPP + Arduino stuff) and crappier C++ highlighting

Plus currently the auto-detect is in competition with itself other over C++ code... when there should be no contest... It's either C++ or it's C++ with Arduino stuff (which should clearly win). Right now they detect entirely different things... so Arduino code might flag as C++ code, losing it's Arduino coloring...

This type of thing would seem to be trivial if we switch to ES6 modules and a build system... what I really want to do for Arduino is require the CPP file and then use it in raw form...

The existing build system makes it much harder to do this.

@joshgoebel joshgoebel added the enhancement An enhancement or new feature label Oct 12, 2019
@joshgoebel joshgoebel self-assigned this Oct 12, 2019
@joshgoebel
Copy link
Member Author

Related:

#2181

@joshgoebel
Copy link
Member Author

Ok, actually this was easier than I thought. :-) Can just ask Highlight.js to save the original builder and make it an attribute of language that other languages can then access.

@joshgoebel
Copy link
Member Author

#2185

@joshgoebel joshgoebel changed the title Feature: Arduino should depend on CPP (becoming a superset) Feature: Make a Arduino a pure super-set of the CPP grammar Oct 13, 2019
@joshgoebel joshgoebel changed the title Feature: Make a Arduino a pure super-set of the CPP grammar (arduino) Feature: Make a Arduino a pure super-set of the CPP grammar Oct 13, 2019
@joshgoebel
Copy link
Member Author

Closed with #2185

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

No branches or pull requests

1 participant