… · PrismJS/prism@d6c5372 · GitHub","description":"root tab size preference pre, code tab size var tab size preference locale featureFlags a11y status checks ruleset actions custom images public preview visib...","inLanguage":"en-US","isPartOf":{"@id":"https://kelaenderkoe.pages.dev/#website"},"datePublished":"2025-12-14T04:32:46.818Z","dateModified":"2025-12-14T04:32:46.818Z","breadcrumb":{"@id":"https://kelaenderkoe.pages.dev/javascript-https-github.com/PrismJS/prism/commit/d6c53726#breadcrumb"},"potentialAction":[{"@type":"ReadAction","target":["https://kelaenderkoe.pages.dev/javascript-https-github.com/PrismJS/prism/commit/d6c53726"]}]},{"@type":"Article","@id":"https://kelaenderkoe.pages.dev/javascript-https-github.com/PrismJS/prism/commit/d6c53726#article","headline":"PureBasic: Added missing keyword and fixed constants ending with ` PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub … · PrismJS/prism@d6c5372 · GitHub","description":"root tab size preference pre, code tab size var tab size preference locale featureFlags a11y status checks ruleset actions custom images public preview visib...","url":"https://kelaenderkoe.pages.dev/javascript-https-github.com/PrismJS/prism/commit/d6c53726","datePublished":"2025-12-14T04:32:46.818Z","dateModified":"2025-12-14T04:32:46.818Z","author":{"@type":"Person","name":"Admin","url":"https://kelaenderkoe.pages.dev"},"publisher":{"@type":"Organization","name":"BERJAYA","url":"https://kelaenderkoe.pages.dev","logo":{"@type":"ImageObject","url":"https://kelaenderkoe.pages.dev/logo.png","width":600,"height":60}},"image":{"@type":"ImageObject","url":"https://avatars.githubusercontent.com/u/64781117?v=4&size=40","width":1200,"height":630},"mainEntityOfPage":{"@type":"WebPage","@id":"https://kelaenderkoe.pages.dev/javascript-https-github.com/PrismJS/prism/commit/d6c53726"},"inLanguage":"en-US","keywords":"u003e, u003c, class, u003cspan, span, u003ee, u003er, u003ed, u003el, u003et, u003ec, u003ei, u003en, u003eo, u003ea"},{"@type":"WebSite","@id":"https://kelaenderkoe.pages.dev/#website","url":"https://kelaenderkoe.pages.dev","name":"BERJAYA","description":"Latest news, articles and resources from BERJAYA","publisher":{"@type":"Organization","name":"BERJAYA","logo":{"@type":"ImageObject","url":"https://kelaenderkoe.pages.dev/logo.png","width":600,"height":60}},"inLanguage":"en-US","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://kelaenderkoe.pages.dev/?s={search_term_string}"},"query-input":"required name=search_term_string"}]},{"@type":"BreadcrumbList","@id":"https://kelaenderkoe.pages.dev/javascript-https-github.com/PrismJS/prism/commit/d6c53726#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://kelaenderkoe.pages.dev"},{"@type":"ListItem","position":2,"name":"PureBasic: Added missing keyword and fixed constants ending with ` PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub PureBasic: Added missing keyword and fixed constants ending with `$` … · PrismJS/prism@d6c5372 · GitHub … · PrismJS/prism@d6c5372 · GitHub","item":"https://kelaenderkoe.pages.dev/javascript-https-github.com/PrismJS/prism/commit/d6c53726"}]}]}
Skip to content

Commit d6c5372

Browse files
authored
PureBasic: Added missing keyword and fixed constants ending with $ (#3320)
1 parent 82d0ca1 commit d6c5372

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

‎components/prism-purebasic.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ slightly changed to pass all tests
99
// PureBasic support, steal stuff from ansi-c
1010
Prism.languages.purebasic = Prism.languages.extend('clike', {
1111
'comment': /;.*/,
12-
'keyword': /\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,
12+
'keyword': /\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|forever|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,
1313
'function': /\b\w+(?:\.\w+)?\s*(?=\()/,
1414
'number': /(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,
1515
'operator': /(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*/@]/
1616
});
1717

1818
Prism.languages.insertBefore('purebasic', 'keyword', {
19-
'tag': /#\w+/,
19+
'tag': /#\w+\$?/,
2020
'asm': {
2121
pattern: /(^[\t ]*)!.*/m,
2222
lookbehind: true,

‎components/prism-purebasic.min.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tests/languages/purebasic/keyword_feature.test‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ INCLUDEFILE
9999
XINCLUDEFILE
100100
MACRO
101101
ENDMACRO
102+
FOREVER
102103

103104
----------------------------------------------------
104105

@@ -203,7 +204,8 @@ ENDMACRO
203204
["keyword", "INCLUDEFILE"],
204205
["keyword", "XINCLUDEFILE"],
205206
["keyword", "MACRO"],
206-
["keyword", "ENDMACRO"]
207+
["keyword", "ENDMACRO"],
208+
["keyword", "FOREVER"]
207209
]
208210

209211
----------------------------------------------------
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#foo
2+
#NULL$
23

34
----------------------------------------------------
45

56
[
6-
["tag", "#foo"]
7+
["tag", "#foo"],
8+
["tag", "#NULL$"]
79
]

0 commit comments

Comments
 (0)