Skip to content

Commit

Permalink
Monkey: Use standard tokens correctly (#3228)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Dec 7, 2021
1 parent 5bf6e35 commit c1025aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
28 changes: 13 additions & 15 deletions components/prism-monkey.js
@@ -1,25 +1,23 @@
Prism.languages.monkey = {
'string': /"[^"\r\n]*"/,
'comment': [
{
pattern: /^#Rem\s[\s\S]*?^#End/im,
greedy: true
},
{
pattern: /'.+/,
greedy: true
}
],
'comment': {
pattern: /^#Rem\s[\s\S]*?^#End|'.+/im,
greedy: true
},
'string': {
pattern: /"[^"\r\n]*"/,
greedy: true,
},
'preprocessor': {
pattern: /(^[ \t]*)#.+/m,
lookbehind: true,
alias: 'comment'
greedy: true,
alias: 'property'
},

'function': /\b\w+(?=\()/,
'type-char': {
pattern: /(\w)[?%#$]/,
lookbehind: true,
alias: 'variable'
pattern: /\b[?%#$]/,
alias: 'class-name'
},
'number': {
pattern: /((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-monkey.min.js

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

0 comments on commit c1025aa

Please sign in to comment.