Contribute a grammar, along with associated tests, from the upstream project maintained at https://github.com/artagnon/tree-sitter-mlir. The new grammar includes several fixes, and successfully parses 60-80% of MLIR tests in the Arith, Math, ControlFlow, SCF, Tensor, Affine, and Linalg dialects. Differential Revision: https://reviews.llvm.org/D144408
11 lines
309 B
JavaScript
11 lines
309 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
llvm_dialect : $ => prec.right(choice(
|
|
seq('llvm.func', $._op_func),
|
|
|
|
seq('llvm.return',
|
|
field('attributes', optional($.attribute)),
|
|
field('results', optional($._value_use_type_list)))))
|
|
}
|