You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
180 lines
4.2 KiB
180 lines
4.2 KiB
{ |
|
"name": "Image Prompt", |
|
"scopeName": "source.prompt", |
|
"patterns": [ |
|
{ |
|
"include": "#value" |
|
} |
|
], |
|
"repository": { |
|
"comment": { |
|
"captures": { |
|
"1": { |
|
"name": "punctuation.definition.comment.prompt" |
|
} |
|
}, |
|
"match": "(#).*$\\n?", |
|
"name": "comment.line.number-sign.prompt" |
|
}, |
|
"escape": { |
|
"begin": "\\\\", |
|
"beginCaptures": { |
|
"0": { |
|
"name": "constant.character.escape.prompt" |
|
} |
|
}, |
|
"end": "[-+.!(){}\\[\\]<\\>]", |
|
"endCaptures": { |
|
"0": { |
|
"name": "constant.character.escape.target.prompt" |
|
} |
|
}, |
|
"name": "meta.structure.escape.prompt", |
|
"patterns": [ |
|
{ |
|
"match": "[^-+.!(){}\\[\\]<\\>]", |
|
"name": "invalid.illegal.escape.prompt" |
|
} |
|
] |
|
}, |
|
"parenthesized": { |
|
"begin": "\\(", |
|
"beginCaptures": { |
|
"0": { |
|
"name": "punctuation.definition.array.begin.prompt" |
|
} |
|
}, |
|
"end": "\\)", |
|
"endCaptures": { |
|
"0": { |
|
"name": "punctuation.definition.array.end.prompt" |
|
} |
|
}, |
|
"name": "meta.structure.array.prompt", |
|
"patterns": [ |
|
{ |
|
"include": "#colon" |
|
}, |
|
{ |
|
"include": "#number" |
|
}, |
|
{ |
|
"include": "#value" |
|
}, |
|
{ |
|
"match": "[^\\s\\)]", |
|
"name": "invalid.illegal.expected-array-separator.prompt" |
|
} |
|
] |
|
}, |
|
"array": { |
|
"begin": "\\[", |
|
"beginCaptures": { |
|
"0": { |
|
"name": "punctuation.definition.array.begin.prompt" |
|
} |
|
}, |
|
"end": "\\]", |
|
"endCaptures": { |
|
"0": { |
|
"name": "punctuation.definition.array.end.prompt" |
|
} |
|
}, |
|
"name": "meta.structure.array.prompt", |
|
"patterns": [ |
|
{ |
|
"include": "#value" |
|
}, |
|
{ |
|
"match": "[^\\s\\]]", |
|
"name": "invalid.illegal.expected-array-separator.prompt" |
|
} |
|
] |
|
}, |
|
"network": { |
|
"begin": "<", |
|
"beginCaptures": { |
|
"0": { |
|
"name": "punctuation.definition.network.begin.prompt" |
|
} |
|
}, |
|
"end": ">", |
|
"endCaptures": { |
|
"0": { |
|
"name": "punctuation.definition.network.end.prompt" |
|
} |
|
}, |
|
"name": "meta.structure.network.prompt", |
|
"patterns": [ |
|
{ |
|
"include": "#colon" |
|
}, |
|
{ |
|
"include": "#number" |
|
}, |
|
{ |
|
"include": "#text" |
|
}, |
|
{ |
|
"match": "[^\\s\\>]", |
|
"name": "invalid.illegal.expected-array-separator.prompt" |
|
} |
|
] |
|
}, |
|
"separator": { |
|
"match": ",\\s*", |
|
"name": "punctuation.separator.variable.prompt" |
|
}, |
|
"colon": { |
|
"match": ":", |
|
"name": "punctuation.separator.variable.prompt" |
|
}, |
|
"number": { |
|
"match": "(?x) # turn on extended mode\n -? # an optional minus\n (?:\n 0 # a zero\n | # ...or...\n [1-9] # a 1-9 character\n \\d* # followed by zero or more digits\n )\n (?:\n (?:\n \\. # a period\n \\d+ # followed by one or more digits\n )?\n (?:\n [eE] # an e character\n [+-]? # followed by an option +/-\n \\d+ # followed by one or more digits\n )? # make exponent optional\n )? # make decimal portion optional", |
|
"name": "constant.numeric" |
|
}, |
|
"keyword": { |
|
"match": "\\b(?:BREAK|AND)\\b", |
|
"name": "keyword.control" |
|
}, |
|
"whitespace": { |
|
"match": "\\s+", |
|
"name": "meta.embedded.whitespace" |
|
}, |
|
"text": { |
|
"match": "[^,:\\[\\]\\(\\) \\\\]+", |
|
"name": "meta.embedded" |
|
}, |
|
"value": { |
|
"patterns": [ |
|
{ |
|
"include": "#comment" |
|
}, |
|
{ |
|
"include": "#escape" |
|
}, |
|
{ |
|
"include": "#parenthesized" |
|
}, |
|
{ |
|
"include": "#array" |
|
}, |
|
{ |
|
"include": "#network" |
|
}, |
|
{ |
|
"include": "#separator" |
|
}, |
|
{ |
|
"include": "#keyword" |
|
}, |
|
{ |
|
"include": "#whitespace" |
|
}, |
|
{ |
|
"include": "#text" |
|
} |
|
] |
|
} |
|
} |
|
}
|
|
|