Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monkey: Use standard tokens correctly #3228

Merged
merged 1 commit into from Dec 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.