Commit graph

3 commits

Author SHA1 Message Date
Jacques Pienaar b9fa45864d Use simpler highlighting textmate syntax
Changes from:
https://github-lightshow.herokuapp.com/?utf8=%E2%9C%93&scope=from-url&grammar_format=auto&grammar_url=https%3A%2F%2Fraw.githubusercontent.com%2Fjpienaar%2Fmlir-grammar%2Fmaster%2Fgrammars%2Fmlir.json&grammar_text=&code_source=from-url&code_url=https%3A%2F%2Fraw.githubusercontent.com%2Fjpienaar%2Fmlir-grammar%2Fmaster%2Fsample.mlir&code=

To:
https://github-lightshow.herokuapp.com/?utf8=%E2%9C%93&scope=from-url&grammar_format=auto&grammar_url=https%3A%2F%2Fraw.githubusercontent.com%2Fjpienaar%2Fmlir-grammar%2Fsimpler%2Fgrammars%2Fmlir.json&grammar_text=&code_source=from-url&code_url=https%3A%2F%2Fraw.githubusercontent.com%2Fjpienaar%2Fmlir-grammar%2Fmaster%2Fsample.mlir&code=

Which I think is an improvement.

PiperOrigin-RevId: 280674770
2019-11-15 09:29:40 -08:00
Jacques Pienaar a6fac0aa29 Update textmate syntax file
Allow comments in more places and fix function params.

PiperOrigin-RevId: 279986797
2019-11-12 09:30:41 -08:00
Jacques Pienaar 532c652d6c Add start of textmate language grammar.
Basic* grammar to start of with, this doesn't handle custom ops and doesn't
handle ops with regions. But useful enough to make reading the .mlir files
easier.

Followed the approach used for emacs & vim and placed in separate directory
under utils.

* I got a little bit carried away trying to handle attributes and tried to do some custom op printing handling, but finally abandoned it. Also first time writing a textmate grammar so I assume a lot can be improved :)

PiperOrigin-RevId: 262985490
2019-08-12 12:53:21 -07:00