Skip to content

Commit

Permalink
PureBasic: Fixed token order inside asm token (#3123)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Oct 5, 2021
1 parent 314d699 commit f3b2578
Show file tree
Hide file tree
Showing 3 changed files with 380 additions and 5 deletions.
8 changes: 4 additions & 4 deletions components/prism-purebasic.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ Prism.languages.insertBefore('purebasic', 'keyword', {
lookbehind: true,
alias: 'fasm-label'
},
'keyword': [
/\b(?:extern|global)\b[^;\r\n]*/i,
/\b(?:CPU|DEFAULT|FLOAT)\b.*/
],
'function': {
pattern: /^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,
lookbehind: true
Expand All @@ -53,10 +57,6 @@ Prism.languages.insertBefore('purebasic', 'keyword', {
lookbehind: true,
alias: 'fasm-label'
},
'keyword': [
/\b(?:extern|global)\b[^;\r\n]*/i,
/\b(?:CPU|DEFAULT|FLOAT)\b.*/
],
'register': /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,
'number': /(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,
'operator': /[\[\]*+\-/%<>=&|$!,.:]/
Expand Down
2 changes: 1 addition & 1 deletion components/prism-purebasic.min.js

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

Loading

0 comments on commit f3b2578

Please sign in to comment.