Add support for apexdoc (based on java javadoc support)

pull/2748/head
olane 7 years ago
parent 9498adec54
commit 40dfb97e56

@ -198,6 +198,24 @@ testTokenization('apex', [
]
}],
// Comments - apex doc, multiple lines
[{
line: '/** start of Apex Doc',
tokens: [
{ startIndex: 0, type: 'comment.doc.apex' }
]
}, {
line: 'a comment between without a star',
tokens: [
{ startIndex: 0, type: 'comment.doc.apex' }
]
}, {
line: 'end of multiline comment*/',
tokens: [
{ startIndex: 0, type: 'comment.doc.apex' }
]
}],
// Keywords
[{
line: 'package test; class Program { static void main(String[] args) {} } }',

@ -269,6 +269,7 @@ export const language = <ILanguage>{
whitespace: [
[/[ \t\r\n]+/, ''],
[/\/\*\*(?!\/)/, 'comment.doc', '@apexdoc'],
[/\/\*/, 'comment', '@comment'],
[/\/\/.*$/, 'comment'],
],
@ -281,6 +282,13 @@ export const language = <ILanguage>{
[/[\/*]/, 'comment']
],
//Identical copy of comment above, except for the addition of .doc
apexdoc: [
[/[^\/*]+/, 'comment.doc'],
[/\*\//, 'comment.doc', '@pop'],
[/[\/*]/, 'comment.doc']
],
string: [
[/[^\\"']+/, 'string'],
[/@escapes/, 'string.escape'],

Loading…
Cancel
Save