Changed to use linecomment for continuation comments

This commit is contained in:
nreed 2021-07-05 11:27:32 -04:00
parent 7b96ed2fbd
commit 4dbc07d557

View file

@ -347,16 +347,22 @@ export const language = <languages.IMonarchLanguage>{
[/[ \t\r\n]+/, ''], [/[ \t\r\n]+/, ''],
[/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'], [/\/\*\*(?!\/)/, 'comment.doc', '@doccomment'],
[/\/\*/, 'comment', '@comment'], [/\/\*/, 'comment', '@comment'],
[/\/\/.*\\$/, 'comment', '@comment'], [/\/\/.*\\$/, 'comment', '@linecomment'],
[/\/\/.*$/, 'comment'] [/\/\/.*$/, 'comment']
], ],
comment: [ comment: [
[/.*[^\\]$/, 'comment', '@pop'],
[/[^\/*]+/, 'comment'], [/[^\/*]+/, 'comment'],
[/\*\//, 'comment', '@pop'], [/\*\//, 'comment', '@pop'],
[/[\/*]/, 'comment'] [/[\/*]/, 'comment']
], ],
//For use with continuous line comments
linecomment: [
[/.*[^\\]$/, 'comment', '@pop'],
[/[^]+/, 'comment']
],
//Identical copy of comment above, except for the addition of .doc //Identical copy of comment above, except for the addition of .doc
doccomment: [ doccomment: [
[/[^\/*]+/, 'comment.doc'], [/[^\/*]+/, 'comment.doc'],