1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- function purebasic(hljs) {
- var STRINGS = {
- className: 'string',
- begin: '(~)?"', end: '"',
- illegal: '\\n'
- };
- var CONSTANTS = {
-
- className: 'symbol',
- begin: '#[a-zA-Z_]\\w*\\$?'
- };
- return {
- name: 'PureBASIC',
- aliases: ['pb', 'pbi'],
- keywords:
-
- 'Align And Array As Break CallDebugger Case CompilerCase CompilerDefault ' +
- 'CompilerElse CompilerElseIf CompilerEndIf CompilerEndSelect CompilerError ' +
- 'CompilerIf CompilerSelect CompilerWarning 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 EnumerationBinary Extends ' +
- 'FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC ' +
- 'IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount ' +
- 'Map Module NewList NewMap Next Not Or Procedure ProcedureC ' +
- 'ProcedureCDLL ProcedureDLL ProcedureReturn Protected Prototype PrototypeC ReDim ' +
- 'Read Repeat Restore Return Runtime Select Shared Static Step Structure ' +
- 'StructureUnion Swap Threaded To UndefineMacro Until Until UnuseModule ' +
- 'UseModule Wend While With XIncludeFile XOr',
- contains: [
-
- hljs.COMMENT(';', '$', {relevance: 0}),
- {
- className: 'function',
- begin: '\\b(Procedure|Declare)(C|CDLL|DLL)?\\b',
- end: '\\(',
- excludeEnd: true,
- returnBegin: true,
- contains: [
- {
- className: 'keyword',
- begin: '(Procedure|Declare)(C|CDLL|DLL)?',
- excludeEnd: true
- },
- {
- className: 'type',
- begin: '\\.\\w*'
-
- },
- hljs.UNDERSCORE_TITLE_MODE
- ]
- },
- STRINGS,
- CONSTANTS
- ]
- };
- }
- module.exports = purebasic;
|