astro-ghostcms/.pnpm-store/v3/files/b7/005766046d1853e2e919f1bc223...

7 lines
31 KiB
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
const lang = Object.freeze({ "displayName": "AppleScript", "fileTypes": ["applescript", "scpt", "script editor"], "firstLineMatch": "^#!.*(osascript)", "name": "applescript", "patterns": [{ "include": "#blocks" }, { "include": "#inline" }], "repository": { "attributes.considering-ignoring": { "patterns": [{ "match": ",", "name": "punctuation.separator.array.attributes.applescript" }, { "match": "\\b(and)\\b", "name": "keyword.control.attributes.and.applescript" }, { "match": "\\b(?i:case|diacriticals|hyphens|numeric\\s+strings|punctuation|white\\s+space)\\b", "name": "constant.other.attributes.text.applescript" }, { "match": "\\b(?i:application\\s+responses)\\b", "name": "constant.other.attributes.application.applescript" }] }, "blocks": { "patterns": [{ "begin": "^\\s*(script)\\s+(\\w+)", "beginCaptures": { "1": { "name": "keyword.control.script.applescript" }, "2": { "name": "entity.name.type.script-object.applescript" } }, "end": "^\\s*(end(?:\\s+script)?)(?=\\s*(--.*?)?$)", "endCaptures": { "1": { "name": "keyword.control.script.applescript" } }, "name": "meta.block.script.applescript", "patterns": [{ "include": "$self" }] }, { "begin": '^(?x)\n \\s*(to|on)\\s+ # "on" or "to"\n (\\w+) # function name\n (\\() # opening paren\n ((?:[\\s,:\\{\\}]*(?:\\w+)?)*) # parameters\n (\\)) # closing paren\n ', "beginCaptures": { "1": { "name": "keyword.control.function.applescript" }, "2": { "name": "entity.name.function.handler.applescript" }, "3": { "name": "punctuation.definition.parameters.begin.applescript" }, "4": { "name": "variable.parameter.handler.applescript" }, "5": { "name": "punctuation.definition.parameters.end.applescript" } }, "comment": "\n This is not a very well-designed rule. For now,\n we can leave it like this though, as it sorta works.\n ", "end": "^\\s*(end)(?:\\s+(\\2))?(?=\\s*(--.*?)?$)", "endCaptures": { "1": { "name": "keyword.control.function.applescript" } }, "name": "meta.function.positional.applescript", "patterns": [{ "include": "$self" }] }, { "begin": '^(?x)\n \\s*(to|on)\\s+ # "on" or "to"\n (\\w+) # function name\n (?:\\s+\n (of|in)\\s+ # "of" or "in"\n (\\w+) # direct parameter\n )?\n (?=\\s+(above|against|apart\\s+from|around|aside\\s+from|at|below|beneath|beside|between|by|for|from|instead\\s+of|into|on|onto|out\\s+of|over|thru|under)\\b)\n ', "beginCaptures": { "1": { "name": "keyword.control.function.applescript" }, "2": { "name": "entity.name.function.handler.applescript" }, "3": { "name": "keyword.control.function.applescript" }, "4": { "name": "variable.parameter.handler.direct.applescript" } }, "comment": "TODO: match `given` parameters", "end": "^\\s*(end)(?:\\s+(\\2))?(?=\\s*(--.*?)?$)", "endCaptures": { "1": { "name": "keyword.control.function.applescript" } }, "name": "meta.function.prepositional.applescript", "patterns": [{ "captures": { "1": { "name": "keyword.control.preposition.applescript" }, "2": { "name": "variable.parameter.handler.applescript" } }, "match": "\\b(?i:above|against|apart\\s+from|around|aside\\s+from|at|below|beneath|beside|between|by|for|from|instead\\s+of|into|on|onto|out\\s+of|over|thru|under)\\s+(\\w+)\\b" }, { "include": "$self" }] }, { "begin": '^(?x)\n \\s*(to|on)\\s+ # "on" or "to"\n (\\w+) # function name\n (?=\\s*(--.*?)?$) # nothing else\n ', "beginCaptures": { "1": { "name": "keyword.control.function.applescript" }, "2": { "name": "entity.name.function.handler.applescript" } }, "end": "^\\s*(end)(?:\\s+(\\2))?(?=\\s*(--.*?)?$)", "endCaptures": { "1": { "name": "keyword.control.function.applescript" } }, "name": "meta.function.parameterless.applescript", "patterns": [{ "include": "$self" }] }, { "include": "#blocks.tell" }, { "include": "#blocks.repeat" }, { "include": "#blocks.statement" }, { "include": "#blocks.other" }] }, "blocks.other": { "patterns": [{ "begin": "^\\s*(considering)\\b", "end": "^\\s*(end(?:\\s+considering)?)(?=\\s*(--.*?)?$)", "name": "meta.block.considering.applesc
var applescript = [
lang
];
export { applescript as default };