]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/delphi.js
1 /*! `delphi` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Website: https://www.embarcadero.com/products/delphi
11 /** @type LanguageFn */
12 function delphi(hljs
) {
142 const COMMENT_MODES
= [
143 hljs
.C_LINE_COMMENT_MODE
,
144 hljs
.COMMENT(/\{/, /\}/, { relevance: 0 }),
145 hljs
.COMMENT(/\(\*/, /\*\)/, { relevance: 10 })
164 contains: [ { begin: /''/ } ]
169 // Source: https://www.freepascal.org/docs-html/ref/refse6.html
172 // Regular numbers, e.g., 123, 123.456.
173 match: /\b\d[\d_]*(\.\d[\d_]*)?/ },
175 // Hexadecimal notation, e.g., $7F.
176 match: /\$[\dA-Fa-f_]+/ },
178 // Hexadecimal literal with no digits
182 // Octal notation, e.g., &42.
183 match: /&[0-7][0-7_]*/ },
185 // Binary notation, e.g., %1010.
188 // Binary literal with no digits
193 const CHAR_STRING
= {
196 { match: /#\d[\d_]*/ },
197 { match: /#\$[\dA-Fa-f][\dA-Fa-f_]*/ },
198 { match: /#&[0-7][0-7_]*/ },
199 { match: /#%[01][01_]*/ }
203 begin: hljs
.IDENT_RE
+ '\\s*=\\s*class\\s*\\(',
205 contains: [ hljs
.TITLE_MODE
]
208 className: 'function',
209 beginKeywords: 'function constructor destructor procedure',
211 keywords: 'function constructor|10 destructor|10 procedure|10',
223 ].concat(COMMENT_MODES
)
226 ].concat(COMMENT_MODES
)
236 case_insensitive: true,
238 illegal: /"|\$[G-Zg-z]|\/\*|<\/|\|/,
246 ].concat(COMMENT_MODES
)
254 export default hljsGrammar
;