[mlir] Add basic tree-sitter grammar file
authorJacques Pienaar <jpienaar@google.com>
Thu, 28 Apr 2022 18:42:46 +0000 (11:42 -0700)
committerJacques Pienaar <jpienaar@google.com>
Thu, 28 Apr 2022 18:42:46 +0000 (11:42 -0700)
commit9a4472c56cbb4ea15be3e9a537e4ebdfc200a52c
tree9907838cc3a76e98cff05bc2cf0e888b5d4aa484
parentc38344dd29efe87dbdfd740094d1b462b1a02043
[mlir] Add basic tree-sitter grammar file

tree-sitter grammar file that tries to closely matches LangRef (it could use
some tweaking and cleanup, but kept fairly basic). Also updated LangRef in
places where found some issues while doing the nearly direct transcription.

This only adds a grammar file, not all the other parts (npm etc) that
accompanies it. Those I'll propose for separate repo like we do for vscode
extension.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D124352
mlir/docs/LangRef.md
mlir/utils/tree-sitter-mlir/README.md [new file with mode: 0644]
mlir/utils/tree-sitter-mlir/grammar.js [new file with mode: 0644]