mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
[clojure] Fix regular expression for character literals.
Consolidate regular expressions for line and in-line comments.
This commit is contained in:
parent
073f212f63
commit
1188cfa1bb
2 changed files with 3 additions and 5 deletions
|
|
@ -747,6 +747,7 @@ testTokenization('clojure', [
|
|||
'\\space',
|
||||
'\\return',
|
||||
'\\tab',
|
||||
'\\o123',
|
||||
'\\u1000',
|
||||
'\\uAaAa',
|
||||
'\\u9F9F'
|
||||
|
|
|
|||
|
|
@ -718,7 +718,7 @@ export const language = <ILanguage>{
|
|||
|
||||
numbers: /^[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?/,
|
||||
|
||||
characters: /\\(?:@symbolCharacter+|[\\"()\[\]{}]|x[0-9A-Fa-f]{4}|u[0-9A-Fa-f]{4}|o[0-7]{3})/,
|
||||
characters: /\\(?:backspace|formfeed|newline|return|space|tab|x[0-9A-Fa-f]{4}|u[0-9A-Fa-f]{4}|o[0-7]{3}|@symbolCharacter|[\\"()\[\]{}])/,
|
||||
|
||||
tokenizer: {
|
||||
root: [
|
||||
|
|
@ -734,9 +734,6 @@ export const language = <ILanguage>{
|
|||
// regular expressions
|
||||
[/\/#"(?:\.|(?:")|[^"\n])*"\/g/, 'regexp'],
|
||||
|
||||
// inline comments
|
||||
[/;.*$/, 'comment'],
|
||||
|
||||
// reader macro characters
|
||||
[/[#'@^`~]/, 'meta'],
|
||||
|
||||
|
|
@ -760,7 +757,7 @@ export const language = <ILanguage>{
|
|||
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/;;.*$/, 'comment']],
|
||||
[/;.*$/, 'comment']],
|
||||
|
||||
string: [
|
||||
[/"/, 'string', '@multiLineString'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue