Make code compile
parent
4c0f0748e8
commit
2c5e6d5448
@ -1,47 +1,61 @@
|
|||||||
// Create your own language definition here
|
/*---------------------------------------------------------------------------------------------
|
||||||
// You can safely look at other samples without losing modifications.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
// Modifications are not saved on browser refresh/close though -- copy often!
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
return {
|
*--------------------------------------------------------------------------------------------*/
|
||||||
// Set defaultToken to invalid to see what you do not tokenize yet
|
|
||||||
// defaultToken: 'invalid',
|
'use strict';
|
||||||
keywords: [],
|
|
||||||
typeKeywords: [],
|
import IRichLanguageConfiguration = monaco.languages.LanguageConfiguration;
|
||||||
operators: [],
|
import ILanguage = monaco.languages.IMonarchLanguage;
|
||||||
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
|
||||||
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
export const conf: IRichLanguageConfiguration = {
|
||||||
tokenizer: {
|
brackets: [],
|
||||||
root: [
|
autoClosingPairs: [],
|
||||||
[/child-src/, 'string.quote'],
|
surroundingPairs: []
|
||||||
[/connect-src/, 'string.quote'],
|
};
|
||||||
[/default-src/, 'string.quote'],
|
|
||||||
[/font-src/, 'string.quote'],
|
export const language = <ILanguage>{
|
||||||
[/frame-src/, 'string.quote'],
|
// Set defaultToken to invalid to see what you do not tokenize yet
|
||||||
[/img-src/, 'string.quote'],
|
// defaultToken: 'invalid',
|
||||||
[/manifest-src/, 'string.quote'],
|
keywords: [],
|
||||||
[/media-src/, 'string.quote'],
|
typeKeywords: [],
|
||||||
[/object-src/, 'string.quote'],
|
tokenPostfix: '.csp',
|
||||||
[/script-src/, 'string.quote'],
|
operators: [],
|
||||||
[/style-src/, 'string.quote'],
|
symbols: /[=><!~?:&|+\-*\/\^%]+/,
|
||||||
[/worker-src/, 'string.quote'],
|
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
||||||
[/base-uri/, 'string.quote'],
|
tokenizer: {
|
||||||
[/plugin-types/, 'string.quote'],
|
root: [
|
||||||
[/sandbox/, 'string.quote'],
|
[/child-src/, 'string.quote'],
|
||||||
[/disown-opener/, 'string.quote'],
|
[/connect-src/, 'string.quote'],
|
||||||
[/form-action/, 'string.quote'],
|
[/default-src/, 'string.quote'],
|
||||||
[/frame-ancestors/, 'string.quote'],
|
[/font-src/, 'string.quote'],
|
||||||
[/report-uri/, 'string.quote'],
|
[/frame-src/, 'string.quote'],
|
||||||
[/report-to/, 'string.quote'],
|
[/img-src/, 'string.quote'],
|
||||||
[/upgrade-insecure-requests/, 'string.quote'],
|
[/manifest-src/, 'string.quote'],
|
||||||
[/block-all-mixed-content/, 'string.quote'],
|
[/media-src/, 'string.quote'],
|
||||||
[/require-sri-for/, 'string.quote'],
|
[/object-src/, 'string.quote'],
|
||||||
[/reflected-xss/, 'string.quote'],
|
[/script-src/, 'string.quote'],
|
||||||
[/referrer/, 'string.quote'],
|
[/style-src/, 'string.quote'],
|
||||||
[/policy-uri/, 'string.quote'],
|
[/worker-src/, 'string.quote'],
|
||||||
[/'self'/, 'string.quote'],
|
[/base-uri/, 'string.quote'],
|
||||||
[/'unsafe-inline'/, 'string.quote'],
|
[/plugin-types/, 'string.quote'],
|
||||||
[/'unsafe-eval'/, 'string.quote'],
|
[/sandbox/, 'string.quote'],
|
||||||
[/'strict-dynamic'/, 'string.quote'],
|
[/disown-opener/, 'string.quote'],
|
||||||
[/'unsafe-hashed-attributes'/, 'string.quote']
|
[/form-action/, 'string.quote'],
|
||||||
]
|
[/frame-ancestors/, 'string.quote'],
|
||||||
}
|
[/report-uri/, 'string.quote'],
|
||||||
|
[/report-to/, 'string.quote'],
|
||||||
|
[/upgrade-insecure-requests/, 'string.quote'],
|
||||||
|
[/block-all-mixed-content/, 'string.quote'],
|
||||||
|
[/require-sri-for/, 'string.quote'],
|
||||||
|
[/reflected-xss/, 'string.quote'],
|
||||||
|
[/referrer/, 'string.quote'],
|
||||||
|
[/policy-uri/, 'string.quote'],
|
||||||
|
[/'self'/, 'string.quote'],
|
||||||
|
[/'unsafe-inline'/, 'string.quote'],
|
||||||
|
[/'unsafe-eval'/, 'string.quote'],
|
||||||
|
[/'strict-dynamic'/, 'string.quote'],
|
||||||
|
[/'unsafe-hashed-attributes'/, 'string.quote']
|
||||||
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue