source: node_modules/refractor/lang/actionscript.js

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.1 KB
Line 
1'use strict'
2
3module.exports = actionscript
4actionscript.displayName = 'actionscript'
5actionscript.aliases = []
6function actionscript(Prism) {
7 Prism.languages.actionscript = Prism.languages.extend('javascript', {
8 keyword:
9 /\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,
10 operator: /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/
11 })
12 Prism.languages.actionscript['class-name'].alias = 'function' // doesn't work with AS because AS is too complex
13 delete Prism.languages.actionscript['parameter']
14 delete Prism.languages.actionscript['literal-property']
15 if (Prism.languages.markup) {
16 Prism.languages.insertBefore('actionscript', 'string', {
17 xml: {
18 pattern:
19 /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,
20 lookbehind: true,
21 inside: Prism.languages.markup
22 }
23 })
24 }
25}
Note: See TracBrowser for help on using the repository browser.