CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
purebasic.js101 linesDownload Raw Back to languages
1/*2Language: PureBASIC3Author: Tristano Ajmone <tajmone@gmail.com>4Description: Syntax highlighting for PureBASIC (v.5.00-5.60). No inline ASM highlighting. (v.1.2, May 2017)5Credits: I've taken inspiration from the PureBasic language file for GeSHi, created by Gustavo Julio Fiorenza (GuShH).6Website: https://www.purebasic.com7Category: system8*/9 10// Base deafult colors in PB IDE: background: #FFFFDF; foreground: #000000;11 12function purebasic(hljs) {13  const STRINGS = { // PB IDE color: #0080FF (Azure Radiance)14    className: 'string',15    begin: '(~)?"',16    end: '"',17    illegal: '\\n'18  };19  const CONSTANTS = { // PB IDE color: #924B72 (Cannon Pink)20    //  "#" + a letter or underscore + letters, digits or underscores + (optional) "$"21    className: 'symbol',22    begin: '#[a-zA-Z_]\\w*\\$?'23  };24 25  return {26    name: 'PureBASIC',27    aliases: [28      'pb',29      'pbi'30    ],31    keywords: // PB IDE color: #006666 (Blue Stone) + Bold32      // Keywords from all version of PureBASIC 5.00 upward ...33      'Align And Array As Break CallDebugger Case CompilerCase CompilerDefault '34      + 'CompilerElse CompilerElseIf CompilerEndIf CompilerEndSelect CompilerError '35      + 'CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug '36      + 'DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default '37      + 'Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM '38      + 'EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration '39      + 'EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect '40      + 'EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary Extends '41      + 'FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC '42      + 'IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount '43      + 'Map Module NewList NewMap Next Not Or Procedure ProcedureC '44      + 'ProcedureCDLL ProcedureDLL ProcedureReturn Protected Prototype PrototypeC ReDim '45      + 'Read Repeat Restore Return Runtime Select Shared Static Step Structure '46      + 'StructureUnion Swap Threaded To UndefineMacro Until Until  UnuseModule '47      + 'UseModule Wend While With XIncludeFile XOr',48    contains: [49      // COMMENTS | PB IDE color: #00AAAA (Persian Green)50      hljs.COMMENT(';', '$', { relevance: 0 }),51 52      { // PROCEDURES DEFINITIONS53        className: 'function',54        begin: '\\b(Procedure|Declare)(C|CDLL|DLL)?\\b',55        end: '\\(',56        excludeEnd: true,57        returnBegin: true,58        contains: [59          { // PROCEDURE KEYWORDS | PB IDE color: #006666 (Blue Stone) + Bold60            className: 'keyword',61            begin: '(Procedure|Declare)(C|CDLL|DLL)?',62            excludeEnd: true63          },64          { // PROCEDURE RETURN TYPE SETTING | PB IDE color: #000000 (Black)65            className: 'type',66            begin: '\\.\\w*'67            // end: ' ',68          },69          hljs.UNDERSCORE_TITLE_MODE // PROCEDURE NAME | PB IDE color: #006666 (Blue Stone)70        ]71      },72      STRINGS,73      CONSTANTS74    ]75  };76}77 78/*  ==============================================================================79                                      CHANGELOG80    ==============================================================================81    - v.1.2 (2017-05-12)82        -- BUG-FIX: Some keywords were accidentally joyned together. Now fixed.83    - v.1.1 (2017-04-30)84        -- Updated to PureBASIC 5.60.85        -- Keywords list now built by extracting them from the PureBASIC SDK's86           "SyntaxHilighting.dll" (from each PureBASIC version). Tokens from each87           version are added to the list, and renamed or removed tokens are kept88           for the sake of covering all versions of the language from PureBASIC89           v5.00 upward. (NOTE: currently, there are no renamed or deprecated90           tokens in the keywords list). For more info, see:91           -- http://www.purebasic.fr/english/viewtopic.php?&p=50626992           -- https://github.com/tajmone/purebasic-archives/tree/master/syntax-highlighting/guidelines93    - v.1.0 (April 2016)94        -- First release95        -- Keywords list taken and adapted from GuShH's (Gustavo Julio Fiorenza)96           PureBasic language file for GeSHi:97           -- https://github.com/easybook/geshi/blob/master/geshi/purebasic.php98*/99 100export { purebasic as default };101 
basant307/AI_Governance_Project · CoolFace