Skip to content

Commit

Permalink
N4JS: Don't use captures if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 22, 2017
1 parent 7f47140 commit 2d3f9df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/prism-n4js.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Prism.languages.n4js = Prism.languages.extend('javascript', {
// Keywords from N4JS language spec: https://numberfour.github.io/n4js/spec/N4JSSpec.html
'keyword': /\b(any|Array|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/
'keyword': /\b(?:any|Array|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/
});

Prism.languages.insertBefore('n4js', 'function', {
// Annotations in N4JS spec: https://numberfour.github.io/n4js/spec/N4JSSpec.html#_annotations
'annotation': {
pattern: /(@+\w+)/,
pattern: /@+\w+/,
alias: 'operator'
}
});
Expand Down
2 changes: 1 addition & 1 deletion components/prism-n4js.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2d3f9df

Please sign in to comment.