This commit is contained in:
Alex Dima 2019-03-04 12:38:58 +01:00
parent ba44226434
commit c362bfab0e
2 changed files with 19 additions and 2 deletions

View file

@ -442,5 +442,20 @@ testTokenization('fsharp', [
tokens: [
{ startIndex: 0, type: 'number.float.fs' }
]
}],
[{
line: '(* This operator -> (*) should be ignored *) let i = 0',
tokens: [
{ startIndex: 0, type: 'comment.fs' },
{ startIndex: 44, type: '' },
{ startIndex: 45, type: 'keyword.let.fs' },
{ startIndex: 48, type: '' },
{ startIndex: 49, type: 'identifier.fs' },
{ startIndex: 50, type: '' },
{ startIndex: 51, type: 'delimiter.fs' },
{ startIndex: 52, type: '' },
{ startIndex: 53, type: 'number.fs' }
]
}]
]);

View file

@ -132,9 +132,11 @@ export const language = <ILanguage>{
],
comment: [
[/[^\*]+/, 'comment'],
[/[^*(]+/, 'comment'],
[/\*\)/, 'comment', '@pop'],
[/\*/, 'comment']
[/\*/, 'comment'],
[/\(\*\)/, 'comment'],
[/\(/, 'comment']
],
string: [