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