main
Last change
on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
940 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = n4js
|
---|
| 4 | n4js.displayName = 'n4js'
|
---|
| 5 | n4js.aliases = ['n4jsd']
|
---|
| 6 | function n4js(Prism) {
|
---|
| 7 | Prism.languages.n4js = Prism.languages.extend('javascript', {
|
---|
| 8 | // Keywords from N4JS language spec: https://numberfour.github.io/n4js/spec/N4JSSpec.html
|
---|
| 9 | keyword:
|
---|
| 10 | /\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/
|
---|
| 11 | })
|
---|
| 12 | Prism.languages.insertBefore('n4js', 'constant', {
|
---|
| 13 | // Annotations in N4JS spec: https://numberfour.github.io/n4js/spec/N4JSSpec.html#_annotations
|
---|
| 14 | annotation: {
|
---|
| 15 | pattern: /@+\w+/,
|
---|
| 16 | alias: 'operator'
|
---|
| 17 | }
|
---|
| 18 | })
|
---|
| 19 | Prism.languages.n4jsd = Prism.languages.n4js
|
---|
| 20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.