mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
Add support for apexdoc (based on java javadoc support)
This commit is contained in:
parent
9498adec54
commit
40dfb97e56
2 changed files with 26 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue