]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/aspectj.js
1 /*! `aspectj` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Author: Hakan Ozler <ozler.hakan@gmail.com>
8 Website: https://www.eclipse.org/aspectj/
9 Description: Syntax Highlighting for the AspectJ Language which is a general-purpose aspect-oriented extension to the Java programming language.
14 /** @type LanguageFn */
15 function aspectj(hljs
) {
16 const regex
= hljs
.regex
;
75 "staticinitialization",
83 "thisJoinPointStaticPart",
84 "thisEnclosingJoinPointStaticPart",
112 // eat up @'s in emails to prevent them to be recognized as doctags
123 hljs
.C_LINE_COMMENT_MODE
,
124 hljs
.C_BLOCK_COMMENT_MODE
,
125 hljs
.APOS_STRING_MODE
,
126 hljs
.QUOTE_STRING_MODE
,
129 beginKeywords: 'aspect',
132 illegal: /[:;"\[\]]/,
134 { beginKeywords: 'extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton' },
135 hljs
.UNDERSCORE_TITLE_MODE
,
139 keywords: KEYWORDS
.concat(SHORTKEYS
),
146 beginKeywords: 'class interface',
150 keywords: 'class interface',
153 { beginKeywords: 'extends implements' },
154 hljs
.UNDERSCORE_TITLE_MODE
158 // AspectJ Constructs
159 beginKeywords: 'pointcut after before around throwing returning',
165 begin: regex
.concat(hljs
.UNDERSCORE_IDENT_RE
, /\s*\(/),
167 contains: [ hljs
.UNDERSCORE_TITLE_MODE
]
181 begin: regex
.concat(hljs
.UNDERSCORE_IDENT_RE
, /\s*\(/),
182 keywords: KEYWORDS
.concat(SHORTKEYS
),
185 hljs
.QUOTE_STRING_MODE
189 // this prevents 'new Name(...), or throw ...' from being recognized as a function definition
190 beginKeywords: 'new throw',
194 // the function class is a bit different for AspectJ compared to the Java language
195 className: 'function',
196 begin: /\w
+ +\w
+(\.\w
+)?\s
*\([^\)]*\)\s
*((throws)[\w
\s
,]+)?[\{;]/,
203 begin: regex
.concat(hljs
.UNDERSCORE_IDENT_RE
, /\s*\(/),
206 contains: [ hljs
.UNDERSCORE_TITLE_MODE
]
215 hljs
.APOS_STRING_MODE
,
216 hljs
.QUOTE_STRING_MODE
,
218 hljs
.C_BLOCK_COMMENT_MODE
221 hljs
.C_LINE_COMMENT_MODE
,
222 hljs
.C_BLOCK_COMMENT_MODE
227 // annotation is also used in this language
239 export default hljsGrammar
;