]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/sas.js
1 /*! `sas` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Author: Mauricio Caceres <mauricio.caceres.bravo@gmail.com>
8 Description: Syntax Highlighting for SAS
12 /** @type LanguageFn */
14 const regex
= hljs
.regex
;
15 // Data step and PROC SQL statements
16 const SAS_KEYWORDS
= [
129 // Built-in SAS functions
412 // Built-in macro functions
413 const MACRO_FUNCTIONS
= [
493 case_insensitive: true,
496 keyword: SAS_KEYWORDS
500 // Distinct highlight for proc <proc>, data, run, quit
501 className: 'keyword',
502 begin: /^\s
*(proc
[\w
\d_
]+|data
|run
|quit
)[\s
;]/
506 className: 'variable',
507 begin: /&[a-zA-Z_&][a-zA-Z0-9_]*\.?/
525 /[a-zA-Z_&][a-zA-Z0-9_]*/
532 { // Built-in macro variables
533 className: 'built_in',
534 begin: '%' + regex
.either(...MACRO_FUNCTIONS
)
537 // User-defined macro functions
538 className: 'title.function',
539 begin: /%[a-zA-Z_][a-zA-Z_0-9]*/
542 // TODO: this is most likely an incorrect classification
543 // built_in may need more nuance
544 // https://github.com/highlightjs/highlight.js/issues/2521
546 begin: regex
.either(...FUNCTIONS
) + '(?=\\()'
551 hljs
.APOS_STRING_MODE
,
552 hljs
.QUOTE_STRING_MODE
555 hljs
.COMMENT('\\*', ';'),
556 hljs
.C_BLOCK_COMMENT_MODE
565 export default hljsGrammar
;