This commit is contained in:
Alex Dima 2018-11-12 13:52:04 +01:00
parent 70f12687bb
commit 9961f06110
2 changed files with 71 additions and 7 deletions

View file

@ -215,19 +215,20 @@ export const language = <ILanguage>{
whitespace: [
[/\s+/, 'white'],
[/(^#.*$)/, 'comment'],
[/('''.*''')|(""".*""")/, 'string'],
[/'''.*$/, 'string', '@endDocString'],
[/""".*$/, 'string', '@endDblDocString']
[/'''/, 'string', '@endDocString'],
[/"""/, 'string', '@endDblDocString']
],
endDocString: [
[/[^']+/, 'string'],
[/\\'/, 'string'],
[/.*'''/, 'string', '@popall'],
[/.*$/, 'string']
[/'''/, 'string', '@popall'],
[/'/, 'string']
],
endDblDocString: [
[/[^"]+/, 'string'],
[/\\"/, 'string'],
[/.*"""/, 'string', '@popall'],
[/.*$/, 'string']
[/"""/, 'string', '@popall'],
[/"/, 'string']
],
// Recognize hex, negatives, decimals, imaginaries, longs, and scientific notation