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.
149 lines
3.5 KiB
149 lines
3.5 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" |
|
}, |
|
"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" |
|
} |
|
] |
|
}, |
|
"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" |
|
}, |
|
"separator": { |
|
"match": ",\\s*", |
|
"name": "punctuation.separator.variable.prompt" |
|
}, |
|
"colon": { |
|
"match": ":", |
|
"name": "punctuation.separator.variable.prompt" |
|
}, |
|
"keyword": { |
|
"match": "\\b(?:BREAK|AND)\\b", |
|
"name": "keyword.control" |
|
}, |
|
"text": { |
|
"match": "[^,:\\[\\]\\(\\)]+", |
|
"name": "meta.embedded" |
|
}, |
|
"value": { |
|
"patterns": [ |
|
{ |
|
"include": "#comment" |
|
}, |
|
{ |
|
"include": "#parenthesized" |
|
}, |
|
{ |
|
"include": "#array" |
|
}, |
|
{ |
|
"include": "#network" |
|
}, |
|
{ |
|
"include": "#separator" |
|
}, |
|
{ |
|
"include": "#keyword" |
|
}, |
|
{ |
|
"include": "#text" |
|
} |
|
] |
|
} |
|
} |
|
}
|
|
|