Reputation: 3271
I have just come across Codemirror.
I would like to know how to create my own Syntax files (for a toy language), or extend the Syntax file of an existing language with new keywords - however, I can't find any documentation on how to get started.
Has anyone any links on docs that that show how to do this?
Upvotes: 8
Views: 9682
Reputation: 7721
extend the Syntax file of an existing language with new keywords
You can also try the recently created keyword.js CodeMirror addon can for this purpose.
Upvotes: 1
Reputation: 2478
http://codemirror.net/doc/manual.html
In the second paragraph it says: "The distribution comes with a few modes (see the mode/ directory), and it isn't hard to write new ones for other languages."
So simply scroll down on that page to the "Writing CodeMirror Modes" part.
Upvotes: 10