mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Remove code for comments
This commit is contained in:
parent
be0d51046c
commit
76f0f15077
3 changed files with 81 additions and 107 deletions
|
|
@ -23,8 +23,8 @@ testTokenization('clojure', [
|
|||
line: 'comment "text comment"',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'keyword.clj' },
|
||||
{ startIndex: 7, type: 'white.clj'},
|
||||
{ startIndex: 8, type: 'string.clj'},
|
||||
{ startIndex: 7, type: 'white.clj' },
|
||||
{ startIndex: 8, type: 'string.clj' },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
@ -44,20 +44,6 @@ testTokenization('clojure', [
|
|||
tokens: [{ startIndex: 0, type: 'comment.clj' }],
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
line: '(comment',
|
||||
tokens: [{ startIndex: 0, type: 'comment.clj' }],
|
||||
},
|
||||
{
|
||||
line: '(comment let',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'comment.clj' },
|
||||
{ startIndex: 8, type: 'white.clj' },
|
||||
{ startIndex: 9, type: 'keyword.clj' },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
// strings
|
||||
[
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import ILanguage = monaco.languages.IMonarchLanguage;
|
|||
export const conf: IRichLanguageConfiguration = {
|
||||
comments: {
|
||||
lineComment: ';;',
|
||||
blockComment: ['(comment', ')'],
|
||||
},
|
||||
|
||||
brackets: [['(', ')'], ['{', '}'], ['[', ']']],
|
||||
|
|
@ -210,18 +209,7 @@ export const language = <ILanguage>{
|
|||
{ include: '@strings' },
|
||||
],
|
||||
|
||||
comment: [
|
||||
[/[^comment\(\)]+/, 'comment'],
|
||||
[/\(comment/, 'comment', '@push'],
|
||||
[/\)/, 'comment', '@pop'],
|
||||
[/[comment\(\)]/, 'comment'],
|
||||
],
|
||||
|
||||
whitespace: [
|
||||
[/[ \t\r\n]+/, 'white'],
|
||||
[/\(comment/, 'comment', '@comment'],
|
||||
[/;;.*$/, 'comment'],
|
||||
],
|
||||
whitespace: [[/[ \t\r\n]+/, 'white'], [/;;.*$/, 'comment']],
|
||||
|
||||
strings: [
|
||||
[/"$/, 'string', '@popall'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue