mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32: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',
|
'\\space',
|
||||||
'\\return',
|
'\\return',
|
||||||
'\\tab',
|
'\\tab',
|
||||||
|
'\\o123',
|
||||||
'\\u1000',
|
'\\u1000',
|
||||||
'\\uAaAa',
|
'\\uAaAa',
|
||||||
'\\u9F9F'
|
'\\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]+)?/,
|
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: {
|
tokenizer: {
|
||||||
root: [
|
root: [
|
||||||
|
|
@ -734,9 +734,6 @@ export const language = <ILanguage>{
|
||||||
// regular expressions
|
// regular expressions
|
||||||
[/\/#"(?:\.|(?:")|[^"\n])*"\/g/, 'regexp'],
|
[/\/#"(?:\.|(?:")|[^"\n])*"\/g/, 'regexp'],
|
||||||
|
|
||||||
// inline comments
|
|
||||||
[/;.*$/, 'comment'],
|
|
||||||
|
|
||||||
// reader macro characters
|
// reader macro characters
|
||||||
[/[#'@^`~]/, 'meta'],
|
[/[#'@^`~]/, 'meta'],
|
||||||
|
|
||||||
|
|
@ -760,7 +757,7 @@ export const language = <ILanguage>{
|
||||||
|
|
||||||
whitespace: [
|
whitespace: [
|
||||||
[/[ \t\r\n]+/, 'white'],
|
[/[ \t\r\n]+/, 'white'],
|
||||||
[/;;.*$/, 'comment']],
|
[/;.*$/, 'comment']],
|
||||||
|
|
||||||
string: [
|
string: [
|
||||||
[/"/, 'string', '@multiLineString'],
|
[/"/, 'string', '@multiLineString'],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue