[Flang][OpenMP] Handle SECTION construct from within SECTIONS (#77759)
[llvm-project.git] / mlir / utils / tree-sitter-mlir / dialect / func.js
blobb94cc98ce0a180fcd9a34643883dcebf8f73244d
1 'use strict';
3 module.exports = {
4   func_dialect : $ => prec.right(choice(
5                    // operation ::= `func.call_indirect` $callee `(`
6                    // $callee_operands `)` attr-dict
7                    //               `:` type($callee)
8                    // operation ::= `func.call` $callee `(` $operands `)`
9                    // attr-dict
10                    //               `:` functional-type($operands, results)
11                    seq(choice('func.call', 'call', 'func.call_indirect',
12                               'call_indirect'),
13                        field('callee', $.symbol_ref_id),
14                        field('operands', $._value_use_list_parens),
15                        field('attributes', optional($.attribute)),
16                        field('return', $._function_type_annotation)),
18                    // operation ::= `func.constant` attr-dict $value `:`
19                    // type(results)
20                    seq(choice('func.constant', 'constant'),
21                        field('attributes', optional($.attribute)),
22                        field('value', $.symbol_ref_id),
23                        field('return', $._function_type_annotation)),
25                    seq('func.func', $._op_func),
27                    seq(choice('func.return', 'return'),
28                        field('attributes', optional($.attribute)),
29                        field('results', optional($._value_use_type_list)))))