main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = autoit
|
---|
4 | autoit.displayName = 'autoit'
|
---|
5 | autoit.aliases = []
|
---|
6 | function autoit(Prism) {
|
---|
7 | Prism.languages.autoit = {
|
---|
8 | comment: [
|
---|
9 | /;.*/,
|
---|
10 | {
|
---|
11 | // The multi-line comments delimiters can actually be commented out with ";"
|
---|
12 | pattern:
|
---|
13 | /(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,
|
---|
14 | lookbehind: true
|
---|
15 | }
|
---|
16 | ],
|
---|
17 | url: {
|
---|
18 | pattern: /(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,
|
---|
19 | lookbehind: true
|
---|
20 | },
|
---|
21 | string: {
|
---|
22 | pattern: /(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,
|
---|
23 | greedy: true,
|
---|
24 | inside: {
|
---|
25 | variable: /([%$@])\w+\1/
|
---|
26 | }
|
---|
27 | },
|
---|
28 | directive: {
|
---|
29 | pattern: /(^[\t ]*)#[\w-]+/m,
|
---|
30 | lookbehind: true,
|
---|
31 | alias: 'keyword'
|
---|
32 | },
|
---|
33 | function: /\b\w+(?=\()/,
|
---|
34 | // Variables and macros
|
---|
35 | variable: /[$@]\w+/,
|
---|
36 | keyword:
|
---|
37 | /\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,
|
---|
38 | number: /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,
|
---|
39 | boolean: /\b(?:False|True)\b/i,
|
---|
40 | operator: /<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,
|
---|
41 | punctuation: /[\[\]().,:]/
|
---|
42 | }
|
---|
43 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.