This commit is contained in:
Alex Dima 2019-03-04 12:44:03 +01:00
parent c362bfab0e
commit e174b96db8
2 changed files with 20 additions and 2 deletions

View file

@ -2076,5 +2076,23 @@ testTokenization(['php', 'css', 'javascript'], [
{ startIndex: 17, type: '' },
{ startIndex: 18, type: 'metatag.php' }
]
}],
[{
line: '<?php',
tokens: [
{ startIndex: 0, type: 'metatag.php' },
]
}, {
line: ' //',
tokens: [
{ startIndex: 0, type: '' },
{ startIndex: 2, type: 'comment.php' },
]
}, {
line: 'if',
tokens: [
{ startIndex: 0, type: 'keyword.php' },
]
}]
]);

View file

@ -225,8 +225,8 @@ export const language = <ILanguage>{
[/[ \t\r\n]+/],
// comments
[/#/, 'comment.php', '@phpLineComment'],
[/\/\//, 'comment.php', '@phpLineComment'],
[/(#|\/\/)$/, 'comment.php'],
[/(#|\/\/)/, 'comment.php', '@phpLineComment'],
// block comments
[/\/\*/, 'comment.php', '@phpComment'],