[Mlir-commits] [mlir] d5db25f - [mlir][textmate] Add support for function visibility
Jacques Pienaar
llvmlistbot at llvm.org
Tue Jan 18 18:57:00 PST 2022
Author: Jacques Pienaar
Date: 2022-01-18T18:48:43-08:00
New Revision: d5db25fb1d0863f4f82445f2812bb64793429583
URL: https://github.com/llvm/llvm-project/commit/d5db25fb1d0863f4f82445f2812bb64793429583
DIFF: https://github.com/llvm/llvm-project/commit/d5db25fb1d0863f4f82445f2812bb64793429583.diff
LOG: [mlir][textmate] Add support for function visibility
Avoids functions with visibility not being marked as functions. Tested
via Lightshow.
Added:
Modified:
mlir/utils/textmate/mlir.json
Removed:
################################################################################
diff --git a/mlir/utils/textmate/mlir.json b/mlir/utils/textmate/mlir.json
index 8399a972d81b6..5b8accac30002 100644
--- a/mlir/utils/textmate/mlir.json
+++ b/mlir/utils/textmate/mlir.json
@@ -1,113 +1,115 @@
{
- "fileTypes":[
+ "fileTypes": [
"mlir"
],
- "repository":{
- "attribute":{
- "match":"\\W[\\w_][\\w\\d_.$]*\\s*=",
- "name":"meta.attribute.mlir"
+ "repository": {
+ "attribute": {
+ "match": "\\W[\\w_][\\w\\d_.$]*\\s*=",
+ "name": "meta.attribute.mlir"
},
- "branch_target":{
- "match":"\\^bb[\\w\\d_$\\.-]+",
- "name":"entity.name.label.mlir"
+ "branch_target": {
+ "match": "\\^bb[\\w\\d_$\\.-]+",
+ "name": "entity.name.label.mlir"
},
- "comment":{
- "match":"\/\/.*$",
- "name":"comment.line.double-slash.mlir"
+ "comment": {
+ "match": "\/\/.*$",
+ "name": "comment.line.double-slash.mlir"
},
- "identifier":{
- "match":"[\\%#@][\\w_][\\w\\d_.$]*",
- "captures":{
- "0":{
- "name":"variable.mlir"
+ "identifier": {
+ "match": "[\\%#@][\\w_][\\w\\d_.$]*",
+ "captures": {
+ "0": {
+ "name": "variable.mlir"
}
},
- "name":"meta.identifier.mlir"
+ "name": "meta.identifier.mlir"
},
- "integer":{
- "match":"[\\Wx]([0-9]+)",
- "captures":{
- "1":{
- "name":"constant.numeric.mlir"
+ "integer": {
+ "match": "[\\Wx]([0-9]+)",
+ "captures": {
+ "1": {
+ "name": "constant.numeric.mlir"
}
},
- "name":"meta.identifier.mlir"
+ "name": "meta.identifier.mlir"
},
- "string":{
- "end":"\"",
- "begin":"\"",
- "beginCaptures":{
- "0":{
- "name":"punctuation.definition.string.begin.mlir"
+ "string": {
+ "end": "\"",
+ "begin": "\"",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.mlir"
}
},
- "patterns":[
+ "patterns": [
{
- "match":"\\\\[nt\"]",
- "name":"constant.character.escape.mlir"
+ "match": "\\\\[nt\"]",
+ "name": "constant.character.escape.mlir"
},
{
- "match":"\\\\.",
- "name":"invalid.illegal.mlir"
+ "match": "\\\\.",
+ "name": "invalid.illegal.mlir"
}
],
- "endCaptures":{
- "0":{
- "name":"punctuation.definition.string.end.mlir"
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.mlir"
}
},
- "name":"string.quoted.double.mlir"
+ "name": "string.quoted.double.mlir"
},
- "types":{
- "match":"[\\Wx](index|i[1-9][0-9]*|f16|bf16|f32|f64|memref|tensor|vector)\\b",
- "captures":{
- "1":{
- "name":"storage.type.mlir"
+ "types": {
+ "match": "[\\Wx](index|i[1-9][0-9]*|f16|bf16|f32|f64|memref|tensor|vector)\\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.mlir"
}
},
- "name":"meta.types.simple.mlir"
+ "name": "meta.types.simple.mlir"
}
},
- "patterns":[
+ "patterns": [
{
- "include":"#comment"
+ "include": "#comment"
},
{
- "include":"#string"
+ "include": "#string"
},
{
- "match":"\\b(func)\\b\\s*(@[\\w_][\\w\\d_.$]*)",
- "captures":{
- "1":{
- "name":"keyword.function.mlir"
+ "match": "\\b(func)\\b\\s*(|private|public)\\s*(@[\\w_][\\w\\d_.$]*)",
+ "captures": {
+ "1": {
+ "name": "keyword.function.mlir"
},
- "2":{
- "name":"entity.name.function.mlir"
+ "2": {
+ "name": "keyword.function.mlir"
+ },
+ "3": {
+ "name": "entity.name.function.mlir"
}
},
- "name":"support.function.mlir"
+ "name": "support.function.mlir"
},
{
- "match":"\\b(attributes|br|call|constant|loc|return)\\b",
- "name":"keyword.module.mlir"
+ "match": "\\b(attributes|br|call|constant|loc|return)\\b",
+ "name": "keyword.module.mlir"
},
{
- "include":"#identifier"
+ "include": "#identifier"
},
{
- "include":"#branch_target"
+ "include": "#branch_target"
},
{
- "include":"#attribute"
+ "include": "#attribute"
},
{
- "include":"#types"
+ "include": "#types"
},
{
- "include":"#integer"
+ "include": "#integer"
}
],
- "name":"MLIR",
- "scopeName":"source.mlir"
+ "name": "MLIR",
+ "scopeName": "source.mlir"
}
-
More information about the Mlir-commits
mailing list