CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
oxygene.js88 linesDownload Raw Back to languages
1/*2Language: Oxygene3Author: Carlo Kok <ck@remobjects.com>4Description: Oxygene is built on the foundation of Object Pascal, revamped and extended to be a modern language for the twenty-first century.5Website: https://www.elementscompiler.com/elements/default.aspx6Category: build-system7*/8 9function oxygene(hljs) {10  const OXYGENE_KEYWORDS = {11    $pattern: /\.?\w+/,12    keyword:13      'abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue '14      + 'create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false '15      + 'final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited '16      + 'inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of '17      + 'old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly '18      + 'record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple '19      + 'type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal '20      + 'register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained'21  };22  const CURLY_COMMENT = hljs.COMMENT(23    /\{/,24    /\}/,25    { relevance: 0 }26  );27  const PAREN_COMMENT = hljs.COMMENT(28    '\\(\\*',29    '\\*\\)',30    { relevance: 10 }31  );32  const STRING = {33    className: 'string',34    begin: '\'',35    end: '\'',36    contains: [ { begin: '\'\'' } ]37  };38  const CHAR_STRING = {39    className: 'string',40    begin: '(#\\d+)+'41  };42  const FUNCTION = {43    beginKeywords: 'function constructor destructor procedure method',44    end: '[:;]',45    keywords: 'function constructor|10 destructor|10 procedure|10 method|10',46    contains: [47      hljs.inherit(hljs.TITLE_MODE, { scope: "title.function" }),48      {49        className: 'params',50        begin: '\\(',51        end: '\\)',52        keywords: OXYGENE_KEYWORDS,53        contains: [54          STRING,55          CHAR_STRING56        ]57      },58      CURLY_COMMENT,59      PAREN_COMMENT60    ]61  };62 63  const SEMICOLON = {64    scope: "punctuation",65    match: /;/,66    relevance: 067  };68 69  return {70    name: 'Oxygene',71    case_insensitive: true,72    keywords: OXYGENE_KEYWORDS,73    illegal: '("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',74    contains: [75      CURLY_COMMENT,76      PAREN_COMMENT,77      hljs.C_LINE_COMMENT_MODE,78      STRING,79      CHAR_STRING,80      hljs.NUMBER_MODE,81      FUNCTION,82      SEMICOLON83    ]84  };85}86 87export { oxygene as default };88 
basant307/AI_Governance_Project · CoolFace