404
+Page not found. Go back home?
+ + + +diff --git a/.all-contributorsrc b/.all-contributorsrc deleted file mode 100644 index 6e5c0f103..000000000 --- a/.all-contributorsrc +++ /dev/null @@ -1,33 +0,0 @@ -{ - "files": [ - "README.md" - ], - "imageSize": 100, - "commit": false, - "contributors": [ - { - "login": "amberisvibin", - "name": "Amber", - "avatar_url": "https://avatars3.githubusercontent.com/u/63863236?v=4", - "profile": "http://dev.to/amberisvibin", - "contributions": [ - "doc" - ] - }, - { - "login": "Aleserche", - "name": "aleserche", - "avatar_url": "https://avatars3.githubusercontent.com/u/2920837?v=4", - "profile": "https://github.com/Aleserche", - "contributions": [ - "code" - ] - } - ], - "contributorsPerLine": 7, - "projectName": "gwion-docs", - "projectOwner": "fennecdjay", - "repoType": "github", - "repoHost": "https://github.com", - "skipCi": true -} diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 0babf0ed9..000000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.mdr linguist-language=Markdown diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index a8037a9e5..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: CI - -on: - [push, workflow_dispatch, repository_dispatch] - -jobs: - build: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, '[skip ci]')" - - steps: - - uses: actions/checkout@v1 - name: Checkout - - - name: Checkout tools repo - uses: actions/checkout@v3 - with: - repository: Gwion/GwionSite - path: GwionSite - - - name: GwionSite tools - run: bash GwionSite/install.sh - - - name: Dependencies - run: bash scripts/update.sh - - - name: MdBook - uses: peaceiris/actions-mdbook@v1 - with: - mdbook-version: 'latest' - - - name: GIT things - run: | - git config --global user.email "action@github.com" - git config --global user.name "GitHub Action" - - - name: Checkout benchmark repo - uses: actions/checkout@v3 - with: - repository: Gwion/gwion-benchmark - path: gwion-benchmark - ref: results - - - name: Core Reference - run: | - echo "# Core Reference" > docs/Reference/README.mdr - echo "compiler generated documentation" >> docs/Reference/README.mdr - echo '```gwion' >> docs/Reference/README.mdr - ./gwion --cdoc >> docs/Reference/README.mdr - echo '```' >> docs/Reference/README.mdr - - - name: Plugin Reference - run: | - echo README.md > docs/Reference/Plugins/list - for plug in *.so; do bash scripts/mk_page.sh $plug; done - - - name: Build book - run: PATH=$PWD:$PATH make build - - - name: Push book - run: | - git add -f book - git commit -m "add book" - git remote set-url origin https://${{ secrets.GWION_TOKEN }}@github.com/Gwion/Gwion.git - git push origin :gh-pages || true - git subtree push --prefix book origin gh-pages diff --git a/.gitignore b/.gitignore deleted file mode 100644 index ecbc91583..000000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -src -book -log -*.gw -ansi2html* diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29bb..000000000 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..f17311098 --- /dev/null +++ b/.nojekyll @@ -0,0 +1 @@ +This file makes sure that Github Pages doesn't process mdBook's output. diff --git a/.vale.ini b/.vale.ini deleted file mode 100644 index f292b9ad7..000000000 --- a/.vale.ini +++ /dev/null @@ -1,30 +0,0 @@ -# Example Vale config file (`.vale.ini` or `_vale.ini`) - -# Core settings -StylesPath = ci/vale/styles - -# The minimum alert level to display (suggestion, warning, or error). -# -# CI builds will only fail on error-level alerts. -MinAlertLevel = warning - -# The "formats" section allows you to associate an "unknown" format -# with one of Vale's supported formats. -[formats] -mdr = md - -# Global settings (applied to every syntax) -[*] -# List of styles to load -BasedOnStyles = write-good, Joblint -# Style.Rule = {YES, NO} to enable or disable a specific rule -vale.Editorializing = YES -# You can also change the level associated with a rule -vale.Hedging = error - -# Syntax-specific settings -# These overwrite any conflicting global settings -[*.{md,txt,mdr}] -vale.Editorializing = YES - -BlockIgnores = (?s) *(@\x60\x60\x60.*?@\x60\x60\x60) diff --git a/404.html b/404.html new file mode 100644 index 000000000..c81d05827 --- /dev/null +++ b/404.html @@ -0,0 +1,201 @@ + + +
+ + +++Author: Jérémie Astor Date: 11/08/22 01:48:15 Commit: 9b73699
+
Please note that times are in second (lower is better)
+++ + +it seems that some chuck test are broken atm. we're investigating this
+
+![]() ![]() ![]() ![]() ![]() ![]() |
++this is a stub for now, this place deserves better
+
You might be here because you found something you could improve in Gwion. +Please open an issue describing the problem and how you might address it.
+gcc
, clang
)You can do this through the github site, or command-line tools like gh
or hub
. See Further Reading.
Clone the url of your fork
+git clone --recursive https://github.com/<your username>/Gwion
+
+Edit some files with your favorite text editor
+cd Gwion
+vim src/path/to/file
+
+make
+
+make test
+
+make -C util clean && make -C ast clean && make clean
+make
+
+git add path/to/changed/files
+
+git commit -m "Something meaningful about why we are here"
+git push
+
+It is recommended that you follow our styleguide for commit messages
+You can do this through the github site, or command-line tools like gh
or hub
. See Further Reading.
It is recommended you submit a PR to a branch other than master;
+dev
You can now sit back and wait for your pull request to be reviewed. If it's accepted, congrats! 🎉 You've made a contribution!
+For a more advanced info on contributing, check out @Chaser324's GitHub Standard Fork & Pull Request Workflow.
+For a guide on making a pull request, there's github's Creating a pull request from a fork.
+ + + +++this is a stub for now, this place deserves better
+
You might be here because you found something you could improve in Gwion's documentation. +Please open an issue describing the problem and how you might address it.
+Technically none of these are needed, but they are quite useful:
+ +You can do this through the github site, or command-line tools like gh
or hub
. See Further Reading.
Clone the url of your fork
+git clone https://github.com/<your username>/gwion-docs
+
+cd gwion-docs
+make watch
+
+git add docs/myfile.mdr
+
+git commit -m "Something meaningful about why we are here"
+git push
+
+You can do this through the github site, or command-line tools like gh
or hub
. See Further Reading.
You can now sit back and wait for your pull request to be reviewed. If it's accepted, congrats! 🎉 You've made a contribution!
+For a more advanced info on contributing, check out @Chaser324's GitHub Standard Fork & Pull Request Workflow.
+For a guide on making a pull request, there's github's Creating a pull request from a fork.
+ + + +First off, thank you for considering translating gwion.
+Thanks to the build system, you're gonna get on tracks fast.
+export TRANSLATION_TARGET=xxx
+so you don't have to repeat it on the command line
+You have to make sure there is a directory for your target language (e.g.: fr, en, es_ES ...).
+make translation-init TRANSLATION_TARGET=<xxx>
+
+Where <xxx>
is your language of choice.
+It will fail if your language already exists, but this is not a problem.
Next, you should adjust the translations. +What about using your favorite editor?
+make translation-edit TRANSLATION_TARGET=<xxx>
+
+Maybe the sources changed, and there is more messages to translate?
+make translation-update
+
+This will update all languages.
+You can now get back to step 2.
It's now time to add your changes to the package
+make translation-commit TRANSLATION_TARGET=<xxx>
+
+++In Gwion's case, +the
+vcs
is the well known git,
+but themake
recipe makes things simple
Now please submit a pull request.
+ + + +Thanks goes to these wonderful people:
+ + + + + + + + + + + + + + + + + + + + + + +fennecdjay was of immeasurable help when I was writing these docs. Thank you to them for sitting down and working me through Gwion plugins from the basics.
+ + + +This is a step by step hands on tutorial that will quide you trought the steps of making a Gwion plugin
+ + + +Plugins are an important aspect of Gwion's flexibility and extensibility. They allow you to customize behavior as well as develop novel functionality within Gwion itself.
+Much of Gwion's features come from plugins. Audio generation, file I/O, image editing and more.
+Plugins are shared object files typically created from C source code. They consist of a few core functions required for the Gwion runtime to properly initialize and use it.
+Let's create a simple plugin which provides a single function: add
. This will take two int
s and return their sum as an int
.
First, open up your terminal and run the following shell commands within Gwion/plug
:
# Create a new directory for our Adder plugin
+mkdir Adder
+
+# Navigate to the newly created directory
+cd Adder
+
+# Create a makefile for compilation
+printf "include ../config.mk\ninclude ../config_post.mk\n" > Makefile
+
+# Create an adder.c file with your favorite text editor
+nano adder.c
+
+We are greeted with any empty file. However, it won't be empty for long.
+Let's add the following code to the top of our file:
+#include "plugin_dev.h"
+
+This will include all the necessary functions and macros to develop a plugin without much head scratching.
+Next, we need the GWION_IMPORT
function. This is extremely important since it is what the Gwion runtime uses to set up your plugin. GWION_IMPORT
is a macro which takes the name of your plugin: in this case that is "Adder". Underneath the include
let's add:
GWION_IMPORT(Adder) {
+ // Init code here
+}
+
+Within this function we register the public API of our plugin to Gwion. In our case, we want an Adder
class with a single static function add
that takes two numbers and returns their sum.
Our first step is to create the Adder
class. This is done with:
GWION_IMPORT(Adder) {
+ // Begin our adder class
+ DECL_OB(const Type, t_adder, = gwi_class_ini(gwi, "Adder", "Object"));
+}
+
+Now, whenever we ini
a class, we must also end
it:
GWION_IMPORT(Adder) {
+ // Begin our adder class
+ DECL_OB(const Type, t_adder, = gwi_class_ini(gwi, "Adder", "Object"));
+
+ // End our adder class
+ GWI_BB(gwi_class_end(gwi));
+}
+
+We also want to make sure to indicate that everything has gone OK. We do this by returning GW_OK
:
GWION_IMPORT(Adder) {
+ // Begin our adder class
+ DECL_OB(const Type, t_adder, = gwi_class_ini(gwi, "Adder", "Object"));
+
+ // End our adder class
+ GWI_BB(gwi_class_end(gwi));
+
+ return GW_OK;
+}
+
+Right now our code doesn't really do much; it creates an empty class and then exits. Let's expand this code to add a static function inside the class:
+GWION_IMPORT(Adder) {
+ // Begin our adder class
+ DECL_OB(const Type, t_adder, = gwi_class_ini(gwi, "Adder", "Object"));
+
+ // Create a new function named `add` with a return type of `int`
+ // gwi_func_ini(gwi, return_type, name);
+ GWI_BB(gwi_func_ini(gwi, "int", "add"));
+
+ // Register our two args `a` and `b` of type `int`
+ // gwi_func_arg(gwi, arg_type, name);
+ GWI_BB(gwi_func_arg(gwi, "int", "a"));
+ GWI_BB(gwi_func_arg(gwi, "int", "b"));
+
+ // Mark the function as completely declared
+ GWI_BB(gwi_func_end(gwi, adder_add, ae_flag_static));
+
+ // End our adder class
+ GWI_BB(gwi_class_end(gwi));
+
+ return GW_OK;
+}
+
+Looks like we are good to go! Let's compile...and:
+adder.c: In function 'import':
+adder.c:22:28: error: 'adder_add' undeclared (first use in this function)
+ 22 | GWI_BB(gwi_func_end(gwi, adder_add, ae_flag_static));
+ | ^~~~~~~~~
+
+When we marked the function as completely declared with gwi_func_end
, we gave the function implementation adder_add
as an argument. This tells Gwion that our Adder.add
function in Gwion corresponds to the C function adder_add
. However we haven't actually defined it! Let's do that. Above our GWION_IMPORT
function, add:
// The `SFUN` macro defines a static function
+// The `static` here is actually a C keyword, unrelated to Gwion
+static SFUN(sfun) {
+ // Function body
+}
+
+Let's recall what our Adder.add
function does. It takes two int
parameters and returns an int
. Gwion provides facilities for doing this:
// The `SFUN` macro defines a static function
+// The `static` here is actually a C keyword, unrelated to Gwion
+static SFUN(sfun) {
+ // Retrieve the arguments
+ // `a` is in memory at offset 0
+ const m_int a = *(m_int*)MEM(0);
+ // `b` is in memory at offset `SZ_INT`
+ // This is because `a` has size `SZ_INT` and `b` is after `a`
+ const m_int b = *(m_int*)MEM(SZ_INT);
+
+ // We now set the return value, given as a void pointer with the `RETURN` macro
+ // We need to cast it to the pointer type we want to return and then assign the return value
+ *(m_int*)RETURN = a + b;
+}
+
+Finally, we can test our plugin. After running make
(which creates Adder.so
) in the directory, create a new file called add.gw
and insert the following code:
#! We import our newly created plugin
+#import Adder
+
+#! Let's call our add function
+<<< Adder.add(1, 2) >>>;
+
+If all goes well, running the following shell command should result in "3" being printed:
+gwion -p. add.gw
+
+
+
+
+ There are some general macros essential to interfacing with Gwion in general.
+The return codes of functions are of type m_bool
and consist of the following values:
Name | Value | Description |
---|---|---|
GW_OK | 1 | Success |
GW_PASS | 0 | Ignore the result and continue |
GW_ERROR | -1 | An error occured |
The following macros are sugar for handling error codes. They can exit the scope of the function. It is recommended to use these rather than writing:
+if (!a) return NULL;
+
+and co.
+Name | Value | Description |
---|---|---|
CHECK_BB | if (f < 0) return GW_ERROR; | Takes an expression that evaluates to m_bool . Potentially exits function returning GW_ERROR . |
CHECK_BO | if (f < 0) return NULL; | Takes an expression that evaluates to m_bool . Potentially exits function returning NULL . |
CHECK_OB | if (!f) return GW_ERROR; | Takes an expression that evaluates to a pointer. Potentially exits function returning GW_ERROR . |
CHECK_OO | if (!f) return NULL; | Takes an expression that evaluates to a pointer. Potentially exits function returning NULL . |
Likewise there are the DECL_XX
macros which specialize to failing if a declaration fails. Their general syntax is as follows:
DECL_XX(type, var_name, = value);
+
+These macros are specific to creating plugins.
+MFUN(name)
signature for a member function
+SFUN(name)
signature for a static function
+CTOR(name)
signature for a constructor
+DTOR(name)
signature for a destructor
+GACK(name)
signature for a pretty print function
+TICK(name)
signature for a UGen tick function
+GWION_IMPORT(name)
main function of a plugin/library
in said main function, one should use GWI_XX instead of CHECK_XX +since it takes care of position and might optimize some checks away (in gwion's internals)
+OP_CHECK(name)
define a type checking function. should return
+correct type in success
+error type on failure
+NULL to continue type checking
OP_EMIT(name)
define an emitter function. returns an m_bool
Gwion can be configured to better suit the user's needs. This is mainly done in two files: config.mk
and util/config.mk
.
config.mk
DEBUG_STACK ?= 0
+util/config.mk
USE_DOUBLE ?= 0
+USE_GETTEXT ?= 0
+USE_DEBUG ?= 1
+USE_LTO ?= 0
+USE_COVERAGE ?= 0
+The source is accessible on github.
+Provided you have git installed, you can get it with:
+git clone --recursive https://github.com/Gwion/Gwion
+
+then change to the source directory
+cd Gwion
+
+Make sure that you have the following programs installed, and that they are in your path :
+First, we need to define some enviromment variables
+set CC=gcc
+set BUILD_ON_WINDOWS=1
+
+Next we need to create some directories
+mkdir .d
+cd util
+mkdir .d
+cd ../ast
+mkdir .d
+cd ..
+
+now, look for something like ast/libprettyerr/libprettyerr.a:
, and replace the relevant command with:
@+set CFLAGS_=${CFLAGS} && set CFLAGS=-I<your current dir>/util/libtermcolor/include && ${MAKE} -s -C ast/libprettyerr static && set CFLAGS=CFLAGS_
+
+where <your current dir> is the absolute path to the current working directory
+and finally run
+make
+
+
+
+
+ The source is accessible on github.
+Provided you have git installed, you can get it with:
+git clone --recursive https://github.com/Gwion/Gwion
+
+then change to the source directory
+cd Gwion
+
+++At this point, you may want to configure the build. +In this case, have a look at the configuration page.
+
make
+
+make install
+
+++You may need root privilege to do this.
+
++ + + +This is not strictly necessary, as you can run the program by typing
+./gwion
in thegwion
directory. It is a good idea to install it, however, so that it can be run in any folder on the system.
This guide will help you install Gwion.
+ + + +fun
+operator
+return
+goto
+switch/case/default
+if/else
+break/continue
+until/do/while/for/repeat
+global/static
+private/protect
+const
+new
+spork
+fork
+typeof
+typedef
+funptr
+class
+enum
+union
+auto
+test.sh +requires valgrind +there are two kinds of tests:
+ +those tests are just gwion (.gw) files, handling special comments:
+#! [skip]
(optionally followed by reason to skip)#! [todo]
(optionally followed by reason to delay testing)#! [contains]
followed by string to match#! [excludes]
followed by string not to matchthose tests are just bash (.sh) files.
+they should start with this snippet
#!/bin/bash
+# [test] #5
+n=0
+[ "$1" ] && n="$1"
+[ "$n" -eq 0 ] && n=1
+source tests/sh/common.sh
+
+
+
+
+ Declaring a primitive or an object is quite straight forward:
+var int i;
+var Object o;
+<<< i, " ", o >>>;
+
+sometimes you just want an object to be instantiated later.
+This is done using the late
keyword
late Object object_ref;
+
+if(object_ref)
+ <<< "We have an object: ", object_ref >>>;
+else
+ <<< "We have no object" >>>;
+
+trying to access, print or pass an non instantiated object will perform NullPtrException
late Object object_ref;
+<<< object_ref >>>;
+
+var int array_ref[];
+new int[2] :=> array_ref;
+<<< array_ref >>>;
+
+
+
+
+ This is a basic tutorial that will lead you through the basics of Gwion.
+ + + + +Amber 📖 |
- aleserche 💻 |
-
For loops in Gwion is pretty similar to classic C syntax
+for(var int i; i < 3; ++i)
+ <<< i >>>;
+
+It also works with a block of code.
+for(var int i; i < 3; ++i) {
+ i/2 :=> var float f1;
+ i/2. :=> var float f2;
+ <<< i, " " , f1, " ", f2 >>>;
+}
+
+var int array[3][4];
+
+for(var int i; i < 3; ++i) {
+ for(var int j; j < 4; ++j) {
+ <<< array[i][j] >>>;
+ }
+}
+
+var int array[2][3];
+foreach(a: array) {
+ <<< a >>>;
+ foreach(b: a)
+ <<< b >>>;
+}
+
+If you want to change it the value in the array, you need a pointer
+var int array[2][3];
+var int i;
+foreach(a: array) {
+ foreach(b: a)
+ <<< ++i :=> b >>>;
+}
+foreach(a: array) {
+ foreach(b: a)
+ <<< b >>>;
+}
+
+
+
+
+ let start simple ;-)
+The easiest way to do an action repeatidly in Gwion is, ... the repeat keyword!
repeat(3)
+ <<< "Hello, world!" >>>;
+
+of course this also works with a block code.
+repeat(3) {
+ maybe ? "You" : "Me" :=> var string s;
+ <<< "Hello, ", s, "!" >>>;
+}
+
+
+
+
+ while(true) {
+ if(maybe)
+ break;
+ <<< "running..." >>>;
+}
+
+well this may output nothing... +lets try
+<<< maybe >>>;
+do{
+ if(maybe)
+ break;
+ <<< "running..." >>>;
+} while(true);
+
+
+
+
+ ++in order to use GWION_CTL ...
+
++THIS IS OUTDATED. please look at the source code in src/lib/ instead
+
use the script
+#include "vm.h"
+#include "instr.h"
+#include "import.h
+
+
+Define the type:
+struct Type_ t_mytype = { "MyType", SZ_INT, &t_object};
+
+++every type extending t_object should have SZ_INT
+
CTOR(mytype_ctor) {
+ /* constructor code here */
+}
+
+DTOR(mytype_dtor) {
+ /* destructor code here */
+}
+
+those macros provide two variables:
+o
: the M_Object for the (con/des)tructorshred
: the VM_Shred for the (con/des)tructorCHECK_BB(import_class_begin(env, &t_mytpe, env->global_nspc, mytype_ctor, mytype_dtor))
+
+declare a m_int
. coding convention require
m_int o_mytype_myvaroffset;
+
+/* declare a member function */
+MFUN(mytype_memberfunction) {
+ /* code here */
+}
+
+SFUN(mtype_staticfunction) {
+ /* code here */
+}
+
+lambdas are anonymous functions.
+The syntax to create them is simple:
+\ variable0 variable1 ... { your code here }
+
+You can even use it to
+\ i { <<< "passed '", i, "'" >>>; }(3);
+
+if the lambda consists of only one expression, the result of that expression is implicetely returned. +Notice there is no semicolon in the lambda body;
+<<< \ { 42 }() >>>;
+
+funptr void fptr_t(int);
+\ i { <<< "passed '", i, "'" >>>; } :=> var fptr_t fptr;
+fptr(4);
+
+funptr void fptr_t(int);
+fun void test(fptr_t fptr) {
+ fptr(5);
+}
+test(\ i { <<< "passed '", i, "'" >>>; });
+
+
+
+
+ Sometimes when writing code, you have a situation such as this:
+fun int incr(int i) {
+ return i + 1;
+}
+
+<<< incr(incr(incr(incr(1)))) >>>;
+
+This code looks rather unappealing due to the nested functions. Instead, you can use pipes!
+Instead of nesting functions over and over again, you can pipe the functions in a nice line.
+fun int incr(int i) {
+ return i + 1;
+}
+
+<<< 1 => incr => incr => incr => incr >>>;
+
+As you can see, the 1
is piped into the incr
function, and the result of that is piped into the incr
function, and so on.
Piping works a little differently if your function has multiple arguments. If a function has multiple arguments, there are two ways to pipe.
+First off, you can pipe all arguments directly.
+fun int add(int i, int j) {
+ return i + j;
+}
+
+<<< (1, 2) => add >>>;
+
+Second off, you can pipe arguments one at a time.
+fun int add(int i, int j) {
+ return i + j;
+}
+
+<<< 1 => add(_, 2) >>>;
+<<< 2 => add(1, _) >>>;
+
+The underscore determines where the piped argument goes. In the first line, 1
goes into the first argument, whereas in the second line, 2
goes into the second argument.
You can also have multiple underscores.
+fun int add3(int i, int j, int k) {
+ return i + j + k;
+}
+
+<<< (1, 3) => add3(_, 2, _) >>>;
+
+The arguments go into their respective underscores. In this case, 1
goes into the first argument and 3
goes into the third.
++A function whoses arity is not fixed.
+
Well, a function that takes a fixed number of arguments, and additionnal ones.
+fun void variadic_test(int i, ...) {
+ <<< "first argument is ", i >>>;
+ varloop vararg {
+ <<< "\tadditionnal argument", vararg $ int >>>;
+ }
+}
+variadic_test(1);
+variadic_test(1, 2);
+variadic_test(1, 2, 3);
+
+
+
+
+ #! declare function 'test_function'
+#! with return type int
+#! taking an int as argument
+fun int test_function(int arg) {
+ #! return the argument + 2
+ return arg + 2;
+}
+
+#! now call the function (and debug print the result)
+<<< test_function(0) >>>;
+#! or use alternate syntax
+<<< 1 => test_function >>>;
+
+According to wikipeda: +In computer science, partial application (or partial function application) refers to the process of fixing a number of arguments to a function, producing another function of smaller arity.
+In gwion, you can use a hole _
to achieve that
fun int test(int i, int j) {
+ return i + j;
+}
+
+test(_, 2) :=> const auto mytest;
+<<< 40 => mytest >>>;
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ compiler generated documentation
+
+
+
+
+ You can use the memoize
pragma to enable memoization on functions:
++fib_recurs.gw
+
fun int recursive_fib(int n) {
+ if (n < 2)
+ return n;
+ return recursive_fib(n - 2) + recursive_fib(n - 1);
+}
+<<< 40 => recursive_fib >>>;
+
+The syntax of the memoize
pragma is as follow:
#pragma memoization <number of results to store>
+
+See the memoized version of previous function:
+++fib_recurs_memoize.gw
+
fun int recursive_fib(int n) {
+#pragma memoize 2
+ if (n < 2)
+ return n;
+ return recursive_fib(n - 2) + recursive_fib(n - 1);
+}
+<<< 40 => recursive_fib >>>;
+
+Under circomstance where memoization is applicable, +such as this one, you can see a huge speed-up.
+normal:
+memoized:
+Memoization setting will be active until the end of file +or until it is changed. +Therefore, if you want to disable memoization for subsequent functions, use:
+#pragma memoize 0
+
+
+
+
+ For those who don't know about enumerated types, +you can read about those +here and +here
+enums require a name and at least one member.
+You use them like this:
+enum MyEnum {
+ zero, one, two
+};
+<<< "${MyEnum.zero} ${MyEnum.one} ${MyEnum.two}" >>>;
+
+When inside a class, enums accept private or protect specifiers.
+ + + +Create an alias for a previously defined type.
+typedef int MyInt;
+var MyInt i;
+<<< i >>>;
+<<< i $ int >>>;
+
+Aliases can also point to an array type
+typedef float[3] Point;
+var Point p;
+foreach(a : p)
+ <<< a >>>;
+
+Aliases can be used to refer to a type family
+typedef Ptr:[int] IntPtr;
+var IntPtr int_ptr;
+<<< int_ptr >>>;
+
+
+
+
+ Union store their component in the same memory space, +but only one element can be used at a time
+union U {
+ int i;
+ float f;
+ Object o;
+};
+
+#! create an union with field `i` set to `1`
+new U(i, 1) :=> var U u;
+
+<<< u.i >>>;
+
+#! set field f to 2.4
+2.4 :=> u.f;
+<<< u.f >>>;
+
+#! this will trigger an invalid access error
+<<< u.i >>>;
+
+
+
+
+ compiler generated documentation
+#!+ [builtin]
+
+#!- one type to rule them all.
+primitive Class;
+
+#!- this type is infered.
+primitive auto;
+
+#!- a void type.
+primitive void;
+
+#!- integer type.
+primitive int;
+
+#!- character type.
+primitive char extends int;
+
+#!- float type.
+primitive float;
+
+#!- represent duration.
+primitive dur;
+
+#!- represent time.
+primitive time;
+
+#!- internal time for `now`.
+primitive @now extends time;
+specialid const now;
+
+#!- internal predicate representation.
+specialid const @predicate;
+#!- internal base of all objects and structures.
+primitive enum extends int;
+primitive @Compound;
+primitive Object extends @Compound;
+specialid const this;
+specialid const super;
+primitive bool extends int;
+const bool true;
+const bool false;
+operator bool ! (int);
+operator @implicit (bool, float);
+specialid const maybe;
+operator bool @conditional (int);
+operator bool @unconditional (int);
+operator int + (int, int);
+operator int - (int, int);
+operator int * (int, int);
+operator int / (int, int);
+operator int (int, int);
+operator int > (int, int);
+operator int >= (int, int);
+operator int < (int, int);
+operator int <= (int, int);
+operator int >> (int, int);
+operator int << (int, int);
+operator int & (int, int);
+operator int | (int, int);
+operator int ^ (int, int);
+operator bool && (int, int);
+operator bool || (int, int);
+operator bool == (int, int);
+operator bool != (int, int);
+operator int :=> (int, int);
+operator int +=> (int, int);
+operator int -=> (int, int);
+operator int *=> (int, int);
+operator int /=> (int, int);
+operator int %=> (int, int);
+operator int <<=> (int, int);
+operator int >>=> (int, int);
+operator int &=> (int, int);
+operator int |=> (int, int);
+operator int ^=> (int, int);
+operator int - (int);
+operator int ++ (int);
+operator int -- (int);
+operator int ~ (int);
+operator int [:] ();
+operator int int ++ ();
+operator int int -- ();
+primitive u8 1;
+primitive u16 2;
+primitive u32 4;
+primitive u64 8;
+operator bool @conditional (float);
+operator bool @unconditional (float);
+operator float + (float, float);
+operator float - (float, float);
+operator float * (float, float);
+operator float / (float, float);
+operator float @implicit (float, float);
+operator float :=> (float, float);
+operator float +=> (float, float);
+operator float -=> (float, float);
+operator float *=> (float, float);
+operator float /=> (float, float);
+operator bool && (float, float);
+operator bool || (float, float);
+operator bool == (float, float);
+operator bool != (float, float);
+operator bool > (float, float);
+operator bool >= (float, float);
+operator bool < (float, float);
+operator bool <= (float, float);
+operator float - (float);
+operator dur :: (int, dur);
+operator dur :: (float, dur);
+operator bool ! (float);
+operator int > (int, float);
+operator int >= (int, float);
+operator int < (int, float);
+operator int <= (int, float);
+operator float + (int, float);
+operator float * (int, float);
+operator float - (int, float);
+operator float / (int, float);
+operator float :=> (int, float);
+operator float +=> (int, float);
+operator float -=> (int, float);
+operator float *=> (int, float);
+operator float /=> (int, float);
+operator float $ (int, float);
+operator float @implicit (int, float);
+operator bool && (int, float);
+operator bool || (int, float);
+operator bool == (int, float);
+operator bool != (int, float);
+operator float + (float, int);
+operator float - (float, int);
+operator float * (float, int);
+operator float / (float, int);
+operator float :=> (float, int);
+operator float +=> (float, int);
+operator float -=> (float, int);
+operator float *=> (float, int);
+operator float /=> (float, int);
+operator float $ (float, int);
+operator bool && (float, int);
+operator bool || (float, int);
+operator bool == (float, int);
+operator bool != (float, int);
+operator bool > (float, int);
+operator bool >= (float, int);
+operator bool < (float, int);
+operator bool <= (float, int);
+operator bool @conditional (dur);
+operator bool @unconditional (dur);
+operator dur :=> (dur, dur);
+operator dur +=> (dur, dur);
+operator dur -=> (dur, dur);
+operator dur *=> (dur, dur);
+operator dur /=> (dur, dur);
+operator dur + (dur, dur);
+operator dur - (dur, dur);
+operator dur * (dur, dur);
+operator float / (dur, dur);
+operator dur / (dur, float);
+operator dur *=> (float, dur);
+operator dur /=> (float, dur);
+operator bool == (dur, dur);
+operator bool != (dur, dur);
+operator bool > (dur, dur);
+operator bool >= (dur, dur);
+operator bool < (dur, dur);
+operator bool <= (dur, dur);
+operator bool @conditional (time);
+operator bool @unconditional (time);
+operator time :=> (time, time);
+operator time + (time, dur);
+operator time * (time, dur);
+operator time / (time, dur);
+operator dur - (time, time);
+operator time *=> (float, time);
+operator time /=> (float, time);
+operator time :=> (dur, time);
+operator time + (dur, time);
+operator time => (dur, @now);
+operator bool > (time, time);
+operator bool >= (time, time);
+operator bool < (time, time);
+operator bool <= (time, time);
+
+#!- the base of all functions.
+primitive function;
+
+#!- the base of decayed operators.
+primitive operator extends function;
+
+#!- the base of function pointers.
+class funptr extends Object {
+ fun void @ctor();
+ fun void default();
+}
+operator funptr class ();
+operator => (@Any, function);
+operator => (@Any, funptr);
+operator :=> (function, funptr);
+operator @implicit (function, funptr);
+operator $ (function, funptr);
+operator @implicit (operator, funptr);
+operator $ (operator, funptr);
+operator :=> (function, function);
+operator function @partial ();
+operator Class @partial ();
+primitive @error;
+operator :=> (Object, Object);
+operator => (@Any, @Compound);
+operator bool == (Object, Object);
+operator bool != (Object, Object);
+operator bool $ (Object, Object);
+operator bool @unconditional (Object);
+operator bool @conditional (Object);
+operator bool ! (Object);
+operator @Compound class ();
+const float samplerate;
+const float pi;
+const dur d_zero;
+const dur samp;
+const dur ms;
+const dur second;
+const dur minute;
+const dur hour;
+const time t_zero;
+primitive None;
+specialid const None;
+operator None :=> (None, None);
+const int index;
+fun bool is(int member);
+operator auto new:[ T ](int size, int id, T value);
+operator . (union, @Any);
+union Option :[ A ] {
+ None none;
+ A val;
+};
+class Array:[ T ] extends Object {
+ funptr static A map_t:[ A ](T elem);
+ funptr static Option:[ A ] compactmap_t:[ A ](T elem);
+ funptr static A fold_t:[ A ](T elem, A acc);
+ funptr static bool filter_t(T elem);
+ funptr static T new_t(int idx);
+ fun bool remove(int index);
+ fun bool insert(int index, T data);
+ fun int size();
+ fun int depth();
+ fun int cap();
+ fun T random();
+ fun A[] map:[ A ](map_t:[ A ] data);
+ fun A[] compactMap:[ A ](compactmap_t:[ A ] data);
+ fun T[] filter(filter_t data);
+ fun int count(filter_t data);
+ fun A foldl:[ A ](fold_t:[ A ] data, A initial);
+ fun A foldr:[ A ](fold_t:[ A ] data, A initial);
+ operator auto new(new_t init);
+}
+operator :=> (Array, Array);
+operator @implicit (Array, Array);
+operator << (Array, @Any);
+operator >> (@Any, Array);
+operator $ (Array, Array);
+operator int [:] (int, Array);
+operator [] (int, Array);
+operator Array void @each_init ();
+operator Array int @each ();
+operator Array @each_val ();
+operator Array int @each_idx ();
+operator Array class ();
+operator @Any bool @array_init ();
+class Event extends Object {
+ fun void @ctor();
+ fun void signal();
+ fun void broadcast();
+}
+operator int => (Event, @now);
+class UGen extends Object {
+ fun void @ctor();
+ fun UGen chan(int arg0);
+ fun int op();
+ fun int op(int arg0);
+ fun float last();
+}
+operator UGen ~> (UGen, UGen);
+operator UGen ~< (UGen, UGen);
+operator UGen :~> (UGen, UGen);
+operator UGen :~< (UGen, UGen);
+operator UGen[] ~> (UGen[], UGen[]);
+operator UGen[] ~< (UGen[], UGen[]);
+operator UGen[] :~> (UGen[], UGen[]);
+operator UGen[] :~< (UGen[], UGen[]);
+operator UGen[] ~> (UGen, UGen[]);
+operator UGen[] ~< (UGen, UGen[]);
+operator UGen[] :~> (UGen, UGen[]);
+operator UGen[] :~< (UGen, UGen[]);
+operator UGen ~> (UGen[], UGen);
+operator UGen ~< (UGen[], UGen);
+operator UGen :~> (UGen[], UGen);
+operator UGen :~< (UGen[], UGen);
+const UGen blackhole;
+const UGen dac;
+const UGen adc;
+operator spork (@Any);
+operator fork (@Any);
+operator new (@Any);
+
+#!- Ref: take a reference from a variable.
+#!- used just as the variable it reference.
+#!- can only be used as argument.
+#!- and cannot be returned.
+struct Ref:[ A ] {
+ #!- a pointer to the referenced variable.
+}
+
+#!- internal `Ref` type creation.
+operator Ref class ();
+class string extends Object {
+ fun void @ctor();
+ fun int size();
+ fun string upper();
+ fun string lower();
+ fun string ltrim();
+ fun string rtrim();
+ fun string trim();
+ fun string insert(int pos, string str);
+ fun string replace(int pos, string str);
+ fun string replace(int pos, int n, string str);
+ fun int find(char c);
+ fun int find(char c, int pos);
+ fun int find(string str);
+ fun int find(string str, int pos);
+ fun int rfind(char c);
+ fun int rfind(char c, int pos);
+ fun int rfind(string str);
+ fun int rfind(string str, int pos);
+ fun void erase(int start, int length);
+ fun void save(string path);
+ fun static string load(string path);
+ fun int atoi();
+ fun int atoi2(&int offset);
+ fun float atof();
+}
+operator [] (int, string);
+operator bool == (string, string);
+operator bool != (string, string);
+operator string [:] (int, string);
+specialid const __file__;
+specialid const __func__;
+specialid const __line__;
+class Shred extends Object {
+ const int cancel;
+ fun void exit();
+ fun bool running();
+ fun bool done();
+ fun int id();
+ fun static Shred fromId(int xid);
+ fun void yield();
+ fun int args();
+ fun string arg(int n);
+ fun string name();
+ fun string path();
+ fun string dir();
+ fun string code_name();
+ fun string code_path();
+ fun string code_dir();
+ fun void set_cancel(int n);
+ fun void test_cancel();
+ fun void lock();
+ fun void unlock();
+ fun float get_now();
+ fun UGen get_blackhole();
+}
+specialid const me;
+class Fork extends Shred {
+ const int is_done;
+ const Event ev;
+ fun void join();
+ fun void test_cancel();
+}
+class TypedFork:[ A ] extends Fork {
+ const A retval;
+}
+class Gain extends UGen {
+ fun void @ctor();
+ fun float gain();
+ fun float gain(float arg0);
+}
+class Impulse extends UGen {
+ fun void @ctor();
+ fun float next();
+ fun float next(float arg0);
+}
+class FullRect extends UGen {
+ fun void @ctor();
+}
+class HalfRect extends UGen {
+ fun void @ctor();
+}
+class Step extends UGen {
+ fun void @ctor();
+ fun float next();
+ fun float next(float arg0);
+}
+class ZeroX extends UGen {
+ fun void @ctor();
+}
+class UsrUGen extends UGen {
+ fun void @ctor();
+ fun int default_tick();
+}
+operator UsrUGen ~=> (function, UsrUGen);
+
+#!- allow member access.
+operator . (@Compound, @Any);
+
+#!- Operators class types.
+operator bool == (Class, Class);
+operator bool != (Class, Class);
+operator bool >= (Class, Class);
+operator bool > (Class, Class);
+operator bool <= (Class, Class);
+operator bool < (Class, Class);
+
+#!- Allow binary call to constructors.
+operator => (@Any, Class);
+
+#!- internal constructor operator.
+operator call_type (@Any);
+
+#!- allow static access.
+operator . (Class, @Any);
+
+#!- Deep Equality fallback
+operator bool ?= (@Any, @Any);
+
+#!- Deep Inequality fallback
+operator bool <> (@Any, @Any);
+
+#!- Deep Equality
+operator bool ?= (@Compound, @Compound);
+
+#!- Deep Inequality
+operator bool <> (@Compound, @Compound);
+class Dict:[ Key, Val ] extends Object {
+ fun void @ctor();
+ fun void remove(Key key);
+}
+operator Dict class ();
+operator Dict int @each ();
+operator Dict void @each_init ();
+operator Dict @each_val ();
+operator Dict @each_idx ();
+fun int hash(int key);
+fun int hash(Object key);
+fun int hash(float key);
+fun int hash(time key);
+fun int hash(dur key);
+fun int hash(string key);
+
+#!- a type for *pretty print*.
+primitive @Gack;
+
+#!- @Gack implicit cast
+operator @implicit (@Gack, @Any);
+class Sift extends Shred {
+}
+
+#!- This operator expands too
+#!- spork {
+#!- while(true) {
+#!- lhs.last() => rhs;
+#!- samp => now;
+#!- }
+#!- }
+operator Sift |> (UGen, function);
+operator Sift |> (Sift, function);
+operator Sift |> (UGen, funptr);
+operator Sift |> (Sift, funptr);
+
+#!- Definition of the basic locale
+fun float BasicLocale(string str);
+enum @hidden_enum { @hidden_enum ,}
+
+
+
+
+ ${result_block.innerHTML}
`
+ code_block.append(result_block);
+ }
+
+ let text = playground_text(code_block);
+
+ result_block.innerText = "Running...";
+
+ fetch_with_timeout("https://TheGwionPlayground.fennecdjay.repl.co", {
+ headers: {
+ 'Content-Type': "text/plain",
+ },
+ method: 'POST',
+ mode: 'cors',
+ body: text
+ })
+ .then(response => response.json())
+ .then(response => result_block.innerHTML = response)
+ .catch(error => result_block.innerText = "Playground Communication: " + error.message);
+ }
+
+ // Syntax highlighting Configuration
+ hljs.configure({
+ tabReplace: ' ', // 4 spaces
+ languages: [], // Languages used for auto-detection
+ });
+
+ let code_nodes = Array
+ .from(document.querySelectorAll('code'))
+ // Don't highlight `inline code` blocks in headers.
+ .filter(function (node) {return !node.parentElement.classList.contains("header"); });
+
+ if (window.ace) {
+ // language-gwion class needs to be removed for editable
+ // blocks or highlightjs will capture events
+ Array
+ .from(document.querySelectorAll('code.editable'))
+ .forEach(function (block) {
+ block.classList.remove('language-gwion');
+ let editor = window.ace.edit(block);
+ editor.commands.addCommand({
+ name: "run",
+ bindKey: {
+ win: "Ctrl-Enter",
+ mac: "Ctrl-Enter"
+ },
+ exec: _editor => run_gwion_code(block.parentNode)
+ });
+ });
+
+ Array
+ .from(document.querySelectorAll('code:not(.editable)'))
+ .forEach(function (block) { hljs.highlightBlock(block); });
+ } else {
+ code_nodes.forEach(function (block) { hljs.highlightBlock(block); });
+ }
+
+ // Adding the hljs class gives code blocks the color css
+ // even if highlighting doesn't apply
+ code_nodes.forEach(function (block) { block.classList.add('hljs'); });
+
+ if (window.playground_copyable) {
+ Array.from(document.querySelectorAll('pre code')).forEach(function (block) {
+ var pre_block = block.parentNode;
+ if (!pre_block.classList.contains('playground')) {
+ var buttons = pre_block.querySelector(".buttons");
+ if (!buttons) {
+ buttons = document.createElement('div');
+ buttons.className = 'buttons';
+ pre_block.insertBefore(buttons, pre_block.firstChild);
+ }
+
+ var clipButton = document.createElement('button');
+ clipButton.className = 'fa fa-copy clip-button';
+ clipButton.title = 'Copy to clipboard';
+ clipButton.setAttribute('aria-label', clipButton.title);
+ clipButton.innerHTML = '';
+
+ buttons.insertBefore(clipButton, buttons.firstChild);
+ }
+ });
+ }
+
+ // Process playground code blocks
+ Array.from(document.querySelectorAll(".playground")).forEach(function (pre_block) {
+ // Add play button
+ var buttons = pre_block.querySelector(".buttons");
+ if (!buttons) {
+ buttons = document.createElement('div');
+ buttons.className = 'buttons';
+ pre_block.insertBefore(buttons, pre_block.firstChild);
+ }
+
+ var runCodeButton = document.createElement('button');
+ runCodeButton.className = 'fa fa-play play-button';
+ runCodeButton.hidden = true;
+ runCodeButton.title = 'Run this code';
+ runCodeButton.setAttribute('aria-label', runCodeButton.title);
+
+ buttons.insertBefore(runCodeButton, buttons.firstChild);
+ runCodeButton.addEventListener('click', function (e) {
+ run_gwion_code(pre_block);
+ });
+
+ if (window.playground_copyable) {
+ var copyCodeClipboardButton = document.createElement('button');
+ copyCodeClipboardButton.className = 'fa fa-copy clip-button';
+ copyCodeClipboardButton.innerHTML = '';
+ copyCodeClipboardButton.title = 'Copy to clipboard';
+ copyCodeClipboardButton.setAttribute('aria-label', copyCodeClipboardButton.title);
+
+ buttons.insertBefore(copyCodeClipboardButton, buttons.firstChild);
+ }
+
+ let code_block = pre_block.querySelector("code");
+
+
+ if (window.ace && code_block.classList.contains("editable")) {
+ var undoChangesButton = document.createElement('button');
+ undoChangesButton.className = 'fa fa-history reset-button';
+ undoChangesButton.title = 'Undo changes';
+ undoChangesButton.setAttribute('aria-label', undoChangesButton.title);
+
+ buttons.insertBefore(undoChangesButton, buttons.firstChild);
+
+ undoChangesButton.addEventListener('click', function () {
+ let editor = window.ace.edit(code_block);
+ editor.setValue(editor.originalCode);
+ editor.clearSelection();
+ });
+ }
+
+ const play_button = pre_block.querySelector(".play-button");
+
+ // skip if code is `no_run`
+ if (pre_block.querySelector('code').classList.contains("no_run")) {
+ play_button.classList.add("hidden");
+ return;
+ }
+ });
+})();
+
+(function themes() {
+ var html = document.querySelector('html');
+ var themeToggleButton = document.getElementById('theme-toggle');
+ var themePopup = document.getElementById('theme-list');
+ var themeColorMetaTag = document.querySelector('meta[name="theme-color"]');
+ var stylesheets = {
+ ayuHighlight: document.querySelector("[href$='ayu-highlight.css']"),
+ tomorrowNight: document.querySelector("[href$='tomorrow-night.css']"),
+ highlight: document.querySelector("[href$='highlight.css']"),
+ };
+
+ function showThemes() {
+ themePopup.style.display = 'block';
+ themeToggleButton.setAttribute('aria-expanded', true);
+ themePopup.querySelector("button#" + get_theme()).focus();
+ }
+
+ function hideThemes() {
+ themePopup.style.display = 'none';
+ themeToggleButton.setAttribute('aria-expanded', false);
+ themeToggleButton.focus();
+ }
+
+ function get_theme() {
+ var theme;
+ try { theme = localStorage.getItem('mdbook-theme'); } catch (e) { }
+ if (theme === null || theme === undefined) {
+ return default_theme;
+ } else {
+ return theme;
+ }
+ }
+
+ function set_theme(theme, store = true) {
+ let ace_theme;
+
+ if (theme == 'coal' || theme == 'navy') {
+ stylesheets.ayuHighlight.disabled = true;
+ stylesheets.tomorrowNight.disabled = false;
+ stylesheets.highlight.disabled = true;
+
+ ace_theme = "ace/theme/tomorrow_night";
+ } else if (theme == 'ayu') {
+ stylesheets.ayuHighlight.disabled = false;
+ stylesheets.tomorrowNight.disabled = true;
+ stylesheets.highlight.disabled = true;
+ ace_theme = "ace/theme/tomorrow_night";
+ } else {
+ stylesheets.ayuHighlight.disabled = true;
+ stylesheets.tomorrowNight.disabled = true;
+ stylesheets.highlight.disabled = false;
+ ace_theme = "ace/theme/dawn";
+ }
+
+ setTimeout(function () {
+ themeColorMetaTag.content = getComputedStyle(document.body).backgroundColor;
+ }, 1);
+
+ if (window.ace && window.editors) {
+ window.editors.forEach(function (editor) {
+ editor.setTheme(ace_theme);
+ });
+ }
+
+ var previousTheme = get_theme();
+
+ if (store) {
+ try { localStorage.setItem('mdbook-theme', theme); } catch (e) { }
+ }
+
+ html.classList.remove(previousTheme);
+ html.classList.add(theme);
+ }
+
+ // Set theme
+ var theme = get_theme();
+
+ set_theme(theme, false);
+
+ themeToggleButton.addEventListener('click', function () {
+ if (themePopup.style.display === 'block') {
+ hideThemes();
+ } else {
+ showThemes();
+ }
+ });
+
+ themePopup.addEventListener('click', function (e) {
+ var theme = e.target.id || e.target.parentElement.id;
+ set_theme(theme);
+ });
+
+ themePopup.addEventListener('focusout', function(e) {
+ // e.relatedTarget is null in Safari and Firefox on macOS (see workaround below)
+ if (!!e.relatedTarget && !themeToggleButton.contains(e.relatedTarget) && !themePopup.contains(e.relatedTarget)) {
+ hideThemes();
+ }
+ });
+
+ // Should not be needed, but it works around an issue on macOS & iOS: https://github.com/rust-lang/mdBook/issues/628
+ document.addEventListener('click', function(e) {
+ if (themePopup.style.display === 'block' && !themeToggleButton.contains(e.target) && !themePopup.contains(e.target)) {
+ hideThemes();
+ }
+ });
+
+ document.addEventListener('keydown', function (e) {
+ if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; }
+ if (!themePopup.contains(e.target)) { return; }
+
+ switch (e.key) {
+ case 'Escape':
+ e.preventDefault();
+ hideThemes();
+ break;
+ case 'ArrowUp':
+ e.preventDefault();
+ var li = document.activeElement.parentElement;
+ if (li && li.previousElementSibling) {
+ li.previousElementSibling.querySelector('button').focus();
+ }
+ break;
+ case 'ArrowDown':
+ e.preventDefault();
+ var li = document.activeElement.parentElement;
+ if (li && li.nextElementSibling) {
+ li.nextElementSibling.querySelector('button').focus();
+ }
+ break;
+ case 'Home':
+ e.preventDefault();
+ themePopup.querySelector('li:first-child button').focus();
+ break;
+ case 'End':
+ e.preventDefault();
+ themePopup.querySelector('li:last-child button').focus();
+ break;
+ }
+ });
+})();
+
+(function sidebar() {
+ var html = document.querySelector("html");
+ var sidebar = document.getElementById("sidebar");
+ var sidebarLinks = document.querySelectorAll('#sidebar a');
+ var sidebarToggleButton = document.getElementById("sidebar-toggle");
+ var sidebarResizeHandle = document.getElementById("sidebar-resize-handle");
+ var firstContact = null;
+
+ function showSidebar() {
+ html.classList.remove('sidebar-hidden')
+ html.classList.add('sidebar-visible');
+ Array.from(sidebarLinks).forEach(function (link) {
+ link.setAttribute('tabIndex', 0);
+ });
+ sidebarToggleButton.setAttribute('aria-expanded', true);
+ sidebar.setAttribute('aria-hidden', false);
+ try { localStorage.setItem('mdbook-sidebar', 'visible'); } catch (e) { }
+ }
+
+
+ var sidebarAnchorToggles = document.querySelectorAll('#sidebar a.toggle');
+
+ function toggleSection(ev) {
+ ev.currentTarget.parentElement.classList.toggle('expanded');
+ }
+
+ Array.from(sidebarAnchorToggles).forEach(function (el) {
+ el.addEventListener('click', toggleSection);
+ });
+
+ function hideSidebar() {
+ html.classList.remove('sidebar-visible')
+ html.classList.add('sidebar-hidden');
+ Array.from(sidebarLinks).forEach(function (link) {
+ link.setAttribute('tabIndex', -1);
+ });
+ sidebarToggleButton.setAttribute('aria-expanded', false);
+ sidebar.setAttribute('aria-hidden', true);
+ try { localStorage.setItem('mdbook-sidebar', 'hidden'); } catch (e) { }
+ }
+
+ // Toggle sidebar
+ sidebarToggleButton.addEventListener('click', function sidebarToggle() {
+ if (html.classList.contains("sidebar-hidden")) {
+ var current_width = parseInt(
+ document.documentElement.style.getPropertyValue('--sidebar-width'), 10);
+ if (current_width < 150) {
+ document.documentElement.style.setProperty('--sidebar-width', '150px');
+ }
+ showSidebar();
+ } else if (html.classList.contains("sidebar-visible")) {
+ hideSidebar();
+ } else {
+ if (getComputedStyle(sidebar)['transform'] === 'none') {
+ hideSidebar();
+ } else {
+ showSidebar();
+ }
+ }
+ });
+
+ sidebarResizeHandle.addEventListener('mousedown', initResize, false);
+
+ function initResize(e) {
+ window.addEventListener('mousemove', resize, false);
+ window.addEventListener('mouseup', stopResize, false);
+ html.classList.add('sidebar-resizing');
+ }
+ function resize(e) {
+ var pos = (e.clientX - sidebar.offsetLeft);
+ if (pos < 20) {
+ hideSidebar();
+ } else {
+ if (html.classList.contains("sidebar-hidden")) {
+ showSidebar();
+ }
+ pos = Math.min(pos, window.innerWidth - 100);
+ document.documentElement.style.setProperty('--sidebar-width', pos + 'px');
+ }
+ }
+ //on mouseup remove windows functions mousemove & mouseup
+ function stopResize(e) {
+ html.classList.remove('sidebar-resizing');
+ window.removeEventListener('mousemove', resize, false);
+ window.removeEventListener('mouseup', stopResize, false);
+ }
+
+ document.addEventListener('touchstart', function (e) {
+ firstContact = {
+ x: e.touches[0].clientX,
+ time: Date.now()
+ };
+ }, { passive: true });
+
+ document.addEventListener('touchmove', function (e) {
+ if (!firstContact)
+ return;
+
+ var curX = e.touches[0].clientX;
+ var xDiff = curX - firstContact.x,
+ tDiff = Date.now() - firstContact.time;
+
+ if (tDiff < 250 && Math.abs(xDiff) >= 150) {
+ if (xDiff >= 0 && firstContact.x < Math.min(document.body.clientWidth * 0.25, 300))
+ showSidebar();
+ else if (xDiff < 0 && curX < 300)
+ hideSidebar();
+
+ firstContact = null;
+ }
+ }, { passive: true });
+
+ // Scroll sidebar to current active section
+ var activeSection = document.getElementById("sidebar").querySelector(".active");
+ if (activeSection) {
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
+ activeSection.scrollIntoView({ block: 'center' });
+ }
+})();
+
+(function chapterNavigation() {
+ document.addEventListener('keydown', function (e) {
+ if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; }
+ if (window.search && window.search.hasFocus()) { return; }
+
+ switch (e.key) {
+ case 'ArrowRight':
+ e.preventDefault();
+ var nextButton = document.querySelector('.nav-chapters.next');
+ if (nextButton) {
+ window.location.href = nextButton.href;
+ }
+ break;
+ case 'ArrowLeft':
+ e.preventDefault();
+ var previousButton = document.querySelector('.nav-chapters.previous');
+ if (previousButton) {
+ window.location.href = previousButton.href;
+ }
+ break;
+ }
+ });
+})();
+
+(function clipboard() {
+ var clipButtons = document.querySelectorAll('.clip-button');
+
+ function hideTooltip(elem) {
+ elem.firstChild.innerText = "";
+ elem.className = 'fa fa-copy clip-button';
+ }
+
+ function showTooltip(elem, msg) {
+ elem.firstChild.innerText = msg;
+ elem.className = 'fa fa-copy tooltipped';
+ }
+
+ var clipboardSnippets = new ClipboardJS('.clip-button', {
+ text: function (trigger) {
+ hideTooltip(trigger);
+ let playground = trigger.closest("pre");
+ return playground_text(playground);
+ }
+ });
+
+ Array.from(clipButtons).forEach(function (clipButton) {
+ clipButton.addEventListener('mouseout', function (e) {
+ hideTooltip(e.currentTarget);
+ });
+ });
+
+ clipboardSnippets.on('success', function (e) {
+ e.clearSelection();
+ showTooltip(e.trigger, "Copied!");
+ });
+
+ clipboardSnippets.on('error', function (e) {
+ showTooltip(e.trigger, "Clipboard error!");
+ });
+})();
+
+(function scrollToTop () {
+ var menuTitle = document.querySelector('.menu-title');
+
+ menuTitle.addEventListener('click', function () {
+ document.scrollingElement.scrollTo({ top: 0, behavior: 'smooth' });
+ });
+})();
+
+(function controllMenu() {
+ var menu = document.getElementById('menu-bar');
+
+ (function controllPosition() {
+ var scrollTop = document.scrollingElement.scrollTop;
+ var prevScrollTop = scrollTop;
+ var minMenuY = -menu.clientHeight - 50;
+ // When the script loads, the page can be at any scroll (e.g. if you reforesh it).
+ menu.style.top = scrollTop + 'px';
+ // Same as parseInt(menu.style.top.slice(0, -2), but faster
+ var topCache = menu.style.top.slice(0, -2);
+ menu.classList.remove('sticky');
+ var stickyCache = false; // Same as menu.classList.contains('sticky'), but faster
+ document.addEventListener('scroll', function () {
+ scrollTop = Math.max(document.scrollingElement.scrollTop, 0);
+ // `null` means that it doesn't need to be updated
+ var nextSticky = null;
+ var nextTop = null;
+ var scrollDown = scrollTop > prevScrollTop;
+ var menuPosAbsoluteY = topCache - scrollTop;
+ if (scrollDown) {
+ nextSticky = false;
+ if (menuPosAbsoluteY > 0) {
+ nextTop = prevScrollTop;
+ }
+ } else {
+ if (menuPosAbsoluteY > 0) {
+ nextSticky = true;
+ } else if (menuPosAbsoluteY < minMenuY) {
+ nextTop = prevScrollTop + minMenuY;
+ }
+ }
+ if (nextSticky === true && stickyCache === false) {
+ menu.classList.add('sticky');
+ stickyCache = true;
+ } else if (nextSticky === false && stickyCache === true) {
+ menu.classList.remove('sticky');
+ stickyCache = false;
+ }
+ if (nextTop !== null) {
+ menu.style.top = nextTop + 'px';
+ topCache = nextTop;
+ }
+ prevScrollTop = scrollTop;
+ }, { passive: true });
+ })();
+ (function controllBorder() {
+ menu.classList.remove('bordered');
+ document.addEventListener('scroll', function () {
+ if (menu.offsetTop === 0) {
+ menu.classList.remove('bordered');
+ } else {
+ menu.classList.add('bordered');
+ }
+ }, { passive: true });
+ })();
+})();
diff --git a/book.toml b/book.toml
deleted file mode 100644
index e1476ca84..000000000
--- a/book.toml
+++ /dev/null
@@ -1,25 +0,0 @@
-[book]
-authors = ["Jérémie Astor", "Pranav Joglekar", "Amber Zeller", "argvsc47 Noodoode#5890"]
-title = "Gwion"
-description = "Tutorial and reference for Gwion"
-language = "en"
-
-[output.html]
-default-theme = "coal"
-additional-css = ["custom.css", "ansi2html.css"]
-git-repository-url ="https://github.com/Gwion/Gwion"
-site-url = "/Gwion/"
-
-[output.html.fold]
-enable = true
-level = 0
-
-[output.html.search]
-use-boolean-and = true
-boost-title = 3
-boost-hierarchy = 2
-boost-paragraph = 1
-
-[output.html.playground]
-line-numbers= false
-editable = true
diff --git a/clipboard.min.js b/clipboard.min.js
new file mode 100644
index 000000000..02c549e35
--- /dev/null
+++ b/clipboard.min.js
@@ -0,0 +1,7 @@
+/*!
+ * clipboard.js v2.0.4
+ * https://zenorocha.github.io/clipboard.js
+ *
+ * Licensed MIT © Zeno Rocha
+ */
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n-@hide bash scripts/list_benchmarks.sh - |
export TRANSLATION_TARGET=xxx
-so you don't have to repeat it on the command line
-
`
+ };
+
+ const VuePlugin = {
+ install(Vue) {
+ Vue.component('highlightjs', Component);
+ }
+ };
+
+ /*
+ Syntax highlighting with language autodetection.
+ https://highlightjs.org/
+ */
+
+ const escape$1 = escapeHTML;
+ const inherit$1 = inherit;
+
+ const { nodeStream: nodeStream$1, mergeStreams: mergeStreams$1 } = utils;
+ const NO_MATCH = Symbol("nomatch");
+
+ /**
+ * @param {any} hljs - object that is extended (legacy)
+ * @returns {HLJSApi}
+ */
+ const HLJS = function(hljs) {
+ // Convenience variables for build-in objects
+ /** @type {unknown[]} */
+ var ArrayProto = [];
+
+ // Global internal variables used within the highlight.js library.
+ /** @type {Record blocks on a page
+ *
+ * @type {Function & {called?: boolean}}
+ */
+ const initHighlighting = () => {
+ if (initHighlighting.called) return;
+ initHighlighting.called = true;
+
+ var blocks = document.querySelectorAll('pre code');
+ ArrayProto.forEach.call(blocks, highlightBlock);
+ };
+
+ // Higlights all when DOMContentLoaded fires
+ function initHighlightingOnLoad() {
+ // @ts-ignore
+ window.addEventListener('DOMContentLoaded', initHighlighting, false);
+ }
+
+ /**
+ * Register a language grammar module
+ *
+ * @param {string} languageName
+ * @param {LanguageFn} languageDefinition
+ */
+ function registerLanguage(languageName, languageDefinition) {
+ var lang = null;
+ try {
+ lang = languageDefinition(hljs);
+ } catch (error) {
+ console.error("Language definition for '{}' could not be registered.".replace("{}", languageName));
+ // hard or soft error
+ if (!SAFE_MODE) { throw error; } else { console.error(error); }
+ // languages that have serious errors are replaced with essentially a
+ // "plaintext" stand-in so that the code blocks will still get normal
+ // css classes applied to them - and one bad language won't break the
+ // entire highlighter
+ lang = PLAINTEXT_LANGUAGE;
+ }
+ // give it a temporary name if it doesn't have one in the meta-data
+ if (!lang.name) lang.name = languageName;
+ languages[languageName] = lang;
+ lang.rawDefinition = languageDefinition.bind(null, hljs);
+
+ if (lang.aliases) {
+ registerAliases(lang.aliases, { languageName });
+ }
+ }
+
+ /**
+ * @returns {string[]} List of language internal names
+ */
+ function listLanguages() {
+ return Object.keys(languages);
+ }
+
+ /**
+ intended usage: When one language truly requires another
+
+ Unlike `getLanguage`, this will throw when the requested language
+ is not available.
+
+ @param {string} name - name of the language to fetch/require
+ @returns {Language | never}
+ */
+ function requireLanguage(name) {
+ var lang = getLanguage(name);
+ if (lang) { return lang; }
+
+ var err = new Error('The \'{}\' language is required, but not loaded.'.replace('{}', name));
+ throw err;
+ }
+
+ /**
+ * @param {string} name - name of the language to retrieve
+ * @returns {Language | undefined}
+ */
+ function getLanguage(name) {
+ name = (name || '').toLowerCase();
+ return languages[name] || languages[aliases[name]];
+ }
+
+ /**
+ *
+ * @param {string|string[]} aliasList - single alias or list of aliases
+ * @param {{languageName: string}} opts
+ */
+ function registerAliases(aliasList, { languageName }) {
+ if (typeof aliasList === 'string') {
+ aliasList = [aliasList];
+ }
+ aliasList.forEach(alias => { aliases[alias] = languageName; });
+ }
+
+ /**
+ * Determines if a given language has auto-detection enabled
+ * @param {string} name - name of the language
+ */
+ function autoDetection(name) {
+ var lang = getLanguage(name);
+ return lang && !lang.disableAutodetect;
+ }
+
+ /**
+ * @param {HLJSPlugin} plugin
+ */
+ function addPlugin(plugin) {
+ plugins.push(plugin);
+ }
+
+ /**
+ *
+ * @param {PluginEvent} event
+ * @param {any} args
+ */
+ function fire(event, args) {
+ var cb = event;
+ plugins.forEach(function(plugin) {
+ if (plugin[cb]) {
+ plugin[cb](args);
+ }
+ });
+ }
+
+ /* fixMarkup is deprecated and will be removed entirely in v11 */
+ function deprecate_fixMarkup(arg) {
+ console.warn("fixMarkup is deprecated and will be removed entirely in v11.0");
+ console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2534");
+
+ return fixMarkup(arg)
+ }
+
+ /* Interface definition */
+ Object.assign(hljs, {
+ highlight,
+ highlightAuto,
+ fixMarkup: deprecate_fixMarkup,
+ highlightBlock,
+ configure,
+ initHighlighting,
+ initHighlightingOnLoad,
+ registerLanguage,
+ listLanguages,
+ getLanguage,
+ registerAliases,
+ requireLanguage,
+ autoDetection,
+ inherit: inherit$1,
+ addPlugin,
+ // plugins for frameworks
+ vuePlugin: VuePlugin
+ });
+
+ hljs.debugMode = function() { SAFE_MODE = false; };
+ hljs.safeMode = function() { SAFE_MODE = true; };
+ hljs.versionString = version;
+
+ for (const key in MODES) {
+ // @ts-ignore
+ if (typeof MODES[key] === "object") {
+ // @ts-ignore
+ deepFreeze(MODES[key]);
+ }
+ }
+
+ // merge all the modes/regexs into our main object
+ Object.assign(hljs, MODES);
+
+ return hljs;
+ };
+
+ // export an "instance" of the highlighter
+ var highlight = HLJS({});
+
+ return highlight;
+
+}());
+if (typeof exports === 'object' && typeof module !== 'undefined') { module.exports = hljs; }
+
+hljs.registerLanguage('1c', function () {
+ 'use strict';
+
+ /*
+ Language: 1C:Enterprise
+ Author: Stanislav Belov
+ Description: built-in language 1C:Enterprise (v7, v8)
+ Category: enterprise
+ */
+
+ function _1c(hljs) {
+
+ // общий паттерн для определения идентификаторов
+ var UNDERSCORE_IDENT_RE = '[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+';
+
+ // v7 уникальные ключевые слова, отсутствующие в v8 ==> keyword
+ var v7_keywords =
+ 'далее ';
+
+ // v8 ключевые слова ==> keyword
+ var v8_keywords =
+ 'возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли ' +
+ 'конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ';
+
+ // keyword : ключевые слова
+ var KEYWORD = v7_keywords + v8_keywords;
+
+ // v7 уникальные директивы, отсутствующие в v8 ==> meta-keyword
+ var v7_meta_keywords =
+ 'загрузитьизфайла ';
+
+ // v8 ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях ==> meta-keyword
+ var v8_meta_keywords =
+ 'вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер ' +
+ 'наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед ' +
+ 'после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ';
+
+ // meta-keyword : ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях
+ var METAKEYWORD = v7_meta_keywords + v8_meta_keywords;
+
+ // v7 системные константы ==> built_in
+ var v7_system_constants =
+ 'разделительстраниц разделительстрок символтабуляции ';
+
+ // v7 уникальные методы глобального контекста, отсутствующие в v8 ==> built_in
+ var v7_global_context_methods =
+ 'ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов ' +
+ 'датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя ' +
+ 'кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца ' +
+ 'коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид ' +
+ 'назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца ' +
+ 'начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов ' +
+ 'основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута ' +
+ 'получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта ' +
+ 'префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына ' +
+ 'рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента ' +
+ 'счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ';
+
+ // v8 методы глобального контекста ==> built_in
+ var v8_global_context_methods =
+ 'acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока ' +
+ 'xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ' +
+ 'ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации ' +
+ 'выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода ' +
+ 'деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы ' +
+ 'загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации ' +
+ 'заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию ' +
+ 'значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла ' +
+ 'изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке ' +
+ 'каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку ' +
+ 'кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты ' +
+ 'конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы ' +
+ 'копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти ' +
+ 'найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы ' +
+ 'началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя ' +
+ 'начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты ' +
+ 'начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов ' +
+ 'начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя ' +
+ 'начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога ' +
+ 'начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией ' +
+ 'начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы ' +
+ 'номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения ' +
+ 'обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении ' +
+ 'отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения ' +
+ 'открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально ' +
+ 'отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа ' +
+ 'перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту ' +
+ 'подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения ' +
+ 'подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки ' +
+ 'показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение ' +
+ 'показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя ' +
+ 'получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса ' +
+ 'получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора ' +
+ 'получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса ' +
+ 'получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации ' +
+ 'получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла ' +
+ 'получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации ' +
+ 'получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления ' +
+ 'получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу ' +
+ 'получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы ' +
+ 'получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет ' +
+ 'получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима ' +
+ 'получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения ' +
+ 'получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути ' +
+ 'получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы ' +
+ 'получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю ' +
+ 'получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных ' +
+ 'получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию ' +
+ 'получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище ' +
+ 'поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода ' +
+ 'представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение ' +
+ 'прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока ' +
+ 'рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных ' +
+ 'раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени ' +
+ 'смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить ' +
+ 'состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс ' +
+ 'строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений '+
+ 'стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах ' +
+ 'текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации ' +
+ 'текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы ' +
+ 'удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим ' +
+ 'установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту ' +
+ 'установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных ' +
+ 'установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации ' +
+ 'установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения ' +
+ 'установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования ' +
+ 'установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима ' +
+ 'установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим ' +
+ 'установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией ' +
+ 'установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы ' +
+ 'установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса ' +
+ 'формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища ';
+
+ // v8 свойства глобального контекста ==> built_in
+ var v8_global_context_property =
+ 'wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы ' +
+ 'внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль ' +
+ 'документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты ' +
+ 'историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений ' +
+ 'отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик ' +
+ 'планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок ' +
+ 'рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений ' +
+ 'регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа ' +
+ 'средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек ' +
+ 'хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков ' +
+ 'хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ';
+
+ // built_in : встроенные или библиотечные объекты (константы, классы, функции)
+ var BUILTIN =
+ v7_system_constants +
+ v7_global_context_methods + v8_global_context_methods +
+ v8_global_context_property;
+
+ // v8 системные наборы значений ==> class
+ var v8_system_sets_of_values =
+ 'webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля ';
+
+ // v8 системные перечисления - интерфейсные ==> class
+ var v8_system_enums_interface =
+ 'автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий ' +
+ 'анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы ' +
+ 'вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы ' +
+ 'виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя ' +
+ 'видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение ' +
+ 'горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы ' +
+ 'группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания ' +
+ 'интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки ' +
+ 'используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы ' +
+ 'источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева ' +
+ 'начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ' +
+ 'ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме ' +
+ 'отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы ' +
+ 'отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы ' +
+ 'отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы ' +
+ 'отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска ' +
+ 'отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования ' +
+ 'отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта ' +
+ 'отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы ' +
+ 'поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы ' +
+ 'поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы ' +
+ 'положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы ' +
+ 'положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы ' +
+ 'положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском ' +
+ 'положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы ' +
+ 'размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта ' +
+ 'режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты ' +
+ 'режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения ' +
+ 'режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра ' +
+ 'режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения ' +
+ 'режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы ' +
+ 'режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки ' +
+ 'режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание ' +
+ 'сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы ' +
+ 'способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление ' +
+ 'статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы ' +
+ 'типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы ' +
+ 'типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления ' +
+ 'типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы ' +
+ 'типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы ' +
+ 'типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений ' +
+ 'типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы ' +
+ 'типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы ' +
+ 'типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы ' +
+ 'факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени ' +
+ 'форматкартинки ширинаподчиненныхэлементовформы ';
+
+ // v8 системные перечисления - свойства прикладных объектов ==> class
+ var v8_system_enums_objects_properties =
+ 'виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса ' +
+ 'использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения ' +
+ 'использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента ';
+
+ // v8 системные перечисления - планы обмена ==> class
+ var v8_system_enums_exchange_plans =
+ 'авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных ';
+
+ // v8 системные перечисления - табличный документ ==> class
+ var v8_system_enums_tabular_document =
+ 'использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы ' +
+ 'положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента ' +
+ 'способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента ' +
+ 'типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента ' +
+ 'типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы ' +
+ 'типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента ' +
+ 'типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц ';
+
+ // v8 системные перечисления - планировщик ==> class
+ var v8_system_enums_sheduler =
+ 'отображениевремениэлементовпланировщика ';
+
+ // v8 системные перечисления - форматированный документ ==> class
+ var v8_system_enums_formatted_document =
+ 'типфайлаформатированногодокумента ';
+
+ // v8 системные перечисления - запрос ==> class
+ var v8_system_enums_query =
+ 'обходрезультатазапроса типзаписизапроса ';
+
+ // v8 системные перечисления - построитель отчета ==> class
+ var v8_system_enums_report_builder =
+ 'видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов ';
+
+ // v8 системные перечисления - работа с файлами ==> class
+ var v8_system_enums_files =
+ 'доступкфайлу режимдиалогавыборафайла режимоткрытияфайла ';
+
+ // v8 системные перечисления - построитель запроса ==> class
+ var v8_system_enums_query_builder =
+ 'типизмеренияпостроителязапроса ';
+
+ // v8 системные перечисления - анализ данных ==> class
+ var v8_system_enums_data_analysis =
+ 'видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных ' +
+ 'типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений ' +
+ 'типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций ' +
+ 'типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных ' +
+ 'типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных ' +
+ 'типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений ';
+
+ // v8 системные перечисления - xml, json, xs, dom, xdto, web-сервисы ==> class
+ var v8_system_enums_xml_json_xs_dom_xdto_ws =
+ 'wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto ' +
+ 'действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs ' +
+ 'исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs ' +
+ 'методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ' +
+ 'ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson ' +
+ 'типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs ' +
+ 'форматдатыjson экранированиесимволовjson ';
+
+ // v8 системные перечисления - система компоновки данных ==> class
+ var v8_system_enums_data_composition_system =
+ 'видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных ' +
+ 'расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных ' +
+ 'расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных ' +
+ 'расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных ' +
+ 'типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных ' +
+ 'типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных ' +
+ 'типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных ' +
+ 'расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных ' +
+ 'режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных ' +
+ 'режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных '+
+ 'вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных ' +
+ 'использованиеусловногооформлениякомпоновкиданных ';
+
+ // v8 системные перечисления - почта ==> class
+ var v8_system_enums_email =
+ 'важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения ' +
+ 'способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты ' +
+ 'статусразборапочтовогосообщения ';
+
+ // v8 системные перечисления - журнал регистрации ==> class
+ var v8_system_enums_logbook =
+ 'режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации ';
+
+ // v8 системные перечисления - криптография ==> class
+ var v8_system_enums_cryptography =
+ 'расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии ' +
+ 'типхранилищасертификатовкриптографии ';
+
+ // v8 системные перечисления - ZIP ==> class
+ var v8_system_enums_zip =
+ 'кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip ' +
+ 'режимсохраненияпутейzip уровеньсжатияzip ';
+
+ // v8 системные перечисления -
+ // Блокировка данных, Фоновые задания, Автоматизированное тестирование,
+ // Доставляемые уведомления, Встроенные покупки, Интернет, Работа с двоичными данными ==> class
+ var v8_system_enums_other =
+ 'звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных ' +
+ 'сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp ';
+
+ // v8 системные перечисления - схема запроса ==> class
+ var v8_system_enums_request_schema =
+ 'направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса ' +
+ 'типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса ';
+
+ // v8 системные перечисления - свойства объектов метаданных ==> class
+ var v8_system_enums_properties_of_metadata_objects =
+ 'httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления ' +
+ 'видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование ' +
+ 'использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения ' +
+ 'использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита ' +
+ 'назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных ' +
+ 'оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи ' +
+ 'основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении ' +
+ 'периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений ' +
+ 'повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение ' +
+ 'разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита '+
+ 'режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности ' +
+ 'режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов ' +
+ 'режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса ' +
+ 'режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов ' +
+ 'сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования ' +
+ 'типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса ' +
+ 'типномерадокумента типномеразадачи типформы удалениедвижений ';
+
+ // v8 системные перечисления - разные ==> class
+ var v8_system_enums_differents =
+ 'важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения ' +
+ 'вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки ' +
+ 'видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак ' +
+ 'использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога ' +
+ 'кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных ' +
+ 'отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения ' +
+ 'режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных ' +
+ 'способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter ' +
+ 'типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты';
+
+ // class: встроенные наборы значений, системные перечисления (содержат дочерние значения, обращения к которым через разыменование)
+ var CLASS =
+ v8_system_sets_of_values +
+ v8_system_enums_interface +
+ v8_system_enums_objects_properties +
+ v8_system_enums_exchange_plans +
+ v8_system_enums_tabular_document +
+ v8_system_enums_sheduler +
+ v8_system_enums_formatted_document +
+ v8_system_enums_query +
+ v8_system_enums_report_builder +
+ v8_system_enums_files +
+ v8_system_enums_query_builder +
+ v8_system_enums_data_analysis +
+ v8_system_enums_xml_json_xs_dom_xdto_ws +
+ v8_system_enums_data_composition_system +
+ v8_system_enums_email +
+ v8_system_enums_logbook +
+ v8_system_enums_cryptography +
+ v8_system_enums_zip +
+ v8_system_enums_other +
+ v8_system_enums_request_schema +
+ v8_system_enums_properties_of_metadata_objects +
+ v8_system_enums_differents;
+
+ // v8 общие объекты (у объектов есть конструктор, экземпляры создаются методом НОВЫЙ) ==> type
+ var v8_shared_object =
+ 'comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs ' +
+ 'блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема ' +
+ 'географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма ' +
+ 'диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания ' +
+ 'диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление ' +
+ 'записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom ' +
+ 'запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта ' +
+ 'интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs ' +
+ 'использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных ' +
+ 'итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла ' +
+ 'компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных ' +
+ 'конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных ' +
+ 'макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson ' +
+ 'обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs ' +
+ 'объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации ' +
+ 'описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных ' +
+ 'описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs ' +
+ 'определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom ' +
+ 'определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных ' +
+ 'параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных ' +
+ 'полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных ' +
+ 'построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml ' +
+ 'процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент ' +
+ 'процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml ' +
+ 'результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto ' +
+ 'сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows ' +
+ 'сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш ' +
+ 'сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент ' +
+ 'текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток ' +
+ 'фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs ' +
+ 'фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs ' +
+ 'фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs ' +
+ 'фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент ' +
+ 'фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла ' +
+ 'чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных ';
+
+ // v8 универсальные коллекции значений ==> type
+ var v8_universal_collection =
+ 'comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура ' +
+ 'фиксированноесоответствие фиксированныймассив ';
+
+ // type : встроенные типы
+ var TYPE =
+ v8_shared_object +
+ v8_universal_collection;
+
+ // literal : примитивные типы
+ var LITERAL = 'null истина ложь неопределено';
+
+ // number : числа
+ var NUMBERS = hljs.inherit(hljs.NUMBER_MODE);
+
+ // string : строки
+ var STRINGS = {
+ className: 'string',
+ begin: '"|\\|', end: '"|$',
+ contains: [{begin: '""'}]
+ };
+
+ // number : даты
+ var DATE = {
+ begin: "'", end: "'", excludeBegin: true, excludeEnd: true,
+ contains: [
+ {
+ className: 'number',
+ begin: '\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}'
+ }
+ ]
+ };
+
+ // comment : комментарии
+ var COMMENTS = hljs.inherit(hljs.C_LINE_COMMENT_MODE);
+
+ // meta : инструкции препроцессора, директивы компиляции
+ var META = {
+ className: 'meta',
+
+ begin: '#|&', end: '$',
+ keywords: {
+ $pattern: UNDERSCORE_IDENT_RE,
+ 'meta-keyword': KEYWORD + METAKEYWORD
+ },
+ contains: [
+ COMMENTS
+ ]
+ };
+
+ // symbol : метка goto
+ var SYMBOL = {
+ className: 'symbol',
+ begin: '~', end: ';|:', excludeEnd: true
+ };
+
+ // function : объявление процедур и функций
+ var FUNCTION = {
+ className: 'function',
+ variants: [
+ {begin: 'процедура|функция', end: '\\)', keywords: 'процедура функция'},
+ {begin: 'конецпроцедуры|конецфункции', keywords: 'конецпроцедуры конецфункции'}
+ ],
+ contains: [
+ {
+ begin: '\\(', end: '\\)', endsParent : true,
+ contains: [
+ {
+ className: 'params',
+ begin: UNDERSCORE_IDENT_RE, end: ',', excludeEnd: true, endsWithParent: true,
+ keywords: {
+ $pattern: UNDERSCORE_IDENT_RE,
+ keyword: 'знач',
+ literal: LITERAL
+ },
+ contains: [
+ NUMBERS,
+ STRINGS,
+ DATE
+ ]
+ },
+ COMMENTS
+ ]
+ },
+ hljs.inherit(hljs.TITLE_MODE, {begin: UNDERSCORE_IDENT_RE})
+ ]
+ };
+
+ return {
+ name: '1C:Enterprise',
+ case_insensitive: true,
+ keywords: {
+ $pattern: UNDERSCORE_IDENT_RE,
+ keyword: KEYWORD,
+ built_in: BUILTIN,
+ class: CLASS,
+ type: TYPE,
+ literal: LITERAL
+ },
+ contains: [
+ META,
+ FUNCTION,
+ COMMENTS,
+ SYMBOL,
+ NUMBERS,
+ STRINGS,
+ DATE
+ ]
+ }
+ }
+
+ return _1c;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('abnf', function () {
+ 'use strict';
+
+ /*
+ Language: Augmented Backus-Naur Form
+ Author: Alex McKibben
+ Website: https://tools.ietf.org/html/rfc5234
+ */
+
+ /** @type LanguageFn */
+ function abnf(hljs) {
+ var regexes = {
+ ruleDeclaration: "^[a-zA-Z][a-zA-Z0-9-]*",
+ unexpectedChars: "[!@#$^&',?+~`|:]"
+ };
+
+ var keywords = [
+ "ALPHA",
+ "BIT",
+ "CHAR",
+ "CR",
+ "CRLF",
+ "CTL",
+ "DIGIT",
+ "DQUOTE",
+ "HEXDIG",
+ "HTAB",
+ "LF",
+ "LWSP",
+ "OCTET",
+ "SP",
+ "VCHAR",
+ "WSP"
+ ];
+
+ var commentMode = hljs.COMMENT(";", "$");
+
+ var terminalBinaryMode = {
+ className: "symbol",
+ begin: /%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/
+ };
+
+ var terminalDecimalMode = {
+ className: "symbol",
+ begin: /%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/
+ };
+
+ var terminalHexadecimalMode = {
+ className: "symbol",
+ begin: /%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/,
+ };
+
+ var caseSensitivityIndicatorMode = {
+ className: "symbol",
+ begin: /%[si]/
+ };
+
+ var ruleDeclarationMode = {
+ className: "attribute",
+ begin: regexes.ruleDeclaration + '(?=\\s*=)',
+ };
+
+ return {
+ name: 'Augmented Backus-Naur Form',
+ illegal: regexes.unexpectedChars,
+ keywords: keywords.join(" "),
+ contains: [
+ ruleDeclarationMode,
+ commentMode,
+ terminalBinaryMode,
+ terminalDecimalMode,
+ terminalHexadecimalMode,
+ caseSensitivityIndicatorMode,
+ hljs.QUOTE_STRING_MODE,
+ hljs.NUMBER_MODE
+ ]
+ };
+ }
+
+ return abnf;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('accesslog', function () {
+ 'use strict';
+
+ /*
+ Language: Apache Access Log
+ Author: Oleg Efimov
+ Description: Apache/Nginx Access Logs
+ Website: https://httpd.apache.org/docs/2.4/logs.html#accesslog
+ */
+
+ /** @type LanguageFn */
+ function accesslog(hljs) {
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
+ var HTTP_VERBS = [
+ "GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "PATCH", "TRACE"
+ ];
+ return {
+ name: 'Apache Access Log',
+ contains: [
+ // IP
+ {
+ className: 'number',
+ begin: '^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b',
+ relevance:5
+ },
+ // Other numbers
+ {
+ className: 'number',
+ begin: '\\b\\d+\\b',
+ relevance: 0
+ },
+ // Requests
+ {
+ className: 'string',
+ begin: '"(' + HTTP_VERBS.join("|") + ')', end: '"',
+ keywords: HTTP_VERBS.join(" "),
+ illegal: '\\n',
+ relevance: 5,
+ contains: [{
+ begin: 'HTTP/[12]\\.\\d',
+ relevance:5
+ }]
+ },
+ // Dates
+ {
+ className: 'string',
+ // dates must have a certain length, this prevents matching
+ // simple array accesses a[123] and [] and other common patterns
+ // found in other languages
+ begin: /\[\d[^\]\n]{8,}\]/,
+ illegal: '\\n',
+ relevance: 1
+ },
+ {
+ className: 'string',
+ begin: /\[/, end: /\]/,
+ illegal: '\\n',
+ relevance: 0
+ },
+ // User agent / relevance boost
+ {
+ className: 'string',
+ begin: '"Mozilla/\\d\\.\\d \\\(', end: '"',
+ illegal: '\\n',
+ relevance: 3
+ },
+ // Strings
+ {
+ className: 'string',
+ begin: '"', end: '"',
+ illegal: '\\n',
+ relevance: 0
+ }
+ ]
+ };
+ }
+
+ return accesslog;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('actionscript', function () {
+ 'use strict';
+
+ /*
+ Language: ActionScript
+ Author: Alexander Myadzel
+ Category: scripting
+ */
+
+ /** @type LanguageFn */
+ function actionscript(hljs) {
+ var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';
+ var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';
+
+ var AS3_REST_ARG_MODE = {
+ className: 'rest_arg',
+ begin: '[.]{3}', end: IDENT_RE,
+ relevance: 10
+ };
+
+ return {
+ name: 'ActionScript',
+ aliases: ['as'],
+ keywords: {
+ keyword: 'as break case catch class const continue default delete do dynamic each ' +
+ 'else extends final finally for function get if implements import in include ' +
+ 'instanceof interface internal is namespace native new override package private ' +
+ 'protected public return set static super switch this throw try typeof use var void ' +
+ 'while with',
+ literal: 'true false null undefined'
+ },
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'class',
+ beginKeywords: 'package', end: '{',
+ contains: [hljs.TITLE_MODE]
+ },
+ {
+ className: 'class',
+ beginKeywords: 'class interface', end: '{', excludeEnd: true,
+ contains: [
+ {
+ beginKeywords: 'extends implements'
+ },
+ hljs.TITLE_MODE
+ ]
+ },
+ {
+ className: 'meta',
+ beginKeywords: 'import include', end: ';',
+ keywords: {'meta-keyword': 'import include'}
+ },
+ {
+ className: 'function',
+ beginKeywords: 'function', end: '[{;]', excludeEnd: true,
+ illegal: '\\S',
+ contains: [
+ hljs.TITLE_MODE,
+ {
+ className: 'params',
+ begin: '\\(', end: '\\)',
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ AS3_REST_ARG_MODE
+ ]
+ },
+ {
+ begin: ':\\s*' + IDENT_FUNC_RETURN_TYPE_RE
+ }
+ ]
+ },
+ hljs.METHOD_GUARD
+ ],
+ illegal: /#/
+ };
+ }
+
+ return actionscript;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('ada', function () {
+ 'use strict';
+
+ /*
+ Language: Ada
+ Author: Lars Schulna
+ Description: Ada is a general-purpose programming language that has great support for saftey critical and real-time applications.
+ It has been developed by the DoD and thus has been used in military and safety-critical applications (like civil aviation).
+ The first version appeared in the 80s, but it's still actively developed today with
+ the newest standard being Ada2012.
+ */
+
+ // We try to support full Ada2012
+ //
+ // We highlight all appearances of types, keywords, literals (string, char, number, bool)
+ // and titles (user defined function/procedure/package)
+ // CSS classes are set accordingly
+ //
+ // Languages causing problems for language detection:
+ // xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword)
+ // sql (ada default.txt has a lot of sql keywords)
+
+ /** @type LanguageFn */
+ function ada(hljs) {
+ // Regular expression for Ada numeric literals.
+ // stolen form the VHDL highlighter
+
+ // Decimal literal:
+ var INTEGER_RE = '\\d(_|\\d)*';
+ var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
+ var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
+
+ // Based literal:
+ var BASED_INTEGER_RE = '\\w+';
+ var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
+
+ var NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
+
+ // Identifier regex
+ var ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*';
+
+ // bad chars, only allowed in literals
+ var BAD_CHARS = `[]{}%#'"`;
+
+ // Ada doesn't have block comments, only line comments
+ var COMMENTS = hljs.COMMENT('--', '$');
+
+ // variable declarations of the form
+ // Foo : Bar := Baz;
+ // where only Bar will be highlighted
+ var VAR_DECLS = {
+ // TODO: These spaces are not required by the Ada syntax
+ // however, I have yet to see handwritten Ada code where
+ // someone does not put spaces around :
+ begin: '\\s+:\\s+', end: '\\s*(:=|;|\\)|=>|$)',
+ // endsWithParent: true,
+ // returnBegin: true,
+ illegal: BAD_CHARS,
+ contains: [
+ {
+ // workaround to avoid highlighting
+ // named loops and declare blocks
+ beginKeywords: 'loop for declare others',
+ endsParent: true,
+ },
+ {
+ // properly highlight all modifiers
+ className: 'keyword',
+ beginKeywords: 'not null constant access function procedure in out aliased exception'
+ },
+ {
+ className: 'type',
+ begin: ID_REGEX,
+ endsParent: true,
+ relevance: 0,
+ }
+ ]
+ };
+
+ return {
+ name: 'Ada',
+ case_insensitive: true,
+ keywords: {
+ keyword:
+ 'abort else new return abs elsif not reverse abstract end ' +
+ 'accept entry select access exception of separate aliased exit or some ' +
+ 'all others subtype and for out synchronized array function overriding ' +
+ 'at tagged generic package task begin goto pragma terminate ' +
+ 'body private then if procedure type case in protected constant interface ' +
+ 'is raise use declare range delay limited record when delta loop rem while ' +
+ 'digits renames with do mod requeue xor',
+ literal:
+ 'True False',
+ },
+ contains: [
+ COMMENTS,
+ // strings "foobar"
+ {
+ className: 'string',
+ begin: /"/, end: /"/,
+ contains: [{begin: /""/, relevance: 0}]
+ },
+ // characters ''
+ {
+ // character literals always contain one char
+ className: 'string',
+ begin: /'.'/
+ },
+ {
+ // number literals
+ className: 'number',
+ begin: NUMBER_RE,
+ relevance: 0
+ },
+ {
+ // Attributes
+ className: 'symbol',
+ begin: "'" + ID_REGEX,
+ },
+ {
+ // package definition, maybe inside generic
+ className: 'title',
+ begin: '(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?', end: '(is|$)',
+ keywords: 'package body',
+ excludeBegin: true,
+ excludeEnd: true,
+ illegal: BAD_CHARS
+ },
+ {
+ // function/procedure declaration/definition
+ // maybe inside generic
+ begin: '(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+', end: '(\\bis|\\bwith|\\brenames|\\)\\s*;)',
+ keywords: 'overriding function procedure with is renames return',
+ // we need to re-match the 'function' keyword, so that
+ // the title mode below matches only exactly once
+ returnBegin: true,
+ contains:
+ [
+ COMMENTS,
+ {
+ // name of the function/procedure
+ className: 'title',
+ begin: '(\\bwith\\s+)?\\b(function|procedure)\\s+',
+ end: '(\\(|\\s+|$)',
+ excludeBegin: true,
+ excludeEnd: true,
+ illegal: BAD_CHARS
+ },
+ // 'self'
+ // // parameter types
+ VAR_DECLS,
+ {
+ // return type
+ className: 'type',
+ begin: '\\breturn\\s+', end: '(\\s+|;|$)',
+ keywords: 'return',
+ excludeBegin: true,
+ excludeEnd: true,
+ // we are done with functions
+ endsParent: true,
+ illegal: BAD_CHARS
+
+ },
+ ]
+ },
+ {
+ // new type declarations
+ // maybe inside generic
+ className: 'type',
+ begin: '\\b(sub)?type\\s+', end: '\\s+',
+ keywords: 'type',
+ excludeBegin: true,
+ illegal: BAD_CHARS
+ },
+
+ // see comment above the definition
+ VAR_DECLS,
+
+ // no markup
+ // relevance boosters for small snippets
+ // {begin: '\\s*=>\\s*'},
+ // {begin: '\\s*:=\\s*'},
+ // {begin: '\\s+:=\\s+'},
+ ]
+ };
+ }
+
+ return ada;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('angelscript', function () {
+ 'use strict';
+
+ /*
+ Language: AngelScript
+ Author: Melissa Geels
+ Category: scripting
+ Website: https://www.angelcode.com/angelscript/
+ */
+
+ /** @type LanguageFn */
+ function angelscript(hljs) {
+ var builtInTypeMode = {
+ className: 'built_in',
+ begin: '\\b(void|bool|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|string|ref|array|double|float|auto|dictionary)'
+ };
+
+ var objectHandleMode = {
+ className: 'symbol',
+ begin: '[a-zA-Z0-9_]+@'
+ };
+
+ var genericMode = {
+ className: 'keyword',
+ begin: '<', end: '>',
+ contains: [ builtInTypeMode, objectHandleMode ]
+ };
+
+ builtInTypeMode.contains = [ genericMode ];
+ objectHandleMode.contains = [ genericMode ];
+
+ return {
+ name: 'AngelScript',
+ aliases: ['asc'],
+
+ keywords:
+ 'for in|0 break continue while do|0 return if else case switch namespace is cast ' +
+ 'or and xor not get|0 in inout|10 out override set|0 private public const default|0 ' +
+ 'final shared external mixin|10 enum typedef funcdef this super import from interface ' +
+ 'abstract|0 try catch protected explicit property',
+
+ // avoid close detection with C# and JS
+ illegal: '(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\s*[^\\(])',
+
+ contains: [
+ { // 'strings'
+ className: 'string',
+ begin: '\'', end: '\'',
+ illegal: '\\n',
+ contains: [ hljs.BACKSLASH_ESCAPE ],
+ relevance: 0
+ },
+
+ { // "strings"
+ className: 'string',
+ begin: '"', end: '"',
+ illegal: '\\n',
+ contains: [ hljs.BACKSLASH_ESCAPE ],
+ relevance: 0
+ },
+
+ // """heredoc strings"""
+ {
+ className: 'string',
+ begin: '"""', end: '"""'
+ },
+
+ hljs.C_LINE_COMMENT_MODE, // single-line comments
+ hljs.C_BLOCK_COMMENT_MODE, // comment blocks
+
+ { // interface or namespace declaration
+ beginKeywords: 'interface namespace', end: '{',
+ illegal: '[;.\\-]',
+ contains: [
+ { // interface or namespace name
+ className: 'symbol',
+ begin: '[a-zA-Z0-9_]+'
+ }
+ ]
+ },
+
+ { // class declaration
+ beginKeywords: 'class', end: '{',
+ illegal: '[;.\\-]',
+ contains: [
+ { // class name
+ className: 'symbol',
+ begin: '[a-zA-Z0-9_]+',
+ contains: [
+ {
+ begin: '[:,]\\s*',
+ contains: [
+ {
+ className: 'symbol',
+ begin: '[a-zA-Z0-9_]+'
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+
+ builtInTypeMode, // built-in types
+ objectHandleMode, // object handles
+
+ { // literals
+ className: 'literal',
+ begin: '\\b(null|true|false)'
+ },
+
+ { // numbers
+ className: 'number',
+ begin: '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)'
+ }
+ ]
+ };
+ }
+
+ return angelscript;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('apache', function () {
+ 'use strict';
+
+ /*
+ Language: Apache config
+ Author: Ruslan Keba
+ Contributors: Ivan Sagalaev
+ Website: https://httpd.apache.org
+ Description: language definition for Apache configuration files (httpd.conf & .htaccess)
+ Category: common, config
+ */
+
+ /** @type LanguageFn */
+ function apache(hljs) {
+ var NUMBER_REF = {className: 'number', begin: '[\\$%]\\d+'};
+ var NUMBER = {className: 'number', begin: '\\d+'};
+ var IP_ADDRESS = {
+ className: "number",
+ begin: '\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?'
+ };
+ var PORT_NUMBER = {
+ className: "number",
+ begin: ":\\d{1,5}"
+ };
+ return {
+ name: 'Apache config',
+ aliases: ['apacheconf'],
+ case_insensitive: true,
+ contains: [
+ hljs.HASH_COMMENT_MODE,
+ {className: 'section', begin: '?', end: '>',
+ contains: [
+ IP_ADDRESS,
+ PORT_NUMBER,
+ // low relevance prevents us from claming XML/HTML where this rule would
+ // match strings inside of XML tags
+ hljs.inherit(hljs.QUOTE_STRING_MODE, { relevance:0 })
+ ]
+ },
+ {
+ className: 'attribute',
+ begin: /\w+/,
+ relevance: 0,
+ // keywords aren’t needed for highlighting per se, they only boost relevance
+ // for a very generally defined mode (starts with a word, ends with line-end
+ keywords: {
+ nomarkup:
+ 'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' +
+ 'sethandler errordocument loadmodule options header listen serverroot ' +
+ 'servername'
+ },
+ starts: {
+ end: /$/,
+ relevance: 0,
+ keywords: {
+ literal: 'on off all deny allow'
+ },
+ contains: [
+ {
+ className: 'meta',
+ begin: '\\s\\[', end: '\\]$'
+ },
+ {
+ className: 'variable',
+ begin: '[\\$%]\\{', end: '\\}',
+ contains: ['self', NUMBER_REF]
+ },
+ IP_ADDRESS,
+ NUMBER,
+ hljs.QUOTE_STRING_MODE
+ ]
+ }
+ }
+ ],
+ illegal: /\S/
+ };
+ }
+
+ return apache;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('applescript', function () {
+ 'use strict';
+
+ /*
+ Language: AppleScript
+ Authors: Nathan Grigg , Dr. Drang
+ Category: scripting
+ Website: https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html
+ */
+
+ /** @type LanguageFn */
+ function applescript(hljs) {
+ var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: ''});
+ var PARAMS = {
+ className: 'params',
+ begin: '\\(', end: '\\)',
+ contains: ['self', hljs.C_NUMBER_MODE, STRING]
+ };
+ var COMMENT_MODE_1 = hljs.COMMENT('--', '$');
+ var COMMENT_MODE_2 = hljs.COMMENT(
+ '\\(\\*',
+ '\\*\\)',
+ {
+ contains: ['self', COMMENT_MODE_1] //allow nesting
+ }
+ );
+ var COMMENTS = [
+ COMMENT_MODE_1,
+ COMMENT_MODE_2,
+ hljs.HASH_COMMENT_MODE
+ ];
+
+ return {
+ name: 'AppleScript',
+ aliases: ['osascript'],
+ keywords: {
+ keyword:
+ 'about above after against and around as at back before beginning ' +
+ 'behind below beneath beside between but by considering ' +
+ 'contain contains continue copy div does eighth else end equal ' +
+ 'equals error every exit fifth first for fourth from front ' +
+ 'get given global if ignoring in into is it its last local me ' +
+ 'middle mod my ninth not of on onto or over prop property put ref ' +
+ 'reference repeat returning script second set seventh since ' +
+ 'sixth some tell tenth that the|0 then third through thru ' +
+ 'timeout times to transaction try until where while whose with ' +
+ 'without',
+ literal:
+ 'AppleScript false linefeed return pi quote result space tab true',
+ built_in:
+ 'alias application boolean class constant date file integer list ' +
+ 'number real record string text ' +
+ 'activate beep count delay launch log offset read round ' +
+ 'run say summarize write ' +
+ 'character characters contents day frontmost id item length ' +
+ 'month name paragraph paragraphs rest reverse running time version ' +
+ 'weekday word words year'
+ },
+ contains: [
+ STRING,
+ hljs.C_NUMBER_MODE,
+ {
+ className: 'built_in',
+ begin:
+ '\\b(clipboard info|the clipboard|info for|list (disks|folder)|' +
+ 'mount volume|path to|(close|open for) access|(get|set) eof|' +
+ 'current date|do shell script|get volume settings|random number|' +
+ 'set volume|system attribute|system info|time to GMT|' +
+ '(load|run|store) script|scripting components|' +
+ 'ASCII (character|number)|localized string|' +
+ 'choose (application|color|file|file name|' +
+ 'folder|from list|remote application|URL)|' +
+ 'display (alert|dialog))\\b|^\\s*return\\b'
+ },
+ {
+ className: 'literal',
+ begin:
+ '\\b(text item delimiters|current application|missing value)\\b'
+ },
+ {
+ className: 'keyword',
+ begin:
+ '\\b(apart from|aside from|instead of|out of|greater than|' +
+ "isn't|(doesn't|does not) (equal|come before|come after|contain)|" +
+ '(greater|less) than( or equal)?|(starts?|ends|begins?) with|' +
+ 'contained by|comes (before|after)|a (ref|reference)|POSIX file|' +
+ 'POSIX path|(date|time) string|quoted form)\\b'
+ },
+ {
+ beginKeywords: 'on',
+ illegal: '[${=;\\n]',
+ contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
+ }
+ ].concat(COMMENTS),
+ illegal: '//|->|=>|\\[\\['
+ };
+ }
+
+ return applescript;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('arcade', function () {
+ 'use strict';
+
+ /*
+ Language: ArcGIS Arcade
+ Category: scripting
+ Author: John Foster
+ Website: https://developers.arcgis.com/arcade/
+ Description: ArcGIS Arcade is an expression language used in many Esri ArcGIS products such as Pro, Online, Server, Runtime, JavaScript, and Python
+ */
+
+ /** @type LanguageFn */
+ function arcade(hljs) {
+ var IDENT_RE = '[A-Za-z_][0-9A-Za-z_]*';
+ var KEYWORDS = {
+ keyword:
+ 'if for while var new function do return void else break',
+ literal:
+ 'BackSlash DoubleQuote false ForwardSlash Infinity NaN NewLine null PI SingleQuote Tab TextFormatting true undefined',
+ built_in:
+ 'Abs Acos Angle Attachments Area AreaGeodetic Asin Atan Atan2 Average Bearing Boolean Buffer BufferGeodetic ' +
+ 'Ceil Centroid Clip Console Constrain Contains Cos Count Crosses Cut Date DateAdd ' +
+ 'DateDiff Day Decode DefaultValue Dictionary Difference Disjoint Distance DistanceGeodetic Distinct ' +
+ 'DomainCode DomainName Equals Exp Extent Feature FeatureSet FeatureSetByAssociation FeatureSetById FeatureSetByPortalItem ' +
+ 'FeatureSetByRelationshipName FeatureSetByTitle FeatureSetByUrl Filter First Floor Geometry GroupBy Guid HasKey Hour IIf IndexOf ' +
+ 'Intersection Intersects IsEmpty IsNan IsSelfIntersecting Length LengthGeodetic Log Max Mean Millisecond Min Minute Month ' +
+ 'MultiPartToSinglePart Multipoint NextSequenceValue Now Number OrderBy Overlaps Point Polygon ' +
+ 'Polyline Portal Pow Random Relate Reverse RingIsClockWise Round Second SetGeometry Sin Sort Sqrt Stdev Sum ' +
+ 'SymmetricDifference Tan Text Timestamp Today ToLocal Top Touches ToUTC TrackCurrentTime ' +
+ 'TrackGeometryWindow TrackIndex TrackStartTime TrackWindow TypeOf Union UrlEncode Variance ' +
+ 'Weekday When Within Year '
+ };
+ var SYMBOL = {
+ className: 'symbol',
+ begin: '\\$[datastore|feature|layer|map|measure|sourcefeature|sourcelayer|targetfeature|targetlayer|value|view]+'
+ };
+ var NUMBER = {
+ className: 'number',
+ variants: [
+ { begin: '\\b(0[bB][01]+)' },
+ { begin: '\\b(0[oO][0-7]+)' },
+ { begin: hljs.C_NUMBER_RE }
+ ],
+ relevance: 0
+ };
+ var SUBST = {
+ className: 'subst',
+ begin: '\\$\\{', end: '\\}',
+ keywords: KEYWORDS,
+ contains: [] // defined later
+ };
+ var TEMPLATE_STRING = {
+ className: 'string',
+ begin: '`', end: '`',
+ contains: [
+ hljs.BACKSLASH_ESCAPE,
+ SUBST
+ ]
+ };
+ SUBST.contains = [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ TEMPLATE_STRING,
+ NUMBER,
+ hljs.REGEXP_MODE
+ ];
+ var PARAMS_CONTAINS = SUBST.contains.concat([
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.C_LINE_COMMENT_MODE
+ ]);
+
+ return {
+ name: 'ArcGIS Arcade',
+ aliases: ['arcade'],
+ keywords: KEYWORDS,
+ contains: [
+ hljs.APOS_STRING_MODE,
+ hljs.QUOTE_STRING_MODE,
+ TEMPLATE_STRING,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ SYMBOL,
+ NUMBER,
+ { // object attr container
+ begin: /[{,]\s*/, relevance: 0,
+ contains: [
+ {
+ begin: IDENT_RE + '\\s*:', returnBegin: true,
+ relevance: 0,
+ contains: [{className: 'attr', begin: IDENT_RE, relevance: 0}]
+ }
+ ]
+ },
+ { // "value" container
+ begin: '(' + hljs.RE_STARTERS_RE + '|\\b(return)\\b)\\s*',
+ keywords: 'return',
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ hljs.REGEXP_MODE,
+ {
+ className: 'function',
+ begin: '(\\(.*?\\)|' + IDENT_RE + ')\\s*=>', returnBegin: true,
+ end: '\\s*=>',
+ contains: [
+ {
+ className: 'params',
+ variants: [
+ {
+ begin: IDENT_RE
+ },
+ {
+ begin: /\(\s*\)/,
+ },
+ {
+ begin: /\(/, end: /\)/,
+ excludeBegin: true, excludeEnd: true,
+ keywords: KEYWORDS,
+ contains: PARAMS_CONTAINS
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ relevance: 0
+ },
+ {
+ className: 'function',
+ beginKeywords: 'function', end: /\{/, excludeEnd: true,
+ contains: [
+ hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}),
+ {
+ className: 'params',
+ begin: /\(/, end: /\)/,
+ excludeBegin: true,
+ excludeEnd: true,
+ contains: PARAMS_CONTAINS
+ }
+ ],
+ illegal: /\[|%/
+ },
+ {
+ begin: /\$[(.]/
+ }
+ ],
+ illegal: /#(?!!)/
+ };
+ }
+
+ return arcade;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('c-like', function () {
+ 'use strict';
+
+ /*
+ Language: C-like foundation grammar for C/C++ grammars
+ Author: Ivan Sagalaev
+ Contributors: Evgeny Stepanischev , Zaven Muradyan , Roel Deckers , Sam Wu , Jordi Petit , Pieter Vantorre , Google Inc. (David Benjamin)
+ Category: common, system
+ */
+
+ /* In the future the intention is to split out the C/C++ grammars distinctly
+ since they are separate languages. They will likely share a common foundation
+ though, and this file sets the groundwork for that - so that we get the breaking
+ change in v10 and don't have to change the requirements again later.
+
+ See: https://github.com/highlightjs/highlight.js/issues/2146
+ */
+
+ /** @type LanguageFn */
+ function cLike(hljs) {
+ function optional(s) {
+ return '(?:' + s + ')?';
+ }
+ var DECLTYPE_AUTO_RE = 'decltype\\(auto\\)';
+ var NAMESPACE_RE = '[a-zA-Z_]\\w*::';
+ var TEMPLATE_ARGUMENT_RE = '<.*?>';
+ var FUNCTION_TYPE_RE = '(' +
+ DECLTYPE_AUTO_RE + '|' +
+ optional(NAMESPACE_RE) +'[a-zA-Z_]\\w*' + optional(TEMPLATE_ARGUMENT_RE) +
+ ')';
+ var CPP_PRIMITIVE_TYPES = {
+ className: 'keyword',
+ begin: '\\b[a-z\\d_]*_t\\b'
+ };
+
+ // https://en.cppreference.com/w/cpp/language/escape
+ // \\ \x \xFF \u2837 \u00323747 \374
+ var CHARACTER_ESCAPES = '\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)';
+ var STRINGS = {
+ className: 'string',
+ variants: [
+ {
+ begin: '(u8?|U|L)?"', end: '"',
+ illegal: '\\n',
+ contains: [hljs.BACKSLASH_ESCAPE]
+ },
+ {
+ begin: '(u8?|U|L)?\'(' + CHARACTER_ESCAPES + "|.)", end: '\'',
+ illegal: '.'
+ },
+ hljs.END_SAME_AS_BEGIN({
+ begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,
+ end: /\)([^()\\ ]{0,16})"/,
+ })
+ ]
+ };
+
+ var NUMBERS = {
+ className: 'number',
+ variants: [
+ { begin: '\\b(0b[01\']+)' },
+ { begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
+ { begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' }
+ ],
+ relevance: 0
+ };
+
+ var PREPROCESSOR = {
+ className: 'meta',
+ begin: /#\s*[a-z]+\b/, end: /$/,
+ keywords: {
+ 'meta-keyword':
+ 'if else elif endif define undef warning error line ' +
+ 'pragma _Pragma ifdef ifndef include'
+ },
+ contains: [
+ {
+ begin: /\\\n/, relevance: 0
+ },
+ hljs.inherit(STRINGS, {className: 'meta-string'}),
+ {
+ className: 'meta-string',
+ begin: /<.*?>/, end: /$/,
+ illegal: '\\n',
+ },
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE
+ ]
+ };
+
+ var TITLE_MODE = {
+ className: 'title',
+ begin: optional(NAMESPACE_RE) + hljs.IDENT_RE,
+ relevance: 0
+ };
+
+ var FUNCTION_TITLE = optional(NAMESPACE_RE) + hljs.IDENT_RE + '\\s*\\(';
+
+ var CPP_KEYWORDS = {
+ keyword: 'int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof ' +
+ 'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +
+ 'unsigned long volatile static protected bool template mutable if public friend ' +
+ 'do goto auto void enum else break extern using asm case typeid wchar_t ' +
+ 'short reinterpret_cast|10 default double register explicit signed typename try this ' +
+ 'switch continue inline delete alignas alignof constexpr consteval constinit decltype ' +
+ 'concept co_await co_return co_yield requires ' +
+ 'noexcept static_assert thread_local restrict final override ' +
+ 'atomic_bool atomic_char atomic_schar ' +
+ 'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
+ 'atomic_ullong new throw return ' +
+ 'and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq',
+ built_in: 'std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +
+ 'auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set ' +
+ 'unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos ' +
+ 'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +
+ 'fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +
+ 'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' +
+ 'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +
+ 'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +
+ 'vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary',
+ literal: 'true false nullptr NULL'
+ };
+
+ var EXPRESSION_CONTAINS = [
+ CPP_PRIMITIVE_TYPES,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ NUMBERS,
+ STRINGS
+ ];
+
+ var EXPRESSION_CONTEXT = {
+ // This mode covers expression context where we can't expect a function
+ // definition and shouldn't highlight anything that looks like one:
+ // `return some()`, `else if()`, `(x*sum(1, 2))`
+ variants: [
+ {begin: /=/, end: /;/},
+ {begin: /\(/, end: /\)/},
+ {beginKeywords: 'new throw return else', end: /;/}
+ ],
+ keywords: CPP_KEYWORDS,
+ contains: EXPRESSION_CONTAINS.concat([
+ {
+ begin: /\(/, end: /\)/,
+ keywords: CPP_KEYWORDS,
+ contains: EXPRESSION_CONTAINS.concat(['self']),
+ relevance: 0
+ }
+ ]),
+ relevance: 0
+ };
+
+ var FUNCTION_DECLARATION = {
+ className: 'function',
+ begin: '(' + FUNCTION_TYPE_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE,
+ returnBegin: true, end: /[{;=]/,
+ excludeEnd: true,
+ keywords: CPP_KEYWORDS,
+ illegal: /[^\w\s\*&:<>]/,
+ contains: [
+
+ { // to prevent it from being confused as the function title
+ begin: DECLTYPE_AUTO_RE,
+ keywords: CPP_KEYWORDS,
+ relevance: 0,
+ },
+ {
+ begin: FUNCTION_TITLE, returnBegin: true,
+ contains: [TITLE_MODE],
+ relevance: 0
+ },
+ {
+ className: 'params',
+ begin: /\(/, end: /\)/,
+ keywords: CPP_KEYWORDS,
+ relevance: 0,
+ contains: [
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ STRINGS,
+ NUMBERS,
+ CPP_PRIMITIVE_TYPES,
+ // Count matching parentheses.
+ {
+ begin: /\(/, end: /\)/,
+ keywords: CPP_KEYWORDS,
+ relevance: 0,
+ contains: [
+ 'self',
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ STRINGS,
+ NUMBERS,
+ CPP_PRIMITIVE_TYPES
+ ]
+ }
+ ]
+ },
+ CPP_PRIMITIVE_TYPES,
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ PREPROCESSOR
+ ]
+ };
+
+ return {
+ aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'],
+ keywords: CPP_KEYWORDS,
+ // the base c-like language will NEVER be auto-detected, rather the
+ // derivitives: c, c++, arduino turn auto-detect back on for themselves
+ disableAutodetect: true,
+ illegal: '',
+ contains: [].concat(
+ EXPRESSION_CONTEXT,
+ FUNCTION_DECLARATION,
+ EXPRESSION_CONTAINS,
+ [
+ PREPROCESSOR,
+ { // containers: ie, `vector rooms (9);`
+ begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>',
+ keywords: CPP_KEYWORDS,
+ contains: ['self', CPP_PRIMITIVE_TYPES]
+ },
+ {
+ begin: hljs.IDENT_RE + '::',
+ keywords: CPP_KEYWORDS
+ },
+ {
+ className: 'class',
+ beginKeywords: 'class struct', end: /[{;:]/,
+ contains: [
+ { beginKeywords: "final" },
+ {begin: /, end: />/, contains: ['self']}, // skip generic stuff
+ hljs.TITLE_MODE
+ ]
+ }
+ ]),
+ exports: {
+ preprocessor: PREPROCESSOR,
+ strings: STRINGS,
+ keywords: CPP_KEYWORDS
+ }
+ };
+ }
+
+ return cLike;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('cpp', function () {
+ 'use strict';
+
+ /*
+ Language: C++
+ Category: common, system
+ Website: https://isocpp.org
+ Requires: c-like.js
+ */
+
+ /** @type LanguageFn */
+ function cpp(hljs) {
+ var lang = hljs.requireLanguage('c-like').rawDefinition();
+ // return auto-detection back on
+ lang.disableAutodetect = false;
+ lang.name = 'C++';
+ lang.aliases = ['cc', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'];
+ return lang;
+ }
+
+ return cpp;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('arduino', function () {
+ 'use strict';
+
+ /*
+ Language: Arduino
+ Author: Stefania Mellai
+ Description: The Arduino® Language is a superset of C++. This rules are designed to highlight the Arduino® source code. For info about language see http://www.arduino.cc.
+ Requires: cpp.js
+ Website: https://www.arduino.cc
+ */
+
+ /** @type LanguageFn */
+ function arduino(hljs) {
+
+ var ARDUINO_KW = {
+ keyword:
+ 'boolean byte word String',
+ built_in:
+ 'setup loop ' +
+ 'KeyboardController MouseController SoftwareSerial ' +
+ 'EthernetServer EthernetClient LiquidCrystal ' +
+ 'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' +
+ 'HttpClient RobotMotor WiFiClient GSMScanner ' +
+ 'FileSystem Scheduler GSMServer YunClient YunServer ' +
+ 'IPAddress GSMClient GSMModem Keyboard Ethernet ' +
+ 'Console GSMBand Esplora Stepper Process ' +
+ 'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' +
+ 'Client Server GSMPIN FileIO Bridge Serial ' +
+ 'EEPROM Stream Mouse Audio Servo File Task ' +
+ 'GPRS WiFi Wire TFT GSM SPI SD ' +
+ 'runShellCommandAsynchronously analogWriteResolution ' +
+ 'retrieveCallingNumber printFirmwareVersion ' +
+ 'analogReadResolution sendDigitalPortPair ' +
+ 'noListenOnLocalhost readJoystickButton setFirmwareVersion ' +
+ 'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' +
+ 'scrollDisplayLeft writeMicroseconds delayMicroseconds ' +
+ 'beginTransmission getSignalStrength runAsynchronously ' +
+ 'getAsynchronously listenOnLocalhost getCurrentCarrier ' +
+ 'readAccelerometer messageAvailable sendDigitalPorts ' +
+ 'lineFollowConfig countryNameWrite runShellCommand ' +
+ 'readStringUntil rewindDirectory readTemperature ' +
+ 'setClockDivider readLightSensor endTransmission ' +
+ 'analogReference detachInterrupt countryNameRead ' +
+ 'attachInterrupt encryptionType readBytesUntil ' +
+ 'robotNameWrite readMicrophone robotNameRead cityNameWrite ' +
+ 'userNameWrite readJoystickY readJoystickX mouseReleased ' +
+ 'openNextFile scanNetworks noInterrupts digitalWrite ' +
+ 'beginSpeaker mousePressed isActionDone mouseDragged ' +
+ 'displayLogos noAutoscroll addParameter remoteNumber ' +
+ 'getModifiers keyboardRead userNameRead waitContinue ' +
+ 'processInput parseCommand printVersion readNetworks ' +
+ 'writeMessage blinkVersion cityNameRead readMessage ' +
+ 'setDataMode parsePacket isListening setBitOrder ' +
+ 'beginPacket isDirectory motorsWrite drawCompass ' +
+ 'digitalRead clearScreen serialEvent rightToLeft ' +
+ 'setTextSize leftToRight requestFrom keyReleased ' +
+ 'compassRead analogWrite interrupts WiFiServer ' +
+ 'disconnect playMelody parseFloat autoscroll ' +
+ 'getPINUsed setPINUsed setTimeout sendAnalog ' +
+ 'readSlider analogRead beginWrite createChar ' +
+ 'motorsStop keyPressed tempoWrite readButton ' +
+ 'subnetMask debugPrint macAddress writeGreen ' +
+ 'randomSeed attachGPRS readString sendString ' +
+ 'remotePort releaseAll mouseMoved background ' +
+ 'getXChange getYChange answerCall getResult ' +
+ 'voiceCall endPacket constrain getSocket writeJSON ' +
+ 'getButton available connected findUntil readBytes ' +
+ 'exitValue readGreen writeBlue startLoop IPAddress ' +
+ 'isPressed sendSysex pauseMode gatewayIP setCursor ' +
+ 'getOemKey tuneWrite noDisplay loadImage switchPIN ' +
+ 'onRequest onReceive changePIN playFile noBuffer ' +
+ 'parseInt overflow checkPIN knobRead beginTFT ' +
+ 'bitClear updateIR bitWrite position writeRGB ' +
+ 'highByte writeRed setSpeed readBlue noStroke ' +
+ 'remoteIP transfer shutdown hangCall beginSMS ' +
+ 'endWrite attached maintain noCursor checkReg ' +
+ 'checkPUK shiftOut isValid shiftIn pulseIn ' +
+ 'connect println localIP pinMode getIMEI ' +
+ 'display noBlink process getBand running beginSD ' +
+ 'drawBMP lowByte setBand release bitRead prepare ' +
+ 'pointTo readRed setMode noFill remove listen ' +
+ 'stroke detach attach noTone exists buffer ' +
+ 'height bitSet circle config cursor random ' +
+ 'IRread setDNS endSMS getKey micros ' +
+ 'millis begin print write ready flush width ' +
+ 'isPIN blink clear press mkdir rmdir close ' +
+ 'point yield image BSSID click delay ' +
+ 'read text move peek beep rect line open ' +
+ 'seek fill size turn stop home find ' +
+ 'step tone sqrt RSSI SSID ' +
+ 'end bit tan cos sin pow map abs max ' +
+ 'min get run put',
+ literal:
+ 'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' +
+ 'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' +
+ 'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' +
+ 'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' +
+ 'DEFAULT OUTPUT INPUT HIGH LOW'
+ };
+
+ var ARDUINO = hljs.requireLanguage('cpp').rawDefinition();
+
+ var kws = ARDUINO.keywords;
+
+ kws.keyword += ' ' + ARDUINO_KW.keyword;
+ kws.literal += ' ' + ARDUINO_KW.literal;
+ kws.built_in += ' ' + ARDUINO_KW.built_in;
+
+ ARDUINO.name = 'Arduino';
+ ARDUINO.aliases = ['ino'];
+
+ return ARDUINO;
+ }
+
+ return arduino;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('armasm', function () {
+ 'use strict';
+
+ /*
+ Language: ARM Assembly
+ Author: Dan Panzarella
+ Description: ARM Assembly including Thumb and Thumb2 instructions
+ Category: assembler
+ */
+
+ /** @type LanguageFn */
+ function armasm(hljs) {
+ //local labels: %?[FB]?[AT]?\d{1,2}\w+
+
+ const COMMENT = {
+ variants: [
+ hljs.COMMENT('^[ \\t]*(?=#)', '$', {relevance: 0, excludeBegin: true }),
+ hljs.COMMENT('[;@]', '$', {relevance: 0}),
+ hljs.C_LINE_COMMENT_MODE,
+ hljs.C_BLOCK_COMMENT_MODE,
+ ]
+ };
+
+ return {
+ name: 'ARM Assembly',
+ case_insensitive: true,
+ aliases: ['arm'],
+ keywords: {
+ $pattern: '\\.?' + hljs.IDENT_RE,
+ meta:
+ //GNU preprocs
+ '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg '+
+ //ARM directives
+ 'ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ',
+ built_in:
+ 'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 '+ //standard registers
+ 'pc lr sp ip sl sb fp '+ //typical regs plus backward compatibility
+ 'a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 '+ //more regs and fp
+ 'p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 '+ //coprocessor regs
+ 'c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 '+ //more coproc
+ 'q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 '+ //advanced SIMD NEON regs
+
+ //program status registers
+ 'cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf '+
+ 'spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf '+
+
+ //NEON and VFP registers
+ 's0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 '+
+ 's16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 '+
+ 'd0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 '+
+ 'd16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ' +
+
+ '{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @'
+ },
+ contains: [
+ {
+ className: 'keyword',
+ begin: '\\b('+ //mnemonics
+ 'adc|'+
+ '(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|'+
+ 'and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|'+
+ 'bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|'+
+ 'setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|'+
+ 'ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|'+
+ 'mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|'+
+ 'mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|'+
+ 'mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|'+
+ 'rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|'+
+ 'stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|'+
+ '[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|'+
+ 'wfe|wfi|yield'+
+ ')'+
+ '(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?'+ //condition codes
+ '[sptrx]?' + //legal postfixes
+ '(?=\\s)' // followed by space
+ },
+ COMMENT,
+ hljs.QUOTE_STRING_MODE,
+ {
+ className: 'string',
+ begin: '\'',
+ end: '[^\\\\]\'',
+ relevance: 0
+ },
+ {
+ className: 'title',
+ begin: '\\|', end: '\\|',
+ illegal: '\\n',
+ relevance: 0
+ },
+ {
+ className: 'number',
+ variants: [
+ {begin: '[#$=]?0x[0-9a-f]+'}, //hex
+ {begin: '[#$=]?0b[01]+'}, //bin
+ {begin: '[#$=]\\d+'}, //literal
+ {begin: '\\b\\d+'} //bare number
+ ],
+ relevance: 0
+ },
+ {
+ className: 'symbol',
+ variants: [
+ {begin: '^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'}, //GNU ARM syntax
+ {begin: '^[a-z_\\.\\$][a-z0-9_\\.\\$]+'}, //ARM syntax
+ {begin: '[=#]\\w+' } //label reference
+ ],
+ relevance: 0
+ }
+ ]
+ };
+ }
+
+ return armasm;
+
+ return module.exports.definer || module.exports;
+
+}());
+
+hljs.registerLanguage('xml', function () {
+ 'use strict';
+
+ /*
+ Language: HTML, XML
+ Website: https://www.w3.org/XML/
+ Category: common
+ */
+
+ function xml(hljs) {
+ var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+';
+ var XML_ENTITIES = {
+ className: 'symbol',
+ begin: '&[a-z]+;|[0-9]+;|[a-f0-9]+;'
+ };
+ var XML_META_KEYWORDS = {
+ begin: '\\s',
+ contains:[
+ {
+ className: 'meta-keyword',
+ begin: '#?[a-z_][a-z1-9_-]+',
+ illegal: '\\n',
+ }
+ ]
+ };
+ var XML_META_PAR_KEYWORDS = hljs.inherit(XML_META_KEYWORDS, {begin: '\\(', end: '\\)'});
+ var APOS_META_STRING_MODE = hljs.inherit(hljs.APOS_STRING_MODE, {className: 'meta-string'});
+ var QUOTE_META_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'});
+ var TAG_INTERNALS = {
+ endsWithParent: true,
+ illegal: /,
+ relevance: 0,
+ contains: [
+ {
+ className: 'attr',
+ begin: XML_IDENT_RE,
+ relevance: 0
+ },
+ {
+ begin: /=\s*/,
+ relevance: 0,
+ contains: [
+ {
+ className: 'string',
+ endsParent: true,
+ variants: [
+ {begin: /"/, end: /"/, contains: [XML_ENTITIES]},
+ {begin: /'/, end: /'/, contains: [XML_ENTITIES]},
+ {begin: /[^\s"'=<>`]+/}
+ ]
+ }
+ ]
+ }
+ ]
+ };
+ return {
+ name: 'HTML, XML',
+ aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist', 'wsf', 'svg'],
+ case_insensitive: true,
+ contains: [
+ {
+ className: 'meta',
+ begin: '',
+ relevance: 10,
+ contains: [
+ XML_META_KEYWORDS,
+ QUOTE_META_STRING_MODE,
+ APOS_META_STRING_MODE,
+ XML_META_PAR_KEYWORDS,
+ {
+ begin: '\\[', end: '\\]',
+ contains:[
+ {
+ className: 'meta',
+ begin: '',
+ contains: [
+ XML_META_KEYWORDS,
+ XML_META_PAR_KEYWORDS,
+ QUOTE_META_STRING_MODE,
+ APOS_META_STRING_MODE
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ hljs.COMMENT(
+ '',
+ {
+ relevance: 10
+ }
+ ),
+ {
+ begin: '<\\!\\[CDATA\\[', end: '\\]\\]>',
+ relevance: 10
+ },
+ XML_ENTITIES,
+ {
+ className: 'meta',
+ begin: /<\?xml/, end: /\?>/, relevance: 10
+ },
+ {
+ className: 'tag',
+ /*
+ The lookahead pattern (?=...) ensures that 'begin' only matches
+ '', returnEnd: true,
+ subLanguage: ['css', 'xml']
+ }
+ },
+ {
+ className: 'tag',
+ // See the comment in the