Closed wmertens closed 9 years ago
Unfortunately there's probably no way to do it more or less automatically because our parser is not very traditional (or even downright weird). The only way to "borrow" another highlighting implementation is to manually re-implementing it in highlight.js syntax. Sorry!
Closing the issue as there's probably nothing we can do anyway. Feel free to continue discussion if necessary!
if you already have a lexer and yacc/bison parser definition or perhaps a BNF definion, what would be the easiest way to make a highlightjs compatible grammar?
Case in point, I used https://github.com/NixOS/nixpkgs/issues/4952#issuecomment-65074661 as inspiration for https://github.com/wmertens/sublime-nix/blob/master/nix.YAML-tmLanguage which is what github can use for highlighting.
So anything that can make me use any of these data points to get a highlightjs compatible grammar would be great.