Upgrade ACE Editor from 1.4.7 to 1.4.14
This commit is contained in:
parent
d514d72ac5
commit
564382ec6c
@ -48,7 +48,7 @@ TCPDF 6.3.2 LGPL-3+ Yes
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
|
||||
JS libraries:
|
||||
Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
ChartJS 3.7.1 MIT License Yes JS library for graph
|
||||
jQuery 3.5.1 MIT License Yes JS library
|
||||
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Oscss-Shop <support@oscss-shop.fr>.
|
||||
* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modifyion 2.0 (the "License");
|
||||
* it under the terms of the GNU General Public License as published bypliance with the License.
|
||||
@ -17,9 +17,6 @@
|
||||
* or see https://www.gnu.org/
|
||||
*/
|
||||
|
||||
if (!defined('REQUIRE_JQUERY_BLOCKUI')) {
|
||||
define('REQUIRE_JQUERY_BLOCKUI', 1);
|
||||
}
|
||||
if (!defined('NOTOKENRENEWAL')) {
|
||||
define('NOTOKENRENEWAL', 1);
|
||||
}
|
||||
|
||||
@ -67,9 +67,6 @@ div.divsearchfield {
|
||||
.tree li:last-child:after{
|
||||
display: none
|
||||
}
|
||||
.blockUI {
|
||||
cursor: auto!important;
|
||||
}
|
||||
.newAppParent{
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
3
htdocs/includes/ace/.npmignore
Normal file
3
htdocs/includes/ace/.npmignore
Normal file
@ -0,0 +1,3 @@
|
||||
demo/
|
||||
kitchen-sink.html
|
||||
* *
|
||||
@ -1,3 +1,26 @@
|
||||
2022.01.26 Version 1.4.14
|
||||
* update vim mode
|
||||
* remove slow regex in beautify extension
|
||||
|
||||
2021.09.30 Version 1.4.13
|
||||
* added useStrictCSP global option to use in environments where dynamic style creation is disabled
|
||||
see demo/csp.html for an example of a page which loads external css files instead of generating styles with javascript
|
||||
* updated vim mode, added support for gqq command
|
||||
|
||||
2020.07.06 Version 1.4.12
|
||||
* removed unused es5-shim
|
||||
* imporved ruby and vbscript highlighting and folding
|
||||
* workaround for double space being converted to dot on mobile keyboards
|
||||
|
||||
2020.04.15 Version 1.4.10
|
||||
* added workaround for chrome bug causing memory leak after calling editor.destroy
|
||||
* added code folding support for vbscript mode
|
||||
|
||||
2020.04.01 Version 1.4.9
|
||||
* added option to disable autoindent
|
||||
* added new language modes
|
||||
* fixed backspace not working with some mobile keyboards
|
||||
|
||||
2020.01.14 Version 1.4.8
|
||||
* highlight both matched braces, and highlight unmatched brace in red
|
||||
* improve snippet manager
|
||||
|
||||
34
htdocs/includes/ace/ace-modules.d.ts
vendored
34
htdocs/includes/ace/ace-modules.d.ts
vendored
@ -1,7 +1,11 @@
|
||||
declare module 'ace-builds/webpack-resolver';
|
||||
declare module 'ace-builds/src-noconflict/ace';
|
||||
declare module 'ace-builds/src-noconflict/ext-beautify';
|
||||
declare module 'ace-builds/src-noconflict/ext-code_lens';
|
||||
declare module 'ace-builds/src-noconflict/ext-elastic_tabstops_lite';
|
||||
declare module 'ace-builds/src-noconflict/ext-emmet';
|
||||
declare module 'ace-builds/src-noconflict/ext-error_marker';
|
||||
declare module 'ace-builds/src-noconflict/ext-hardwrap';
|
||||
declare module 'ace-builds/src-noconflict/ext-keybinding_menu';
|
||||
declare module 'ace-builds/src-noconflict/ext-language_tools';
|
||||
declare module 'ace-builds/src-noconflict/ext-linking';
|
||||
@ -21,10 +25,12 @@ declare module 'ace-builds/src-noconflict/ext-whitespace';
|
||||
declare module 'ace-builds/src-noconflict/keybinding-emacs';
|
||||
declare module 'ace-builds/src-noconflict/keybinding-sublime';
|
||||
declare module 'ace-builds/src-noconflict/keybinding-vim';
|
||||
declare module 'ace-builds/src-noconflict/keybinding-vscode';
|
||||
declare module 'ace-builds/src-noconflict/mode-abap';
|
||||
declare module 'ace-builds/src-noconflict/mode-abc';
|
||||
declare module 'ace-builds/src-noconflict/mode-actionscript';
|
||||
declare module 'ace-builds/src-noconflict/mode-ada';
|
||||
declare module 'ace-builds/src-noconflict/mode-alda';
|
||||
declare module 'ace-builds/src-noconflict/mode-apache_conf';
|
||||
declare module 'ace-builds/src-noconflict/mode-apex';
|
||||
declare module 'ace-builds/src-noconflict/mode-applescript';
|
||||
@ -34,7 +40,6 @@ declare module 'ace-builds/src-noconflict/mode-asl';
|
||||
declare module 'ace-builds/src-noconflict/mode-assembly_x86';
|
||||
declare module 'ace-builds/src-noconflict/mode-autohotkey';
|
||||
declare module 'ace-builds/src-noconflict/mode-batchfile';
|
||||
declare module 'ace-builds/src-noconflict/mode-bro';
|
||||
declare module 'ace-builds/src-noconflict/mode-c9search';
|
||||
declare module 'ace-builds/src-noconflict/mode-cirru';
|
||||
declare module 'ace-builds/src-noconflict/mode-clojure';
|
||||
@ -92,6 +97,7 @@ declare module 'ace-builds/src-noconflict/mode-jade';
|
||||
declare module 'ace-builds/src-noconflict/mode-java';
|
||||
declare module 'ace-builds/src-noconflict/mode-javascript';
|
||||
declare module 'ace-builds/src-noconflict/mode-json';
|
||||
declare module 'ace-builds/src-noconflict/mode-json5';
|
||||
declare module 'ace-builds/src-noconflict/mode-jsoniq';
|
||||
declare module 'ace-builds/src-noconflict/mode-jsp';
|
||||
declare module 'ace-builds/src-noconflict/mode-jssm';
|
||||
@ -99,6 +105,7 @@ declare module 'ace-builds/src-noconflict/mode-jsx';
|
||||
declare module 'ace-builds/src-noconflict/mode-julia';
|
||||
declare module 'ace-builds/src-noconflict/mode-kotlin';
|
||||
declare module 'ace-builds/src-noconflict/mode-latex';
|
||||
declare module 'ace-builds/src-noconflict/mode-latte';
|
||||
declare module 'ace-builds/src-noconflict/mode-less';
|
||||
declare module 'ace-builds/src-noconflict/mode-liquid';
|
||||
declare module 'ace-builds/src-noconflict/mode-lisp';
|
||||
@ -114,7 +121,9 @@ declare module 'ace-builds/src-noconflict/mode-markdown';
|
||||
declare module 'ace-builds/src-noconflict/mode-mask';
|
||||
declare module 'ace-builds/src-noconflict/mode-matlab';
|
||||
declare module 'ace-builds/src-noconflict/mode-maze';
|
||||
declare module 'ace-builds/src-noconflict/mode-mediawiki';
|
||||
declare module 'ace-builds/src-noconflict/mode-mel';
|
||||
declare module 'ace-builds/src-noconflict/mode-mips';
|
||||
declare module 'ace-builds/src-noconflict/mode-mixal';
|
||||
declare module 'ace-builds/src-noconflict/mode-mushcode';
|
||||
declare module 'ace-builds/src-noconflict/mode-mysql';
|
||||
@ -122,11 +131,11 @@ declare module 'ace-builds/src-noconflict/mode-nginx';
|
||||
declare module 'ace-builds/src-noconflict/mode-nim';
|
||||
declare module 'ace-builds/src-noconflict/mode-nix';
|
||||
declare module 'ace-builds/src-noconflict/mode-nsis';
|
||||
declare module 'ace-builds/src-noconflict/mode-nunjucks';
|
||||
declare module 'ace-builds/src-noconflict/mode-objectivec';
|
||||
declare module 'ace-builds/src-noconflict/mode-ocaml';
|
||||
declare module 'ace-builds/src-noconflict/mode-pascal';
|
||||
declare module 'ace-builds/src-noconflict/mode-perl';
|
||||
declare module 'ace-builds/src-noconflict/mode-perl6';
|
||||
declare module 'ace-builds/src-noconflict/mode-pgsql';
|
||||
declare module 'ace-builds/src-noconflict/mode-php';
|
||||
declare module 'ace-builds/src-noconflict/mode-php_laravel_blade';
|
||||
@ -134,12 +143,15 @@ declare module 'ace-builds/src-noconflict/mode-pig';
|
||||
declare module 'ace-builds/src-noconflict/mode-plain_text';
|
||||
declare module 'ace-builds/src-noconflict/mode-powershell';
|
||||
declare module 'ace-builds/src-noconflict/mode-praat';
|
||||
declare module 'ace-builds/src-noconflict/mode-prisma';
|
||||
declare module 'ace-builds/src-noconflict/mode-prolog';
|
||||
declare module 'ace-builds/src-noconflict/mode-properties';
|
||||
declare module 'ace-builds/src-noconflict/mode-protobuf';
|
||||
declare module 'ace-builds/src-noconflict/mode-puppet';
|
||||
declare module 'ace-builds/src-noconflict/mode-python';
|
||||
declare module 'ace-builds/src-noconflict/mode-qml';
|
||||
declare module 'ace-builds/src-noconflict/mode-r';
|
||||
declare module 'ace-builds/src-noconflict/mode-raku';
|
||||
declare module 'ace-builds/src-noconflict/mode-razor';
|
||||
declare module 'ace-builds/src-noconflict/mode-rdoc';
|
||||
declare module 'ace-builds/src-noconflict/mode-red';
|
||||
@ -152,11 +164,13 @@ declare module 'ace-builds/src-noconflict/mode-sass';
|
||||
declare module 'ace-builds/src-noconflict/mode-scad';
|
||||
declare module 'ace-builds/src-noconflict/mode-scala';
|
||||
declare module 'ace-builds/src-noconflict/mode-scheme';
|
||||
declare module 'ace-builds/src-noconflict/mode-scrypt';
|
||||
declare module 'ace-builds/src-noconflict/mode-scss';
|
||||
declare module 'ace-builds/src-noconflict/mode-sh';
|
||||
declare module 'ace-builds/src-noconflict/mode-sjs';
|
||||
declare module 'ace-builds/src-noconflict/mode-slim';
|
||||
declare module 'ace-builds/src-noconflict/mode-smarty';
|
||||
declare module 'ace-builds/src-noconflict/mode-smithy';
|
||||
declare module 'ace-builds/src-noconflict/mode-snippets';
|
||||
declare module 'ace-builds/src-noconflict/mode-soy_template';
|
||||
declare module 'ace-builds/src-noconflict/mode-space';
|
||||
@ -210,6 +224,8 @@ declare module 'ace-builds/src-noconflict/theme-merbivore';
|
||||
declare module 'ace-builds/src-noconflict/theme-merbivore_soft';
|
||||
declare module 'ace-builds/src-noconflict/theme-monokai';
|
||||
declare module 'ace-builds/src-noconflict/theme-mono_industrial';
|
||||
declare module 'ace-builds/src-noconflict/theme-nord_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-one_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-pastel_on_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-solarized_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-solarized_light';
|
||||
@ -228,6 +244,7 @@ declare module 'ace-builds/src-noconflict/snippets/abap';
|
||||
declare module 'ace-builds/src-noconflict/snippets/abc';
|
||||
declare module 'ace-builds/src-noconflict/snippets/actionscript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ada';
|
||||
declare module 'ace-builds/src-noconflict/snippets/alda';
|
||||
declare module 'ace-builds/src-noconflict/snippets/apache_conf';
|
||||
declare module 'ace-builds/src-noconflict/snippets/apex';
|
||||
declare module 'ace-builds/src-noconflict/snippets/applescript';
|
||||
@ -237,7 +254,6 @@ declare module 'ace-builds/src-noconflict/snippets/asl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/assembly_x86';
|
||||
declare module 'ace-builds/src-noconflict/snippets/autohotkey';
|
||||
declare module 'ace-builds/src-noconflict/snippets/batchfile';
|
||||
declare module 'ace-builds/src-noconflict/snippets/bro';
|
||||
declare module 'ace-builds/src-noconflict/snippets/c9search';
|
||||
declare module 'ace-builds/src-noconflict/snippets/cirru';
|
||||
declare module 'ace-builds/src-noconflict/snippets/clojure';
|
||||
@ -295,6 +311,7 @@ declare module 'ace-builds/src-noconflict/snippets/jade';
|
||||
declare module 'ace-builds/src-noconflict/snippets/java';
|
||||
declare module 'ace-builds/src-noconflict/snippets/javascript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/json';
|
||||
declare module 'ace-builds/src-noconflict/snippets/json5';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jsoniq';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jsp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jssm';
|
||||
@ -302,6 +319,7 @@ declare module 'ace-builds/src-noconflict/snippets/jsx';
|
||||
declare module 'ace-builds/src-noconflict/snippets/julia';
|
||||
declare module 'ace-builds/src-noconflict/snippets/kotlin';
|
||||
declare module 'ace-builds/src-noconflict/snippets/latex';
|
||||
declare module 'ace-builds/src-noconflict/snippets/latte';
|
||||
declare module 'ace-builds/src-noconflict/snippets/less';
|
||||
declare module 'ace-builds/src-noconflict/snippets/liquid';
|
||||
declare module 'ace-builds/src-noconflict/snippets/lisp';
|
||||
@ -317,7 +335,9 @@ declare module 'ace-builds/src-noconflict/snippets/markdown';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mask';
|
||||
declare module 'ace-builds/src-noconflict/snippets/matlab';
|
||||
declare module 'ace-builds/src-noconflict/snippets/maze';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mediawiki';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mel';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mips';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mixal';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mushcode';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mysql';
|
||||
@ -325,11 +345,11 @@ declare module 'ace-builds/src-noconflict/snippets/nginx';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nim';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nix';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nsis';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nunjucks';
|
||||
declare module 'ace-builds/src-noconflict/snippets/objectivec';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ocaml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/pascal';
|
||||
declare module 'ace-builds/src-noconflict/snippets/perl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/perl6';
|
||||
declare module 'ace-builds/src-noconflict/snippets/pgsql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/php';
|
||||
declare module 'ace-builds/src-noconflict/snippets/php_laravel_blade';
|
||||
@ -337,12 +357,15 @@ declare module 'ace-builds/src-noconflict/snippets/pig';
|
||||
declare module 'ace-builds/src-noconflict/snippets/plain_text';
|
||||
declare module 'ace-builds/src-noconflict/snippets/powershell';
|
||||
declare module 'ace-builds/src-noconflict/snippets/praat';
|
||||
declare module 'ace-builds/src-noconflict/snippets/prisma';
|
||||
declare module 'ace-builds/src-noconflict/snippets/prolog';
|
||||
declare module 'ace-builds/src-noconflict/snippets/properties';
|
||||
declare module 'ace-builds/src-noconflict/snippets/protobuf';
|
||||
declare module 'ace-builds/src-noconflict/snippets/puppet';
|
||||
declare module 'ace-builds/src-noconflict/snippets/python';
|
||||
declare module 'ace-builds/src-noconflict/snippets/qml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/r';
|
||||
declare module 'ace-builds/src-noconflict/snippets/raku';
|
||||
declare module 'ace-builds/src-noconflict/snippets/razor';
|
||||
declare module 'ace-builds/src-noconflict/snippets/rdoc';
|
||||
declare module 'ace-builds/src-noconflict/snippets/red';
|
||||
@ -355,11 +378,13 @@ declare module 'ace-builds/src-noconflict/snippets/sass';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scad';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scala';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scheme';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scrypt';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scss';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sh';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sjs';
|
||||
declare module 'ace-builds/src-noconflict/snippets/slim';
|
||||
declare module 'ace-builds/src-noconflict/snippets/smarty';
|
||||
declare module 'ace-builds/src-noconflict/snippets/smithy';
|
||||
declare module 'ace-builds/src-noconflict/snippets/snippets';
|
||||
declare module 'ace-builds/src-noconflict/snippets/soy_template';
|
||||
declare module 'ace-builds/src-noconflict/snippets/space';
|
||||
@ -390,4 +415,3 @@ declare module 'ace-builds/src-noconflict/snippets/xml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/xquery';
|
||||
declare module 'ace-builds/src-noconflict/snippets/yaml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/zeek';
|
||||
declare module 'ace-builds/webpack-resolver';
|
||||
|
||||
28
htdocs/includes/ace/ace.d.ts
vendored
28
htdocs/includes/ace/ace.d.ts
vendored
@ -21,10 +21,12 @@ export namespace Ace {
|
||||
getLine(row: number): string;
|
||||
getLines(firstRow: number, lastRow: number): string[];
|
||||
getAllLines(): string[];
|
||||
getLength(): number;
|
||||
getTextRange(range: Range): string;
|
||||
getLinesForRange(range: Range): string[];
|
||||
insert(position: Point, text: string): Point;
|
||||
insertInLine(position: Point, text: string): Point;
|
||||
insertNewLine(position: Point): Point;
|
||||
clippedPos(row: number, column: number): Point;
|
||||
clonePos(pos: Point): Point;
|
||||
pos(row: number, column: number): Point;
|
||||
@ -153,7 +155,7 @@ export namespace Ace {
|
||||
}
|
||||
|
||||
export interface EditSessionOptions {
|
||||
wrap: string | number;
|
||||
wrap: "off" | "free" | "printmargin" | boolean | number;
|
||||
wrapMethod: 'code' | 'text' | 'auto';
|
||||
indentedSoftWrap: boolean;
|
||||
firstLineNumber: number;
|
||||
@ -212,6 +214,7 @@ export namespace Ace {
|
||||
mergeUndoDeltas: true | false | 'always';
|
||||
behavioursEnabled: boolean;
|
||||
wrapBehavioursEnabled: boolean;
|
||||
enableAutoIndent: boolean;
|
||||
autoScrollEditorIntoView: boolean;
|
||||
keyboardHandler: string;
|
||||
placeholder: string;
|
||||
@ -228,7 +231,7 @@ export namespace Ace {
|
||||
range: Range;
|
||||
preserveCase: boolean;
|
||||
regExp: RegExp;
|
||||
wholeWord: string;
|
||||
wholeWord: boolean;
|
||||
caseSensitive: boolean;
|
||||
wrap: boolean;
|
||||
}
|
||||
@ -362,7 +365,7 @@ export namespace Ace {
|
||||
moduleUrl(name: string, component?: string): string;
|
||||
setModuleUrl(name: string, subst: string): string;
|
||||
loadModule(moduleName: string | [string, string],
|
||||
onLoad: (module: any) => void): void;
|
||||
onLoad?: (module: any) => void): void;
|
||||
init(packaged: any): any;
|
||||
defineOptions(obj: any, path: string, options: { [key: string]: any }): Config;
|
||||
resetOptions(obj: any): void;
|
||||
@ -398,6 +401,8 @@ export namespace Ace {
|
||||
export interface EditSession extends EventEmitter, OptionsProvider, Folding {
|
||||
selection: Selection;
|
||||
|
||||
// TODO: define BackgroundTokenizer
|
||||
|
||||
on(name: 'changeFold',
|
||||
callback: (obj: { data: Fold, action: string }) => void): Function;
|
||||
on(name: 'changeScrollLeft', callback: (scrollLeft: number) => void): Function;
|
||||
@ -519,6 +524,8 @@ export namespace Ace {
|
||||
removeKeyboardHandler(handler: KeyboardHandler): boolean;
|
||||
getKeyboardHandler(): KeyboardHandler;
|
||||
getStatusText(): string;
|
||||
onCommandKey(e: any, hashId: number, keyCode: number): boolean;
|
||||
onTextInput(text: string): boolean;
|
||||
}
|
||||
|
||||
interface CommandMap {
|
||||
@ -549,10 +556,17 @@ export namespace Ace {
|
||||
toggleRecording(editor: Editor): void;
|
||||
replay(editor: Editor): void;
|
||||
addCommand(command: Command): void;
|
||||
removeCommand(command: Command, keepCommand?: boolean): void;
|
||||
addCommands(command: Command[]): void;
|
||||
removeCommand(command: Command | string, keepCommand?: boolean): void;
|
||||
removeCommands(command: Command[]): void;
|
||||
bindKey(key: string | { mac?: string, win?: string },
|
||||
command: CommandLike,
|
||||
position?: number): void;
|
||||
bindKeys(keys: {[s: string]: Function}): void;
|
||||
parseKeys(keyPart: string): {key: string, hashId: number};
|
||||
findKeyCommand(hashId: number, keyString: string): string | undefined;
|
||||
handleKeyboard(data: {}, hashId: number, keyString: string, keyCode: string | number): void | {command: string};
|
||||
getStatusText(editor: Editor, data: {}): string;
|
||||
}
|
||||
|
||||
export interface VirtualRenderer extends OptionsProvider, EventEmitter {
|
||||
@ -746,7 +760,7 @@ export namespace Ace {
|
||||
setFontSize(size: string): void;
|
||||
focus(): void;
|
||||
isFocused(): boolean;
|
||||
flur(): void;
|
||||
blur(): void;
|
||||
getSelectedText(): string;
|
||||
getCopyText(): string;
|
||||
execCommand(command: string | string[], args?: any): boolean;
|
||||
@ -844,9 +858,10 @@ export namespace Ace {
|
||||
replace(replacement: string, options?: Partial<SearchOptions>): number;
|
||||
replaceAll(replacement: string, options?: Partial<SearchOptions>): number;
|
||||
getLastSearchOptions(): Partial<SearchOptions>;
|
||||
find(needle: string, options?: Partial<SearchOptions>, animate?: boolean): void;
|
||||
find(needle: string | RegExp, options?: Partial<SearchOptions>, animate?: boolean): Ace.Range | undefined;
|
||||
findNext(options?: Partial<SearchOptions>, animate?: boolean): void;
|
||||
findPrevious(options?: Partial<SearchOptions>, animate?: boolean): void;
|
||||
findAll(needle: string | RegExp, options?: Partial<SearchOptions>, additive?: boolean): number;
|
||||
undo(): void;
|
||||
redo(): void;
|
||||
destroy(): void;
|
||||
@ -857,6 +872,7 @@ export namespace Ace {
|
||||
type CompleterCallback = (error: any, completions: Completion[]) => void;
|
||||
|
||||
interface Completer {
|
||||
identifierRegexps?: Array<RegExp>,
|
||||
getCompletions(editor: Editor,
|
||||
session: EditSession,
|
||||
position: Point,
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<meta name="author" content="Fabian Jakobs">
|
||||
<!--
|
||||
Ace
|
||||
version 1.4.8
|
||||
version 1.4.14
|
||||
commit
|
||||
-->
|
||||
|
||||
@ -21,18 +21,18 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidePanel" style="position:absolute;height:100%;">
|
||||
<div class="toggleButton">
|
||||
<div class="toggleButton" id="optionToggle" role="button" aria-label="Hide Options" tabindex="0">
|
||||
<div></div><div></div><div></div>
|
||||
</div>
|
||||
<a href="https://c9.io" title="Cloud9 IDE | Your code anywhere, anytime">
|
||||
<img id="c9-logo" src="demo/kitchen-sink/logo.png" style="width: 172px;margin: -9px 30px -12px 51px;">
|
||||
<a href="https://c9.io">
|
||||
<img id="c9-logo" alt="Cloud9 IDE | Your code anywhere, anytime" src="demo/kitchen-sink/logo.png" style="width: 172px;margin: -9px 30px -12px 51px;">
|
||||
</a>
|
||||
<div style="position: absolute; overflow: hidden; top:100px; bottom:0">
|
||||
<div id="optionsPanel" style="width: 120%; height:100%; overflow-y: scroll">
|
||||
|
||||
|
||||
<a href="https://ace.c9.io">
|
||||
<img id="ace-logo" src="demo/kitchen-sink/ace-logo.png" style="width: 134px;margin: 46px 0px 4px 66px;">
|
||||
<img id="ace-logo" alt="Ace Website" src="demo/kitchen-sink/ace-logo.png" style="width: 134px;margin: 46px 0px 4px 66px;">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "ace-builds",
|
||||
"main": "./src-noconflict/ace.js",
|
||||
"typings": "ace.d.ts",
|
||||
"version": "1.4.8",
|
||||
"version": "1.4.14",
|
||||
"description": "Ace (Ajax.org Cloud9 Editor)",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -40,16 +40,28 @@ exports.beautify = function(session) {
|
||||
var inBlock = false;
|
||||
var levels = {0: 0};
|
||||
var parents = [];
|
||||
var caseBody = false;
|
||||
|
||||
var trimNext = function() {
|
||||
if (nextToken && nextToken.value && nextToken.type !== 'string.regexp')
|
||||
nextToken.value = nextToken.value.trim();
|
||||
nextToken.value = nextToken.value.replace(/^\s*/, "");
|
||||
};
|
||||
|
||||
|
||||
var trimLine = function() {
|
||||
code = code.replace(/ +$/, "");
|
||||
};
|
||||
var end = code.length - 1;
|
||||
|
||||
while (true) {
|
||||
if (end == 0)
|
||||
break;
|
||||
if (code[end] !== " ")
|
||||
break;
|
||||
|
||||
end = end - 1;
|
||||
}
|
||||
|
||||
code = code.slice(0, end + 1);
|
||||
};
|
||||
|
||||
var trimCode = function() {
|
||||
code = code.trimRight();
|
||||
breakBefore = false;
|
||||
@ -201,8 +213,11 @@ exports.beautify = function(session) {
|
||||
trimLine();
|
||||
if(value === "/>")
|
||||
spaceBefore = true;
|
||||
} else if (token.type === "keyword" && value.match(/^(case|default)$/)) {
|
||||
if (caseBody)
|
||||
unindent = 1;
|
||||
}
|
||||
if (breakBefore && !(token.type.match(/^(comment)$/) && !value.substr(0, 1).match(/^[/#]$/)) && !(token.type.match(/^(string)$/) && !value.substr(0, 1).match(/^['"]$/))) {
|
||||
if (breakBefore && !(token.type.match(/^(comment)$/) && !value.substr(0, 1).match(/^[/#]$/)) && !(token.type.match(/^(string)$/) && !value.substr(0, 1).match(/^['"@]$/))) {
|
||||
|
||||
indent = lastIndent;
|
||||
|
||||
@ -229,16 +244,16 @@ exports.beautify = function(session) {
|
||||
code += tabString;
|
||||
}
|
||||
|
||||
|
||||
if (token.type === "keyword" && value.match(/^(case|default)$/)) {
|
||||
parents[depth] = value;
|
||||
depth++;
|
||||
}
|
||||
|
||||
|
||||
if (token.type === "keyword" && value.match(/^(break)$/)) {
|
||||
if (caseBody === false) {
|
||||
parents[depth] = value;
|
||||
depth++;
|
||||
caseBody = true;
|
||||
}
|
||||
} else if (token.type === "keyword" && value.match(/^(break)$/)) {
|
||||
if(parents[depth-1] && parents[depth-1].match(/^(case|default)$/)) {
|
||||
depth--;
|
||||
caseBody = false;
|
||||
}
|
||||
}
|
||||
if (token.type === "paren.lparen") {
|
||||
@ -264,6 +279,9 @@ exports.beautify = function(session) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (token.type == "text")
|
||||
value = value.replace(/\s+$/, " ");
|
||||
if (spaceBefore && !breakBefore) {
|
||||
trimLine();
|
||||
if (code.substr(-1) !== "\n")
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
define("ace/ext/code_lens",["require","exports","module","ace/line_widgets","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"], function(require, exports, module) {
|
||||
define("ace/ext/code_lens",["require","exports","module","ace/line_widgets","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var LineWidgets = require("../line_widgets").LineWidgets;
|
||||
var event = require("../lib/event");
|
||||
var lang = require("../lib/lang");
|
||||
var dom = require("../lib/dom");
|
||||
|
||||
@ -120,12 +121,14 @@ exports.setLenses = function(session, lenses) {
|
||||
function attachToEditor(editor) {
|
||||
editor.codeLensProviders = [];
|
||||
editor.renderer.on("afterRender", renderWidgets);
|
||||
editor.$codeLensClickHandler = function(e) {
|
||||
var command = e.target.lensCommand;
|
||||
if (command)
|
||||
editor.execCommand(command.id, command.arguments);
|
||||
};
|
||||
editor.container.addEventListener("click", editor.$codeLensClickHandler);
|
||||
if (!editor.$codeLensClickHandler) {
|
||||
editor.$codeLensClickHandler = function(e) {
|
||||
var command = e.target.lensCommand;
|
||||
if (command)
|
||||
editor.execCommand(command.id, command.arguments);
|
||||
};
|
||||
event.addListener(editor.container, "click", editor.$codeLensClickHandler, editor);
|
||||
}
|
||||
editor.$updateLenses = function() {
|
||||
var session = editor.session;
|
||||
if (!session) return;
|
||||
@ -138,8 +141,9 @@ function attachToEditor(editor) {
|
||||
var providersToWaitNum = editor.codeLensProviders.length;
|
||||
var lenses = [];
|
||||
editor.codeLensProviders.forEach(function(provider) {
|
||||
provider.provideCodeLenses(session, function(currentLenses) {
|
||||
currentLenses.forEach(function(lens) {
|
||||
provider.provideCodeLenses(session, function(err, payload) {
|
||||
if (err) return;
|
||||
payload.forEach(function(lens) {
|
||||
lenses.push(lens);
|
||||
});
|
||||
providersToWaitNum--;
|
||||
@ -222,7 +226,7 @@ dom.importCssString("\
|
||||
.ace_dark > .ace_codeLens > a:hover {\
|
||||
color: #4e94ce;\
|
||||
}\
|
||||
", "");
|
||||
", "codelense.css", false);
|
||||
|
||||
}); (function() {
|
||||
window.require(["ace/ext/code_lens"], function(m) {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"], function(require, exports, module) {
|
||||
define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var dom = require("./lib/dom");
|
||||
var oop = require("./lib/oop");
|
||||
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
||||
var lang = require("./lib/lang");
|
||||
@ -144,7 +145,9 @@ var SnippetManager = function() {
|
||||
{regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) {
|
||||
var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function(operator) {
|
||||
return operator.length == 2 ? operator[1] : "\x00";
|
||||
}).split("\x00");
|
||||
}).split("\x00").map(function(value){
|
||||
return {value: value};
|
||||
});
|
||||
stack[0].choices = choices;
|
||||
return [choices[0]];
|
||||
}, next: "start"},
|
||||
@ -615,6 +618,12 @@ var SnippetManager = function() {
|
||||
}
|
||||
snippetMap[scope].push(s);
|
||||
|
||||
if (s.prefix)
|
||||
s.tabTrigger = s.prefix;
|
||||
|
||||
if (!s.content && s.body)
|
||||
s.content = Array.isArray(s.body) ? s.body.join("\n") : s.body;
|
||||
|
||||
if (s.tabTrigger && !s.trigger) {
|
||||
if (!s.guard && /^\w/.test(s.tabTrigger))
|
||||
s.guard = "\\b";
|
||||
@ -631,10 +640,13 @@ var SnippetManager = function() {
|
||||
s.endTriggerRe = new RegExp(s.endTrigger);
|
||||
}
|
||||
|
||||
if (snippets && snippets.content)
|
||||
addSnippet(snippets);
|
||||
else if (Array.isArray(snippets))
|
||||
if (Array.isArray(snippets)) {
|
||||
snippets.forEach(addSnippet);
|
||||
} else {
|
||||
Object.keys(snippets).forEach(function(key) {
|
||||
addSnippet(snippets[key]);
|
||||
});
|
||||
}
|
||||
|
||||
this._signal("registerSnippets", {scope: scope});
|
||||
};
|
||||
@ -684,7 +696,7 @@ var SnippetManager = function() {
|
||||
snippet.tabTrigger = val.match(/^\S*/)[0];
|
||||
if (!snippet.name)
|
||||
snippet.name = val;
|
||||
} else {
|
||||
} else if (key) {
|
||||
snippet[key] = val;
|
||||
}
|
||||
}
|
||||
@ -833,18 +845,17 @@ var TabstopManager = function(editor) {
|
||||
|
||||
this.selectedTabstop = ts;
|
||||
var range = ts.firstNonLinked || ts;
|
||||
if (ts.choices) range.cursor = range.start;
|
||||
if (!this.editor.inVirtualSelectionMode) {
|
||||
var sel = this.editor.multiSelect;
|
||||
sel.toSingleRange(range.clone());
|
||||
sel.toSingleRange(range);
|
||||
for (var i = 0; i < ts.length; i++) {
|
||||
if (ts.hasLinkedRanges && ts[i].linked)
|
||||
continue;
|
||||
sel.addRange(ts[i].clone(), true);
|
||||
}
|
||||
if (sel.ranges[0])
|
||||
sel.addRange(sel.ranges[0].clone());
|
||||
} else {
|
||||
this.editor.selection.setRange(range);
|
||||
this.editor.selection.fromOrientedRange(range);
|
||||
}
|
||||
|
||||
this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
|
||||
@ -971,14 +982,14 @@ var moveRelative = function(point, start) {
|
||||
};
|
||||
|
||||
|
||||
require("./lib/dom").importCssString("\
|
||||
dom.importCssString("\
|
||||
.ace_snippet-marker {\
|
||||
-moz-box-sizing: border-box;\
|
||||
box-sizing: border-box;\
|
||||
background: rgba(194, 193, 208, 0.09);\
|
||||
border: 1px dotted rgba(211, 208, 235, 0.62);\
|
||||
position: absolute;\
|
||||
}");
|
||||
}", "snippets.css", false);
|
||||
|
||||
exports.snippetManager = new SnippetManager();
|
||||
|
||||
|
||||
125
htdocs/includes/ace/src/ext-hardwrap.js
Normal file
125
htdocs/includes/ace/src/ext-hardwrap.js
Normal file
@ -0,0 +1,125 @@
|
||||
define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var Range = require("../range").Range;
|
||||
|
||||
function hardWrap(editor, options) {
|
||||
var max = options.column || editor.getOption("printMarginColumn");
|
||||
var allowMerge = options.allowMerge != false;
|
||||
|
||||
var row = Math.min(options.startRow, options.endRow);
|
||||
var endRow = Math.max(options.startRow, options.endRow);
|
||||
|
||||
var session = editor.session;
|
||||
|
||||
while (row <= endRow) {
|
||||
var line = session.getLine(row);
|
||||
if (line.length > max) {
|
||||
var space = findSpace(line, max, 5);
|
||||
if (space) {
|
||||
var indentation = /^\s*/.exec(line)[0];
|
||||
session.replace(new Range(row,space.start,row,space.end), "\n" + indentation);
|
||||
}
|
||||
endRow++;
|
||||
} else if (allowMerge && /\S/.test(line) && row != endRow) {
|
||||
var nextLine = session.getLine(row + 1);
|
||||
if (nextLine && /\S/.test(nextLine)) {
|
||||
var trimmedLine = line.replace(/\s+$/, "");
|
||||
var trimmedNextLine = nextLine.replace(/^\s+/, "");
|
||||
var mergedLine = trimmedLine + " " + trimmedNextLine;
|
||||
|
||||
var space = findSpace(mergedLine, max, 5);
|
||||
if (space && space.start > trimmedLine.length || mergedLine.length < max) {
|
||||
var replaceRange = new Range(row,trimmedLine.length,row + 1,nextLine.length - trimmedNextLine.length);
|
||||
session.replace(replaceRange, " ");
|
||||
row--;
|
||||
endRow--;
|
||||
} else if (trimmedLine.length < line.length) {
|
||||
session.remove(new Range(row, trimmedLine.length, row, line.length));
|
||||
}
|
||||
}
|
||||
}
|
||||
row++;
|
||||
}
|
||||
|
||||
function findSpace(line, max, min) {
|
||||
if (line.length < max)
|
||||
return;
|
||||
var before = line.slice(0, max);
|
||||
var after = line.slice(max);
|
||||
var spaceAfter = /^(?:(\s+)|(\S+)(\s+))/.exec(after);
|
||||
var spaceBefore = /(?:(\s+)|(\s+)(\S+))$/.exec(before);
|
||||
var start = 0;
|
||||
var end = 0;
|
||||
if (spaceBefore && !spaceBefore[2]) {
|
||||
start = max - spaceBefore[1].length;
|
||||
end = max;
|
||||
}
|
||||
if (spaceAfter && !spaceAfter[2]) {
|
||||
if (!start)
|
||||
start = max;
|
||||
end = max + spaceAfter[1].length;
|
||||
}
|
||||
if (start) {
|
||||
return {
|
||||
start: start,
|
||||
end: end
|
||||
};
|
||||
}
|
||||
if (spaceBefore && spaceBefore[2] && spaceBefore.index > min) {
|
||||
return {
|
||||
start: spaceBefore.index,
|
||||
end: spaceBefore.index + spaceBefore[2].length
|
||||
};
|
||||
}
|
||||
if (spaceAfter && spaceAfter[2]) {
|
||||
start = max + spaceAfter[2].length;
|
||||
return {
|
||||
start: start,
|
||||
end: start + spaceAfter[3].length
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function wrapAfterInput(e) {
|
||||
if (e.command.name == "insertstring" && /\S/.test(e.args)) {
|
||||
var editor = e.editor;
|
||||
var cursor = editor.selection.cursor;
|
||||
if (cursor.column <= editor.renderer.$printMarginColumn) return;
|
||||
var lastDelta = editor.session.$undoManager.$lastDelta;
|
||||
|
||||
hardWrap(editor, {
|
||||
startRow: cursor.row, endRow: cursor.row,
|
||||
allowMerge: false
|
||||
});
|
||||
if (lastDelta != editor.session.$undoManager.$lastDelta)
|
||||
editor.session.markUndoGroup();
|
||||
}
|
||||
}
|
||||
|
||||
var Editor = require("../editor").Editor;
|
||||
require("../config").defineOptions(Editor.prototype, "editor", {
|
||||
hardWrap: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
this.commands.on("afterExec", wrapAfterInput);
|
||||
} else {
|
||||
this.commands.off("afterExec", wrapAfterInput);
|
||||
}
|
||||
},
|
||||
value: false
|
||||
}
|
||||
});
|
||||
|
||||
exports.hardWrap = hardWrap;
|
||||
|
||||
}); (function() {
|
||||
window.require(["ace/ext/hardwrap"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@ -61,7 +61,7 @@ margin: 0px;\
|
||||
.ace_optionsMenuEntry button:hover{\
|
||||
background: #f0f0f0;\
|
||||
}";
|
||||
dom.importCssString(cssText);
|
||||
dom.importCssString(cssText, "settings_menu.css", false);
|
||||
|
||||
module.exports.overlayPage = function overlayPage(editor, contentElement, callback) {
|
||||
var closer = document.createElement('div');
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"], function(require, exports, module) {
|
||||
define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var dom = require("./lib/dom");
|
||||
var oop = require("./lib/oop");
|
||||
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
||||
var lang = require("./lib/lang");
|
||||
@ -144,7 +145,9 @@ var SnippetManager = function() {
|
||||
{regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) {
|
||||
var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function(operator) {
|
||||
return operator.length == 2 ? operator[1] : "\x00";
|
||||
}).split("\x00");
|
||||
}).split("\x00").map(function(value){
|
||||
return {value: value};
|
||||
});
|
||||
stack[0].choices = choices;
|
||||
return [choices[0]];
|
||||
}, next: "start"},
|
||||
@ -615,6 +618,12 @@ var SnippetManager = function() {
|
||||
}
|
||||
snippetMap[scope].push(s);
|
||||
|
||||
if (s.prefix)
|
||||
s.tabTrigger = s.prefix;
|
||||
|
||||
if (!s.content && s.body)
|
||||
s.content = Array.isArray(s.body) ? s.body.join("\n") : s.body;
|
||||
|
||||
if (s.tabTrigger && !s.trigger) {
|
||||
if (!s.guard && /^\w/.test(s.tabTrigger))
|
||||
s.guard = "\\b";
|
||||
@ -631,10 +640,13 @@ var SnippetManager = function() {
|
||||
s.endTriggerRe = new RegExp(s.endTrigger);
|
||||
}
|
||||
|
||||
if (snippets && snippets.content)
|
||||
addSnippet(snippets);
|
||||
else if (Array.isArray(snippets))
|
||||
if (Array.isArray(snippets)) {
|
||||
snippets.forEach(addSnippet);
|
||||
} else {
|
||||
Object.keys(snippets).forEach(function(key) {
|
||||
addSnippet(snippets[key]);
|
||||
});
|
||||
}
|
||||
|
||||
this._signal("registerSnippets", {scope: scope});
|
||||
};
|
||||
@ -684,7 +696,7 @@ var SnippetManager = function() {
|
||||
snippet.tabTrigger = val.match(/^\S*/)[0];
|
||||
if (!snippet.name)
|
||||
snippet.name = val;
|
||||
} else {
|
||||
} else if (key) {
|
||||
snippet[key] = val;
|
||||
}
|
||||
}
|
||||
@ -833,18 +845,17 @@ var TabstopManager = function(editor) {
|
||||
|
||||
this.selectedTabstop = ts;
|
||||
var range = ts.firstNonLinked || ts;
|
||||
if (ts.choices) range.cursor = range.start;
|
||||
if (!this.editor.inVirtualSelectionMode) {
|
||||
var sel = this.editor.multiSelect;
|
||||
sel.toSingleRange(range.clone());
|
||||
sel.toSingleRange(range);
|
||||
for (var i = 0; i < ts.length; i++) {
|
||||
if (ts.hasLinkedRanges && ts[i].linked)
|
||||
continue;
|
||||
sel.addRange(ts[i].clone(), true);
|
||||
}
|
||||
if (sel.ranges[0])
|
||||
sel.addRange(sel.ranges[0].clone());
|
||||
} else {
|
||||
this.editor.selection.setRange(range);
|
||||
this.editor.selection.fromOrientedRange(range);
|
||||
}
|
||||
|
||||
this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
|
||||
@ -971,14 +982,14 @@ var moveRelative = function(point, start) {
|
||||
};
|
||||
|
||||
|
||||
require("./lib/dom").importCssString("\
|
||||
dom.importCssString("\
|
||||
.ace_snippet-marker {\
|
||||
-moz-box-sizing: border-box;\
|
||||
box-sizing: border-box;\
|
||||
background: rgba(194, 193, 208, 0.09);\
|
||||
border: 1px dotted rgba(211, 208, 235, 0.62);\
|
||||
position: absolute;\
|
||||
}");
|
||||
}", "snippets.css", false);
|
||||
|
||||
exports.snippetManager = new SnippetManager();
|
||||
|
||||
@ -1330,7 +1341,7 @@ dom.importCssString("\
|
||||
line-height: 1.4;\
|
||||
background: #25282c;\
|
||||
color: #c1c1c1;\
|
||||
}", "autocompletion.css");
|
||||
}", "autocompletion.css", false);
|
||||
|
||||
exports.AcePopup = AcePopup;
|
||||
exports.$singleLineEditor = $singleLineEditor;
|
||||
@ -1476,6 +1487,7 @@ var Autocomplete = function() {
|
||||
} else if (keepPopupPosition && !prefix) {
|
||||
this.detach();
|
||||
}
|
||||
this.changeTimer.cancel();
|
||||
};
|
||||
|
||||
this.detach = function() {
|
||||
@ -1538,13 +1550,15 @@ var Autocomplete = function() {
|
||||
if (!data)
|
||||
return false;
|
||||
|
||||
var completions = this.completions;
|
||||
this.editor.startOperation({command: {name: "insertMatch"}});
|
||||
if (data.completer && data.completer.insertMatch) {
|
||||
data.completer.insertMatch(this.editor, data);
|
||||
} else {
|
||||
if (this.completions.filterText) {
|
||||
if (completions.filterText) {
|
||||
var ranges = this.editor.selection.getAllRanges();
|
||||
for (var i = 0, range; range = ranges[i]; i++) {
|
||||
range.start.column -= this.completions.filterText.length;
|
||||
range.start.column -= completions.filterText.length;
|
||||
this.editor.session.remove(range);
|
||||
}
|
||||
}
|
||||
@ -1553,7 +1567,9 @@ var Autocomplete = function() {
|
||||
else
|
||||
this.editor.execCommand("insertstring", data.value || data);
|
||||
}
|
||||
this.detach();
|
||||
if (this.completions == completions)
|
||||
this.detach();
|
||||
this.editor.endOperation();
|
||||
};
|
||||
|
||||
|
||||
@ -1649,19 +1665,14 @@ var Autocomplete = function() {
|
||||
return this.openPopup(this.editor, "", keepPopupPosition);
|
||||
}
|
||||
var _id = this.gatherCompletionsId;
|
||||
this.gatherCompletions(this.editor, function(err, results) {
|
||||
var detachIfFinished = function() {
|
||||
if (!results.finished) return;
|
||||
return this.detach();
|
||||
}.bind(this);
|
||||
var detachIfFinished = function(results) {
|
||||
if (!results.finished) return;
|
||||
return this.detach();
|
||||
}.bind(this);
|
||||
|
||||
var processResults = function(results) {
|
||||
var prefix = results.prefix;
|
||||
var matches = results && results.matches;
|
||||
|
||||
if (!matches || !matches.length)
|
||||
return detachIfFinished();
|
||||
if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId)
|
||||
return;
|
||||
var matches = results.matches;
|
||||
|
||||
this.completions = new FilteredList(matches);
|
||||
|
||||
@ -1671,14 +1682,39 @@ var Autocomplete = function() {
|
||||
this.completions.setFilter(prefix);
|
||||
var filtered = this.completions.filtered;
|
||||
if (!filtered.length)
|
||||
return detachIfFinished();
|
||||
return detachIfFinished(results);
|
||||
if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet)
|
||||
return detachIfFinished();
|
||||
return detachIfFinished(results);
|
||||
if (this.autoInsert && filtered.length == 1 && results.finished)
|
||||
return this.insertMatch(filtered[0]);
|
||||
|
||||
this.openPopup(this.editor, prefix, keepPopupPosition);
|
||||
}.bind(this);
|
||||
|
||||
var isImmediate = true;
|
||||
var immediateResults = null;
|
||||
this.gatherCompletions(this.editor, function(err, results) {
|
||||
var prefix = results.prefix;
|
||||
var matches = results && results.matches;
|
||||
|
||||
if (!matches || !matches.length)
|
||||
return detachIfFinished(results);
|
||||
if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId)
|
||||
return;
|
||||
if (isImmediate) {
|
||||
immediateResults = results;
|
||||
return;
|
||||
}
|
||||
|
||||
processResults(results);
|
||||
}.bind(this));
|
||||
|
||||
isImmediate = false;
|
||||
if (immediateResults) {
|
||||
var results = immediateResults;
|
||||
immediateResults = null;
|
||||
processResults(results);
|
||||
}
|
||||
};
|
||||
|
||||
this.cancelContextMenu = function() {
|
||||
@ -2032,31 +2068,33 @@ var onChangeMode = function(e, editor) {
|
||||
};
|
||||
|
||||
var loadSnippetsForMode = function(mode) {
|
||||
var id = mode.$id;
|
||||
if (typeof mode == "string")
|
||||
mode = config.$modes[mode];
|
||||
if (!mode)
|
||||
return;
|
||||
if (!snippetManager.files)
|
||||
snippetManager.files = {};
|
||||
loadSnippetFile(id);
|
||||
|
||||
loadSnippetFile(mode.$id, mode.snippetFileId);
|
||||
if (mode.modes)
|
||||
mode.modes.forEach(loadSnippetsForMode);
|
||||
};
|
||||
|
||||
var loadSnippetFile = function(id) {
|
||||
if (!id || snippetManager.files[id])
|
||||
var loadSnippetFile = function(id, snippetFilePath) {
|
||||
if (!snippetFilePath || !id || snippetManager.files[id])
|
||||
return;
|
||||
var snippetFilePath = id.replace("mode", "snippets");
|
||||
snippetManager.files[id] = {};
|
||||
config.loadModule(snippetFilePath, function(m) {
|
||||
if (m) {
|
||||
snippetManager.files[id] = m;
|
||||
if (!m.snippets && m.snippetText)
|
||||
m.snippets = snippetManager.parseSnippetFile(m.snippetText);
|
||||
snippetManager.register(m.snippets || [], m.scope);
|
||||
if (m.includeScopes) {
|
||||
snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes;
|
||||
m.includeScopes.forEach(function(x) {
|
||||
loadSnippetFile("ace/mode/" + x);
|
||||
});
|
||||
}
|
||||
if (!m) return;
|
||||
snippetManager.files[id] = m;
|
||||
if (!m.snippets && m.snippetText)
|
||||
m.snippets = snippetManager.parseSnippetFile(m.snippetText);
|
||||
snippetManager.register(m.snippets || [], m.scope);
|
||||
if (m.includeScopes) {
|
||||
snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes;
|
||||
m.includeScopes.forEach(function(x) {
|
||||
loadSnippetsForMode("ace/mode/" + x);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@ -39,22 +39,23 @@ var supportedModes = {
|
||||
ABC: ["abc"],
|
||||
ActionScript:["as"],
|
||||
ADA: ["ada|adb"],
|
||||
Alda: ["alda"],
|
||||
Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
ASL: ["dsl|asl"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
Apex: ["apex|cls|trigger|tgr"],
|
||||
AQL: ["aql"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
ASL: ["dsl|asl|asl.json"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
BatchFile: ["bat|cmd"],
|
||||
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
|
||||
C9Search: ["c9search_results"],
|
||||
Crystal: ["cr"],
|
||||
Cirru: ["cirru|cr"],
|
||||
Clojure: ["clj|cljs"],
|
||||
Cobol: ["CBL|COB"],
|
||||
coffee: ["coffee|cf|cson|^Cakefile"],
|
||||
ColdFusion: ["cfm"],
|
||||
Crystal: ["cr"],
|
||||
CSharp: ["cs"],
|
||||
Csound_Document: ["csd"],
|
||||
Csound_Orchestra: ["orc"],
|
||||
@ -101,8 +102,8 @@ var supportedModes = {
|
||||
Jade: ["jade|pug"],
|
||||
Java: ["java"],
|
||||
JavaScript: ["js|jsm|jsx"],
|
||||
JSON5: ["json5"],
|
||||
JSON: ["json"],
|
||||
JSON5: ["json5"],
|
||||
JSONiq: ["jq"],
|
||||
JSP: ["jsp"],
|
||||
JSSM: ["jssm|jssm_state"],
|
||||
@ -110,6 +111,7 @@ var supportedModes = {
|
||||
Julia: ["jl"],
|
||||
Kotlin: ["kt|kts"],
|
||||
LaTeX: ["tex|latex|ltx|bib"],
|
||||
Latte: ["latte"],
|
||||
LESS: ["less"],
|
||||
Liquid: ["liquid"],
|
||||
Lisp: ["lisp"],
|
||||
@ -124,32 +126,36 @@ var supportedModes = {
|
||||
Mask: ["mask"],
|
||||
MATLAB: ["matlab"],
|
||||
Maze: ["mz"],
|
||||
MediaWiki: ["wiki|mediawiki"],
|
||||
MEL: ["mel"],
|
||||
MIPS: ["s|asm"],
|
||||
MIXAL: ["mixal"],
|
||||
MUSHCode: ["mc|mush"],
|
||||
MySQL: ["mysql"],
|
||||
Nginx: ["nginx|conf"],
|
||||
Nix: ["nix"],
|
||||
Nim: ["nim"],
|
||||
Nix: ["nix"],
|
||||
NSIS: ["nsi|nsh"],
|
||||
Nunjucks: ["nunjucks|nunjs|nj|njk"],
|
||||
ObjectiveC: ["m|mm"],
|
||||
OCaml: ["ml|mli"],
|
||||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
Perl6: ["p6|pl6|pm6"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Puppet: ["epp|pp"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
Praat: ["praat|praatscript|psc|proc"],
|
||||
Prisma: ["prisma"],
|
||||
Prolog: ["plg|prolog"],
|
||||
Properties: ["properties"],
|
||||
Protobuf: ["proto"],
|
||||
Puppet: ["epp|pp"],
|
||||
Python: ["py"],
|
||||
QML: ["qml"],
|
||||
R: ["r"],
|
||||
Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"],
|
||||
Razor: ["cshtml|asp"],
|
||||
RDoc: ["Rd"],
|
||||
Red: ["red|reds"],
|
||||
@ -161,11 +167,13 @@ var supportedModes = {
|
||||
SCAD: ["scad"],
|
||||
Scala: ["scala|sbt"],
|
||||
Scheme: ["scm|sm|rkt|oak|scheme"],
|
||||
Scrypt: ["scrypt"],
|
||||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
Smithy: ["smithy"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
Space: ["space"],
|
||||
@ -181,7 +189,7 @@ var supportedModes = {
|
||||
Textile: ["textile"],
|
||||
Toml: ["toml"],
|
||||
TSX: ["tsx"],
|
||||
Twig: ["latte|twig|swig"],
|
||||
Twig: ["twig|swig"],
|
||||
Typescript: ["ts|typescript|str"],
|
||||
Vala: ["vala"],
|
||||
VBScript: ["vbs|vb"],
|
||||
@ -213,6 +221,7 @@ var nameOverrides = {
|
||||
Perl6: "Perl 6",
|
||||
AutoHotKey: "AutoHotkey / AutoIt"
|
||||
};
|
||||
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
var data = supportedModes[name];
|
||||
|
||||
@ -61,7 +61,7 @@ margin: 0px;\
|
||||
.ace_optionsMenuEntry button:hover{\
|
||||
background: #f0f0f0;\
|
||||
}";
|
||||
dom.importCssString(cssText);
|
||||
dom.importCssString(cssText, "settings_menu.css", false);
|
||||
|
||||
module.exports.overlayPage = function overlayPage(editor, contentElement, callback) {
|
||||
var closer = document.createElement('div');
|
||||
@ -160,22 +160,23 @@ var supportedModes = {
|
||||
ABC: ["abc"],
|
||||
ActionScript:["as"],
|
||||
ADA: ["ada|adb"],
|
||||
Alda: ["alda"],
|
||||
Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
ASL: ["dsl|asl"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
Apex: ["apex|cls|trigger|tgr"],
|
||||
AQL: ["aql"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
ASL: ["dsl|asl|asl.json"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
BatchFile: ["bat|cmd"],
|
||||
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
|
||||
C9Search: ["c9search_results"],
|
||||
Crystal: ["cr"],
|
||||
Cirru: ["cirru|cr"],
|
||||
Clojure: ["clj|cljs"],
|
||||
Cobol: ["CBL|COB"],
|
||||
coffee: ["coffee|cf|cson|^Cakefile"],
|
||||
ColdFusion: ["cfm"],
|
||||
Crystal: ["cr"],
|
||||
CSharp: ["cs"],
|
||||
Csound_Document: ["csd"],
|
||||
Csound_Orchestra: ["orc"],
|
||||
@ -222,8 +223,8 @@ var supportedModes = {
|
||||
Jade: ["jade|pug"],
|
||||
Java: ["java"],
|
||||
JavaScript: ["js|jsm|jsx"],
|
||||
JSON5: ["json5"],
|
||||
JSON: ["json"],
|
||||
JSON5: ["json5"],
|
||||
JSONiq: ["jq"],
|
||||
JSP: ["jsp"],
|
||||
JSSM: ["jssm|jssm_state"],
|
||||
@ -231,6 +232,7 @@ var supportedModes = {
|
||||
Julia: ["jl"],
|
||||
Kotlin: ["kt|kts"],
|
||||
LaTeX: ["tex|latex|ltx|bib"],
|
||||
Latte: ["latte"],
|
||||
LESS: ["less"],
|
||||
Liquid: ["liquid"],
|
||||
Lisp: ["lisp"],
|
||||
@ -245,32 +247,36 @@ var supportedModes = {
|
||||
Mask: ["mask"],
|
||||
MATLAB: ["matlab"],
|
||||
Maze: ["mz"],
|
||||
MediaWiki: ["wiki|mediawiki"],
|
||||
MEL: ["mel"],
|
||||
MIPS: ["s|asm"],
|
||||
MIXAL: ["mixal"],
|
||||
MUSHCode: ["mc|mush"],
|
||||
MySQL: ["mysql"],
|
||||
Nginx: ["nginx|conf"],
|
||||
Nix: ["nix"],
|
||||
Nim: ["nim"],
|
||||
Nix: ["nix"],
|
||||
NSIS: ["nsi|nsh"],
|
||||
Nunjucks: ["nunjucks|nunjs|nj|njk"],
|
||||
ObjectiveC: ["m|mm"],
|
||||
OCaml: ["ml|mli"],
|
||||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
Perl6: ["p6|pl6|pm6"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Puppet: ["epp|pp"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
Praat: ["praat|praatscript|psc|proc"],
|
||||
Prisma: ["prisma"],
|
||||
Prolog: ["plg|prolog"],
|
||||
Properties: ["properties"],
|
||||
Protobuf: ["proto"],
|
||||
Puppet: ["epp|pp"],
|
||||
Python: ["py"],
|
||||
QML: ["qml"],
|
||||
R: ["r"],
|
||||
Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"],
|
||||
Razor: ["cshtml|asp"],
|
||||
RDoc: ["Rd"],
|
||||
Red: ["red|reds"],
|
||||
@ -282,11 +288,13 @@ var supportedModes = {
|
||||
SCAD: ["scad"],
|
||||
Scala: ["scala|sbt"],
|
||||
Scheme: ["scm|sm|rkt|oak|scheme"],
|
||||
Scrypt: ["scrypt"],
|
||||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
Smithy: ["smithy"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
Space: ["space"],
|
||||
@ -302,7 +310,7 @@ var supportedModes = {
|
||||
Textile: ["textile"],
|
||||
Toml: ["toml"],
|
||||
TSX: ["tsx"],
|
||||
Twig: ["latte|twig|swig"],
|
||||
Twig: ["twig|swig"],
|
||||
Typescript: ["ts|typescript|str"],
|
||||
Vala: ["vala"],
|
||||
VBScript: ["vbs|vb"],
|
||||
@ -334,6 +342,7 @@ var nameOverrides = {
|
||||
Perl6: "Perl 6",
|
||||
AutoHotKey: "AutoHotkey / AutoIt"
|
||||
};
|
||||
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
var data = supportedModes[name];
|
||||
@ -367,7 +376,7 @@ var themeData = [
|
||||
["Solarized Light"],
|
||||
["TextMate" ],
|
||||
["Tomorrow" ],
|
||||
["XCode" ],
|
||||
["Xcode" ],
|
||||
["Kuroir"],
|
||||
["KatzenMilch"],
|
||||
["SQL Server" ,"sqlserver" , "light"],
|
||||
@ -384,6 +393,8 @@ var themeData = [
|
||||
["Merbivore Soft" ,"merbivore_soft" , "dark"],
|
||||
["Mono Industrial" ,"mono_industrial" , "dark"],
|
||||
["Monokai" ,"monokai" , "dark"],
|
||||
["Nord Dark" ,"nord_dark" , "dark"],
|
||||
["One Dark" ,"one_dark" , "dark"],
|
||||
["Pastel on dark" ,"pastel_on_dark" , "dark"],
|
||||
["Solarized Dark" ,"solarized_dark" , "dark"],
|
||||
["Terminal" ,"terminal" , "dark"],
|
||||
@ -498,6 +509,7 @@ var optionGroups = {
|
||||
"Soft Tabs": [{
|
||||
path: "useSoftTabs"
|
||||
}, {
|
||||
ariaLabel: "Tab Size",
|
||||
path: "tabSize",
|
||||
type: "number",
|
||||
values: [2, 3, 4, 8, 16]
|
||||
@ -519,6 +531,12 @@ var optionGroups = {
|
||||
"Enable Behaviours": {
|
||||
path: "behavioursEnabled"
|
||||
},
|
||||
"Wrap with quotes": {
|
||||
path: "wrapBehavioursEnabled"
|
||||
},
|
||||
"Enable Auto Indent": {
|
||||
path: "enableAutoIndent"
|
||||
},
|
||||
"Full Line Selection": {
|
||||
type: "checkbox",
|
||||
values: "text|line",
|
||||
@ -533,11 +551,12 @@ var optionGroups = {
|
||||
"Show Indent Guides": {
|
||||
path: "displayIndentGuides"
|
||||
},
|
||||
"Persistent Scrollbar": [{
|
||||
"Persistent HScrollbar": {
|
||||
path: "hScrollBarAlwaysVisible"
|
||||
}, {
|
||||
},
|
||||
"Persistent VScrollbar": {
|
||||
path: "vScrollBarAlwaysVisible"
|
||||
}],
|
||||
},
|
||||
"Animate scrolling": {
|
||||
path: "animatedScroll"
|
||||
},
|
||||
@ -556,6 +575,7 @@ var optionGroups = {
|
||||
"Show Print Margin": [{
|
||||
path: "showPrintMargin"
|
||||
}, {
|
||||
ariaLabel: "Print Margin",
|
||||
type: "number",
|
||||
path: "printMarginColumn"
|
||||
}],
|
||||
@ -618,10 +638,10 @@ var OptionPanel = function(editor, element) {
|
||||
|
||||
this.render = function() {
|
||||
this.container.innerHTML = "";
|
||||
buildDom(["table", {id: "controls"},
|
||||
buildDom(["table", {role: "presentation", id: "controls"},
|
||||
this.renderOptionGroup(optionGroups.Main),
|
||||
["tr", null, ["td", {colspan: 2},
|
||||
["table", {id: "more-controls"},
|
||||
["table", {role: "presentation", id: "more-controls"},
|
||||
this.renderOptionGroup(optionGroups.More)
|
||||
]
|
||||
]],
|
||||
@ -664,17 +684,20 @@ var OptionPanel = function(editor, element) {
|
||||
}
|
||||
|
||||
if (option.type == "buttonBar") {
|
||||
control = ["div", option.items.map(function(item) {
|
||||
control = ["div", {role: "group", "aria-labelledby": option.path + "-label"}, option.items.map(function(item) {
|
||||
return ["button", {
|
||||
value: item.value,
|
||||
ace_selected_button: value == item.value,
|
||||
'aria-pressed': value == item.value,
|
||||
onclick: function() {
|
||||
self.setOption(option, item.value);
|
||||
var nodes = this.parentNode.querySelectorAll("[ace_selected_button]");
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
nodes[i].removeAttribute("ace_selected_button");
|
||||
nodes[i].setAttribute("aria-pressed", false);
|
||||
}
|
||||
this.setAttribute("ace_selected_button", true);
|
||||
this.setAttribute("aria-pressed", true);
|
||||
}
|
||||
}, item.desc || item.caption || item.name];
|
||||
})];
|
||||
@ -682,6 +705,11 @@ var OptionPanel = function(editor, element) {
|
||||
control = ["input", {type: "number", value: value || option.defaultValue, style:"width:3em", oninput: function() {
|
||||
self.setOption(option, parseInt(this.value));
|
||||
}}];
|
||||
if (option.ariaLabel) {
|
||||
control[1]["aria-label"] = option.ariaLabel;
|
||||
} else {
|
||||
control[1].id = key;
|
||||
}
|
||||
if (option.defaults) {
|
||||
control = [control, option.defaults.map(function(item) {
|
||||
return ["button", {onclick: function() {
|
||||
@ -725,11 +753,13 @@ var OptionPanel = function(editor, element) {
|
||||
this.renderOption = function(key, option) {
|
||||
if (option.path && !option.onchange && !this.editor.$options[option.path])
|
||||
return;
|
||||
this.options[option.path] = option;
|
||||
var safeKey = "-" + option.path;
|
||||
var path = Array.isArray(option) ? option[0].path : option.path;
|
||||
this.options[path] = option;
|
||||
var safeKey = "-" + path;
|
||||
var safeId = path + "-label";
|
||||
var control = this.renderOptionControl(safeKey, option);
|
||||
return ["tr", {class: "ace_optionsMenuEntry"}, ["td",
|
||||
["label", {for: safeKey}, key]
|
||||
["label", {for: safeKey, id: safeId}, key]
|
||||
], ["td", control]];
|
||||
};
|
||||
|
||||
|
||||
@ -364,7 +364,7 @@ dom.importCssString("\
|
||||
line-height: 1.4;\
|
||||
background: #25282c;\
|
||||
color: #c1c1c1;\
|
||||
}", "autocompletion.css");
|
||||
}", "autocompletion.css", false);
|
||||
|
||||
exports.AcePopup = AcePopup;
|
||||
exports.$singleLineEditor = $singleLineEditor;
|
||||
@ -430,8 +430,9 @@ exports.getCompletionPrefix = function (editor) {
|
||||
|
||||
});
|
||||
|
||||
define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"], function(require, exports, module) {
|
||||
define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var dom = require("./lib/dom");
|
||||
var oop = require("./lib/oop");
|
||||
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
||||
var lang = require("./lib/lang");
|
||||
@ -576,7 +577,9 @@ var SnippetManager = function() {
|
||||
{regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) {
|
||||
var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function(operator) {
|
||||
return operator.length == 2 ? operator[1] : "\x00";
|
||||
}).split("\x00");
|
||||
}).split("\x00").map(function(value){
|
||||
return {value: value};
|
||||
});
|
||||
stack[0].choices = choices;
|
||||
return [choices[0]];
|
||||
}, next: "start"},
|
||||
@ -1047,6 +1050,12 @@ var SnippetManager = function() {
|
||||
}
|
||||
snippetMap[scope].push(s);
|
||||
|
||||
if (s.prefix)
|
||||
s.tabTrigger = s.prefix;
|
||||
|
||||
if (!s.content && s.body)
|
||||
s.content = Array.isArray(s.body) ? s.body.join("\n") : s.body;
|
||||
|
||||
if (s.tabTrigger && !s.trigger) {
|
||||
if (!s.guard && /^\w/.test(s.tabTrigger))
|
||||
s.guard = "\\b";
|
||||
@ -1063,10 +1072,13 @@ var SnippetManager = function() {
|
||||
s.endTriggerRe = new RegExp(s.endTrigger);
|
||||
}
|
||||
|
||||
if (snippets && snippets.content)
|
||||
addSnippet(snippets);
|
||||
else if (Array.isArray(snippets))
|
||||
if (Array.isArray(snippets)) {
|
||||
snippets.forEach(addSnippet);
|
||||
} else {
|
||||
Object.keys(snippets).forEach(function(key) {
|
||||
addSnippet(snippets[key]);
|
||||
});
|
||||
}
|
||||
|
||||
this._signal("registerSnippets", {scope: scope});
|
||||
};
|
||||
@ -1116,7 +1128,7 @@ var SnippetManager = function() {
|
||||
snippet.tabTrigger = val.match(/^\S*/)[0];
|
||||
if (!snippet.name)
|
||||
snippet.name = val;
|
||||
} else {
|
||||
} else if (key) {
|
||||
snippet[key] = val;
|
||||
}
|
||||
}
|
||||
@ -1265,18 +1277,17 @@ var TabstopManager = function(editor) {
|
||||
|
||||
this.selectedTabstop = ts;
|
||||
var range = ts.firstNonLinked || ts;
|
||||
if (ts.choices) range.cursor = range.start;
|
||||
if (!this.editor.inVirtualSelectionMode) {
|
||||
var sel = this.editor.multiSelect;
|
||||
sel.toSingleRange(range.clone());
|
||||
sel.toSingleRange(range);
|
||||
for (var i = 0; i < ts.length; i++) {
|
||||
if (ts.hasLinkedRanges && ts[i].linked)
|
||||
continue;
|
||||
sel.addRange(ts[i].clone(), true);
|
||||
}
|
||||
if (sel.ranges[0])
|
||||
sel.addRange(sel.ranges[0].clone());
|
||||
} else {
|
||||
this.editor.selection.setRange(range);
|
||||
this.editor.selection.fromOrientedRange(range);
|
||||
}
|
||||
|
||||
this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
|
||||
@ -1403,14 +1414,14 @@ var moveRelative = function(point, start) {
|
||||
};
|
||||
|
||||
|
||||
require("./lib/dom").importCssString("\
|
||||
dom.importCssString("\
|
||||
.ace_snippet-marker {\
|
||||
-moz-box-sizing: border-box;\
|
||||
box-sizing: border-box;\
|
||||
background: rgba(194, 193, 208, 0.09);\
|
||||
border: 1px dotted rgba(211, 208, 235, 0.62);\
|
||||
position: absolute;\
|
||||
}");
|
||||
}", "snippets.css", false);
|
||||
|
||||
exports.snippetManager = new SnippetManager();
|
||||
|
||||
@ -1507,6 +1518,7 @@ var Autocomplete = function() {
|
||||
} else if (keepPopupPosition && !prefix) {
|
||||
this.detach();
|
||||
}
|
||||
this.changeTimer.cancel();
|
||||
};
|
||||
|
||||
this.detach = function() {
|
||||
@ -1569,13 +1581,15 @@ var Autocomplete = function() {
|
||||
if (!data)
|
||||
return false;
|
||||
|
||||
var completions = this.completions;
|
||||
this.editor.startOperation({command: {name: "insertMatch"}});
|
||||
if (data.completer && data.completer.insertMatch) {
|
||||
data.completer.insertMatch(this.editor, data);
|
||||
} else {
|
||||
if (this.completions.filterText) {
|
||||
if (completions.filterText) {
|
||||
var ranges = this.editor.selection.getAllRanges();
|
||||
for (var i = 0, range; range = ranges[i]; i++) {
|
||||
range.start.column -= this.completions.filterText.length;
|
||||
range.start.column -= completions.filterText.length;
|
||||
this.editor.session.remove(range);
|
||||
}
|
||||
}
|
||||
@ -1584,7 +1598,9 @@ var Autocomplete = function() {
|
||||
else
|
||||
this.editor.execCommand("insertstring", data.value || data);
|
||||
}
|
||||
this.detach();
|
||||
if (this.completions == completions)
|
||||
this.detach();
|
||||
this.editor.endOperation();
|
||||
};
|
||||
|
||||
|
||||
@ -1680,19 +1696,14 @@ var Autocomplete = function() {
|
||||
return this.openPopup(this.editor, "", keepPopupPosition);
|
||||
}
|
||||
var _id = this.gatherCompletionsId;
|
||||
this.gatherCompletions(this.editor, function(err, results) {
|
||||
var detachIfFinished = function() {
|
||||
if (!results.finished) return;
|
||||
return this.detach();
|
||||
}.bind(this);
|
||||
var detachIfFinished = function(results) {
|
||||
if (!results.finished) return;
|
||||
return this.detach();
|
||||
}.bind(this);
|
||||
|
||||
var processResults = function(results) {
|
||||
var prefix = results.prefix;
|
||||
var matches = results && results.matches;
|
||||
|
||||
if (!matches || !matches.length)
|
||||
return detachIfFinished();
|
||||
if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId)
|
||||
return;
|
||||
var matches = results.matches;
|
||||
|
||||
this.completions = new FilteredList(matches);
|
||||
|
||||
@ -1702,14 +1713,39 @@ var Autocomplete = function() {
|
||||
this.completions.setFilter(prefix);
|
||||
var filtered = this.completions.filtered;
|
||||
if (!filtered.length)
|
||||
return detachIfFinished();
|
||||
return detachIfFinished(results);
|
||||
if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet)
|
||||
return detachIfFinished();
|
||||
return detachIfFinished(results);
|
||||
if (this.autoInsert && filtered.length == 1 && results.finished)
|
||||
return this.insertMatch(filtered[0]);
|
||||
|
||||
this.openPopup(this.editor, prefix, keepPopupPosition);
|
||||
}.bind(this);
|
||||
|
||||
var isImmediate = true;
|
||||
var immediateResults = null;
|
||||
this.gatherCompletions(this.editor, function(err, results) {
|
||||
var prefix = results.prefix;
|
||||
var matches = results && results.matches;
|
||||
|
||||
if (!matches || !matches.length)
|
||||
return detachIfFinished(results);
|
||||
if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId)
|
||||
return;
|
||||
if (isImmediate) {
|
||||
immediateResults = results;
|
||||
return;
|
||||
}
|
||||
|
||||
processResults(results);
|
||||
}.bind(this));
|
||||
|
||||
isImmediate = false;
|
||||
if (immediateResults) {
|
||||
var results = immediateResults;
|
||||
immediateResults = null;
|
||||
processResults(results);
|
||||
}
|
||||
};
|
||||
|
||||
this.cancelContextMenu = function() {
|
||||
@ -1998,7 +2034,7 @@ margin: 0px;\
|
||||
.ace_optionsMenuEntry button:hover{\
|
||||
background: #f0f0f0;\
|
||||
}";
|
||||
dom.importCssString(cssText);
|
||||
dom.importCssString(cssText, "settings_menu.css", false);
|
||||
|
||||
module.exports.overlayPage = function overlayPage(editor, contentElement, callback) {
|
||||
var closer = document.createElement('div');
|
||||
@ -2097,22 +2133,23 @@ var supportedModes = {
|
||||
ABC: ["abc"],
|
||||
ActionScript:["as"],
|
||||
ADA: ["ada|adb"],
|
||||
Alda: ["alda"],
|
||||
Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
ASL: ["dsl|asl"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
Apex: ["apex|cls|trigger|tgr"],
|
||||
AQL: ["aql"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
ASL: ["dsl|asl|asl.json"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
BatchFile: ["bat|cmd"],
|
||||
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
|
||||
C9Search: ["c9search_results"],
|
||||
Crystal: ["cr"],
|
||||
Cirru: ["cirru|cr"],
|
||||
Clojure: ["clj|cljs"],
|
||||
Cobol: ["CBL|COB"],
|
||||
coffee: ["coffee|cf|cson|^Cakefile"],
|
||||
ColdFusion: ["cfm"],
|
||||
Crystal: ["cr"],
|
||||
CSharp: ["cs"],
|
||||
Csound_Document: ["csd"],
|
||||
Csound_Orchestra: ["orc"],
|
||||
@ -2159,8 +2196,8 @@ var supportedModes = {
|
||||
Jade: ["jade|pug"],
|
||||
Java: ["java"],
|
||||
JavaScript: ["js|jsm|jsx"],
|
||||
JSON5: ["json5"],
|
||||
JSON: ["json"],
|
||||
JSON5: ["json5"],
|
||||
JSONiq: ["jq"],
|
||||
JSP: ["jsp"],
|
||||
JSSM: ["jssm|jssm_state"],
|
||||
@ -2168,6 +2205,7 @@ var supportedModes = {
|
||||
Julia: ["jl"],
|
||||
Kotlin: ["kt|kts"],
|
||||
LaTeX: ["tex|latex|ltx|bib"],
|
||||
Latte: ["latte"],
|
||||
LESS: ["less"],
|
||||
Liquid: ["liquid"],
|
||||
Lisp: ["lisp"],
|
||||
@ -2182,32 +2220,36 @@ var supportedModes = {
|
||||
Mask: ["mask"],
|
||||
MATLAB: ["matlab"],
|
||||
Maze: ["mz"],
|
||||
MediaWiki: ["wiki|mediawiki"],
|
||||
MEL: ["mel"],
|
||||
MIPS: ["s|asm"],
|
||||
MIXAL: ["mixal"],
|
||||
MUSHCode: ["mc|mush"],
|
||||
MySQL: ["mysql"],
|
||||
Nginx: ["nginx|conf"],
|
||||
Nix: ["nix"],
|
||||
Nim: ["nim"],
|
||||
Nix: ["nix"],
|
||||
NSIS: ["nsi|nsh"],
|
||||
Nunjucks: ["nunjucks|nunjs|nj|njk"],
|
||||
ObjectiveC: ["m|mm"],
|
||||
OCaml: ["ml|mli"],
|
||||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
Perl6: ["p6|pl6|pm6"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Puppet: ["epp|pp"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
Praat: ["praat|praatscript|psc|proc"],
|
||||
Prisma: ["prisma"],
|
||||
Prolog: ["plg|prolog"],
|
||||
Properties: ["properties"],
|
||||
Protobuf: ["proto"],
|
||||
Puppet: ["epp|pp"],
|
||||
Python: ["py"],
|
||||
QML: ["qml"],
|
||||
R: ["r"],
|
||||
Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"],
|
||||
Razor: ["cshtml|asp"],
|
||||
RDoc: ["Rd"],
|
||||
Red: ["red|reds"],
|
||||
@ -2219,11 +2261,13 @@ var supportedModes = {
|
||||
SCAD: ["scad"],
|
||||
Scala: ["scala|sbt"],
|
||||
Scheme: ["scm|sm|rkt|oak|scheme"],
|
||||
Scrypt: ["scrypt"],
|
||||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
Smithy: ["smithy"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
Space: ["space"],
|
||||
@ -2239,7 +2283,7 @@ var supportedModes = {
|
||||
Textile: ["textile"],
|
||||
Toml: ["toml"],
|
||||
TSX: ["tsx"],
|
||||
Twig: ["latte|twig|swig"],
|
||||
Twig: ["twig|swig"],
|
||||
Typescript: ["ts|typescript|str"],
|
||||
Vala: ["vala"],
|
||||
VBScript: ["vbs|vb"],
|
||||
@ -2271,6 +2315,7 @@ var nameOverrides = {
|
||||
Perl6: "Perl 6",
|
||||
AutoHotKey: "AutoHotkey / AutoIt"
|
||||
};
|
||||
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
var data = supportedModes[name];
|
||||
@ -2586,13 +2631,10 @@ prompt.commands = function(editor, callback) {
|
||||
var platform = handler.platform;
|
||||
var cbn = handler.byName;
|
||||
for (var i in cbn) {
|
||||
var key;
|
||||
if (cbn[i].bindKey && cbn[i].bindKey[platform] !== null) {
|
||||
key = cbn[i].bindKey["win"];
|
||||
} else {
|
||||
key = "";
|
||||
var key = cbn[i].bindKey;
|
||||
if (typeof key !== "string") {
|
||||
key = key && key[platform] || "";
|
||||
}
|
||||
|
||||
var commands = cbn[i];
|
||||
var description = commands.description || normalizeName(commands.name);
|
||||
if (!Array.isArray(commands))
|
||||
@ -2749,7 +2791,7 @@ dom.importCssString(".ace_prompt_container {\
|
||||
background: white;\
|
||||
border-radius: 2px;\
|
||||
box-shadow: 0px 2px 3px 0px #555;\
|
||||
}");
|
||||
}", "promtp.css", false);
|
||||
|
||||
|
||||
exports.prompt = prompt;
|
||||
|
||||
@ -160,7 +160,7 @@ var keyUtil = require("../lib/keys");
|
||||
|
||||
var MAX_COUNT = 999;
|
||||
|
||||
dom.importCssString(searchboxCss, "ace_searchbox");
|
||||
dom.importCssString(searchboxCss, "ace_searchbox", false);
|
||||
|
||||
var SearchBox = function(editor, range, showReplaceForm) {
|
||||
var div = dom.createElement("div");
|
||||
|
||||
@ -61,7 +61,7 @@ margin: 0px;\
|
||||
.ace_optionsMenuEntry button:hover{\
|
||||
background: #f0f0f0;\
|
||||
}";
|
||||
dom.importCssString(cssText);
|
||||
dom.importCssString(cssText, "settings_menu.css", false);
|
||||
|
||||
module.exports.overlayPage = function overlayPage(editor, contentElement, callback) {
|
||||
var closer = document.createElement('div');
|
||||
@ -160,22 +160,23 @@ var supportedModes = {
|
||||
ABC: ["abc"],
|
||||
ActionScript:["as"],
|
||||
ADA: ["ada|adb"],
|
||||
Alda: ["alda"],
|
||||
Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
ASL: ["dsl|asl"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
Apex: ["apex|cls|trigger|tgr"],
|
||||
AQL: ["aql"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
ASL: ["dsl|asl|asl.json"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
BatchFile: ["bat|cmd"],
|
||||
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
|
||||
C9Search: ["c9search_results"],
|
||||
Crystal: ["cr"],
|
||||
Cirru: ["cirru|cr"],
|
||||
Clojure: ["clj|cljs"],
|
||||
Cobol: ["CBL|COB"],
|
||||
coffee: ["coffee|cf|cson|^Cakefile"],
|
||||
ColdFusion: ["cfm"],
|
||||
Crystal: ["cr"],
|
||||
CSharp: ["cs"],
|
||||
Csound_Document: ["csd"],
|
||||
Csound_Orchestra: ["orc"],
|
||||
@ -222,8 +223,8 @@ var supportedModes = {
|
||||
Jade: ["jade|pug"],
|
||||
Java: ["java"],
|
||||
JavaScript: ["js|jsm|jsx"],
|
||||
JSON5: ["json5"],
|
||||
JSON: ["json"],
|
||||
JSON5: ["json5"],
|
||||
JSONiq: ["jq"],
|
||||
JSP: ["jsp"],
|
||||
JSSM: ["jssm|jssm_state"],
|
||||
@ -231,6 +232,7 @@ var supportedModes = {
|
||||
Julia: ["jl"],
|
||||
Kotlin: ["kt|kts"],
|
||||
LaTeX: ["tex|latex|ltx|bib"],
|
||||
Latte: ["latte"],
|
||||
LESS: ["less"],
|
||||
Liquid: ["liquid"],
|
||||
Lisp: ["lisp"],
|
||||
@ -245,32 +247,36 @@ var supportedModes = {
|
||||
Mask: ["mask"],
|
||||
MATLAB: ["matlab"],
|
||||
Maze: ["mz"],
|
||||
MediaWiki: ["wiki|mediawiki"],
|
||||
MEL: ["mel"],
|
||||
MIPS: ["s|asm"],
|
||||
MIXAL: ["mixal"],
|
||||
MUSHCode: ["mc|mush"],
|
||||
MySQL: ["mysql"],
|
||||
Nginx: ["nginx|conf"],
|
||||
Nix: ["nix"],
|
||||
Nim: ["nim"],
|
||||
Nix: ["nix"],
|
||||
NSIS: ["nsi|nsh"],
|
||||
Nunjucks: ["nunjucks|nunjs|nj|njk"],
|
||||
ObjectiveC: ["m|mm"],
|
||||
OCaml: ["ml|mli"],
|
||||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
Perl6: ["p6|pl6|pm6"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
Puppet: ["epp|pp"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
Praat: ["praat|praatscript|psc|proc"],
|
||||
Prisma: ["prisma"],
|
||||
Prolog: ["plg|prolog"],
|
||||
Properties: ["properties"],
|
||||
Protobuf: ["proto"],
|
||||
Puppet: ["epp|pp"],
|
||||
Python: ["py"],
|
||||
QML: ["qml"],
|
||||
R: ["r"],
|
||||
Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"],
|
||||
Razor: ["cshtml|asp"],
|
||||
RDoc: ["Rd"],
|
||||
Red: ["red|reds"],
|
||||
@ -282,11 +288,13 @@ var supportedModes = {
|
||||
SCAD: ["scad"],
|
||||
Scala: ["scala|sbt"],
|
||||
Scheme: ["scm|sm|rkt|oak|scheme"],
|
||||
Scrypt: ["scrypt"],
|
||||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
Smithy: ["smithy"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
Space: ["space"],
|
||||
@ -302,7 +310,7 @@ var supportedModes = {
|
||||
Textile: ["textile"],
|
||||
Toml: ["toml"],
|
||||
TSX: ["tsx"],
|
||||
Twig: ["latte|twig|swig"],
|
||||
Twig: ["twig|swig"],
|
||||
Typescript: ["ts|typescript|str"],
|
||||
Vala: ["vala"],
|
||||
VBScript: ["vbs|vb"],
|
||||
@ -334,6 +342,7 @@ var nameOverrides = {
|
||||
Perl6: "Perl 6",
|
||||
AutoHotKey: "AutoHotkey / AutoIt"
|
||||
};
|
||||
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
var data = supportedModes[name];
|
||||
@ -367,7 +376,7 @@ var themeData = [
|
||||
["Solarized Light"],
|
||||
["TextMate" ],
|
||||
["Tomorrow" ],
|
||||
["XCode" ],
|
||||
["Xcode" ],
|
||||
["Kuroir"],
|
||||
["KatzenMilch"],
|
||||
["SQL Server" ,"sqlserver" , "light"],
|
||||
@ -384,6 +393,8 @@ var themeData = [
|
||||
["Merbivore Soft" ,"merbivore_soft" , "dark"],
|
||||
["Mono Industrial" ,"mono_industrial" , "dark"],
|
||||
["Monokai" ,"monokai" , "dark"],
|
||||
["Nord Dark" ,"nord_dark" , "dark"],
|
||||
["One Dark" ,"one_dark" , "dark"],
|
||||
["Pastel on dark" ,"pastel_on_dark" , "dark"],
|
||||
["Solarized Dark" ,"solarized_dark" , "dark"],
|
||||
["Terminal" ,"terminal" , "dark"],
|
||||
@ -498,6 +509,7 @@ var optionGroups = {
|
||||
"Soft Tabs": [{
|
||||
path: "useSoftTabs"
|
||||
}, {
|
||||
ariaLabel: "Tab Size",
|
||||
path: "tabSize",
|
||||
type: "number",
|
||||
values: [2, 3, 4, 8, 16]
|
||||
@ -519,6 +531,12 @@ var optionGroups = {
|
||||
"Enable Behaviours": {
|
||||
path: "behavioursEnabled"
|
||||
},
|
||||
"Wrap with quotes": {
|
||||
path: "wrapBehavioursEnabled"
|
||||
},
|
||||
"Enable Auto Indent": {
|
||||
path: "enableAutoIndent"
|
||||
},
|
||||
"Full Line Selection": {
|
||||
type: "checkbox",
|
||||
values: "text|line",
|
||||
@ -533,11 +551,12 @@ var optionGroups = {
|
||||
"Show Indent Guides": {
|
||||
path: "displayIndentGuides"
|
||||
},
|
||||
"Persistent Scrollbar": [{
|
||||
"Persistent HScrollbar": {
|
||||
path: "hScrollBarAlwaysVisible"
|
||||
}, {
|
||||
},
|
||||
"Persistent VScrollbar": {
|
||||
path: "vScrollBarAlwaysVisible"
|
||||
}],
|
||||
},
|
||||
"Animate scrolling": {
|
||||
path: "animatedScroll"
|
||||
},
|
||||
@ -556,6 +575,7 @@ var optionGroups = {
|
||||
"Show Print Margin": [{
|
||||
path: "showPrintMargin"
|
||||
}, {
|
||||
ariaLabel: "Print Margin",
|
||||
type: "number",
|
||||
path: "printMarginColumn"
|
||||
}],
|
||||
@ -618,10 +638,10 @@ var OptionPanel = function(editor, element) {
|
||||
|
||||
this.render = function() {
|
||||
this.container.innerHTML = "";
|
||||
buildDom(["table", {id: "controls"},
|
||||
buildDom(["table", {role: "presentation", id: "controls"},
|
||||
this.renderOptionGroup(optionGroups.Main),
|
||||
["tr", null, ["td", {colspan: 2},
|
||||
["table", {id: "more-controls"},
|
||||
["table", {role: "presentation", id: "more-controls"},
|
||||
this.renderOptionGroup(optionGroups.More)
|
||||
]
|
||||
]],
|
||||
@ -664,17 +684,20 @@ var OptionPanel = function(editor, element) {
|
||||
}
|
||||
|
||||
if (option.type == "buttonBar") {
|
||||
control = ["div", option.items.map(function(item) {
|
||||
control = ["div", {role: "group", "aria-labelledby": option.path + "-label"}, option.items.map(function(item) {
|
||||
return ["button", {
|
||||
value: item.value,
|
||||
ace_selected_button: value == item.value,
|
||||
'aria-pressed': value == item.value,
|
||||
onclick: function() {
|
||||
self.setOption(option, item.value);
|
||||
var nodes = this.parentNode.querySelectorAll("[ace_selected_button]");
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
nodes[i].removeAttribute("ace_selected_button");
|
||||
nodes[i].setAttribute("aria-pressed", false);
|
||||
}
|
||||
this.setAttribute("ace_selected_button", true);
|
||||
this.setAttribute("aria-pressed", true);
|
||||
}
|
||||
}, item.desc || item.caption || item.name];
|
||||
})];
|
||||
@ -682,6 +705,11 @@ var OptionPanel = function(editor, element) {
|
||||
control = ["input", {type: "number", value: value || option.defaultValue, style:"width:3em", oninput: function() {
|
||||
self.setOption(option, parseInt(this.value));
|
||||
}}];
|
||||
if (option.ariaLabel) {
|
||||
control[1]["aria-label"] = option.ariaLabel;
|
||||
} else {
|
||||
control[1].id = key;
|
||||
}
|
||||
if (option.defaults) {
|
||||
control = [control, option.defaults.map(function(item) {
|
||||
return ["button", {onclick: function() {
|
||||
@ -725,11 +753,13 @@ var OptionPanel = function(editor, element) {
|
||||
this.renderOption = function(key, option) {
|
||||
if (option.path && !option.onchange && !this.editor.$options[option.path])
|
||||
return;
|
||||
this.options[option.path] = option;
|
||||
var safeKey = "-" + option.path;
|
||||
var path = Array.isArray(option) ? option[0].path : option.path;
|
||||
this.options[path] = option;
|
||||
var safeKey = "-" + path;
|
||||
var safeId = path + "-label";
|
||||
var control = this.renderOptionControl(safeKey, option);
|
||||
return ["tr", {class: "ace_optionsMenuEntry"}, ["td",
|
||||
["label", {for: safeKey}, key]
|
||||
["label", {for: safeKey, id: safeId}, key]
|
||||
], ["td", control]];
|
||||
};
|
||||
|
||||
|
||||
@ -1,135 +1,4 @@
|
||||
define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
exports.isDark = false;
|
||||
exports.cssClass = "ace-tm";
|
||||
exports.cssText = ".ace-tm .ace_gutter {\
|
||||
background: #f0f0f0;\
|
||||
color: #333;\
|
||||
}\
|
||||
.ace-tm .ace_print-margin {\
|
||||
width: 1px;\
|
||||
background: #e8e8e8;\
|
||||
}\
|
||||
.ace-tm .ace_fold {\
|
||||
background-color: #6B72E6;\
|
||||
}\
|
||||
.ace-tm {\
|
||||
background-color: #FFFFFF;\
|
||||
color: black;\
|
||||
}\
|
||||
.ace-tm .ace_cursor {\
|
||||
color: black;\
|
||||
}\
|
||||
.ace-tm .ace_invisible {\
|
||||
color: rgb(191, 191, 191);\
|
||||
}\
|
||||
.ace-tm .ace_storage,\
|
||||
.ace-tm .ace_keyword {\
|
||||
color: blue;\
|
||||
}\
|
||||
.ace-tm .ace_constant {\
|
||||
color: rgb(197, 6, 11);\
|
||||
}\
|
||||
.ace-tm .ace_constant.ace_buildin {\
|
||||
color: rgb(88, 72, 246);\
|
||||
}\
|
||||
.ace-tm .ace_constant.ace_language {\
|
||||
color: rgb(88, 92, 246);\
|
||||
}\
|
||||
.ace-tm .ace_constant.ace_library {\
|
||||
color: rgb(6, 150, 14);\
|
||||
}\
|
||||
.ace-tm .ace_invalid {\
|
||||
background-color: rgba(255, 0, 0, 0.1);\
|
||||
color: red;\
|
||||
}\
|
||||
.ace-tm .ace_support.ace_function {\
|
||||
color: rgb(60, 76, 114);\
|
||||
}\
|
||||
.ace-tm .ace_support.ace_constant {\
|
||||
color: rgb(6, 150, 14);\
|
||||
}\
|
||||
.ace-tm .ace_support.ace_type,\
|
||||
.ace-tm .ace_support.ace_class {\
|
||||
color: rgb(109, 121, 222);\
|
||||
}\
|
||||
.ace-tm .ace_keyword.ace_operator {\
|
||||
color: rgb(104, 118, 135);\
|
||||
}\
|
||||
.ace-tm .ace_string {\
|
||||
color: rgb(3, 106, 7);\
|
||||
}\
|
||||
.ace-tm .ace_comment {\
|
||||
color: rgb(76, 136, 107);\
|
||||
}\
|
||||
.ace-tm .ace_comment.ace_doc {\
|
||||
color: rgb(0, 102, 255);\
|
||||
}\
|
||||
.ace-tm .ace_comment.ace_doc.ace_tag {\
|
||||
color: rgb(128, 159, 191);\
|
||||
}\
|
||||
.ace-tm .ace_constant.ace_numeric {\
|
||||
color: rgb(0, 0, 205);\
|
||||
}\
|
||||
.ace-tm .ace_variable {\
|
||||
color: rgb(49, 132, 149);\
|
||||
}\
|
||||
.ace-tm .ace_xml-pe {\
|
||||
color: rgb(104, 104, 91);\
|
||||
}\
|
||||
.ace-tm .ace_entity.ace_name.ace_function {\
|
||||
color: #0000A2;\
|
||||
}\
|
||||
.ace-tm .ace_heading {\
|
||||
color: rgb(12, 7, 255);\
|
||||
}\
|
||||
.ace-tm .ace_list {\
|
||||
color:rgb(185, 6, 144);\
|
||||
}\
|
||||
.ace-tm .ace_meta.ace_tag {\
|
||||
color:rgb(0, 22, 142);\
|
||||
}\
|
||||
.ace-tm .ace_string.ace_regex {\
|
||||
color: rgb(255, 0, 0)\
|
||||
}\
|
||||
.ace-tm .ace_marker-layer .ace_selection {\
|
||||
background: rgb(181, 213, 255);\
|
||||
}\
|
||||
.ace-tm.ace_multiselect .ace_selection.ace_start {\
|
||||
box-shadow: 0 0 3px 0px white;\
|
||||
}\
|
||||
.ace-tm .ace_marker-layer .ace_step {\
|
||||
background: rgb(252, 255, 0);\
|
||||
}\
|
||||
.ace-tm .ace_marker-layer .ace_stack {\
|
||||
background: rgb(164, 229, 101);\
|
||||
}\
|
||||
.ace-tm .ace_marker-layer .ace_bracket {\
|
||||
margin: -1px 0 0 -1px;\
|
||||
border: 1px solid rgb(192, 192, 192);\
|
||||
}\
|
||||
.ace-tm .ace_marker-layer .ace_active-line {\
|
||||
background: rgba(0, 0, 0, 0.07);\
|
||||
}\
|
||||
.ace-tm .ace_gutter-active-line {\
|
||||
background-color : #dcdcdc;\
|
||||
}\
|
||||
.ace-tm .ace_marker-layer .ace_selected-word {\
|
||||
background: rgb(250, 250, 255);\
|
||||
border: 1px solid rgb(200, 200, 250);\
|
||||
}\
|
||||
.ace-tm .ace_indent-guide {\
|
||||
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\
|
||||
}\
|
||||
";
|
||||
exports.$id = "ace/theme/textmate";
|
||||
|
||||
var dom = require("../lib/dom");
|
||||
dom.importCssString(exports.cssText, exports.cssClass);
|
||||
});
|
||||
|
||||
define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate"], function(require, exports, module) {
|
||||
define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var event = require("../lib/event");
|
||||
@ -137,8 +6,6 @@ var UA = require("../lib/useragent");
|
||||
var net = require("../lib/net");
|
||||
var ace = require("../ace");
|
||||
|
||||
require("../theme/textmate");
|
||||
|
||||
module.exports = exports = ace;
|
||||
var getCSSProperty = function(element, container, property) {
|
||||
var ret = element.style[property];
|
||||
|
||||
@ -13,7 +13,7 @@ var themeData = [
|
||||
["Solarized Light"],
|
||||
["TextMate" ],
|
||||
["Tomorrow" ],
|
||||
["XCode" ],
|
||||
["Xcode" ],
|
||||
["Kuroir"],
|
||||
["KatzenMilch"],
|
||||
["SQL Server" ,"sqlserver" , "light"],
|
||||
@ -30,6 +30,8 @@ var themeData = [
|
||||
["Merbivore Soft" ,"merbivore_soft" , "dark"],
|
||||
["Mono Industrial" ,"mono_industrial" , "dark"],
|
||||
["Monokai" ,"monokai" , "dark"],
|
||||
["Nord Dark" ,"nord_dark" , "dark"],
|
||||
["One Dark" ,"one_dark" , "dark"],
|
||||
["Pastel on dark" ,"pastel_on_dark" , "dark"],
|
||||
["Solarized Dark" ,"solarized_dark" , "dark"],
|
||||
["Terminal" ,"terminal" , "dark"],
|
||||
|
||||
@ -98,7 +98,7 @@ dom.importCssString(".ace_occur-highlight {\n\
|
||||
.ace_dark .ace_occur-highlight {\n\
|
||||
background-color: rgb(80, 140, 85);\n\
|
||||
box-shadow: 0 0 4px rgb(60, 120, 70);\n\
|
||||
}\n", "incremental-occur-highlighting");
|
||||
}\n", "incremental-occur-highlighting", false);
|
||||
|
||||
exports.Occur = Occur;
|
||||
|
||||
@ -325,7 +325,7 @@ oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
|
||||
this.attach = function(editor) {
|
||||
var iSearch = this.$iSearch;
|
||||
HashHandler.call(this, exports.iSearchCommands, editor.commands.platform);
|
||||
this.$commandExecHandler = editor.commands.addEventListener('exec', function(e) {
|
||||
this.$commandExecHandler = editor.commands.on('exec', function(e) {
|
||||
if (!e.command.isIncrementalSearchCommand)
|
||||
return iSearch.deactivate();
|
||||
e.stopPropagation();
|
||||
@ -340,7 +340,7 @@ oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
|
||||
|
||||
this.detach = function(editor) {
|
||||
if (!this.$commandExecHandler) return;
|
||||
editor.commands.removeEventListener('exec', this.$commandExecHandler);
|
||||
editor.commands.off('exec', this.$commandExecHandler);
|
||||
delete this.$commandExecHandler;
|
||||
};
|
||||
|
||||
@ -349,7 +349,7 @@ oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
|
||||
if (((hashId === 1/*ctrl*/ || hashId === 8/*command*/) && key === 'v')
|
||||
|| (hashId === 1/*ctrl*/ && key === 'y')) return null;
|
||||
var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
|
||||
if (cmd.command) { return cmd; }
|
||||
if (cmd && cmd.command) { return cmd; }
|
||||
if (hashId == -1) {
|
||||
var extendCmd = this.commands.extendSearchTerm;
|
||||
if (extendCmd) { return {command: extendCmd, args: key}; }
|
||||
@ -406,27 +406,28 @@ function objectToRegExp(obj) {
|
||||
|
||||
(function() {
|
||||
|
||||
this.activate = function(ed, backwards) {
|
||||
this.$editor = ed;
|
||||
this.$startPos = this.$currentPos = ed.getCursorPosition();
|
||||
this.activate = function(editor, backwards) {
|
||||
this.$editor = editor;
|
||||
this.$startPos = this.$currentPos = editor.getCursorPosition();
|
||||
this.$options.needle = '';
|
||||
this.$options.backwards = backwards;
|
||||
ed.keyBinding.addKeyboardHandler(this.$keyboardHandler);
|
||||
this.$originalEditorOnPaste = ed.onPaste; ed.onPaste = this.onPaste.bind(this);
|
||||
this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this));
|
||||
this.selectionFix(ed);
|
||||
editor.keyBinding.addKeyboardHandler(this.$keyboardHandler);
|
||||
this.$originalEditorOnPaste = editor.onPaste;
|
||||
editor.onPaste = this.onPaste.bind(this);
|
||||
this.$mousedownHandler = editor.on('mousedown', this.onMouseDown.bind(this));
|
||||
this.selectionFix(editor);
|
||||
this.statusMessage(true);
|
||||
};
|
||||
|
||||
this.deactivate = function(reset) {
|
||||
this.cancelSearch(reset);
|
||||
var ed = this.$editor;
|
||||
ed.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
|
||||
var editor = this.$editor;
|
||||
editor.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
|
||||
if (this.$mousedownHandler) {
|
||||
ed.removeEventListener('mousedown', this.$mousedownHandler);
|
||||
editor.off('mousedown', this.$mousedownHandler);
|
||||
delete this.$mousedownHandler;
|
||||
}
|
||||
ed.onPaste = this.$originalEditorOnPaste;
|
||||
editor.onPaste = this.$originalEditorOnPaste;
|
||||
this.message('');
|
||||
};
|
||||
|
||||
@ -557,7 +558,7 @@ function objectToRegExp(obj) {
|
||||
exports.IncrementalSearch = IncrementalSearch;
|
||||
|
||||
var dom = require('./lib/dom');
|
||||
dom.importCssString && dom.importCssString("\
|
||||
dom.importCssString("\
|
||||
.ace_marker-layer .ace_isearch-result {\
|
||||
position: absolute;\
|
||||
z-index: 6;\
|
||||
@ -571,7 +572,7 @@ div.ace_isearch-result {\
|
||||
.ace_dark div.ace_isearch-result {\
|
||||
background-color: rgb(100, 110, 160);\
|
||||
box-shadow: 0 0 4px rgb(80, 90, 140);\
|
||||
}", "incremental-search-highlighting");
|
||||
}", "incremental-search-highlighting", false);
|
||||
var commands = require("./commands/command_manager");
|
||||
(function() {
|
||||
this.setupIncrementalSearch = function(editor, val) {
|
||||
@ -700,20 +701,20 @@ exports.handler.attach = function(editor) {
|
||||
editor.commands.addCommands(commands);
|
||||
exports.handler.platform = editor.commands.platform;
|
||||
editor.$emacsModeHandler = this;
|
||||
editor.addEventListener('copy', this.onCopy);
|
||||
editor.addEventListener('paste', this.onPaste);
|
||||
editor.on('copy', this.onCopy);
|
||||
editor.on('paste', this.onPaste);
|
||||
};
|
||||
|
||||
exports.handler.detach = function(editor) {
|
||||
editor.renderer.$blockCursor = false;
|
||||
editor.session.$selectLongWords = $formerLongWords;
|
||||
editor.session.$useEmacsStyleLineStart = $formerLineStart;
|
||||
editor.removeEventListener("click", $resetMarkMode);
|
||||
editor.removeEventListener("changeSession", $kbSessionChange);
|
||||
editor.off("click", $resetMarkMode);
|
||||
editor.off("changeSession", $kbSessionChange);
|
||||
editor.unsetStyle("emacs-mode");
|
||||
editor.commands.removeCommands(commands);
|
||||
editor.removeEventListener('copy', this.onCopy);
|
||||
editor.removeEventListener('paste', this.onPaste);
|
||||
editor.off('copy', this.onCopy);
|
||||
editor.off('paste', this.onPaste);
|
||||
editor.$emacsModeHandler = null;
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -116,7 +116,7 @@ exports.handler.addCommands([{
|
||||
|
||||
|
||||
[{
|
||||
bindKey: {mac: "Control-G", win: "Ctrl-G"},
|
||||
bindKey: {mac: "Ctrl-G", win: "Ctrl-G"},
|
||||
name: "gotoline"
|
||||
}, {
|
||||
bindKey: {mac: "Command-Shift-L|Command-F2", win: "Ctrl-Shift-L|Ctrl-F2"},
|
||||
@ -158,10 +158,10 @@ exports.handler.addCommands([{
|
||||
bindKey: {mac: "Command-[", win: "Ctrl-["},
|
||||
name: "blockoutdent"
|
||||
}, {
|
||||
bindKey: {mac: "Control-PageDown", win: "Alt-PageDown"},
|
||||
bindKey: {mac: "Ctrl-PageDown", win: "Alt-PageDown"},
|
||||
name: "pagedown"
|
||||
}, {
|
||||
bindKey: {mac: "Control-PageUp", win: "Alt-PageUp"},
|
||||
bindKey: {mac: "Ctrl-PageUp", win: "Alt-PageUp"},
|
||||
name: "pageup"
|
||||
}, {
|
||||
bindKey: {mac: "Shift-Option-A", win: "Shift-Alt-A"},
|
||||
|
||||
@ -254,7 +254,10 @@ define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function () {
|
||||
this.lineCommentStart = "%";
|
||||
|
||||
this.$id = "ace/mode/abc";
|
||||
this.snippetFileId = "ace/snippets/abc";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -261,6 +261,7 @@ oop.inherits(Mode, TextMode);
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
this.$id = "ace/mode/actionscript";
|
||||
this.snippetFileId = "ace/snippets/actionscript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
311
htdocs/includes/ace/src/mode-alda.js
Normal file
311
htdocs/includes/ace/src/mode-alda.js
Normal file
@ -0,0 +1,311 @@
|
||||
define("ace/mode/alda_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var AldaHighlightRules = function() {
|
||||
|
||||
this.$rules = {
|
||||
pitch: [{
|
||||
token: "variable.parameter.operator.pitch.alda",
|
||||
regex: /(?:[+\-]+|\=)/
|
||||
}, {
|
||||
token: "",
|
||||
regex: "",
|
||||
next: "timing"
|
||||
}],
|
||||
timing: [{
|
||||
token: "string.quoted.operator.timing.alda",
|
||||
regex: /\d+(?:s|ms)?/
|
||||
}, {
|
||||
token: "",
|
||||
regex: "",
|
||||
next: "start"
|
||||
}],
|
||||
start: [{
|
||||
token: [
|
||||
"constant.language.instrument.alda",
|
||||
"constant.language.instrument.alda",
|
||||
"meta.part.call.alda",
|
||||
"storage.type.nickname.alda",
|
||||
"meta.part.call.alda"
|
||||
],
|
||||
regex: /^([a-zA-Z]{2}[\w\-+\'()]*)((?:\s*\/\s*[a-zA-Z]{2}[\w\-+\'()]*)*)(?:(\s*)(\"[a-zA-Z]{2}[\w\-+\'()]*\"))?(\s*:)/
|
||||
}, {
|
||||
token: [
|
||||
"text",
|
||||
"entity.other.inherited-class.voice.alda",
|
||||
"text"
|
||||
],
|
||||
regex: /^(\s*)(V\d+)(:)/
|
||||
}, {
|
||||
token: "comment.line.number-sign.alda",
|
||||
regex: /#.*$/
|
||||
}, {
|
||||
token: "entity.name.function.pipe.measure.alda",
|
||||
regex: /\|/
|
||||
}, {
|
||||
token: "comment.block.inline.alda",
|
||||
regex: /\(comment\b/,
|
||||
push: [{
|
||||
token: "comment.block.inline.alda",
|
||||
regex: /\)/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment.block.inline.alda"
|
||||
}]
|
||||
}, {
|
||||
token: "entity.name.function.marker.alda",
|
||||
regex: /%[a-zA-Z]{2}[\w\-+\'()]*/
|
||||
}, {
|
||||
token: "entity.name.function.at-marker.alda",
|
||||
regex: /@[a-zA-Z]{2}[\w\-+\'()]*/
|
||||
}, {
|
||||
token: "keyword.operator.octave-change.alda",
|
||||
regex: /\bo\d+\b/
|
||||
}, {
|
||||
token: "keyword.operator.octave-shift.alda",
|
||||
regex: /[><]/
|
||||
}, {
|
||||
token: "keyword.operator.repeat.alda",
|
||||
regex: /\*\s*\d+/
|
||||
}, {
|
||||
token: "string.quoted.operator.timing.alda",
|
||||
regex: /[.]|r\d*(?:s|ms)?/
|
||||
},{
|
||||
token: "text",
|
||||
regex: /([cdefgab])/,
|
||||
next: "pitch"
|
||||
}, {
|
||||
token: "string.quoted.operator.timing.alda",
|
||||
regex: /~/,
|
||||
next: "timing"
|
||||
}, {
|
||||
token: "punctuation.section.embedded.cram.alda",
|
||||
regex: /\}/,
|
||||
next: "timing"
|
||||
}, {
|
||||
token: "constant.numeric.subchord.alda",
|
||||
regex: /\//
|
||||
}, {
|
||||
todo: {
|
||||
token: "punctuation.section.embedded.cram.alda",
|
||||
regex: /\{/,
|
||||
push: [{
|
||||
token: "punctuation.section.embedded.cram.alda",
|
||||
regex: /\}/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "$self"
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
todo: {
|
||||
token: "keyword.control.sequence.alda",
|
||||
regex: /\[/,
|
||||
push: [{
|
||||
token: "keyword.control.sequence.alda",
|
||||
regex: /\]/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "$self"
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
token: "meta.inline.clojure.alda",
|
||||
regex: /\(/,
|
||||
push: [{
|
||||
token: "meta.inline.clojure.alda",
|
||||
regex: /\)/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "source.clojure"
|
||||
}, {
|
||||
defaultToken: "meta.inline.clojure.alda"
|
||||
}]
|
||||
}]
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
AldaHighlightRules.metaData = {
|
||||
scopeName: "source.alda",
|
||||
fileTypes: ["alda"],
|
||||
name: "Alda"
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(AldaHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.AldaHighlightRules = AldaHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/alda",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/alda_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var AldaHighlightRules = require("./alda_highlight_rules").AldaHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = AldaHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/alda";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
window.require(["ace/mode/alda"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@ -58,16 +58,7 @@ define("ace/mode/asl_highlight_rules",["require","exports","module","ace/lib/oop
|
||||
var ASLHighlightRules = function() {
|
||||
var keywords = (
|
||||
"Default|DefinitionBlock|Device|Method|Else|ElseIf|For|Function|If|Include|Method|Return|" +
|
||||
"Scope|Switch|Case|While|Break|BreakPoint|Continue|NoOp|Wait"
|
||||
);
|
||||
|
||||
var keywordOperators = (
|
||||
"Add|And|Decrement|Divide|Increment|Index|LAnd|LEqual|LGreater|LGreaterEqual|" +
|
||||
"LLess|LLessEqual|LNot|LNotEqual|LOr|Mod|Multiply|NAnd|NOr|Not|Or|RefOf|Revision|" +
|
||||
"ShiftLeft|ShiftRight|Subtract|XOr|DerefOf"
|
||||
);
|
||||
|
||||
var buildinFunctions = (
|
||||
"Scope|Switch|Case|While|Break|BreakPoint|Continue|NoOp|Wait|True|False|" +
|
||||
"AccessAs|Acquire|Alias|BankField|Buffer|Concatenate|ConcatenateResTemplate|" +
|
||||
"CondRefOf|Connection|CopyObject|CreateBitField|CreateByteField|CreateDWordField|" +
|
||||
"CreateField|CreateQWordField|CreateWordField|DataTableRegion|Debug|" +
|
||||
@ -83,6 +74,12 @@ define("ace/mode/asl_highlight_rules",["require","exports","module","ace/lib/oop
|
||||
"WordSpace"
|
||||
);
|
||||
|
||||
var keywordOperators = (
|
||||
"Add|And|Decrement|Divide|Increment|Index|LAnd|LEqual|LGreater|LGreaterEqual|" +
|
||||
"LLess|LLessEqual|LNot|LNotEqual|LOr|Mod|Multiply|NAnd|NOr|Not|Or|RefOf|Revision|" +
|
||||
"ShiftLeft|ShiftRight|Subtract|XOr|DerefOf"
|
||||
);
|
||||
|
||||
var flags = (
|
||||
"AttribQuick|AttribSendReceive|AttribByte|AttribBytes|AttribRawBytes|" +
|
||||
"AttribRawProcessBytes|AttribWord|AttribBlock|AttribProcessCall|AttribBlockProcessCall|" +
|
||||
@ -121,21 +118,25 @@ define("ace/mode/asl_highlight_rules",["require","exports","module","ace/lib/oop
|
||||
"ThermalZoneObj|BuffFieldObj|DDBHandleObj"
|
||||
);
|
||||
|
||||
var buildinConstants = (
|
||||
var builtinConstants = (
|
||||
"__FILE__|__PATH__|__LINE__|__DATE__|__IASL__"
|
||||
);
|
||||
|
||||
var strNumbers = (
|
||||
"One|Ones|Zero"
|
||||
);
|
||||
|
||||
var deprecated = (
|
||||
"Memory24|Processor"
|
||||
);
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"keyword": keywords,
|
||||
"constant.numeric": strNumbers,
|
||||
"keyword.operator": keywordOperators,
|
||||
"function.buildin": buildinFunctions,
|
||||
"constant.language": buildinConstants,
|
||||
"constant.language": builtinConstants,
|
||||
"storage.type": storageTypes,
|
||||
"constant.character": flags,
|
||||
"constant.library": flags,
|
||||
"invalid.deprecated": deprecated
|
||||
}, "identifier");
|
||||
|
||||
@ -174,13 +175,13 @@ define("ace/mode/asl_highlight_rules",["require","exports","module","ace/lib/oop
|
||||
regex : /0[xX][0-9a-fA-F]+\b/
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : /(One(s)?|Zero|True|False|[0-9]+)\b/
|
||||
regex : /[0-9]+\b/
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "/|!|\\$|%|&|\\||\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|\\^|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\|="
|
||||
regex : /[!\~\*\/%+-<>\^|=&]/
|
||||
}, {
|
||||
token : "lparen",
|
||||
regex : "[[({]"
|
||||
|
||||
@ -1,334 +0,0 @@
|
||||
define("ace/mode/bro_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var BroHighlightRules = function() {
|
||||
|
||||
this.$rules = {
|
||||
start: [{
|
||||
token: "punctuation.definition.comment.bro",
|
||||
regex: /#/,
|
||||
push: [{
|
||||
token: "comment.line.number-sign.bro",
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment.line.number-sign.bro"
|
||||
}]
|
||||
}, {
|
||||
token: "keyword.control.bro",
|
||||
regex: /\b(?:break|case|continue|else|for|if|return|switch|next|when|timeout|schedule)\b/
|
||||
}, {
|
||||
token: [
|
||||
"meta.function.bro",
|
||||
"meta.function.bro",
|
||||
"storage.type.bro",
|
||||
"meta.function.bro",
|
||||
"entity.name.function.bro",
|
||||
"meta.function.bro"
|
||||
],
|
||||
regex: /^(\s*)(?:function|hook|event)(\s*)(.*)(\s*\()(.*)(\).*$)/
|
||||
}, {
|
||||
token: "storage.type.bro",
|
||||
regex: /\b(?:bool|enum|double|int|count|port|addr|subnet|any|file|interval|time|string|table|vector|set|record|pattern|hook)\b/
|
||||
}, {
|
||||
token: "storage.modifier.bro",
|
||||
regex: /\b(?:global|const|redef|local|&(?:optional|rotate_interval|rotate_size|add_func|del_func|expire_func|expire_create|expire_read|expire_write|persistent|synchronized|encrypt|mergeable|priority|group|type_column|log|error_handler))\b/
|
||||
}, {
|
||||
token: "keyword.operator.bro",
|
||||
regex: /\s*(?:\||&&|(?:>|<|!)=?|==)\s*|\b!?in\b/
|
||||
}, {
|
||||
token: "constant.language.bro",
|
||||
regex: /\b(?:T|F)\b/
|
||||
}, {
|
||||
token: "constant.numeric.bro",
|
||||
regex: /\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:\/(?:tcp|udp|icmp)|\s*(?:u?sec|min|hr|day)s?)?\b/
|
||||
}, {
|
||||
token: "punctuation.definition.string.begin.bro",
|
||||
regex: /"/,
|
||||
push: [{
|
||||
token: "punctuation.definition.string.end.bro",
|
||||
regex: /"/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#string_escaped_char"
|
||||
}, {
|
||||
include: "#string_placeholder"
|
||||
}, {
|
||||
defaultToken: "string.quoted.double.bro"
|
||||
}]
|
||||
}, {
|
||||
token: "punctuation.definition.string.begin.bro",
|
||||
regex: /\//,
|
||||
push: [{
|
||||
token: "punctuation.definition.string.end.bro",
|
||||
regex: /\//,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#string_escaped_char"
|
||||
}, {
|
||||
include: "#string_placeholder"
|
||||
}, {
|
||||
defaultToken: "string.quoted.regex.bro"
|
||||
}]
|
||||
}, {
|
||||
token: [
|
||||
"meta.preprocessor.bro.load",
|
||||
"keyword.other.special-method.bro"
|
||||
],
|
||||
regex: /^(\s*)(\@load(?:-sigs)?)\b/,
|
||||
push: [{
|
||||
token: [],
|
||||
regex: /(?=\#)|$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "meta.preprocessor.bro.load"
|
||||
}]
|
||||
}, {
|
||||
token: [
|
||||
"meta.preprocessor.bro.if",
|
||||
"keyword.other.special-method.bro",
|
||||
"meta.preprocessor.bro.if"
|
||||
],
|
||||
regex: /^(\s*)(\@endif|\@if(?:n?def)?)(.*$)/,
|
||||
push: [{
|
||||
token: [],
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "meta.preprocessor.bro.if"
|
||||
}]
|
||||
}],
|
||||
"#disabled": [{
|
||||
token: "text",
|
||||
regex: /^\s*\@if(?:n?def)?\b.*$/,
|
||||
push: [{
|
||||
token: "text",
|
||||
regex: /^\s*\@endif\b.*$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#disabled"
|
||||
}, {
|
||||
include: "#pragma-mark"
|
||||
}],
|
||||
comment: "eat nested preprocessor ifdefs"
|
||||
}],
|
||||
"#preprocessor-rule-other": [{
|
||||
token: [
|
||||
"text",
|
||||
"meta.preprocessor.bro",
|
||||
"meta.preprocessor.bro",
|
||||
"text"
|
||||
],
|
||||
regex: /^(\s*)(@if)((?:n?def)?)\b(.*?)(?:(?=)|$)/,
|
||||
push: [{
|
||||
token: ["text", "meta.preprocessor.bro", "text"],
|
||||
regex: /^(\s*)(@endif)\b(.*$)/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "$base"
|
||||
}]
|
||||
}],
|
||||
"#string_escaped_char": [{
|
||||
token: "constant.character.escape.bro",
|
||||
regex: /\\(?:\\|[abefnprtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2})/
|
||||
}, {
|
||||
token: "invalid.illegal.unknown-escape.bro",
|
||||
regex: /\\./
|
||||
}],
|
||||
"#string_placeholder": [{
|
||||
token: "constant.other.placeholder.bro",
|
||||
regex: /%(?:\d+\$)?[#0\- +']*[,;:_]?(?:-?\d+|\*(?:-?\d+\$)?)?(?:\.(?:-?\d+|\*(?:-?\d+\$)?)?)?(?:hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?[diouxXDOUeEfFgGaACcSspn%]/
|
||||
}, {
|
||||
token: "invalid.illegal.placeholder.bro",
|
||||
regex: /%/
|
||||
}]
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
BroHighlightRules.metaData = {
|
||||
fileTypes: ["bro"],
|
||||
foldingStartMarker: "^(\\@if(n?def)?)",
|
||||
foldingStopMarker: "^\\@endif",
|
||||
keyEquivalent: "@B",
|
||||
name: "Bro",
|
||||
scopeName: "source.bro"
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(BroHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.BroHighlightRules = BroHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/bro",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bro_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var BroHighlightRules = require("./bro_highlight_rules").BroHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = BroHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/bro";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
window.require(["ace/mode/bro"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@ -65,7 +65,7 @@ var c_cppHighlightRules = function() {
|
||||
|
||||
var storageType = (
|
||||
"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
|
||||
"_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
|
||||
"_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" +
|
||||
"class|wchar_t|template|char16_t|char32_t"
|
||||
);
|
||||
|
||||
@ -489,6 +489,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/c_cpp";
|
||||
this.snippetFileId = "ace/snippets/c_cpp";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -301,6 +301,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/clojure";
|
||||
this.snippetFileId = "ace/snippets/clojure";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -385,6 +385,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/coffee";
|
||||
this.snippetFileId = "ace/snippets/coffee";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -300,7 +300,7 @@ var CsoundScoreHighlightRules = function(embeddedRulePrefix) {
|
||||
start.push(
|
||||
{
|
||||
token : "keyword.control.csound-score",
|
||||
regex : /[abCdefiqstvxy]/
|
||||
regex : /[aBbCdefiqstvxy]/
|
||||
}, {
|
||||
token : "invalid.illegal.csound-score",
|
||||
regex : /w/
|
||||
@ -935,10 +935,10 @@ var PythonHighlightRules = function() {
|
||||
regex: "\\s+"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "'(.)*'"
|
||||
regex: "'[^']*'"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: '"(.)*"'
|
||||
regex: '"[^"]*"'
|
||||
}, {
|
||||
token: "function.support",
|
||||
regex: "(!s|!r|!a)"
|
||||
@ -1141,6 +1141,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"adsynt",
|
||||
"adsynt2",
|
||||
"aftouch",
|
||||
"allpole",
|
||||
"alpass",
|
||||
"alwayson",
|
||||
"ampdb",
|
||||
@ -1148,11 +1149,17 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ampmidi",
|
||||
"ampmidicurve",
|
||||
"ampmidid",
|
||||
"apoleparams",
|
||||
"arduinoRead",
|
||||
"arduinoReadF",
|
||||
"arduinoStart",
|
||||
"arduinoStop",
|
||||
"areson",
|
||||
"aresonk",
|
||||
"atone",
|
||||
"atonek",
|
||||
"atonex",
|
||||
"autocorr",
|
||||
"babo",
|
||||
"balance",
|
||||
"balance2",
|
||||
@ -1160,8 +1167,6 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"barmodel",
|
||||
"bbcutm",
|
||||
"bbcuts",
|
||||
"beadsynt",
|
||||
"beosc",
|
||||
"betarand",
|
||||
"bexprnd",
|
||||
"bformdec1",
|
||||
@ -1170,6 +1175,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"biquad",
|
||||
"biquada",
|
||||
"birnd",
|
||||
"bob",
|
||||
"bpf",
|
||||
"bpfcos",
|
||||
"bqrez",
|
||||
@ -1195,6 +1201,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ceps",
|
||||
"cepsinv",
|
||||
"chanctrl",
|
||||
"changed",
|
||||
"changed2",
|
||||
"chani",
|
||||
"chano",
|
||||
@ -1206,11 +1213,19 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"chnclear",
|
||||
"chnexport",
|
||||
"chnget",
|
||||
"chngeta",
|
||||
"chngeti",
|
||||
"chngetk",
|
||||
"chngetks",
|
||||
"chngets",
|
||||
"chnmix",
|
||||
"chnparams",
|
||||
"chnset",
|
||||
"chnseta",
|
||||
"chnseti",
|
||||
"chnsetk",
|
||||
"chnsetks",
|
||||
"chnsets",
|
||||
"chuap",
|
||||
"clear",
|
||||
"clfilt",
|
||||
@ -1219,6 +1234,13 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"clockon",
|
||||
"cmp",
|
||||
"cmplxprod",
|
||||
"cntCreate",
|
||||
"cntCycles",
|
||||
"cntDelete",
|
||||
"cntDelete_i",
|
||||
"cntRead",
|
||||
"cntReset",
|
||||
"cntState",
|
||||
"comb",
|
||||
"combinv",
|
||||
"compilecsd",
|
||||
@ -1238,6 +1260,8 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"cosseg",
|
||||
"cossegb",
|
||||
"cossegr",
|
||||
"count",
|
||||
"count_i",
|
||||
"cps2pch",
|
||||
"cpsmidi",
|
||||
"cpsmidib",
|
||||
@ -1263,6 +1287,11 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ctrl21",
|
||||
"ctrl7",
|
||||
"ctrlinit",
|
||||
"ctrlpreset",
|
||||
"ctrlprint",
|
||||
"ctrlprintpresets",
|
||||
"ctrlsave",
|
||||
"ctrlselect",
|
||||
"cuserrnd",
|
||||
"dam",
|
||||
"date",
|
||||
@ -1408,6 +1437,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ftchnls",
|
||||
"ftconv",
|
||||
"ftcps",
|
||||
"ftexists",
|
||||
"ftfree",
|
||||
"ftgen",
|
||||
"ftgenonce",
|
||||
@ -1424,7 +1454,9 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ftsamplebank",
|
||||
"ftsave",
|
||||
"ftsavek",
|
||||
"ftset",
|
||||
"ftslice",
|
||||
"ftslicei",
|
||||
"ftsr",
|
||||
"gain",
|
||||
"gainslider",
|
||||
@ -1441,7 +1473,6 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"getcol",
|
||||
"getftargs",
|
||||
"getrow",
|
||||
"getrowlin",
|
||||
"getseed",
|
||||
"gogobel",
|
||||
"grain",
|
||||
@ -1689,8 +1720,12 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"la_k_upper_solve_mr",
|
||||
"la_k_vc_set",
|
||||
"la_k_vr_set",
|
||||
"lag",
|
||||
"lagud",
|
||||
"lastcycle",
|
||||
"lenarray",
|
||||
"lfo",
|
||||
"lfsr",
|
||||
"limit",
|
||||
"limit1",
|
||||
"lincos",
|
||||
@ -1734,6 +1769,8 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"lowpass2",
|
||||
"lowres",
|
||||
"lowresx",
|
||||
"lpcanal",
|
||||
"lpcfilter",
|
||||
"lpf18",
|
||||
"lpform",
|
||||
"lpfreson",
|
||||
@ -1749,14 +1786,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"lpshold",
|
||||
"lpsholdp",
|
||||
"lpslot",
|
||||
"lua_exec",
|
||||
"lua_iaopcall",
|
||||
"lua_iaopcall_off",
|
||||
"lua_ikopcall",
|
||||
"lua_ikopcall_off",
|
||||
"lua_iopcall",
|
||||
"lua_iopcall_off",
|
||||
"lua_opdef",
|
||||
"lufs",
|
||||
"mac",
|
||||
"maca",
|
||||
"madsr",
|
||||
@ -1779,6 +1809,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"median",
|
||||
"mediank",
|
||||
"metro",
|
||||
"metro2",
|
||||
"mfb",
|
||||
"midglobal",
|
||||
"midiarp",
|
||||
@ -1831,6 +1862,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"mp3sr",
|
||||
"mpulse",
|
||||
"mrtmsg",
|
||||
"ms2st",
|
||||
"mtof",
|
||||
"mton",
|
||||
"multitap",
|
||||
@ -1840,6 +1872,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"mvclpf2",
|
||||
"mvclpf3",
|
||||
"mvclpf4",
|
||||
"mvmfilter",
|
||||
"mxadsr",
|
||||
"nchnls_hw",
|
||||
"nestedap",
|
||||
@ -1883,6 +1916,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"oscilx",
|
||||
"out",
|
||||
"out32",
|
||||
"outall",
|
||||
"outc",
|
||||
"outch",
|
||||
"outh",
|
||||
@ -1983,12 +2017,11 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"printk2",
|
||||
"printks",
|
||||
"printks2",
|
||||
"println",
|
||||
"prints",
|
||||
"printsk",
|
||||
"product",
|
||||
"pset",
|
||||
"ptable",
|
||||
"ptable3",
|
||||
"ptablei",
|
||||
"ptablew",
|
||||
"ptrack",
|
||||
"puts",
|
||||
@ -2005,6 +2038,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"pvsarp",
|
||||
"pvsbandp",
|
||||
"pvsbandr",
|
||||
"pvsbandwidth",
|
||||
"pvsbin",
|
||||
"pvsblur",
|
||||
"pvsbuffer",
|
||||
@ -2013,6 +2047,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"pvscale",
|
||||
"pvscent",
|
||||
"pvsceps",
|
||||
"pvscfs",
|
||||
"pvscross",
|
||||
"pvsdemix",
|
||||
"pvsdiskin",
|
||||
@ -2032,6 +2067,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"pvsinfo",
|
||||
"pvsinit",
|
||||
"pvslock",
|
||||
"pvslpc",
|
||||
"pvsmaska",
|
||||
"pvsmix",
|
||||
"pvsmooth",
|
||||
@ -2133,6 +2169,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"qnan",
|
||||
"r2c",
|
||||
"rand",
|
||||
"randc",
|
||||
"randh",
|
||||
"randi",
|
||||
"random",
|
||||
@ -2156,6 +2193,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"repluck",
|
||||
"reshapearray",
|
||||
"reson",
|
||||
"resonbnk",
|
||||
"resonk",
|
||||
"resonr",
|
||||
"resonx",
|
||||
@ -2173,6 +2211,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"rms",
|
||||
"rnd",
|
||||
"rnd31",
|
||||
"rndseed",
|
||||
"round",
|
||||
"rspline",
|
||||
"rtclock",
|
||||
@ -2185,14 +2224,17 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"sc_phasor",
|
||||
"sc_trig",
|
||||
"scale",
|
||||
"scale2",
|
||||
"scalearray",
|
||||
"scanhammer",
|
||||
"scans",
|
||||
"scantable",
|
||||
"scanu",
|
||||
"scanu2",
|
||||
"schedkwhen",
|
||||
"schedkwhennamed",
|
||||
"schedule",
|
||||
"schedulek",
|
||||
"schedwhen",
|
||||
"scoreline",
|
||||
"scoreline_i",
|
||||
@ -2238,6 +2280,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"sinh",
|
||||
"sininv",
|
||||
"sinsyn",
|
||||
"skf",
|
||||
"sleighbells",
|
||||
"slicearray",
|
||||
"slicearray_i",
|
||||
@ -2273,13 +2316,16 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"spat3di",
|
||||
"spat3dt",
|
||||
"spdist",
|
||||
"spf",
|
||||
"splitrig",
|
||||
"sprintf",
|
||||
"sprintfk",
|
||||
"spsend",
|
||||
"sqrt",
|
||||
"squinewave",
|
||||
"st2ms",
|
||||
"statevar",
|
||||
"sterrain",
|
||||
"stix",
|
||||
"strcat",
|
||||
"strcatk",
|
||||
@ -2303,6 +2349,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"strrindex",
|
||||
"strrindexk",
|
||||
"strset",
|
||||
"strstrip",
|
||||
"strsub",
|
||||
"strsubk",
|
||||
"strtod",
|
||||
@ -2317,6 +2364,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"sum",
|
||||
"sumarray",
|
||||
"svfilter",
|
||||
"svn",
|
||||
"syncgrain",
|
||||
"syncloop",
|
||||
"syncphasor",
|
||||
@ -2357,7 +2405,6 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"tabmorphi",
|
||||
"tabplay",
|
||||
"tabrec",
|
||||
"tabrowlin",
|
||||
"tabsum",
|
||||
"tabw",
|
||||
"tabw_i",
|
||||
@ -2389,7 +2436,11 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"trcross",
|
||||
"trfilter",
|
||||
"trhighest",
|
||||
"trigExpseg",
|
||||
"trigLinseg",
|
||||
"trigger",
|
||||
"trighold",
|
||||
"trigphasor",
|
||||
"trigseq",
|
||||
"trim",
|
||||
"trim_i",
|
||||
@ -2401,6 +2452,8 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"trsplit",
|
||||
"turnoff",
|
||||
"turnoff2",
|
||||
"turnoff2_i",
|
||||
"turnoff3",
|
||||
"turnon",
|
||||
"tvconv",
|
||||
"unirand",
|
||||
@ -2424,6 +2477,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"vbapz",
|
||||
"vbapzmove",
|
||||
"vcella",
|
||||
"vclpf",
|
||||
"vco",
|
||||
"vco2",
|
||||
"vco2ft",
|
||||
@ -2472,6 +2526,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"vpow_i",
|
||||
"vpowv",
|
||||
"vpowv_i",
|
||||
"vps",
|
||||
"vpvoc",
|
||||
"vrandh",
|
||||
"vrandi",
|
||||
@ -2511,6 +2566,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"wrap",
|
||||
"writescratch",
|
||||
"wterrain",
|
||||
"wterrain2",
|
||||
"xadsr",
|
||||
"xin",
|
||||
"xout",
|
||||
@ -2543,24 +2599,47 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"zkwm"
|
||||
];
|
||||
var deprecatedOpcodes = [
|
||||
"OSCsendA",
|
||||
"array",
|
||||
"beadsynt",
|
||||
"beosc",
|
||||
"bformdec",
|
||||
"bformenc",
|
||||
"changed",
|
||||
"buchla",
|
||||
"copy2ftab",
|
||||
"copy2ttab",
|
||||
"getrowlin",
|
||||
"hrtfer",
|
||||
"ktableseg",
|
||||
"lentab",
|
||||
"lua_exec",
|
||||
"lua_iaopcall",
|
||||
"lua_iaopcall_off",
|
||||
"lua_ikopcall",
|
||||
"lua_ikopcall_off",
|
||||
"lua_iopcall",
|
||||
"lua_iopcall_off",
|
||||
"lua_opdef",
|
||||
"maxtab",
|
||||
"mintab",
|
||||
"mp3scal_check",
|
||||
"mp3scal_load",
|
||||
"mp3scal_load2",
|
||||
"mp3scal_play",
|
||||
"mp3scal_play2",
|
||||
"pop",
|
||||
"pop_f",
|
||||
"ptable",
|
||||
"ptable3",
|
||||
"ptablei",
|
||||
"ptableiw",
|
||||
"push",
|
||||
"push_f",
|
||||
"pvsgendy",
|
||||
"scalet",
|
||||
"signalflowgraph",
|
||||
"sndload",
|
||||
"socksend_k",
|
||||
"soundout",
|
||||
"soundouts",
|
||||
"specaddm",
|
||||
@ -2573,11 +2652,14 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"specsum",
|
||||
"spectrum",
|
||||
"stack",
|
||||
"sumTableFilter",
|
||||
"sumtab",
|
||||
"systime",
|
||||
"tabgen",
|
||||
"tableiw",
|
||||
"tabmap",
|
||||
"tabmap_i",
|
||||
"tabrowlin",
|
||||
"tabslice",
|
||||
"tb0",
|
||||
"tb0_init",
|
||||
@ -2612,6 +2694,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"tb9",
|
||||
"tb9_init",
|
||||
"vbap16",
|
||||
"vbap1move",
|
||||
"vbap4",
|
||||
"vbap4move",
|
||||
"vbap8",
|
||||
@ -4006,6 +4089,11 @@ var Mode = function() {
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/csound_document";
|
||||
this.snippetFileId = "ace/snippets/csound_document";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
window.require(["ace/mode/csound_document"], function(m) {
|
||||
|
||||
@ -300,7 +300,7 @@ var CsoundScoreHighlightRules = function(embeddedRulePrefix) {
|
||||
start.push(
|
||||
{
|
||||
token : "keyword.control.csound-score",
|
||||
regex : /[abCdefiqstvxy]/
|
||||
regex : /[aBbCdefiqstvxy]/
|
||||
}, {
|
||||
token : "invalid.illegal.csound-score",
|
||||
regex : /w/
|
||||
@ -935,10 +935,10 @@ var PythonHighlightRules = function() {
|
||||
regex: "\\s+"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "'(.)*'"
|
||||
regex: "'[^']*'"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: '"(.)*"'
|
||||
regex: '"[^"]*"'
|
||||
}, {
|
||||
token: "function.support",
|
||||
regex: "(!s|!r|!a)"
|
||||
@ -1141,6 +1141,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"adsynt",
|
||||
"adsynt2",
|
||||
"aftouch",
|
||||
"allpole",
|
||||
"alpass",
|
||||
"alwayson",
|
||||
"ampdb",
|
||||
@ -1148,11 +1149,17 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ampmidi",
|
||||
"ampmidicurve",
|
||||
"ampmidid",
|
||||
"apoleparams",
|
||||
"arduinoRead",
|
||||
"arduinoReadF",
|
||||
"arduinoStart",
|
||||
"arduinoStop",
|
||||
"areson",
|
||||
"aresonk",
|
||||
"atone",
|
||||
"atonek",
|
||||
"atonex",
|
||||
"autocorr",
|
||||
"babo",
|
||||
"balance",
|
||||
"balance2",
|
||||
@ -1160,8 +1167,6 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"barmodel",
|
||||
"bbcutm",
|
||||
"bbcuts",
|
||||
"beadsynt",
|
||||
"beosc",
|
||||
"betarand",
|
||||
"bexprnd",
|
||||
"bformdec1",
|
||||
@ -1170,6 +1175,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"biquad",
|
||||
"biquada",
|
||||
"birnd",
|
||||
"bob",
|
||||
"bpf",
|
||||
"bpfcos",
|
||||
"bqrez",
|
||||
@ -1195,6 +1201,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ceps",
|
||||
"cepsinv",
|
||||
"chanctrl",
|
||||
"changed",
|
||||
"changed2",
|
||||
"chani",
|
||||
"chano",
|
||||
@ -1206,11 +1213,19 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"chnclear",
|
||||
"chnexport",
|
||||
"chnget",
|
||||
"chngeta",
|
||||
"chngeti",
|
||||
"chngetk",
|
||||
"chngetks",
|
||||
"chngets",
|
||||
"chnmix",
|
||||
"chnparams",
|
||||
"chnset",
|
||||
"chnseta",
|
||||
"chnseti",
|
||||
"chnsetk",
|
||||
"chnsetks",
|
||||
"chnsets",
|
||||
"chuap",
|
||||
"clear",
|
||||
"clfilt",
|
||||
@ -1219,6 +1234,13 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"clockon",
|
||||
"cmp",
|
||||
"cmplxprod",
|
||||
"cntCreate",
|
||||
"cntCycles",
|
||||
"cntDelete",
|
||||
"cntDelete_i",
|
||||
"cntRead",
|
||||
"cntReset",
|
||||
"cntState",
|
||||
"comb",
|
||||
"combinv",
|
||||
"compilecsd",
|
||||
@ -1238,6 +1260,8 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"cosseg",
|
||||
"cossegb",
|
||||
"cossegr",
|
||||
"count",
|
||||
"count_i",
|
||||
"cps2pch",
|
||||
"cpsmidi",
|
||||
"cpsmidib",
|
||||
@ -1263,6 +1287,11 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ctrl21",
|
||||
"ctrl7",
|
||||
"ctrlinit",
|
||||
"ctrlpreset",
|
||||
"ctrlprint",
|
||||
"ctrlprintpresets",
|
||||
"ctrlsave",
|
||||
"ctrlselect",
|
||||
"cuserrnd",
|
||||
"dam",
|
||||
"date",
|
||||
@ -1408,6 +1437,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ftchnls",
|
||||
"ftconv",
|
||||
"ftcps",
|
||||
"ftexists",
|
||||
"ftfree",
|
||||
"ftgen",
|
||||
"ftgenonce",
|
||||
@ -1424,7 +1454,9 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"ftsamplebank",
|
||||
"ftsave",
|
||||
"ftsavek",
|
||||
"ftset",
|
||||
"ftslice",
|
||||
"ftslicei",
|
||||
"ftsr",
|
||||
"gain",
|
||||
"gainslider",
|
||||
@ -1441,7 +1473,6 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"getcol",
|
||||
"getftargs",
|
||||
"getrow",
|
||||
"getrowlin",
|
||||
"getseed",
|
||||
"gogobel",
|
||||
"grain",
|
||||
@ -1689,8 +1720,12 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"la_k_upper_solve_mr",
|
||||
"la_k_vc_set",
|
||||
"la_k_vr_set",
|
||||
"lag",
|
||||
"lagud",
|
||||
"lastcycle",
|
||||
"lenarray",
|
||||
"lfo",
|
||||
"lfsr",
|
||||
"limit",
|
||||
"limit1",
|
||||
"lincos",
|
||||
@ -1734,6 +1769,8 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"lowpass2",
|
||||
"lowres",
|
||||
"lowresx",
|
||||
"lpcanal",
|
||||
"lpcfilter",
|
||||
"lpf18",
|
||||
"lpform",
|
||||
"lpfreson",
|
||||
@ -1749,14 +1786,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"lpshold",
|
||||
"lpsholdp",
|
||||
"lpslot",
|
||||
"lua_exec",
|
||||
"lua_iaopcall",
|
||||
"lua_iaopcall_off",
|
||||
"lua_ikopcall",
|
||||
"lua_ikopcall_off",
|
||||
"lua_iopcall",
|
||||
"lua_iopcall_off",
|
||||
"lua_opdef",
|
||||
"lufs",
|
||||
"mac",
|
||||
"maca",
|
||||
"madsr",
|
||||
@ -1779,6 +1809,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"median",
|
||||
"mediank",
|
||||
"metro",
|
||||
"metro2",
|
||||
"mfb",
|
||||
"midglobal",
|
||||
"midiarp",
|
||||
@ -1831,6 +1862,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"mp3sr",
|
||||
"mpulse",
|
||||
"mrtmsg",
|
||||
"ms2st",
|
||||
"mtof",
|
||||
"mton",
|
||||
"multitap",
|
||||
@ -1840,6 +1872,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"mvclpf2",
|
||||
"mvclpf3",
|
||||
"mvclpf4",
|
||||
"mvmfilter",
|
||||
"mxadsr",
|
||||
"nchnls_hw",
|
||||
"nestedap",
|
||||
@ -1883,6 +1916,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"oscilx",
|
||||
"out",
|
||||
"out32",
|
||||
"outall",
|
||||
"outc",
|
||||
"outch",
|
||||
"outh",
|
||||
@ -1983,12 +2017,11 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"printk2",
|
||||
"printks",
|
||||
"printks2",
|
||||
"println",
|
||||
"prints",
|
||||
"printsk",
|
||||
"product",
|
||||
"pset",
|
||||
"ptable",
|
||||
"ptable3",
|
||||
"ptablei",
|
||||
"ptablew",
|
||||
"ptrack",
|
||||
"puts",
|
||||
@ -2005,6 +2038,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"pvsarp",
|
||||
"pvsbandp",
|
||||
"pvsbandr",
|
||||
"pvsbandwidth",
|
||||
"pvsbin",
|
||||
"pvsblur",
|
||||
"pvsbuffer",
|
||||
@ -2013,6 +2047,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"pvscale",
|
||||
"pvscent",
|
||||
"pvsceps",
|
||||
"pvscfs",
|
||||
"pvscross",
|
||||
"pvsdemix",
|
||||
"pvsdiskin",
|
||||
@ -2032,6 +2067,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"pvsinfo",
|
||||
"pvsinit",
|
||||
"pvslock",
|
||||
"pvslpc",
|
||||
"pvsmaska",
|
||||
"pvsmix",
|
||||
"pvsmooth",
|
||||
@ -2133,6 +2169,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"qnan",
|
||||
"r2c",
|
||||
"rand",
|
||||
"randc",
|
||||
"randh",
|
||||
"randi",
|
||||
"random",
|
||||
@ -2156,6 +2193,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"repluck",
|
||||
"reshapearray",
|
||||
"reson",
|
||||
"resonbnk",
|
||||
"resonk",
|
||||
"resonr",
|
||||
"resonx",
|
||||
@ -2173,6 +2211,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"rms",
|
||||
"rnd",
|
||||
"rnd31",
|
||||
"rndseed",
|
||||
"round",
|
||||
"rspline",
|
||||
"rtclock",
|
||||
@ -2185,14 +2224,17 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"sc_phasor",
|
||||
"sc_trig",
|
||||
"scale",
|
||||
"scale2",
|
||||
"scalearray",
|
||||
"scanhammer",
|
||||
"scans",
|
||||
"scantable",
|
||||
"scanu",
|
||||
"scanu2",
|
||||
"schedkwhen",
|
||||
"schedkwhennamed",
|
||||
"schedule",
|
||||
"schedulek",
|
||||
"schedwhen",
|
||||
"scoreline",
|
||||
"scoreline_i",
|
||||
@ -2238,6 +2280,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"sinh",
|
||||
"sininv",
|
||||
"sinsyn",
|
||||
"skf",
|
||||
"sleighbells",
|
||||
"slicearray",
|
||||
"slicearray_i",
|
||||
@ -2273,13 +2316,16 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"spat3di",
|
||||
"spat3dt",
|
||||
"spdist",
|
||||
"spf",
|
||||
"splitrig",
|
||||
"sprintf",
|
||||
"sprintfk",
|
||||
"spsend",
|
||||
"sqrt",
|
||||
"squinewave",
|
||||
"st2ms",
|
||||
"statevar",
|
||||
"sterrain",
|
||||
"stix",
|
||||
"strcat",
|
||||
"strcatk",
|
||||
@ -2303,6 +2349,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"strrindex",
|
||||
"strrindexk",
|
||||
"strset",
|
||||
"strstrip",
|
||||
"strsub",
|
||||
"strsubk",
|
||||
"strtod",
|
||||
@ -2317,6 +2364,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"sum",
|
||||
"sumarray",
|
||||
"svfilter",
|
||||
"svn",
|
||||
"syncgrain",
|
||||
"syncloop",
|
||||
"syncphasor",
|
||||
@ -2357,7 +2405,6 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"tabmorphi",
|
||||
"tabplay",
|
||||
"tabrec",
|
||||
"tabrowlin",
|
||||
"tabsum",
|
||||
"tabw",
|
||||
"tabw_i",
|
||||
@ -2389,7 +2436,11 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"trcross",
|
||||
"trfilter",
|
||||
"trhighest",
|
||||
"trigExpseg",
|
||||
"trigLinseg",
|
||||
"trigger",
|
||||
"trighold",
|
||||
"trigphasor",
|
||||
"trigseq",
|
||||
"trim",
|
||||
"trim_i",
|
||||
@ -2401,6 +2452,8 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"trsplit",
|
||||
"turnoff",
|
||||
"turnoff2",
|
||||
"turnoff2_i",
|
||||
"turnoff3",
|
||||
"turnon",
|
||||
"tvconv",
|
||||
"unirand",
|
||||
@ -2424,6 +2477,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"vbapz",
|
||||
"vbapzmove",
|
||||
"vcella",
|
||||
"vclpf",
|
||||
"vco",
|
||||
"vco2",
|
||||
"vco2ft",
|
||||
@ -2472,6 +2526,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"vpow_i",
|
||||
"vpowv",
|
||||
"vpowv_i",
|
||||
"vps",
|
||||
"vpvoc",
|
||||
"vrandh",
|
||||
"vrandi",
|
||||
@ -2511,6 +2566,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"wrap",
|
||||
"writescratch",
|
||||
"wterrain",
|
||||
"wterrain2",
|
||||
"xadsr",
|
||||
"xin",
|
||||
"xout",
|
||||
@ -2543,24 +2599,47 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"zkwm"
|
||||
];
|
||||
var deprecatedOpcodes = [
|
||||
"OSCsendA",
|
||||
"array",
|
||||
"beadsynt",
|
||||
"beosc",
|
||||
"bformdec",
|
||||
"bformenc",
|
||||
"changed",
|
||||
"buchla",
|
||||
"copy2ftab",
|
||||
"copy2ttab",
|
||||
"getrowlin",
|
||||
"hrtfer",
|
||||
"ktableseg",
|
||||
"lentab",
|
||||
"lua_exec",
|
||||
"lua_iaopcall",
|
||||
"lua_iaopcall_off",
|
||||
"lua_ikopcall",
|
||||
"lua_ikopcall_off",
|
||||
"lua_iopcall",
|
||||
"lua_iopcall_off",
|
||||
"lua_opdef",
|
||||
"maxtab",
|
||||
"mintab",
|
||||
"mp3scal_check",
|
||||
"mp3scal_load",
|
||||
"mp3scal_load2",
|
||||
"mp3scal_play",
|
||||
"mp3scal_play2",
|
||||
"pop",
|
||||
"pop_f",
|
||||
"ptable",
|
||||
"ptable3",
|
||||
"ptablei",
|
||||
"ptableiw",
|
||||
"push",
|
||||
"push_f",
|
||||
"pvsgendy",
|
||||
"scalet",
|
||||
"signalflowgraph",
|
||||
"sndload",
|
||||
"socksend_k",
|
||||
"soundout",
|
||||
"soundouts",
|
||||
"specaddm",
|
||||
@ -2573,11 +2652,14 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"specsum",
|
||||
"spectrum",
|
||||
"stack",
|
||||
"sumTableFilter",
|
||||
"sumtab",
|
||||
"systime",
|
||||
"tabgen",
|
||||
"tableiw",
|
||||
"tabmap",
|
||||
"tabmap_i",
|
||||
"tabrowlin",
|
||||
"tabslice",
|
||||
"tb0",
|
||||
"tb0_init",
|
||||
@ -2612,6 +2694,7 @@ var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
|
||||
"tb9",
|
||||
"tb9_init",
|
||||
"vbap16",
|
||||
"vbap1move",
|
||||
"vbap4",
|
||||
"vbap4move",
|
||||
"vbap8",
|
||||
@ -2937,6 +3020,8 @@ oop.inherits(Mode, TextMode);
|
||||
this.lineCommentStart = ";";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
|
||||
this.$id = "ace/mode/csound_orchestra";
|
||||
this.snippetFileId = "ace/snippets/csound_orchestra";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -300,7 +300,7 @@ var CsoundScoreHighlightRules = function(embeddedRulePrefix) {
|
||||
start.push(
|
||||
{
|
||||
token : "keyword.control.csound-score",
|
||||
regex : /[abCdefiqstvxy]/
|
||||
regex : /[aBbCdefiqstvxy]/
|
||||
}, {
|
||||
token : "invalid.illegal.csound-score",
|
||||
regex : /w/
|
||||
@ -448,6 +448,7 @@ oop.inherits(Mode, TextMode);
|
||||
this.lineCommentStart = ";";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
|
||||
this.$id = "ace/mode/csound_score";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -705,6 +705,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -308,7 +308,7 @@ var DHighlightRules = function() {
|
||||
regex: '[a-zA-Z]+'
|
||||
}, {
|
||||
token: 'string',
|
||||
regex: '".*"'
|
||||
regex: '"[^"]*"'
|
||||
}, {
|
||||
token: 'comment',
|
||||
regex: '//.*$'
|
||||
|
||||
@ -65,7 +65,7 @@ var c_cppHighlightRules = function() {
|
||||
|
||||
var storageType = (
|
||||
"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
|
||||
"_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
|
||||
"_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" +
|
||||
"class|wchar_t|template|char16_t|char32_t"
|
||||
);
|
||||
|
||||
@ -489,6 +489,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/c_cpp";
|
||||
this.snippetFileId = "ace/snippets/c_cpp";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -700,6 +701,7 @@ oop.inherits(Mode, CMode);
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
this.$id = "ace/mode/dart";
|
||||
this.snippetFileId = "ace/snippets/dart";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -132,6 +132,7 @@ oop.inherits(Mode, TextMode);
|
||||
(function() {
|
||||
|
||||
this.$id = "ace/mode/diff";
|
||||
this.snippetFileId = "ace/snippets/diff";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2578,6 +2581,7 @@ oop.inherits(Mode, HtmlMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/django";
|
||||
this.snippetFileId = "ace/snippets/django";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -435,6 +435,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/sh";
|
||||
this.snippetFileId = "ace/snippets/sh";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -168,7 +168,7 @@ var JavaHighlightRules = function() {
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
regex : "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
}, {
|
||||
token : "lparen",
|
||||
regex : "[[({]"
|
||||
@ -483,6 +483,7 @@ oop.inherits(Mode, TextMode);
|
||||
(function() {
|
||||
this.lineCommentStart = "//";
|
||||
this.$id = "ace/mode/drools";
|
||||
this.snippetFileId = "ace/snippets/drools";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -152,6 +152,7 @@ oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/edifact";
|
||||
this.snippetFileId = "ace/snippets/edifact";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -996,6 +996,7 @@ oop.inherits(Mode, TextMode);
|
||||
this.lineCommentStart = "%";
|
||||
this.blockComment = null;
|
||||
this.$id = "ace/mode/erlang";
|
||||
this.snippetFileId = "ace/snippets/erlang";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -245,6 +245,7 @@ oop.inherits(Mode, TextMode);
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
this.$id = "ace/mode/fsl";
|
||||
this.snippetFileId = "ace/snippets/fsl";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -65,7 +65,7 @@ var c_cppHighlightRules = function() {
|
||||
|
||||
var storageType = (
|
||||
"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
|
||||
"_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
|
||||
"_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" +
|
||||
"class|wchar_t|template|char16_t|char32_t"
|
||||
);
|
||||
|
||||
@ -489,6 +489,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/c_cpp";
|
||||
this.snippetFileId = "ace/snippets/c_cpp";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1075,6 +1076,7 @@ oop.inherits(Mode, JavaScriptMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/gobstones";
|
||||
this.snippetFileId = "ace/snippets/gobstones";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -200,6 +200,7 @@ oop.inherits(Mode, TextMode);
|
||||
(function() {
|
||||
this.lineCommentStart = "#";
|
||||
this.$id = "ace/mode/graphqlschema";
|
||||
this.snippetFileId = "ace/snippets/graphqlschema";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -1012,17 +1012,17 @@ var constantOtherSymbol = exports.constantOtherSymbol = {
|
||||
regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
|
||||
};
|
||||
|
||||
var qString = exports.qString = {
|
||||
exports.qString = {
|
||||
token : "string", // single line
|
||||
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
||||
};
|
||||
|
||||
var qqString = exports.qqString = {
|
||||
exports.qqString = {
|
||||
token : "string", // single line
|
||||
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
||||
};
|
||||
|
||||
var tString = exports.tString = {
|
||||
exports.tString = {
|
||||
token : "string", // backtick string
|
||||
regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
|
||||
};
|
||||
@ -1032,9 +1032,34 @@ var constantNumericHex = exports.constantNumericHex = {
|
||||
regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
|
||||
};
|
||||
|
||||
var constantNumericBinary = exports.constantNumericBinary = {
|
||||
token: "constant.numeric",
|
||||
regex: /\b(0[bB][01](?:[01]|_(?=[01]))*)\b/
|
||||
};
|
||||
|
||||
var constantNumericDecimal = exports.constantNumericDecimal = {
|
||||
token: "constant.numeric",
|
||||
regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/
|
||||
};
|
||||
|
||||
var constantNumericOctal = exports.constantNumericDecimal = {
|
||||
token: "constant.numeric",
|
||||
regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/
|
||||
};
|
||||
|
||||
var constantNumericRational = exports.constantNumericRational = {
|
||||
token: "constant.numeric", //rational + complex
|
||||
regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/
|
||||
};
|
||||
|
||||
var constantNumericComplex = exports.constantNumericComplex = {
|
||||
token: "constant.numeric", //simple complex numbers
|
||||
regex: /\b([\d]i)\b/
|
||||
};
|
||||
|
||||
var constantNumericFloat = exports.constantNumericFloat = {
|
||||
token : "constant.numeric", // float
|
||||
regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
|
||||
token : "constant.numeric", // float + complex
|
||||
regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"
|
||||
};
|
||||
|
||||
var instanceVariable = exports.instanceVariable = {
|
||||
@ -1074,18 +1099,19 @@ var RubyHighlightRules = function() {
|
||||
"filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
|
||||
"translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
|
||||
"cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
|
||||
"has_many|has_one|belongs_to|has_and_belongs_to_many"
|
||||
"has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|" +
|
||||
"private_class_method|remove_method|undef_method"
|
||||
);
|
||||
|
||||
var keywords = (
|
||||
"alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
|
||||
"__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
|
||||
"redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
|
||||
"redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend"
|
||||
);
|
||||
|
||||
var buildinConstants = (
|
||||
"true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
|
||||
"RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
|
||||
"RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION"
|
||||
);
|
||||
|
||||
var builtinVariables = (
|
||||
@ -1101,126 +1127,191 @@ var RubyHighlightRules = function() {
|
||||
"invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
|
||||
}, "identifier");
|
||||
|
||||
var escapedChars = "\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})";
|
||||
|
||||
var closeParen = {
|
||||
"(": ")",
|
||||
"[": "]",
|
||||
"{": "}",
|
||||
"<": ">",
|
||||
"^": "^",
|
||||
"|": "|",
|
||||
"%": "%"
|
||||
};
|
||||
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
"start": [
|
||||
{
|
||||
token : "comment",
|
||||
regex : "#.*$"
|
||||
token: "comment",
|
||||
regex: "#.*$"
|
||||
}, {
|
||||
token : "comment", // multi line comment
|
||||
regex : "^=begin(?:$|\\s.*$)",
|
||||
next : "comment"
|
||||
token: "comment.multiline", // multi line comment
|
||||
regex: "^=begin(?=$|\\s.*$)",
|
||||
next: "comment"
|
||||
}, {
|
||||
token : "string.regexp",
|
||||
regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
|
||||
token: "string.regexp",
|
||||
regex: /[/](?=.*\/)/,
|
||||
next: "regex"
|
||||
},
|
||||
|
||||
[{
|
||||
regex: "[{}]", onMatch: function(val, state, stack) {
|
||||
this.next = val == "{" ? this.nextState : "";
|
||||
if (val == "{" && stack.length) {
|
||||
stack.unshift("start", state);
|
||||
return "paren.lparen";
|
||||
}
|
||||
if (val == "}" && stack.length) {
|
||||
stack.shift();
|
||||
this.next = stack.shift();
|
||||
if (this.next.indexOf("string") != -1)
|
||||
return "paren.end";
|
||||
}
|
||||
return val == "{" ? "paren.lparen" : "paren.rparen";
|
||||
},
|
||||
nextState: "start"
|
||||
}, {
|
||||
token : "string.start",
|
||||
regex : /"/,
|
||||
push : [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
|
||||
token: ["constant.other.symbol.ruby", "string.start"],
|
||||
regex: /(:)?(")/,
|
||||
push: [{
|
||||
token: "constant.language.escape",
|
||||
regex: escapedChars
|
||||
}, {
|
||||
token : "paren.start",
|
||||
regex : /#{/,
|
||||
push : "start"
|
||||
token: "paren.start",
|
||||
regex: /#{/,
|
||||
push: "start"
|
||||
}, {
|
||||
token : "string.end",
|
||||
regex : /"/,
|
||||
next : "pop"
|
||||
token: "string.end",
|
||||
regex: /"/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}, {
|
||||
token : "string.start",
|
||||
regex : /`/,
|
||||
push : [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
|
||||
token: "string.start",
|
||||
regex: /`/,
|
||||
push: [{
|
||||
token: "constant.language.escape",
|
||||
regex: escapedChars
|
||||
}, {
|
||||
token : "paren.start",
|
||||
regex : /#{/,
|
||||
push : "start"
|
||||
token: "paren.start",
|
||||
regex: /#{/,
|
||||
push: "start"
|
||||
}, {
|
||||
token : "string.end",
|
||||
regex : /`/,
|
||||
next : "pop"
|
||||
token: "string.end",
|
||||
regex: /`/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}, {
|
||||
token : "string.start",
|
||||
regex : /'/,
|
||||
push : [{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\['\\]/
|
||||
}, {
|
||||
token : "string.end",
|
||||
regex : /'/,
|
||||
next : "pop"
|
||||
token: ["constant.other.symbol.ruby", "string.start"],
|
||||
regex: /(:)?(')/,
|
||||
push: [{
|
||||
token: "constant.language.escape",
|
||||
regex: /\\['\\]/
|
||||
}, {
|
||||
token: "string.end",
|
||||
regex: /'/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}]
|
||||
}, {
|
||||
token: "string.start",//doesn't see any differences between strings and array of strings in highlighting
|
||||
regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) {
|
||||
if (stack.length)
|
||||
stack = [];
|
||||
var paren = val[val.length - 1];
|
||||
stack.unshift(paren, state);
|
||||
this.next = "qStateWithoutInterpolation";
|
||||
return this.token;
|
||||
}
|
||||
}, {
|
||||
token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
|
||||
regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) {
|
||||
if (stack.length)
|
||||
stack = [];
|
||||
var paren = val[val.length - 1];
|
||||
stack.unshift(paren, state);
|
||||
this.next = "qStateWithInterpolation";
|
||||
return this.token;
|
||||
}
|
||||
}, {
|
||||
token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
|
||||
regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) {
|
||||
if (stack.length)
|
||||
stack = [];
|
||||
var paren = val[val.length - 1];
|
||||
stack.unshift(paren, state);
|
||||
this.next = "sStateWithoutInterpolation";
|
||||
return this.token;
|
||||
}
|
||||
}, {
|
||||
token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
|
||||
regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) {
|
||||
if (stack.length)
|
||||
stack = [];
|
||||
var paren = val[val.length - 1];
|
||||
stack.unshift(paren, state);
|
||||
this.next = "sStateWithInterpolation";
|
||||
return this.token;
|
||||
}
|
||||
}, {
|
||||
token: "string.regexp",
|
||||
regex: /%[r]([(\[<{^|%])/, onMatch: function (val, state, stack) {
|
||||
if (stack.length)
|
||||
stack = [];
|
||||
var paren = val[val.length - 1];
|
||||
stack.unshift(paren, state);
|
||||
this.next = "rState";
|
||||
return this.token;
|
||||
}
|
||||
}],
|
||||
|
||||
{
|
||||
token : "text", // namespaces aren't symbols
|
||||
regex : "::"
|
||||
token: "punctuation", // namespaces aren't symbols
|
||||
regex: "::"
|
||||
},
|
||||
instanceVariable,
|
||||
{
|
||||
token: "variable.global", // global variable
|
||||
regex: "[$][a-zA-Z_\\d]+"
|
||||
}, {
|
||||
token : "variable.instance", // instance variable
|
||||
regex : "@{1,2}[a-zA-Z_\\d]+"
|
||||
token: "support.class", // class name
|
||||
regex: "[A-Z][a-zA-Z_\\d]*"
|
||||
}, {
|
||||
token : "support.class", // class name
|
||||
regex : "[A-Z][a-zA-Z_\\d]+"
|
||||
token: ["punctuation.operator", "support.function"],
|
||||
regex: /(\.)([a-zA-Z_\d]+)(?=\()/
|
||||
}, {
|
||||
token: ["punctuation.operator", "identifier"],
|
||||
regex: /(\.)([a-zA-Z_][a-zA-Z_\d]*)/
|
||||
}, {
|
||||
token: "string.character",
|
||||
regex: "\\B\\?(?:" + escapedChars + "|\\S)"
|
||||
}, {
|
||||
token: "punctuation.operator",
|
||||
regex: /\?(?=.+:)/
|
||||
},
|
||||
|
||||
constantNumericRational,
|
||||
constantNumericComplex,
|
||||
constantOtherSymbol,
|
||||
constantNumericHex,
|
||||
constantNumericFloat,
|
||||
|
||||
constantNumericBinary,
|
||||
constantNumericDecimal,
|
||||
constantNumericOctal,
|
||||
{
|
||||
token : "constant.language.boolean",
|
||||
regex : "(?:true|false)\\b"
|
||||
token: "constant.language.boolean",
|
||||
regex: "(?:true|false)\\b"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
token: keywordMapper,
|
||||
regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "punctuation.separator.key-value",
|
||||
regex : "=>"
|
||||
token: "punctuation.separator.key-value",
|
||||
regex: "=>"
|
||||
}, {
|
||||
stateName: "heredoc",
|
||||
onMatch : function(value, currentState, stack) {
|
||||
var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
|
||||
onMatch: function (value, currentState, stack) {
|
||||
var next = (value[2] == '-' || value[2] == '~') ? "indentedHeredoc" : "heredoc";
|
||||
var tokens = value.split(this.splitRegex);
|
||||
stack.push(next, tokens[3]);
|
||||
return [
|
||||
{type:"constant", value: tokens[1]},
|
||||
{type:"string", value: tokens[2]},
|
||||
{type:"support.class", value: tokens[3]},
|
||||
{type:"string", value: tokens[4]}
|
||||
{type: "constant", value: tokens[1]},
|
||||
{type: "string", value: tokens[2]},
|
||||
{type: "support.class", value: tokens[3]},
|
||||
{type: "string", value: tokens[4]}
|
||||
];
|
||||
},
|
||||
regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
|
||||
regex: "(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",
|
||||
rules: {
|
||||
heredoc: [{
|
||||
onMatch: function(value, currentState, stack) {
|
||||
onMatch: function(value, currentState, stack) {
|
||||
if (value === stack[1]) {
|
||||
stack.shift();
|
||||
stack.shift();
|
||||
@ -1237,7 +1328,7 @@ var RubyHighlightRules = function() {
|
||||
token: "string",
|
||||
regex: "^ +"
|
||||
}, {
|
||||
onMatch: function(value, currentState, stack) {
|
||||
onMatch: function(value, currentState, stack) {
|
||||
if (value === stack[1]) {
|
||||
stack.shift();
|
||||
stack.shift();
|
||||
@ -1252,38 +1343,261 @@ var RubyHighlightRules = function() {
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
regex : "$",
|
||||
token : "empty",
|
||||
next : function(currentState, stack) {
|
||||
regex: "$",
|
||||
token: "empty",
|
||||
next: function(currentState, stack) {
|
||||
if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
|
||||
return stack[0];
|
||||
return currentState;
|
||||
}
|
||||
}, {
|
||||
token: "keyword.operator",
|
||||
regex: "!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
}, {
|
||||
token : "string.character",
|
||||
regex : "\\B\\?."
|
||||
token: "paren.lparen",
|
||||
regex: "[[({]"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
token: "paren.rparen",
|
||||
regex: "[\\])}]",
|
||||
onMatch: function(value, currentState, stack) {
|
||||
this.next = '';
|
||||
if (value == "}" && stack.length > 1 && stack[1] != "start") {
|
||||
stack.shift();
|
||||
this.next = stack.shift();
|
||||
}
|
||||
return this.token;
|
||||
}
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[[({]"
|
||||
token: "text",
|
||||
regex: "\\s+"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\])}]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
token: "punctuation.operator",
|
||||
regex: /[?:,;.]/
|
||||
}
|
||||
],
|
||||
"comment" : [
|
||||
"comment": [
|
||||
{
|
||||
token : "comment", // closing comment
|
||||
regex : "^=end(?:$|\\s.*$)",
|
||||
next : "start"
|
||||
token: "comment.multiline", // closing comment
|
||||
regex: "^=end(?=$|\\s.*$)",
|
||||
next: "start"
|
||||
}, {
|
||||
token : "comment", // comment spanning whole line
|
||||
regex : ".+"
|
||||
token: "comment", // comment spanning whole line
|
||||
regex: ".+"
|
||||
}
|
||||
],
|
||||
"qStateWithInterpolation": [{
|
||||
token: "string.start",// excluded nested |^% due to difficulty in realization
|
||||
regex: /[(\[<{]/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val === stack[0]) {
|
||||
stack.unshift(val, state);
|
||||
return this.token;
|
||||
}
|
||||
return "string";
|
||||
}
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: escapedChars
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: /\\./
|
||||
}, {
|
||||
token: "paren.start",
|
||||
regex: /#{/,
|
||||
push: "start"
|
||||
}, {
|
||||
token: "string.end",
|
||||
regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val === closeParen[stack[0]]) {
|
||||
stack.shift();
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = '';
|
||||
return "string";
|
||||
}
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}],
|
||||
"qStateWithoutInterpolation": [{
|
||||
token: "string.start",// excluded nested |^% due to difficulty in realization
|
||||
regex: /[(\[<{]/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val === stack[0]) {
|
||||
stack.unshift(val, state);
|
||||
return this.token;
|
||||
}
|
||||
return "string";
|
||||
}
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: /\\['\\]/
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: /\\./
|
||||
}, {
|
||||
token: "string.end",
|
||||
regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val === closeParen[stack[0]]) {
|
||||
stack.shift();
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = '';
|
||||
return "string";
|
||||
}
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}],
|
||||
"sStateWithoutInterpolation": [{
|
||||
token: "constant.other.symbol.ruby",// excluded nested |^% due to difficulty in realization
|
||||
regex: /[(\[<{]/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val === stack[0]) {
|
||||
stack.unshift(val, state);
|
||||
return this.token;
|
||||
}
|
||||
return "constant.other.symbol.ruby";
|
||||
}
|
||||
}, {
|
||||
token: "constant.other.symbol.ruby",
|
||||
regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val === closeParen[stack[0]]) {
|
||||
stack.shift();
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = '';
|
||||
return "constant.other.symbol.ruby";
|
||||
}
|
||||
}, {
|
||||
defaultToken: "constant.other.symbol.ruby"
|
||||
}],
|
||||
"sStateWithInterpolation": [{
|
||||
token: "constant.other.symbol.ruby",// excluded nested |^% due to difficulty in realization
|
||||
regex: /[(\[<{]/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val === stack[0]) {
|
||||
stack.unshift(val, state);
|
||||
return this.token;
|
||||
}
|
||||
return "constant.other.symbol.ruby";
|
||||
}
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: escapedChars
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: /\\./
|
||||
}, {
|
||||
token: "paren.start",
|
||||
regex: /#{/,
|
||||
push: "start"
|
||||
}, {
|
||||
token: "constant.other.symbol.ruby",
|
||||
regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val === closeParen[stack[0]]) {
|
||||
stack.shift();
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = '';
|
||||
return "constant.other.symbol.ruby";
|
||||
}
|
||||
}, {
|
||||
defaultToken: "constant.other.symbol.ruby"
|
||||
}],
|
||||
"rState": [{
|
||||
token: "string.regexp",// excluded nested |^% due to difficulty in realization
|
||||
regex: /[(\[<{]/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val === stack[0]) {
|
||||
stack.unshift(val, state);
|
||||
return this.token;
|
||||
}
|
||||
return "constant.language.escape";
|
||||
}
|
||||
}, {
|
||||
token: "paren.start",
|
||||
regex: /#{/,
|
||||
push: "start"
|
||||
}, {
|
||||
token: "string.regexp",
|
||||
regex: /\//
|
||||
}, {
|
||||
token: "string.regexp",
|
||||
regex: /[)\]>}^|%][imxouesn]*/, onMatch: function (val, state, stack) {
|
||||
if (stack.length && val[0] === closeParen[stack[0]]) {
|
||||
stack.shift();
|
||||
this.next = stack.shift();
|
||||
return this.token;
|
||||
}
|
||||
this.next = '';
|
||||
return "constant.language.escape";
|
||||
}
|
||||
},
|
||||
{include: "regex"},
|
||||
{
|
||||
defaultToken: "string.regexp"
|
||||
}],
|
||||
"regex": [
|
||||
{// character classes
|
||||
token: "regexp.keyword",
|
||||
regex: /\\[wWdDhHsS]/
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: /\\[AGbBzZ]/
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: /\\g<[a-zA-Z0-9]*>/
|
||||
}, {
|
||||
token: ["constant.language.escape", "regexp.keyword", "constant.language.escape"],
|
||||
regex: /(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/
|
||||
}, {
|
||||
token: ["constant.language.escape", "invalid", "constant.language.escape"],
|
||||
regex: /(\\p{\^?)([^/]*)(})/
|
||||
}, {// escapes
|
||||
token: "regexp.keyword.operator",
|
||||
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
||||
}, {// flag
|
||||
token: "string.regexp",
|
||||
regex: /[/][imxouesn]*/,
|
||||
next: "start"
|
||||
}, {// invalid operators
|
||||
token: "invalid",
|
||||
regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
|
||||
}, {// operators
|
||||
token: "constant.language.escape",
|
||||
regex: /\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
|
||||
}, {
|
||||
token: "constant.language.delimiter",
|
||||
regex: /\|/
|
||||
}, {
|
||||
token: "regexp.keyword",
|
||||
regex: /\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: /\[\^?/,
|
||||
push: "regex_character_class"
|
||||
}, {
|
||||
defaultToken: "string.regexp"
|
||||
}
|
||||
],
|
||||
"regex_character_class": [
|
||||
{
|
||||
token: "regexp.keyword",
|
||||
regex: /\\[wWdDhHsS]/
|
||||
}, {
|
||||
token: "regexp.charclass.keyword.operator",
|
||||
regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: /&?&?\[\^?/,
|
||||
push: "regex_character_class"
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: "]",
|
||||
next: "pop"
|
||||
}, {
|
||||
token: "constant.language.escape",
|
||||
regex: "-"
|
||||
}, {
|
||||
defaultToken: "string.regexp.characterclass"
|
||||
}
|
||||
]
|
||||
};
|
||||
@ -1545,6 +1859,7 @@ oop.inherits(Mode, TextMode);
|
||||
this.lineCommentStart = "//";
|
||||
|
||||
this.$id = "ace/mode/haml";
|
||||
this.snippetFileId = "ace/snippets/haml";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -366,6 +366,7 @@ oop.inherits(Mode, TextMode);
|
||||
this.lineCommentStart = "--";
|
||||
this.blockComment = null;
|
||||
this.$id = "ace/mode/haskell";
|
||||
this.snippetFileId = "ace/snippets/haskell";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -1704,6 +1704,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2041,6 +2042,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2933,6 +2935,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -234,6 +234,7 @@ oop.inherits(Mode, TextMode);
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
this.$id = "ace/mode/io";
|
||||
this.snippetFileId = "ace/snippets/io";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -909,7 +910,7 @@ var JavaHighlightRules = function() {
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
regex : "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
}, {
|
||||
token : "lparen",
|
||||
regex : "[[({]"
|
||||
@ -1023,6 +1024,7 @@ oop.inherits(Mode, JavaScriptMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/java";
|
||||
this.snippetFileId = "ace/snippets/java";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -275,6 +275,9 @@ oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
|
||||
|
||||
@ -2618,6 +2618,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/jsoniq";
|
||||
this.snippetFileId = "ace/snippets/jsoniq";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -1122,7 +1122,7 @@ var JavaHighlightRules = function() {
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
regex : "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
|
||||
}, {
|
||||
token : "lparen",
|
||||
regex : "[[({]"
|
||||
@ -1419,6 +1419,7 @@ oop.inherits(Mode, TextMode);
|
||||
(function() {
|
||||
|
||||
this.$id = "ace/mode/jsp";
|
||||
this.snippetFileId = "ace/snippets/jsp";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -781,6 +781,8 @@ var Mode = function() {
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
this.$id = "ace/mode/kotlin";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
|
||||
2708
htdocs/includes/ace/src/mode-latte.js
Normal file
2708
htdocs/includes/ace/src/mode-latte.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2725,6 +2728,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/liquid";
|
||||
this.snippetFileId = "ace/snippets/liquid";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -329,6 +329,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/lsl";
|
||||
this.snippetFileId = "ace/snippets/lsl";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -438,6 +438,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/lua";
|
||||
this.snippetFileId = "ace/snippets/lua";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2938,6 +2941,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/lua";
|
||||
this.snippetFileId = "ace/snippets/lua";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -398,6 +398,7 @@ oop.inherits(Mode, TextMode);
|
||||
this.$indentWithTabs = true;
|
||||
|
||||
this.$id = "ace/mode/makefile";
|
||||
this.snippetFileId = "ace/snippets/makefile";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1986,6 +1987,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2539,6 +2541,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -3124,6 +3127,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/sh";
|
||||
this.snippetFileId = "ace/snippets/sh";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -3176,6 +3180,7 @@ oop.inherits(Mode, TextMode);
|
||||
}
|
||||
};
|
||||
this.$id = "ace/mode/markdown";
|
||||
this.snippetFileId = "ace/snippets/markdown";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -278,6 +278,7 @@ oop.inherits(Mode, TextMode);
|
||||
(function() {
|
||||
this.lineCommentStart = "//";
|
||||
this.$id = "ace/mode/maze";
|
||||
this.snippetFileId = "ace/snippets/maze";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
592
htdocs/includes/ace/src/mode-mediawiki.js
Normal file
592
htdocs/includes/ace/src/mode-mediawiki.js
Normal file
@ -0,0 +1,592 @@
|
||||
define("ace/mode/mediawiki_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var MediaWikiHighlightRules = function() {
|
||||
this.$rules = {
|
||||
start: [{
|
||||
include: "#switch"
|
||||
}, {
|
||||
include: "#redirect"
|
||||
}, {
|
||||
include: "#variable"
|
||||
}, {
|
||||
include: "#comment"
|
||||
}, {
|
||||
include: "#entity"
|
||||
}, {
|
||||
include: "#emphasis"
|
||||
}, {
|
||||
include: "#tag"
|
||||
}, {
|
||||
include: "#table"
|
||||
}, {
|
||||
include: "#hr"
|
||||
}, {
|
||||
include: "#heading"
|
||||
}, {
|
||||
include: "#link"
|
||||
}, {
|
||||
include: "#list"
|
||||
}, {
|
||||
include: "#template"
|
||||
}],
|
||||
"#hr": [{
|
||||
token: "markup.bold",
|
||||
regex: /^[-]{4,}/
|
||||
}],
|
||||
"#switch": [{
|
||||
token: "constant.language",
|
||||
regex: /(__NOTOC__|__FORCETOC__|__TOC__|__NOEDITSECTION__|__NEWSECTIONLINK__|__NONEWSECTIONLINK__|__NOWYSIWYG__|__NOGALLERY__|__HIDDENCAT__|__EXPECTUNUSEDCATEGORY__|__NOCONTENTCONVERT__|__NOCC__|__NOTITLECONVERT__|__NOTC__|__START__|__END__|__INDEX__|__NOINDEX__|__STATICREDIRECT__|__NOGLOBAL__|__DISAMBIG__)/
|
||||
}],
|
||||
"#redirect": [{
|
||||
token: [
|
||||
"keyword.control.redirect",
|
||||
"meta.keyword.control"
|
||||
],
|
||||
regex: /(^#REDIRECT|^#redirect|^#Redirect)(\s+)/
|
||||
}],
|
||||
"#variable": [{
|
||||
token: "storage.type.variable",
|
||||
regex: /{{{/,
|
||||
push: [{
|
||||
token: "storage.type.variable",
|
||||
regex: /}}}/,
|
||||
next: "pop"
|
||||
}, {
|
||||
token: [
|
||||
"text",
|
||||
"variable.other",
|
||||
"text",
|
||||
"keyword.operator"
|
||||
],
|
||||
regex: /(\s*)(\w+)(\s*)((?:\|)?)/
|
||||
}, {
|
||||
defaultToken: "storage.type.variable"
|
||||
}]
|
||||
}],
|
||||
"#entity": [{
|
||||
token: "constant.character.entity",
|
||||
regex: /&\w+;/
|
||||
}],
|
||||
"#list": [{
|
||||
token: "markup.bold",
|
||||
regex: /^[#*;:]+/,
|
||||
push: [{
|
||||
token: "markup.list",
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "$self"
|
||||
}, {
|
||||
defaultToken: "markup.list"
|
||||
}]
|
||||
}],
|
||||
"#template": [{
|
||||
token: [
|
||||
"storage.type.function",
|
||||
"meta.template",
|
||||
"entity.name.function",
|
||||
"meta.template"
|
||||
],
|
||||
regex: /({{)(\s*)([#\w: ]+)(\s*)/,
|
||||
push: [{
|
||||
token: "storage.type.function",
|
||||
regex: /}}/,
|
||||
next: "pop"
|
||||
}, {
|
||||
token: [
|
||||
"storage",
|
||||
"meta.structure.dictionary",
|
||||
"support.type.property-name",
|
||||
"meta.structure.dictionary",
|
||||
"punctuation.separator.dictionary.key-value",
|
||||
"meta.structure.dictionary",
|
||||
"meta.structure.dictionary.value"
|
||||
],
|
||||
regex: /(\|)(\s*)([a-zA-Z-]*)(\s*)(=)(\s*)([^|}]*)/,
|
||||
push: [{
|
||||
token: "meta.structure.dictionary",
|
||||
regex: /(?=}}|[|])/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "meta.structure.dictionary"
|
||||
}]
|
||||
}, {
|
||||
token: ["storage", "meta.template.value"],
|
||||
regex: /(\|)(.*?)/,
|
||||
push: [{
|
||||
token: [],
|
||||
regex: /(?=}}|[|])/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "$self"
|
||||
}, {
|
||||
defaultToken: "meta.template.value"
|
||||
}]
|
||||
}, {
|
||||
defaultToken: "meta.template"
|
||||
}]
|
||||
}],
|
||||
"#link": [{
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"meta.tag.link.internal",
|
||||
"entity.name.tag",
|
||||
"meta.tag.link.internal",
|
||||
"string.other.link.title",
|
||||
"meta.tag.link.internal",
|
||||
"punctuation.definition.tag"
|
||||
],
|
||||
regex: /(\[\[)(\s*)((?:Category|Wikipedia)?)(:?)([^\]\]\|]+)(\s*)((?:\|)*)/,
|
||||
push: [{
|
||||
token: "punctuation.definition.tag.end",
|
||||
regex: /\]\]/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "$self"
|
||||
}, {
|
||||
defaultToken: "meta.tag.link.internal"
|
||||
}]
|
||||
}, {
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"meta.tag.link.external",
|
||||
"meta.tag.link.external",
|
||||
"string.unquoted",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /(\[)(.*?)([\s]+)(.*?)(\])/
|
||||
}],
|
||||
"#comment": [{
|
||||
token: "punctuation.definition.comment.html",
|
||||
regex: /<!--/,
|
||||
push: [{
|
||||
token: "punctuation.definition.comment.html",
|
||||
regex: /-->/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment.block.html"
|
||||
}]
|
||||
}],
|
||||
"#emphasis": [{
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"markup.italic.bold",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /(''''')(?!')(.*?)('''''|$)/
|
||||
}, {
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"markup.bold",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /(''')(?!')(.*?)('''|$)/
|
||||
}, {
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"markup.italic",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /('')(?!')(.*?)(''|$)/
|
||||
}],
|
||||
"#heading": [{
|
||||
token: [
|
||||
"punctuation.definition.heading",
|
||||
"entity.name.section",
|
||||
"punctuation.definition.heading"
|
||||
],
|
||||
regex: /(={1,6})(.+?)(\1)(?!=)/
|
||||
}],
|
||||
"#tag": [{
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"entity.name.tag",
|
||||
"meta.tag.block.ref",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /(<)(ref)((?:\s+.*?)?)(>)/,
|
||||
caseInsensitive: true,
|
||||
push: [{
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"entity.name.tag",
|
||||
"meta.tag.block.ref",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /(<\/)(ref)(\s*)(>)/,
|
||||
caseInsensitive: true,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "$self"
|
||||
}, {
|
||||
defaultToken: "meta.tag.block.ref"
|
||||
}]
|
||||
},
|
||||
{
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"entity.name.tag",
|
||||
"meta.tag.block.nowiki",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /(<)(nowiki)((?:\s+.*?)?)(>)/,
|
||||
caseInsensitive: true,
|
||||
push: [{
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"entity.name.tag",
|
||||
"meta.tag.block.nowiki",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /(<\/)(nowiki)(\s*)(>)/,
|
||||
caseInsensitive: true,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "meta.tag.block.nowiki"
|
||||
}]
|
||||
}, {
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"entity.name.tag"
|
||||
],
|
||||
regex: /(<\/?)(noinclude|includeonly|onlyinclude)(?=\W)/,
|
||||
caseInsensitive: true,
|
||||
push: [{
|
||||
token: [
|
||||
"invalid.illegal",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /((?:\/)?)(>)/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#attribute"
|
||||
}, {
|
||||
defaultToken: "meta.tag.block.any"
|
||||
}]
|
||||
}, {
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"entity.name.tag"
|
||||
],
|
||||
regex: /(<)(br|wbr|hr|meta|link)(?=\W)/,
|
||||
caseInsensitive: true,
|
||||
push: [{
|
||||
token: "punctuation.definition.tag.end",
|
||||
regex: /\/?>/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#attribute"
|
||||
}, {
|
||||
defaultToken: "meta.tag.other"
|
||||
}]
|
||||
}, {
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"entity.name.tag"
|
||||
],
|
||||
regex: /(<\/?)(div|center|span|h1|h2|h3|h4|h5|h6|bdo|em|strong|cite|dfn|code|samp|kbd|var|abbr|blockquote|q|sub|sup|p|pre|ins|del|ul|ol|li|dl|dd|dt|table|caption|thead|tfoot|tbody|colgroup|col|tr|td|th|a|img|video|source|track|tt|b|i|big|small|strike|s|u|font|ruby|rb|rp|rt|rtc|math|figure|figcaption|bdi|data|time|mark|html)(?=\W)/,
|
||||
caseInsensitive: true,
|
||||
push: [{
|
||||
token: [
|
||||
"invalid.illegal",
|
||||
"punctuation.definition.tag.end"
|
||||
],
|
||||
regex: /((?:\/)?)(>)/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#attribute"
|
||||
}, {
|
||||
defaultToken: "meta.tag.block"
|
||||
}]
|
||||
}, {
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"invalid.illegal"
|
||||
],
|
||||
regex: /(<\/)(br|wbr|hr|meta|link)(?=\W)/,
|
||||
caseInsensitive: true,
|
||||
push: [{
|
||||
token: "punctuation.definition.tag.end",
|
||||
regex: /\/?>/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#attribute"
|
||||
}, {
|
||||
defaultToken: "meta.tag.other"
|
||||
}]
|
||||
}],
|
||||
"#caption": [{
|
||||
token: [
|
||||
"meta.tag.block.table-caption",
|
||||
"punctuation.definition.tag.begin"
|
||||
],
|
||||
regex: /^(\s*)(\|\+)/,
|
||||
push: [{
|
||||
token: "meta.tag.block.table-caption",
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "meta.tag.block.table-caption"
|
||||
}]
|
||||
}],
|
||||
"#tr": [{
|
||||
token: [
|
||||
"meta.tag.block.tr",
|
||||
"punctuation.definition.tag.begin",
|
||||
"meta.tag.block.tr",
|
||||
"invalid.illegal"
|
||||
],
|
||||
regex: /^(\s*)(\|\-)([\s]*)(.*)/
|
||||
}],
|
||||
"#th": [{
|
||||
token: [
|
||||
"meta.tag.block.th.heading",
|
||||
"punctuation.definition.tag.begin",
|
||||
"meta.tag.block.th.heading",
|
||||
"punctuation.definition.tag",
|
||||
"markup.bold"
|
||||
],
|
||||
regex: /^(\s*)(!)(?:(.*?)(\|))?(.*?)(?=!!|$)/,
|
||||
push: [{
|
||||
token: "meta.tag.block.th.heading",
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
token: [
|
||||
"punctuation.definition.tag.begin",
|
||||
"meta.tag.block.th.inline",
|
||||
"punctuation.definition.tag",
|
||||
"markup.bold"
|
||||
],
|
||||
regex: /(!!)(?:(.*?)(\|))?(.*?)(?=!!|$)/
|
||||
}, {
|
||||
include: "$self"
|
||||
}, {
|
||||
defaultToken: "meta.tag.block.th.heading"
|
||||
}]
|
||||
}],
|
||||
"#td": [{
|
||||
token: [
|
||||
"meta.tag.block.td",
|
||||
"punctuation.definition.tag.begin"
|
||||
],
|
||||
regex: /^(\s*)(\|)/,
|
||||
push: [{
|
||||
token: "meta.tag.block.td",
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "$self"
|
||||
}, {
|
||||
defaultToken: "meta.tag.block.td"
|
||||
}]
|
||||
}],
|
||||
"#table": [{
|
||||
patterns: [{
|
||||
name: "meta.tag.block.table",
|
||||
begin: "^\\s*({\\|)(.*?)$",
|
||||
end: "^\\s*\\|}",
|
||||
beginCaptures: {
|
||||
1: {
|
||||
name: "punctuation.definition.tag.begin"
|
||||
},
|
||||
2: {
|
||||
patterns: [{
|
||||
include: "#attribute"
|
||||
}]
|
||||
},
|
||||
3: {
|
||||
name: "invalid.illegal"
|
||||
}
|
||||
},
|
||||
endCaptures: {
|
||||
0: {
|
||||
name: "punctuation.definition.tag.end"
|
||||
}
|
||||
},
|
||||
patterns: [{
|
||||
include: "#comment"
|
||||
}, {
|
||||
include: "#template"
|
||||
}, {
|
||||
include: "#caption"
|
||||
}, {
|
||||
include: "#tr"
|
||||
}, {
|
||||
include: "#th"
|
||||
}, {
|
||||
include: "#td"
|
||||
}]
|
||||
}],
|
||||
repository: {
|
||||
caption: {
|
||||
name: "meta.tag.block.table-caption",
|
||||
begin: "^\\s*(\\|\\+)",
|
||||
end: "$",
|
||||
beginCaptures: {
|
||||
1: {
|
||||
name: "punctuation.definition.tag.begin"
|
||||
}
|
||||
}
|
||||
},
|
||||
tr: {
|
||||
name: "meta.tag.block.tr",
|
||||
match: "^\\s*(\\|\\-)[\\s]*(.*)",
|
||||
captures: {
|
||||
1: {
|
||||
name: "punctuation.definition.tag.begin"
|
||||
},
|
||||
2: {
|
||||
name: "invalid.illegal"
|
||||
}
|
||||
}
|
||||
},
|
||||
th: {
|
||||
name: "meta.tag.block.th.heading",
|
||||
begin: "^\\s*(!)((.*?)(\\|))?(.*?)(?=(!!)|$)",
|
||||
end: "$",
|
||||
beginCaptures: {
|
||||
1: {
|
||||
name: "punctuation.definition.tag.begin"
|
||||
},
|
||||
3: {
|
||||
patterns: [{
|
||||
include: "#attribute"
|
||||
}]
|
||||
},
|
||||
4: {
|
||||
name: "punctuation.definition.tag"
|
||||
},
|
||||
5: {
|
||||
name: "markup.bold"
|
||||
}
|
||||
},
|
||||
patterns: [{
|
||||
name: "meta.tag.block.th.inline",
|
||||
match: "(!!)((.*?)(\\|))?(.*?)(?=(!!)|$)",
|
||||
captures: {
|
||||
1: {
|
||||
name: "punctuation.definition.tag.begin"
|
||||
},
|
||||
3: {
|
||||
patterns: [{
|
||||
include: "#attribute"
|
||||
}]
|
||||
},
|
||||
4: {
|
||||
name: "punctuation.definition.tag"
|
||||
},
|
||||
5: {
|
||||
name: "markup.bold"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
include: "$self"
|
||||
}]
|
||||
},
|
||||
td: {
|
||||
name: "meta.tag.block.td",
|
||||
begin: "^\\s*(\\|)",
|
||||
end: "$",
|
||||
beginCaptures: {
|
||||
1: {
|
||||
name: "punctuation.definition.tag.begin"
|
||||
},
|
||||
2: {
|
||||
patterns: [{
|
||||
include: "#attribute"
|
||||
}]
|
||||
},
|
||||
3: {
|
||||
name: "punctuation.definition.tag"
|
||||
}
|
||||
},
|
||||
patterns: [{
|
||||
include: "$self"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}],
|
||||
"#attribute": [{
|
||||
include: "#string"
|
||||
}, {
|
||||
token: "entity.other.attribute-name",
|
||||
regex: /\w+/
|
||||
}],
|
||||
"#string": [{
|
||||
token: "string.quoted.double",
|
||||
regex: /\"/,
|
||||
push: [{
|
||||
token: "string.quoted.double",
|
||||
regex: /\"/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "string.quoted.double"
|
||||
}]
|
||||
}, {
|
||||
token: "string.quoted.single",
|
||||
regex: /\'/,
|
||||
push: [{
|
||||
token: "string.quoted.single",
|
||||
regex: /\'/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "string.quoted.single"
|
||||
}]
|
||||
}],
|
||||
"#url": [{
|
||||
token: "markup.underline.link",
|
||||
regex: /(?:http(?:s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:\/?#\[\]@!\$&'\(\)\*\+,;=.]+/
|
||||
}, {
|
||||
token: "invalid.illegal",
|
||||
regex: /.*/
|
||||
}]
|
||||
};
|
||||
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
MediaWikiHighlightRules.metaData = {
|
||||
name: "MediaWiki",
|
||||
scopeName: "text.html.mediawiki",
|
||||
fileTypes: ["mediawiki", "wiki"]
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(MediaWikiHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.MediaWikiHighlightRules = MediaWikiHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/mediawiki",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mediawiki_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var MediaWikiHighlightRules = require("./mediawiki_highlight_rules").MediaWikiHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = MediaWikiHighlightRules;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.type = "text";
|
||||
this.blockComment = {start: "<!--", end: "-->"};
|
||||
this.$id = "ace/mode/mediawiki";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
window.require(["ace/mode/mediawiki"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
264
htdocs/includes/ace/src/mode-mips.js
Normal file
264
htdocs/includes/ace/src/mode-mips.js
Normal file
@ -0,0 +1,264 @@
|
||||
define("ace/mode/mips_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var MIPSHighlightRules = function() {
|
||||
|
||||
var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;
|
||||
|
||||
this.$rules = {
|
||||
start: [{
|
||||
token: "storage.modifier.mips",
|
||||
regex: /\.\b(?:align|ascii|asciiz|byte|double|extern|float|globl|space|word)\b/,
|
||||
comment: "Assembler directives for data storage"
|
||||
}, {
|
||||
token: "entity.name.section.mips",
|
||||
regex: /\.\b(?:data|text|kdata|ktext|)\b/,
|
||||
comment: "Segements: .data .text"
|
||||
}, {
|
||||
token: "variable.parameter.mips",
|
||||
regex: /\$(?:(?:3[01]|[12]?[0-9]|[0-9])|zero|at|v[01]|a[0-3]|s[0-7]|t[0-9]|k[01]|gp|sp|fp|ra)/,
|
||||
comment: "Registers by id $1, $2, ..."
|
||||
}, {
|
||||
token: "variable.parameter.mips",
|
||||
regex: /\$f(?:[0-9]|[1-2][0-9]|3[0-1])/,
|
||||
comment: "Floating point registers"
|
||||
}, {
|
||||
token: "support.function.source.mips",
|
||||
regex: /\b(?:(?:add|sub|div|l|mov|mult|neg|s|c\.eq|c\.le|c\.lt)\.[ds]|cvt\.s\.[dw]|cvt\.d\.[sw]|cvt\.w\.[ds]|bc1[tf])\b/,
|
||||
comment: "The MIPS floating-point instruction set"
|
||||
}, {
|
||||
token: "support.function.source.mips",
|
||||
regex: /\b(?:add|addu|addi|addiu|sub|subu|and|andi|or|not|ori|nor|xor|xori|slt|sltu|slti|sltiu|sll|sllv|rol|srl|sra|srlv|ror|j|jr|jal|beq|bne|lw|sw|lb|sb|lui|move|mfhi|mflo|mthi|mtlo)\b/,
|
||||
comment: "Just the hardcoded instructions provided by the MIPS assembly language"
|
||||
}, {
|
||||
token: "support.function.other.mips",
|
||||
regex: /\b(?:abs|b|beqz|bge|bgt|bgtu|ble|bleu|blt|bltu|bnez|div|divu|la|li|move|mul|neg|not|rem|remu|seq|sge|sgt|sle|sne)\b/,
|
||||
comment: "Pseudo instructions"
|
||||
}, {
|
||||
token: "entity.name.function.mips",
|
||||
regex: /\bsyscall\b/,
|
||||
comment: "Other"
|
||||
}, {
|
||||
token : "string", // character
|
||||
regex : "(?:'\")(?:" + escapeRe + "|.)?(?:'\")"
|
||||
}, {
|
||||
token : "string.start",
|
||||
regex : '\'',
|
||||
stateName: "qstring",
|
||||
next: [
|
||||
{ token: "string", regex: /\\\s*$/, next: "qqstring" },
|
||||
{ token: "constant.language.escape", regex: escapeRe },
|
||||
{ token: "string.end", regex: '\'|$', next: "start" },
|
||||
{ defaultToken: "string"}
|
||||
]
|
||||
}, {
|
||||
token : "string.start",
|
||||
regex : '"',
|
||||
stateName: "qqstring",
|
||||
next: [
|
||||
{ token: "string", regex: /\\\s*$/, next: "qqstring" },
|
||||
{ token: "constant.language.escape", regex: escapeRe },
|
||||
{ token: "string.end", regex: '"|$', next: "start" },
|
||||
{ defaultToken: "string"}
|
||||
]
|
||||
}, {
|
||||
token: "constant.numeric.mips",
|
||||
regex: /\b(?:\d+|0(?:x|X)[a-fA-F0-9]+)\b/,
|
||||
comment: "Numbers like +12, -3, 55, 0x3F"
|
||||
}, {
|
||||
token: "entity.name.tag.mips",
|
||||
regex: /\b[\w]+\b:/,
|
||||
comment: "Labels at line start: begin_repeat: add ..."
|
||||
}, {
|
||||
token: "comment.assembly",
|
||||
regex: /#.*$/,
|
||||
comment: "Single line comments"
|
||||
}]
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
MIPSHighlightRules.metaData = {
|
||||
fileTypes: ["s", "asm"],
|
||||
name: "MIPS",
|
||||
scopeName: "source.mips"
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(MIPSHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.MIPSHighlightRules = MIPSHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/mips",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mips_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var MIPSHighlightRules = require("./mips_highlight_rules").MIPSHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = MIPSHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = ["#"];
|
||||
this.$id = "ace/mode/mips";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
window.require(["ace/mode/mips"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@ -65,7 +65,7 @@ var c_cppHighlightRules = function() {
|
||||
|
||||
var storageType = (
|
||||
"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
|
||||
"_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
|
||||
"_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" +
|
||||
"class|wchar_t|template|char16_t|char32_t"
|
||||
);
|
||||
|
||||
@ -489,6 +489,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/c_cpp";
|
||||
this.snippetFileId = "ace/snippets/c_cpp";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -13,7 +13,7 @@ var NSISHighlightRules = function() {
|
||||
caseInsensitive: true
|
||||
}, {
|
||||
token: "keyword.command.nsis",
|
||||
regex: /^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetLabelAddress|GetTempFileName|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadAndSetImage|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestLongPathAware|ManifestMaxVersionTested|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEAddResource|PEDllCharacteristics|PERemoveResource|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/,
|
||||
regex: /^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetKnownFolderPath|GetLabelAddress|GetTempFileName|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfRtlLanguage|IfShellVarContextAll|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadAndSetImage|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestLongPathAware|ManifestMaxVersionTested|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEAddResource|PEDllCharacteristics|PERemoveResource|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/,
|
||||
caseInsensitive: true
|
||||
}, {
|
||||
token: "keyword.control.nsis",
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -65,7 +65,7 @@ var c_cppHighlightRules = function() {
|
||||
|
||||
var storageType = (
|
||||
"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
|
||||
"_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
|
||||
"_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" +
|
||||
"class|wchar_t|template|char16_t|char32_t"
|
||||
);
|
||||
|
||||
|
||||
@ -367,6 +367,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/perl";
|
||||
this.snippetFileId = "ace/snippets/perl";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -526,10 +526,10 @@ var PythonHighlightRules = function() {
|
||||
regex: "\\s+"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "'(.)*'"
|
||||
regex: "'[^']*'"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: '"(.)*"'
|
||||
regex: '"[^"]*"'
|
||||
}, {
|
||||
token: "function.support",
|
||||
regex: "(!s|!r|!a)"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
489
htdocs/includes/ace/src/mode-prisma.js
Normal file
489
htdocs/includes/ace/src/mode-prisma.js
Normal file
@ -0,0 +1,489 @@
|
||||
define("ace/mode/prisma_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var PrismaHighlightRules = function() {
|
||||
|
||||
this.$rules = {
|
||||
start: [{
|
||||
include: "#triple_comment"
|
||||
}, {
|
||||
include: "#double_comment"
|
||||
}, {
|
||||
include: "#model_block_definition"
|
||||
}, {
|
||||
include: "#config_block_definition"
|
||||
}, {
|
||||
include: "#enum_block_definition"
|
||||
}, {
|
||||
include: "#type_definition"
|
||||
}],
|
||||
"#model_block_definition": [{
|
||||
token: [
|
||||
"source.prisma.embedded.source",
|
||||
"storage.type.model.prisma",
|
||||
"source.prisma.embedded.source",
|
||||
"entity.name.type.model.prisma",
|
||||
"source.prisma.embedded.source",
|
||||
"punctuation.definition.tag.prisma"
|
||||
],
|
||||
regex: /^(\s*)(model|type)(\s+)([A-Za-z][\w]*)(\s+)({)/,
|
||||
push: [{
|
||||
token: "punctuation.definition.tag.prisma",
|
||||
regex: /\s*\}/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#triple_comment"
|
||||
}, {
|
||||
include: "#double_comment"
|
||||
}, {
|
||||
include: "#field_definition"
|
||||
}, {
|
||||
defaultToken: "source.prisma.embedded.source"
|
||||
}]
|
||||
}],
|
||||
"#enum_block_definition": [{
|
||||
token: [
|
||||
"source.prisma.embedded.source",
|
||||
"storage.type.enum.prisma",
|
||||
"source.prisma.embedded.source",
|
||||
"entity.name.type.enum.prisma",
|
||||
"source.prisma.embedded.source",
|
||||
"punctuation.definition.tag.prisma"
|
||||
],
|
||||
regex: /^(\s*)(enum)(\s+)([A-Za-z][\w]*)(\s+)({)/,
|
||||
push: [{
|
||||
token: "punctuation.definition.tag.prisma",
|
||||
regex: /\s*\}/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#triple_comment"
|
||||
}, {
|
||||
include: "#double_comment"
|
||||
}, {
|
||||
include: "#enum_value_definition"
|
||||
}, {
|
||||
defaultToken: "source.prisma.embedded.source"
|
||||
}]
|
||||
}],
|
||||
"#config_block_definition": [{
|
||||
token: [
|
||||
"source.prisma.embedded.source",
|
||||
"storage.type.config.prisma",
|
||||
"source.prisma.embedded.source",
|
||||
"entity.name.type.config.prisma",
|
||||
"source.prisma.embedded.source",
|
||||
"punctuation.definition.tag.prisma"
|
||||
],
|
||||
regex: /^(\s*)(generator|datasource)(\s+)([A-Za-z][\w]*)(\s+)({)/,
|
||||
push: [{
|
||||
token: "source.prisma.embedded.source",
|
||||
regex: /\s*\}/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#triple_comment"
|
||||
}, {
|
||||
include: "#double_comment"
|
||||
}, {
|
||||
include: "#assignment"
|
||||
}, {
|
||||
defaultToken: "source.prisma.embedded.source"
|
||||
}]
|
||||
}],
|
||||
"#assignment": [{
|
||||
token: [
|
||||
"text",
|
||||
"variable.other.assignment.prisma",
|
||||
"text",
|
||||
"keyword.operator.terraform",
|
||||
"text"
|
||||
],
|
||||
regex: /^(\s*)(\w+)(\s*)(=)(\s*)/,
|
||||
push: [{
|
||||
token: "text",
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#value"
|
||||
}, {
|
||||
include: "#double_comment_inline"
|
||||
}]
|
||||
}],
|
||||
"#field_definition": [{
|
||||
token: [
|
||||
"text",
|
||||
"variable.other.assignment.prisma",
|
||||
"invalid.illegal.colon.prisma",
|
||||
"text",
|
||||
"support.type.primitive.prisma",
|
||||
"keyword.operator.list_type.prisma",
|
||||
"keyword.operator.optional_type.prisma",
|
||||
"invalid.illegal.required_type.prisma"
|
||||
],
|
||||
regex: /^(\s*)(\w+)((?:\s*:)?)(\s+)(\w+)((?:\[\])?)((?:\?)?)((?:\!)?)/
|
||||
}, {
|
||||
include: "#attribute_with_arguments"
|
||||
}, {
|
||||
include: "#attribute"
|
||||
}],
|
||||
"#type_definition": [{
|
||||
token: [
|
||||
"text",
|
||||
"storage.type.type.prisma",
|
||||
"text",
|
||||
"entity.name.type.type.prisma",
|
||||
"text",
|
||||
"support.type.primitive.prisma"
|
||||
],
|
||||
regex: /^(\s*)(type)(\s+)(\w+)(\s*=\s*)(\w+)/
|
||||
}, {
|
||||
include: "#attribute_with_arguments"
|
||||
}, {
|
||||
include: "#attribute"
|
||||
}],
|
||||
"#enum_value_definition": [{
|
||||
token: [
|
||||
"text",
|
||||
"variable.other.assignment.prisma",
|
||||
"text"
|
||||
],
|
||||
regex: /^(\s*)(\w+)(\s*$)/
|
||||
}, {
|
||||
include: "#attribute_with_arguments"
|
||||
}, {
|
||||
include: "#attribute"
|
||||
}],
|
||||
"#attribute_with_arguments": [{
|
||||
token: [
|
||||
"entity.name.function.attribute.prisma",
|
||||
"punctuation.definition.tag.prisma"
|
||||
],
|
||||
regex: /(@@?[\w\.]+)(\()/,
|
||||
push: [{
|
||||
token: "punctuation.definition.tag.prisma",
|
||||
regex: /\)/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#named_argument"
|
||||
}, {
|
||||
include: "#value"
|
||||
}, {
|
||||
defaultToken: "source.prisma.attribute.with_arguments"
|
||||
}]
|
||||
}],
|
||||
"#attribute": [{
|
||||
token: "entity.name.function.attribute.prisma",
|
||||
regex: /@@?[\w\.]+/
|
||||
}],
|
||||
"#array": [{
|
||||
token: "source.prisma.array",
|
||||
regex: /\[/,
|
||||
push: [{
|
||||
token: "source.prisma.array",
|
||||
regex: /\]/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#value"
|
||||
}, {
|
||||
defaultToken: "source.prisma.array"
|
||||
}]
|
||||
}],
|
||||
"#value": [{
|
||||
include: "#array"
|
||||
}, {
|
||||
include: "#functional"
|
||||
}, {
|
||||
include: "#literal"
|
||||
}],
|
||||
"#functional": [{
|
||||
token: [
|
||||
"support.function.functional.prisma",
|
||||
"punctuation.definition.tag.prisma"
|
||||
],
|
||||
regex: /(\w+)(\()/,
|
||||
push: [{
|
||||
token: "punctuation.definition.tag.prisma",
|
||||
regex: /\)/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#value"
|
||||
}, {
|
||||
defaultToken: "source.prisma.functional"
|
||||
}]
|
||||
}],
|
||||
"#literal": [{
|
||||
include: "#boolean"
|
||||
}, {
|
||||
include: "#number"
|
||||
}, {
|
||||
include: "#double_quoted_string"
|
||||
}, {
|
||||
include: "#identifier"
|
||||
}],
|
||||
"#identifier": [{
|
||||
token: "support.constant.constant.prisma",
|
||||
regex: /\b(?:\w)+\b/
|
||||
}],
|
||||
"#map_key": [{
|
||||
token: [
|
||||
"variable.parameter.key.prisma",
|
||||
"text",
|
||||
"punctuation.definition.separator.key-value.prisma",
|
||||
"text"
|
||||
],
|
||||
regex: /(\w+)(\s*)(:)(\s*)/
|
||||
}],
|
||||
"#named_argument": [{
|
||||
include: "#map_key"
|
||||
}, {
|
||||
include: "#value"
|
||||
}],
|
||||
"#triple_comment": [{
|
||||
token: "comment.prisma",
|
||||
regex: /\/\/\//,
|
||||
push: [{
|
||||
token: "comment.prisma",
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment.prisma"
|
||||
}]
|
||||
}],
|
||||
"#double_comment": [{
|
||||
token: "comment.prisma",
|
||||
regex: /\/\//,
|
||||
push: [{
|
||||
token: "comment.prisma",
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment.prisma"
|
||||
}]
|
||||
}],
|
||||
"#double_comment_inline": [{
|
||||
token: "comment.prisma",
|
||||
regex: /\/\/[^$]*/
|
||||
}],
|
||||
"#boolean": [{
|
||||
token: "constant.language.boolean.prisma",
|
||||
regex: /\b(?:true|false)\b/
|
||||
}],
|
||||
"#number": [{
|
||||
token: "constant.numeric.prisma",
|
||||
regex: /(?:0(?:x|X)[0-9a-fA-F]*|(?:\+|-)?\b(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:[LlFfUuDdg]|UL|ul)?\b/
|
||||
}],
|
||||
"#double_quoted_string": [{
|
||||
token: "string.quoted.double.start.prisma",
|
||||
regex: /"/,
|
||||
push: [{
|
||||
token: "string.quoted.double.end.prisma",
|
||||
regex: /"/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#string_interpolation"
|
||||
}, {
|
||||
token: "string.quoted.double.prisma",
|
||||
regex: /[\w\-\/\._\\%@:\?=]+/
|
||||
}, {
|
||||
defaultToken: "unnamed"
|
||||
}]
|
||||
}],
|
||||
"#string_interpolation": [{
|
||||
token: "keyword.control.interpolation.start.prisma",
|
||||
regex: /\$\{/,
|
||||
push: [{
|
||||
token: "keyword.control.interpolation.end.prisma",
|
||||
regex: /\s*\}/,
|
||||
next: "pop"
|
||||
}, {
|
||||
include: "#value"
|
||||
}, {
|
||||
defaultToken: "source.tag.embedded.source.prisma"
|
||||
}]
|
||||
}]
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
PrismaHighlightRules.metaData = {
|
||||
name: "Prisma",
|
||||
scopeName: "source.prisma"
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(PrismaHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.PrismaHighlightRules = PrismaHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/prisma",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prisma_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var PrismaHighlightRules = require("./prisma_highlight_rules").PrismaHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = PrismaHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "//";
|
||||
this.$id = "ace/mode/prisma";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
window.require(["ace/mode/prisma"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@ -65,7 +65,7 @@ var c_cppHighlightRules = function() {
|
||||
|
||||
var storageType = (
|
||||
"asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" +
|
||||
"_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" +
|
||||
"_Imaginary|int|int8_t|int16_t|int32_t|int64_t|long|short|signed|size_t|struct|typedef|uint8_t|uint16_t|uint32_t|uint64_t|union|unsigned|void|" +
|
||||
"class|wchar_t|template|char16_t|char32_t"
|
||||
);
|
||||
|
||||
@ -489,6 +489,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/c_cpp";
|
||||
this.snippetFileId = "ace/snippets/c_cpp";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -44,7 +44,7 @@ var PuppetHighlightRules = function () {
|
||||
},
|
||||
{
|
||||
token: "multiline.comment.begin.puppet",
|
||||
regex: '^\\s*\\/\\*\\s*$',
|
||||
regex: '^\\s*\\/\\*',
|
||||
push: "blockComment"
|
||||
},
|
||||
{
|
||||
@ -82,11 +82,7 @@ var PuppetHighlightRules = function () {
|
||||
}
|
||||
],
|
||||
blockComment: [{
|
||||
regex: "^\\s*\\/\\*\\s*$",
|
||||
token: "multiline.comment.begin.puppet",
|
||||
push: "blockComment"
|
||||
}, {
|
||||
regex: "^\\s*\\*\\/\\s*$",
|
||||
regex: "\\*\\/",
|
||||
token: "multiline.comment.end.puppet",
|
||||
next: "pop"
|
||||
}, {
|
||||
@ -355,6 +351,9 @@ oop.inherits(Mode, TextMode);
|
||||
|
||||
|
||||
(function () {
|
||||
this.lineCommentStart = "#";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
|
||||
this.$id = "ace/mode/puppet";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
|
||||
@ -343,10 +343,10 @@ var PythonHighlightRules = function() {
|
||||
regex: "\\s+"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: "'(.)*'"
|
||||
regex: "'[^']*'"
|
||||
}, {
|
||||
token: "string",
|
||||
regex: '"(.)*"'
|
||||
regex: '"[^"]*"'
|
||||
}, {
|
||||
token: "function.support",
|
||||
regex: "(!s|!r|!a)"
|
||||
@ -494,6 +494,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/python";
|
||||
this.snippetFileId = "ace/snippets/python";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
381
htdocs/includes/ace/src/mode-qml.js
Normal file
381
htdocs/includes/ace/src/mode-qml.js
Normal file
@ -0,0 +1,381 @@
|
||||
define("ace/mode/qml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var QmlHighlightRules = function() {
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"variable.language":
|
||||
"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
|
||||
"Namespace|QName|XML|XMLList|" + // E4X
|
||||
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
||||
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
|
||||
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
|
||||
"SyntaxError|TypeError|URIError|" +
|
||||
"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
|
||||
"isNaN|parseFloat|parseInt|" +
|
||||
"JSON|Math|" + // Other
|
||||
"this|arguments|prototype|window|document" , // Pseudo
|
||||
"keyword":
|
||||
"const|yield|import|get|set|async|await|" +
|
||||
"break|case|catch|continue|default|delete|do|else|finally|for|function|" +
|
||||
"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
|
||||
"__parent__|__count__|escape|unescape|with|__proto__|" +
|
||||
"class|enum|extends|super|export|implements|private|public|interface|package|protected|static|" +
|
||||
"readonly|string|int|bool|date|color|url|real|double|var|variant|" +
|
||||
"height|width|anchors|parent|" +
|
||||
"Abstract3DSeries|AbstractActionInput|AbstractAnimation|AbstractAxis|AbstractAxis3D|AbstractAxisInput|" +
|
||||
"AbstractBarSeries|AbstractButton|AbstractClipAnimator|AbstractClipBlendNode|AbstractDataProxy|AbstractGraph3D|" +
|
||||
"AbstractInputHandler3D|AbstractPhysicalDevice|AbstractRayCaster|AbstractSeries|AbstractSkeleton|AbstractTextureImage|" +
|
||||
"Accelerometer|AccelerometerReading|Accessible|Action|ActionGroup|ActionInput|" +
|
||||
"AdditiveClipBlend|Address|Affector|Age|AlphaCoverage|AlphaTest|" +
|
||||
"Altimeter|AltimeterReading|AmbientLightReading|AmbientLightSensor|AmbientTemperatureReading|AmbientTemperatureSensor|" +
|
||||
"AnalogAxisInput|AnchorAnimation|AnchorChanges|AngleDirection|AnimatedImage|AnimatedSprite|" +
|
||||
"Animation|AnimationController|AnimationGroup|Animator|ApplicationWindow|ApplicationWindowStyle|" +
|
||||
"AreaSeries|Armature|AttenuationModelInverse|AttenuationModelLinear|Attractor|Attribute|" +
|
||||
"Audio|AudioCategory|AudioEngine|AudioListener|AudioSample|AuthenticationDialogRequest|" +
|
||||
"Axis|AxisAccumulator|AxisSetting|BackspaceKey|Bar3DSeries|BarCategoryAxis|" +
|
||||
"BarDataProxy|BarSeries|BarSet|Bars3D|BaseKey|Behavior|" +
|
||||
"Binding|Blend|BlendEquation|BlendEquationArguments|BlendedClipAnimator|BlitFramebuffer|" +
|
||||
"BluetoothDiscoveryModel|BluetoothService|BluetoothSocket|BorderImage|BorderImageMesh|BoxPlotSeries|" +
|
||||
"BoxSet|BrightnessContrast|Buffer|BusyIndicator|BusyIndicatorStyle|Button|" +
|
||||
"ButtonAxisInput|ButtonGroup|ButtonStyle|Calendar|CalendarStyle|Camera|" +
|
||||
"Camera3D|CameraCapabilities|CameraCapture|CameraExposure|CameraFlash|CameraFocus|" +
|
||||
"CameraImageProcessing|CameraLens|CameraRecorder|CameraSelector|CandlestickSeries|CandlestickSet|" +
|
||||
"Canvas|Canvas3D|Canvas3DAbstractObject|Canvas3DActiveInfo|Canvas3DBuffer|Canvas3DContextAttributes|" +
|
||||
"Canvas3DFrameBuffer|Canvas3DProgram|Canvas3DRenderBuffer|Canvas3DShader|Canvas3DShaderPrecisionFormat|Canvas3DTexture|" +
|
||||
"Canvas3DTextureProvider|Canvas3DUniformLocation|CanvasGradient|CanvasImageData|CanvasPixelArray|Category|" +
|
||||
"CategoryAxis|CategoryAxis3D|CategoryModel|CategoryRange|ChangeLanguageKey|ChartView|" +
|
||||
"CheckBox|CheckBoxStyle|CheckDelegate|CircularGauge|CircularGaugeStyle|ClearBuffers|" +
|
||||
"ClipAnimator|ClipPlane|CloseEvent|ColorAnimation|ColorDialog|ColorDialogRequest|" +
|
||||
"ColorGradient|ColorGradientStop|ColorMask|ColorOverlay|Colorize|Column|" +
|
||||
"ColumnLayout|ComboBox|ComboBoxStyle|Compass|CompassReading|Component|Component3D|" +
|
||||
"ComputeCommand|ConeGeometry|ConeMesh|ConicalGradient|Connections|ContactDetail|" +
|
||||
"ContactDetails|Container|Context2D|Context3D|ContextMenuRequest|Control|" +
|
||||
"CoordinateAnimation|CuboidGeometry|CuboidMesh|CullFace|CumulativeDirection|" +
|
||||
"Custom3DItem|Custom3DLabel|Custom3DVolume|CustomParticle|CylinderGeometry|CylinderMesh|" +
|
||||
"Date|DateTimeAxis|DelayButton|DelayButtonStyle|DelegateChoice|DelegateChooser|DelegateModel|" +
|
||||
"DelegateModelGroup|DepthTest|Desaturate|Dial|DialStyle|Dialog|DialogButtonBox|DiffuseMapMaterial|" +
|
||||
"DiffuseSpecularMapMaterial|DiffuseSpecularMaterial|Direction|DirectionalBlur|DirectionalLight|DispatchCompute|" +
|
||||
"Displace|DistanceReading|DistanceSensor|Dithering|DoubleValidator|Drag|DragEvent|DragHandler|Drawer|DropArea|" +
|
||||
"DropShadow|DwmFeatures|DynamicParameter|EditorialModel|Effect|EllipseShape|Emitter|EnterKey|EnterKeyAction|" +
|
||||
"Entity|EntityLoader|EnvironmentLight|EventConnection|EventPoint|EventTouchPoint|ExclusiveGroup|ExtendedAttributes|" +
|
||||
"ExtrudedTextGeometry|ExtrudedTextMesh|FastBlur|FileDialog|FileDialogRequest|FillerKey|FilterKey|FinalState|" +
|
||||
"FirstPersonCameraController|Flickable|Flipable|Flow|FocusScope|FolderListModel|FontDialog|FontLoader|" +
|
||||
"FontMetrics|FormValidationMessageRequest|ForwardRenderer|Frame|FrameAction|FrameGraphNode|Friction|" +
|
||||
"FrontFace|FrustumCulling|FullScreenRequest|GLStateDumpExt|GammaAdjust|Gauge|GaugeStyle|GaussianBlur|" +
|
||||
"GeocodeModel|Geometry|GeometryRenderer|GestureEvent|Glow|GoochMaterial|Gradient|GradientStop|GraphicsApiFilter|" +
|
||||
"GraphicsInfo|Gravity|Grid|GridLayout|GridMesh|GridView|GroupBox|GroupGoal|Gyroscope|GyroscopeReading|HBarModelMapper|" +
|
||||
"HBoxPlotModelMapper|HCandlestickModelMapper|HPieModelMapper|HXYModelMapper|HandlerPoint|HandwritingInputPanel|" +
|
||||
"HandwritingModeKey|HeightMapSurfaceDataProxy|HideKeyboardKey|HistoryState|HolsterReading|HolsterSensor|HorizontalBarSeries|" +
|
||||
"|HorizontalPercentBarSeries|HorizontalStackedBarSeries|HoverHandler|HueSaturation|HumidityReading|HumiditySensor|" +
|
||||
"IRProximityReading|IRProximitySensor|Icon|Image|ImageModel|ImageParticle|InnerShadow|InputChord|InputContext|InputEngine|" +
|
||||
"InputHandler3D|InputMethod|InputModeKey|InputPanel|InputSequence|InputSettings|Instantiator|IntValidator|InvokedServices|" +
|
||||
"Item|ItemDelegate|ItemGrabResult|ItemModelBarDataProxy|ItemModelScatterDataProxy|ItemModelSurfaceDataProxy|ItemParticle|" +
|
||||
"ItemSelectionModel|IviApplication|IviSurface|JavaScriptDialogRequest|Joint|JumpList|JumpListCategory|JumpListDestination|" +
|
||||
"JumpListLink|JumpListSeparator|Key|KeyEvent|KeyIcon|KeyNavigation|KeyPanel|KeyboardColumn|KeyboardDevice|KeyboardHandler|" +
|
||||
"KeyboardLayout|KeyboardLayoutLoader|KeyboardRow|KeyboardStyle|KeyframeAnimation|Keys|Label|Layer|LayerFilter|Layout|" +
|
||||
"LayoutMirroring|Legend|LerpBlend|LevelAdjust|LevelOfDetail|LevelOfDetailBoundingSphere|LevelOfDetailLoader|" +
|
||||
"LevelOfDetailSwitch|LidReading|LidSensor|Light|Light3D|LightReading|LightSensor|LineSeries|LineShape|LineWidth|" +
|
||||
"LinearGradient|ListElement|ListModel|ListView|Loader|Locale|Location|LogValueAxis|LogValueAxis3DFormatter|LoggingCategory|" +
|
||||
"LogicalDevice|Magnetometer|MagnetometerReading|Map|MapCircle|MapCircleObject|MapCopyrightNotice|MapGestureArea|MapIconObject|" +
|
||||
"MapItemGroup|MapItemView|MapObjectView|MapParameter|MapPinchEvent|MapPolygon|MapPolygonObject|MapPolyline|MapPolylineObject|" +
|
||||
"MapQuickItem|MapRectangle|MapRoute|MapRouteObject|MapType|Margins|MaskShape|MaskedBlur|Material|Matrix4x4|MediaPlayer|" +
|
||||
"MemoryBarrier|Menu|MenuBar|MenuBarItem|MenuBarStyle|MenuItem|MenuSeparator|MenuStyle|Mesh|MessageDialog|ModeKey|MorphTarget|" +
|
||||
"MorphingAnimation|MouseArea|MouseDevice|MouseEvent|MouseHandler|MultiPointHandler|MultiPointTouchArea|MultiSampleAntiAliasing|" +
|
||||
"Navigator|NdefFilter|NdefMimeRecord|NdefRecord|NdefTextRecord|NdefUriRecord|NearField|NoDepthMask|NoDraw|Node|NodeInstantiator|" +
|
||||
"NormalDiffuseMapAlphaMaterial|NormalDiffuseMapMaterial|NormalDiffuseSpecularMapMaterial|Number|NumberAnimation|NumberKey|Object3D|" +
|
||||
"ObjectModel|ObjectPicker|OpacityAnimator|OpacityMask|OpenGLInfo|OrbitCameraController|OrientationReading|OrientationSensor|Overlay|" +
|
||||
"Package|Page|PageIndicator|Pane|ParallelAnimation|Parameter|ParentAnimation|ParentChange|Particle|ParticleGroup|ParticlePainter|" +
|
||||
"ParticleSystem|Path|PathAngleArc|PathAnimation|PathArc|PathAttribute|PathCubic|PathCurve|PathElement|PathInterpolator|PathLine|" +
|
||||
"PathMove|PathPercent|PathQuad|PathSvg|PathView|PauseAnimation|PerVertexColorMaterial|PercentBarSeries|PhongAlphaMaterial|" +
|
||||
"PhongMaterial|PickEvent|PickLineEvent|PickPointEvent|PickTriangleEvent|PickingSettings|Picture|PieMenu|PieMenuStyle|PieSeries|" +
|
||||
"PieSlice|PinchArea|PinchEvent|PinchHandler|Place|PlaceAttribute|PlaceSearchModel|PlaceSearchSuggestionModel|PlaneGeometry|" +
|
||||
"PlaneMesh|PlayVariation|Playlist|PlaylistItem|Plugin|PluginParameter|PointDirection|PointHandler|PointLight|PointSize|" +
|
||||
"PointerDevice|PointerDeviceHandler|PointerEvent|PointerHandler|PolarChartView|PolygonOffset|Popup|Position|PositionSource|" +
|
||||
"Positioner|PressureReading|PressureSensor|Product|ProgressBar|ProgressBarStyle|PropertyAction|PropertyAnimation|PropertyChanges|" +
|
||||
"ProximityFilter|ProximityReading|ProximitySensor|QAbstractState|QAbstractTransition|QSignalTransition|" +
|
||||
"QVirtualKeyboardSelectionListModel|Qt|QtMultimedia|QtObject|QtPositioning|QuaternionAnimation|QuotaRequest|RadialBlur|" +
|
||||
"RadialGradient|Radio|RadioButton|RadioButtonStyle|RadioData|RadioDelegate|RangeSlider|Ratings|RayCaster|Rectangle|" +
|
||||
"RectangleShape|RectangularGlow|RecursiveBlur|RegExpValidator|RegisterProtocolHandlerRequest|RenderCapture|" +
|
||||
"RenderCaptureReply|RenderPass|RenderPassFilter|RenderSettings|RenderState|RenderStateSet|RenderSurfaceSelector|" +
|
||||
"RenderTarget|RenderTargetOutput|RenderTargetSelector|Repeater|ReviewModel|Rotation|RotationAnimation|RotationAnimator|" +
|
||||
"RotationReading|RotationSensor|RoundButton|Route|RouteLeg|RouteManeuver|RouteModel|RouteQuery|RouteSegment|Row|" +
|
||||
"RowLayout|Scale|ScaleAnimator|Scatter3D|Scatter3DSeries|ScatterDataProxy|ScatterSeries|Scene2D|Scene3D|SceneLoader|" +
|
||||
"ScissorTest|Screen|ScreenRayCaster|ScriptAction|ScrollBar|ScrollIndicator|ScrollView|ScrollViewStyle|ScxmlStateMachine|" +
|
||||
"SeamlessCubemap|SelectionListItem|Sensor|SensorGesture|SensorGlobal|SensorReading|SequentialAnimation|Settings|" +
|
||||
"SettingsStore|ShaderEffect|ShaderEffectSource|ShaderProgram|ShaderProgramBuilder|Shape|ShellSurface|ShellSurfaceItem|" +
|
||||
"ShiftHandler|ShiftKey|Shortcut|SignalSpy|SignalTransition|SinglePointHandler|Skeleton|SkeletonLoader|Slider|SliderStyle|" +
|
||||
"SmoothedAnimation|SortPolicy|Sound|SoundEffect|SoundInstance|SpaceKey|SphereGeometry|SphereMesh|SpinBox|SpinBoxStyle|" +
|
||||
"SplineSeries|SplitView|SpotLight|SpringAnimation|Sprite|SpriteGoal|SpriteSequence|Stack|StackLayout|StackView|" +
|
||||
"StackViewDelegate|StackedBarSeries|State|StateChangeScript|StateGroup|StateMachine|StateMachineLoader|StatusBar|" +
|
||||
"StatusBarStyle|StatusIndicator|StatusIndicatorStyle|StencilMask|StencilOperation|StencilOperationArguments|StencilTest|" +
|
||||
"StencilTestArguments|Store|String|Supplier|Surface3D|Surface3DSeries|SurfaceDataProxy|SwipeDelegate|SwipeView|Switch|" +
|
||||
"SwitchDelegate|SwitchStyle|SymbolModeKey|SystemPalette|Tab|TabBar|TabButton|TabView|TabViewStyle|TableView|TableViewColumn|" +
|
||||
"TableViewStyle|TapHandler|TapReading|TapSensor|TargetDirection|TaskbarButton|Technique|TechniqueFilter|TestCase|Text|TextArea|" +
|
||||
"TextAreaStyle|TextEdit|TextField|TextFieldStyle|TextInput|TextMetrics|TextureImage|TextureImageFactory|Theme3D|ThemeColor|" +
|
||||
"ThresholdMask|ThumbnailToolBar|ThumbnailToolButton|TiltReading|TiltSensor|TimeoutTransition|Timer|ToggleButton|" +
|
||||
"ToggleButtonStyle|ToolBar|ToolBarStyle|ToolButton|ToolSeparator|ToolTip|Torch|TorusGeometry|TorusMesh|TouchEventSequence|" +
|
||||
"TouchInputHandler3D|TouchPoint|Trace|TraceCanvas|TraceInputArea|TraceInputKey|TraceInputKeyPanel|TrailEmitter|Transaction|" +
|
||||
"Transform|Transition|Translate|TreeView|TreeViewStyle|Tumbler|TumblerColumn|TumblerStyle|Turbulence|UniformAnimator|User|" +
|
||||
"VBarModelMapper|VBoxPlotModelMapper|VCandlestickModelMapper|VPieModelMapper|VXYModelMapper|ValueAxis|ValueAxis3D|" +
|
||||
"ValueAxis3DFormatter|Vector3dAnimation|VertexBlendAnimation|Video|VideoOutput|ViewTransition|Viewport|" +
|
||||
"VirtualKeyboardSettings|Wander|WavefrontMesh|WaylandClient|WaylandCompositor|WaylandHardwareLayer|" +
|
||||
"WaylandOutput|WaylandQuickItem|WaylandSeat|WaylandSurface|WaylandView|Waypoint|" +
|
||||
"WebChannel|WebEngine|WebEngineAction|WebEngineCertificateError|WebEngineDownloadItem|WebEngineHistory|" +
|
||||
"WebEngineHistoryListModel|WebEngineLoadRequest|WebEngineNavigationRequest|WebEngineNewViewRequest|WebEngineProfile|WebEngineScript|" +
|
||||
"WebEngineSettings|WebEngineView|WebSocket|WebSocketServer|WebView|WebViewLoadRequest|" +
|
||||
"WheelEvent|Window|WlShell|WlShellSurface|WorkerScript|XAnimator|" +
|
||||
"XYPoint|XYSeries|XdgDecorationManagerV1|XdgPopup|XdgPopupV5|XdgPopupV6|" +
|
||||
"XdgShell|XdgShellV5|XdgShellV6|XdgSurface|XdgSurfaceV5|XdgSurfaceV6|" +
|
||||
"XdgToplevel|XdgToplevelV6|XmlListModel|XmlRole|YAnimator|ZoomBlur",
|
||||
"storage.type":
|
||||
"const|let|var|function|" + // js
|
||||
"property|", // qml
|
||||
"constant.language":
|
||||
"null|Infinity|NaN|undefined",
|
||||
"support.function":
|
||||
"print|console\\.log",
|
||||
"constant.language.boolean": "true|false"
|
||||
}, "identifier");
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
{
|
||||
token : "string", // single line
|
||||
regex : '"',
|
||||
next : "string"
|
||||
}, {
|
||||
token : "constant.numeric", // hex
|
||||
regex : "0[xX][0-9a-fA-F]+\\b"
|
||||
}, {
|
||||
token : "constant.numeric", // float
|
||||
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
||||
}, {
|
||||
token : "constant.language.boolean",
|
||||
regex : "(?:true|false)\\b"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "\\/\\/.*$"
|
||||
}, {
|
||||
token : "comment.start",
|
||||
regex : "\\/\\*",
|
||||
next : "comment"
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[[({]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\])}]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "\\b\\w+\\b"
|
||||
}
|
||||
],
|
||||
"string" : [
|
||||
{
|
||||
token : "constant.language.escape",
|
||||
regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"|$',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "string"
|
||||
}
|
||||
],
|
||||
"comment" : [
|
||||
{
|
||||
token : "comment.end",
|
||||
regex : "\\*\\/",
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "comment"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
oop.inherits(QmlHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.QmlHighlightRules = QmlHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/qml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/qml_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var QmlHighlightRules = require("./qml_highlight_rules").QmlHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = QmlHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
this.$quotes = { '"': '"', "'": "'" };
|
||||
this.$id = "ace/mode/qml";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
window.require(["ace/mode/qml"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@ -299,6 +299,7 @@ define("ace/mode/r",["require","exports","module","ace/unicode","ace/range","ace
|
||||
|
||||
this.nonTokenRe = new RegExp("^(?:[^" + unicode.wordChars + "._]|\s])+", "g");
|
||||
this.$id = "ace/mode/r";
|
||||
this.snippetFileId = "ace/snippets/r";
|
||||
}).call(Mode.prototype);
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
define("ace/mode/perl6_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
define("ace/mode/raku_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var Perl6HighlightRules = function() {
|
||||
var RakuHighlightRules = function() {
|
||||
|
||||
var keywords = (
|
||||
"my|our|class|role|grammar|is|does|sub|method|submethod|try|" +
|
||||
@ -34,7 +34,7 @@ var Perl6HighlightRules = function() {
|
||||
"Pod::Block|Pod::Block::Code|Pod::Block::Comment|Pod::Block::Declarator|"+
|
||||
"Pod::Block::Named|Pod::Block::Para|Pod::Block::Table|Pod::Heading|Pod::Item|"+
|
||||
"Positional|PositionalBindFailover|Proc|Proc::Async|Promise|Proxy|PseudoStash|"+
|
||||
"QuantHash|Range|Rat|Rational|RatStr|Real|Regex|Routine|Scalar|Scheduler|"+
|
||||
"Raku|QuantHash|Range|Rat|Rational|RatStr|Real|Regex|Routine|Scalar|Scheduler|"+
|
||||
"Semaphore|Seq|Set|SetHash|Setty|Signature|Slip|Stash|Str|StrDistance|Stringy|"+
|
||||
"Sub|Submethod|Supplier|Supplier::Preserving|Supply|Systemic|Tap|Telemetry|"+
|
||||
"Telemetry::Instrument::Thread|Telemetry::Instrument::Usage|Telemetry::Period|"+
|
||||
@ -120,7 +120,7 @@ var Perl6HighlightRules = function() {
|
||||
"positional|posix|postfix|postmatch|precomp-ext|precomp-target|pred|prefix|prematch|prepend|"+
|
||||
"print|printf|print-nl|print-to|private|private_method_table|proc|produce|Promise|prompt|"+
|
||||
"protect|pull-one|push|push-all|push-at-least|push-exactly|push-until-lazy|put|"+
|
||||
"qualifier-type|quit|r|race|radix|rand|range|raw|re|read|readchars|readonly|"+
|
||||
"qualifier-type|quit|r|race|radix|raku|rand|range|raw|re|read|readchars|readonly|"+
|
||||
"ready|Real|reallocate|reals|reason|rebless|receive|recv|redispatcher|redo|reduce|"+
|
||||
"rel2abs|relative|release|rename|repeated|replacement|report|reserved|resolve|"+
|
||||
"restore|result|resume|rethrow|reverse|right|rindex|rmdir|roles_to_compose|"+
|
||||
@ -339,9 +339,9 @@ var Perl6HighlightRules = function() {
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(Perl6HighlightRules, TextHighlightRules);
|
||||
oop.inherits(RakuHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.Perl6HighlightRules = Perl6HighlightRules;
|
||||
exports.RakuHighlightRules = RakuHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
|
||||
@ -524,17 +524,17 @@ oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/perl6",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl6_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
define("ace/mode/raku",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/raku_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Perl6HighlightRules = require("./perl6_highlight_rules").Perl6HighlightRules;
|
||||
var RakuHighlightRules = require("./raku_highlight_rules").RakuHighlightRules;
|
||||
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
||||
var CStyleFoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = Perl6HighlightRules;
|
||||
this.HighlightRules = RakuHighlightRules;
|
||||
|
||||
this.$outdent = new MatchingBraceOutdent();
|
||||
this.foldingRules = new CStyleFoldMode({start: "^=(begin)\\b", end: "^=(end)\\b"});
|
||||
@ -579,12 +579,12 @@ oop.inherits(Mode, TextMode);
|
||||
this.$outdent.autoOutdent(doc, row);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/perl6";
|
||||
this.$id = "ace/mode/raku";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
window.require(["ace/mode/perl6"], function(m) {
|
||||
window.require(["ace/mode/raku"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2858,6 +2861,7 @@ oop.inherits(Mode, HtmlMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/razor";
|
||||
this.snippetFileId = "ace/snippets/razor";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -1316,6 +1317,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/css";
|
||||
this.snippetFileId = "ace/snippets/css";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
@ -2493,6 +2495,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/html";
|
||||
this.snippetFileId = "ace/snippets/html";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
@ -242,6 +242,7 @@ oop.inherits(Mode, TextMode);
|
||||
this.type = "text";
|
||||
|
||||
this.$id = "ace/mode/rst";
|
||||
this.snippetFileId = "ace/snippets/rst";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -5,15 +5,16 @@ var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var stringEscape = /\\(?:[nrt0'"\\]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source;
|
||||
var wordPattern = /[a-zA-Z_\xa1-\uffff][a-zA-Z0-9_\xa1-\uffff]*/.source;
|
||||
var RustHighlightRules = function() {
|
||||
|
||||
this.$rules = { start:
|
||||
[ { token: 'variable.other.source.rust',
|
||||
regex: '\'[a-zA-Z_][a-zA-Z0-9_]*(?![\\\'])' },
|
||||
regex: '\'' + wordPattern + '(?![\\\'])' },
|
||||
{ token: 'string.quoted.single.source.rust',
|
||||
regex: "'(?:[^'\\\\]|" + stringEscape + ")'" },
|
||||
{ token: 'identifier',
|
||||
regex: /r#[a-zA-Z_][a-zA-Z0-9_]*\b/ },
|
||||
regex: "r#" + wordPattern + "\\b" },
|
||||
{
|
||||
stateName: "bracketedComment",
|
||||
onMatch : function(value, currentState, stack){
|
||||
@ -53,8 +54,8 @@ var RustHighlightRules = function() {
|
||||
regex: stringEscape },
|
||||
{ defaultToken: 'string.quoted.double.source.rust' } ] },
|
||||
{ token: [ 'keyword.source.rust', 'text', 'entity.name.function.source.rust' ],
|
||||
regex: '\\b(fn)(\\s+)((?:r#)?[a-zA-Z_][a-zA-Z0-9_]*)' },
|
||||
{ token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' },
|
||||
regex: '\\b(fn)(\\s+)((?:r#)?'+ wordPattern + ')' },
|
||||
{ token: 'support.constant', regex: wordPattern + '::' },
|
||||
{ token: 'keyword.source.rust',
|
||||
regex: '\\b(?:abstract|alignof|as|async|await|become|box|break|catch|continue|const|crate|default|do|dyn|else|enum|extern|for|final|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\\b' },
|
||||
{ token: 'storage.type.source.rust',
|
||||
|
||||
@ -784,6 +784,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/javascript";
|
||||
this.snippetFileId = "ace/snippets/javascript";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
364
htdocs/includes/ace/src/mode-scrypt.js
Normal file
364
htdocs/includes/ace/src/mode-scrypt.js
Normal file
@ -0,0 +1,364 @@
|
||||
define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var DocCommentHighlightRules = function() {
|
||||
this.$rules = {
|
||||
"start" : [ {
|
||||
token : "comment.doc.tag",
|
||||
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
||||
},
|
||||
DocCommentHighlightRules.getTagRule(),
|
||||
{
|
||||
defaultToken : "comment.doc",
|
||||
caseInsensitive: true
|
||||
}]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
||||
|
||||
DocCommentHighlightRules.getTagRule = function(start) {
|
||||
return {
|
||||
token : "comment.doc.tag.storage.type",
|
||||
regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
|
||||
};
|
||||
};
|
||||
|
||||
DocCommentHighlightRules.getStartRule = function(start) {
|
||||
return {
|
||||
token : "comment.doc", // doc comment
|
||||
regex : "\\/\\*(?=\\*)",
|
||||
next : start
|
||||
};
|
||||
};
|
||||
|
||||
DocCommentHighlightRules.getEndRule = function (start) {
|
||||
return {
|
||||
token : "comment.doc", // closing comment
|
||||
regex : "\\*\\/",
|
||||
next : start
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/scrypt_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function (require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var scryptHighlightRules = function () {
|
||||
|
||||
var keywords = (
|
||||
"contract|library|loop|new|private|" +
|
||||
"public|if|else|struct|type|" +
|
||||
"require|static|const|import|exit|return|asm"
|
||||
);
|
||||
|
||||
var buildinConstants = ("true|false");
|
||||
|
||||
|
||||
var langClasses = (
|
||||
"function|auto|constructor|bytes|int|bool|SigHashPreimage|PrivKey|PubKey|Sig|Ripemd160|Sha1|Sha256|" +
|
||||
"SigHashType|SigHashPreimage|OpCodeType"
|
||||
);
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"variable.language": "this",
|
||||
"keyword": keywords,
|
||||
"constant.language": buildinConstants,
|
||||
"support.function": langClasses
|
||||
}, "identifier");
|
||||
|
||||
this.$rules = {
|
||||
"start": [
|
||||
{
|
||||
token: "comment",
|
||||
regex: "\\/\\/.*$"
|
||||
},
|
||||
DocCommentHighlightRules.getStartRule("doc-start"),
|
||||
{
|
||||
token: "comment", // multi line comment
|
||||
regex: "\\/\\*",
|
||||
next: "comment"
|
||||
}, {
|
||||
token: "string", // single line
|
||||
regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
|
||||
}, {
|
||||
token: "string", // single line
|
||||
regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
|
||||
}, {
|
||||
token: "constant.numeric", // hex
|
||||
regex: /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
|
||||
}, {
|
||||
token: "constant.numeric", // float
|
||||
regex: /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/
|
||||
}, {
|
||||
token: "constant.language.boolean",
|
||||
regex: "(?:true|false)\\b"
|
||||
},
|
||||
{
|
||||
token: ["support.function.math.scrypt", "text", "text"],
|
||||
regex: /\b(abs|min|max|within|ripemd160|sha1|sha256|hash160|hash256|checkSig|checkMultiSig|num2bin|pack|unpack|len|reverseBytes|repeat)(\s*)(\()/
|
||||
}, {
|
||||
token: [
|
||||
"entity.name.type.scrypt",
|
||||
"text",
|
||||
"text",
|
||||
"text",
|
||||
"variable.object.property.scrypt"
|
||||
],
|
||||
regex: /\b(SigHash)(\s*)(\.)(\s*)(ANYONECANPAY|ALL|FORKID|NONE|SINGLE)\b/
|
||||
},
|
||||
{
|
||||
token: [
|
||||
"entity.name.type.scrypt",
|
||||
"text",
|
||||
"text",
|
||||
"text",
|
||||
"variable.object.property.scrypt"
|
||||
],
|
||||
regex: /\b(OpCode)(\s*)(\.)(\s*)(OP_PUSHDATA1|OP_PUSHDATA2|OP_PUSHDATA4|OP_0|OP_FALSE|OP_1NEGATE|OP_1|OP_TRUE|OP_2|OP_3|OP_4|OP_5|OP_6|OP_7|OP_8|OP_9|OP_10|OP_11|OP_12|OP_13|OP_14|OP_15|OP_16|OP_1ADD|OP_1SUB|OP_NEGATE|OP_ABS|OP_NOT|OP_0NOTEQUAL|OP_ADD|OP_SUB|OP_MUL|OP_DIV|OP_MOD|OP_LSHIFT|OP_RSHIFT|OP_BOOLAND|OP_BOOLOR|OP_NUMEQUAL|OP_NUMEQUALVERIFY|OP_NUMNOTEQUAL|OP_LESSTHAN|OP_GREATERTHAN|OP_LESSTHANOREQUAL|OP_GREATERTHANOREQUAL|OP_MIN|OP_MAX|OP_WITHIN|OP_CAT|OP_SPLIT|OP_BIN2NUM|OP_NUM2BIN|OP_SIZE|OP_NOP|OP_IF|OP_NOTIF|OP_ELSE|OP_ENDIF|OP_VERIFY|OP_RETURN|OP_TOALTSTACK|OP_FROMALTSTACK|OP_IFDUP|OP_DEPTH|OP_DROP|OP_DUP|OP_NIP|OP_OVER|OP_PICK|OP_ROLL|OP_ROT|OP_SWAP|OP_TUCK|OP_2DROP|OP_2DUP|OP_3DUP|OP_2OVER|OP_2ROT|OP_2SWAP|OP_RIPEMD160|OP_SHA1|OP_SHA256|OP_HASH160|OP_HASH256|OP_CODESEPARATOR|OP_CHECKSIG|OP_CHECKSIGVERIFY|OP_CHECKMULTISIG|OP_CHECKMULTISIGVERIFY|OP_INVERT|OP_AND|OP_OR|OP_XOR|OP_EQUAL|OP_EQUALVERIFY)\b/
|
||||
}, {
|
||||
token: "entity.name.type.scrypt",
|
||||
regex: /\b(?:P2PKH|P2PK|Tx|HashPuzzleRipemd160|HashPuzzleSha1|HashPuzzleSha256|HashPuzzleHash160|OpCode|SigHash)\b/
|
||||
}, {
|
||||
token: [
|
||||
"punctuation.separator.period.scrypt",
|
||||
'text',
|
||||
"entity.name.function.scrypt",
|
||||
"text",
|
||||
"punctuation.definition.parameters.begin.bracket.round.scrypt"
|
||||
],
|
||||
regex: /(\.)([^\S$\r]*)([\w][\w\d]*)(\s*)(\()/,
|
||||
push: [{
|
||||
token: "punctuation.definition.parameters.end.bracket.round.scrypt",
|
||||
regex: /\)/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "start"
|
||||
}]
|
||||
}, {
|
||||
token: keywordMapper,
|
||||
regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token: "keyword.operator",
|
||||
regex: "!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^="
|
||||
}, {
|
||||
token: "lparen",
|
||||
regex: "[[({]"
|
||||
}, {
|
||||
token: "rparen",
|
||||
regex: "[\\])}]"
|
||||
}, {
|
||||
token: "text",
|
||||
regex: "\\s+"
|
||||
}
|
||||
],
|
||||
"comment": [
|
||||
{
|
||||
token: "comment", // closing comment
|
||||
regex: "\\*\\/",
|
||||
next: "start"
|
||||
}, {
|
||||
defaultToken: "comment"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
this.embedRules(DocCommentHighlightRules, "doc-",
|
||||
[DocCommentHighlightRules.getEndRule("start")]);
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(scryptHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.scryptHighlightRules = scryptHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/scrypt",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scrypt_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var scryptHighlightRules = require("./scrypt_highlight_rules").scryptHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function () {
|
||||
this.HighlightRules = scryptHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function () {
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = { start: "/*", end: "*/" };
|
||||
this.$quotes = { '"': '"', "'": "'" };
|
||||
|
||||
this.createWorker = function (session) {
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
this.$id = "ace/mode/scrypt";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
window.require(["ace/mode/scrypt"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@ -435,6 +435,7 @@ oop.inherits(Mode, TextMode);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/sh";
|
||||
this.snippetFileId = "ace/snippets/sh";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user