2 lines
30 KiB
JavaScript
2 lines
30 KiB
JavaScript
|
|
const e=Object.freeze(JSON.parse('{"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":"^\\\\s*(to|on)\\\\s+(\\\\w+)(\\\\()((?:[\\\\s,:{}]*(?:\\\\w+)?)*)(\\\\))","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\\t\\t\\t\\t\\t\\tThis is not a very well-designed rule. For now,\\n\\t\\t\\t\\t\\t\\twe can leave it like this though, as it sorta works.\\n\\t\\t\\t\\t\\t","end":"^\\\\s*(end)(?:\\\\s+(\\\\2))?(?=\\\\s*(--.*?)?$)","endCaptures":{"1":{"name":"keyword.control.function.applescript"}},"name":"meta.function.positional.applescript","patterns":[{"include":"$self"}]},{"begin":"^\\\\s*(to|on)\\\\s+(\\\\w+)(?:\\\\s+(of|in)\\\\s+(\\\\w+))?(?=\\\\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)","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":"^\\\\s*(to|on)\\\\s+(\\\\w+)(?=\\\\s*(--.*?)?$)","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.applescript","patterns":[{"begin":"(?<=considering)","end":"(?<!¬)$","name":"meta.array.attributes.considering.applescript","patterns":[{"include":"#attributes.considering-ignoring"}]},{"begin":"(?<=ignoring)","end":"(?<!¬)$","name":"meta.array.attributes.ignoring.applescript","patterns":[{"include":"#attributes.considering-ignoring"}]},{"match":"\\\\b(but)\\\\b","name":"keyword.control.but.applescript"},{"include":"$self"}]},{"begin":"^\\\\s*(ignoring)\\\\b","end":"^\\\\s*(end(?:\\\\s+ignoring)
|