]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/lasso.js
1 /*! `lasso` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= ( function () {
8 Author: Eric Knibbe <eric@lassosoft.com>
9 Description: Lasso is a language and server platform for database-driven web applications. This definition handles Lasso 9 syntax and LassoScript for Lasso 8.6 and earlier.
10 Website: http://www.lassosoft.com/What-Is-Lasso
11 Category: database, web
14 function lasso ( hljs
) {
15 const LASSO_IDENT_RE
= '[a-zA-Z_][ \\ w.]*' ;
16 const LASSO_ANGLE_RE
= '< \\ ?(lasso(script)?|=)' ;
17 const LASSO_CLOSE_RE
= ' \\ ]| \\ ?>' ;
18 const LASSO_KEYWORDS
= {
19 $ pattern : LASSO_IDENT_RE
+ '|&[lg]t;' ,
21 'true false none minimal full all void and or not '
22 + 'bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft' ,
24 'array date decimal duration integer map pair string tag xml null '
25 + 'boolean bytes keyword list locale queue set stack staticarray '
26 + 'local var variable global data self inherited currentcapture givenblock' ,
28 'cache database_names database_schemanames database_tablenames '
29 + 'define_tag define_type email_batch encode_set html_comment handle '
30 + 'handle_error header if inline iterate ljax_target link '
31 + 'link_currentaction link_currentgroup link_currentrecord link_detail '
32 + 'link_firstgroup link_firstrecord link_lastgroup link_lastrecord '
33 + 'link_nextgroup link_nextrecord link_prevgroup link_prevrecord log '
34 + 'loop namespace_using output_none portal private protect records '
35 + 'referer referrer repeating resultset rows search_args '
36 + 'search_arguments select sort_args sort_arguments thread_atomic '
37 + 'value_list while abort case else fail_if fail_ifnot fail if_empty '
38 + 'if_false if_null if_true loop_abort loop_continue loop_count params '
39 + 'params_up return return_value run_children soap_definetag '
40 + 'soap_lastrequest soap_lastresponse tag_name ascending average by '
41 + 'define descending do equals frozen group handle_failure import in '
42 + 'into join let match max min on order parent protected provide public '
43 + 'require returnhome skip split_thread sum take thread to trait type '
44 + 'where with yield yieldhome'
46 const HTML_COMMENT
= hljs
. COMMENT (
51 const LASSO_NOPROCESS
= {
53 begin : ' \\ [noprocess \\ ]' ,
55 end : ' \\ [/noprocess \\ ]' ,
57 contains : [ HTML_COMMENT
]
62 begin : ' \\ [/noprocess|' + LASSO_ANGLE_RE
64 const LASSO_DATAMEMBER
= {
66 begin : ' \' ' + LASSO_IDENT_RE
+ ' \' '
69 hljs
. C_LINE_COMMENT_MODE
,
70 hljs
. C_BLOCK_COMMENT_MODE
,
71 hljs
. inherit ( hljs
. C_NUMBER_MODE
, { begin : hljs
. C_NUMBER_RE
+ '|(-?infinity|NaN) \\ b' }),
72 hljs
. inherit ( hljs
. APOS_STRING_MODE
, { illegal : null }),
73 hljs
. inherit ( hljs
. QUOTE_STRING_MODE
, { illegal : null }),
81 { begin : '[#$]' + LASSO_IDENT_RE
},
98 begin : '-(?!infinity)' + LASSO_IDENT_RE
,
101 { begin : '( \\ . \\ . \\ .)' }
107 contains : [ LASSO_DATAMEMBER
]
111 beginKeywords : 'define' ,
114 contains : [ hljs
. inherit ( hljs
. TITLE_MODE
, { begin : LASSO_IDENT_RE
+ '(=(?!>))?|[-+*/%](?!>)' }) ]
123 case_insensitive : true ,
124 keywords : LASSO_KEYWORDS
,
128 begin : LASSO_CLOSE_RE
,
131 end : ' \\ [|' + LASSO_ANGLE_RE
,
134 contains : [ HTML_COMMENT
]
141 begin : ' \\ [no_square_brackets' ,
143 end : ' \\ [/no_square_brackets \\ ]' , // not implemented in the language
144 keywords : LASSO_KEYWORDS
,
148 begin : LASSO_CLOSE_RE
,
151 end : ' \\ [noprocess \\ ]|' + LASSO_ANGLE_RE
,
153 contains : [ HTML_COMMENT
]
180 hljs
. registerLanguage ( 'lasso' , hljsGrammar
);