Commit | Line | Data |
---|---|---|
a59d0557 | 1 | define(["prism/prism","prism/components/prism-javascript"], function () { |
20d1407b TD |
2 | Prism.languages.actionscript = Prism.languages.extend('javascript', { |
3 | 'keyword': /\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|native|override|set|static)\b/, | |
4 | 'operator': /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/ | |
5 | }); | |
6 | Prism.languages.actionscript['class-name'].alias = 'function'; | |
7 | ||
8 | if (Prism.languages.markup) { | |
9 | Prism.languages.insertBefore('actionscript', 'string', { | |
10 | 'xml': { | |
11 | pattern: /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/, | |
12 | lookbehind: true, | |
a59d0557 | 13 | inside: Prism.languages.markup |
20d1407b TD |
14 | } |
15 | }); | |
16 | } | |
a59d0557 | 17 | |
20d1407b | 18 | return Prism; }) |