mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-18 16:58:23 +00:00
[mlir][textmate] Add support for function visibility
Avoids functions with visibility not being marked as functions. Tested via Lightshow.
This commit is contained in:
parent
a00f3e2d09
commit
d5db25fb1d
@ -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"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user