diff --git a/content/css/main.sass b/content/css/main.sass index 73901d367..d70c3a526 100644 --- a/content/css/main.sass +++ b/content/css/main.sass @@ -128,7 +128,7 @@ body color: $base01 pre, code - font-family: Monaco, monospace + font-family: Incosolata, Monaco, monospace pre &::selection @@ -174,7 +174,7 @@ ol li ul, ol li ol, ul li ol, ul li ul list-style: circle -body, h1, h2, h3, h4, #entete, .tag +body, h1, h2, h3, h4, #entete, .tagname font-family: Georgia, Palatino, "Century Schoolbook L", "Times New Roman", Times, serif line-height: 1.4em @@ -600,12 +600,12 @@ img.clean margin-top: 2em z-index: 9002 -.file +.codefile font-size: 0.8em text-align: right padding-right: 1em margin-right: 0.1 - margin-bottom: 0 + margin-bottom: -1em .flush clear: both @@ -648,9 +648,6 @@ pre overflow-x: auto overflow-y: hidden -.withfile pre - margin-top: 0 - .navigationprev, .navigationnext padding: 0px margin-left: 0.2em @@ -707,7 +704,7 @@ table.impact tr td a, a:visited color: #ECA -.tag +.tagname display: inline cursor: pointer margin-left: 0.5em diff --git a/layouts/article.html b/layouts/article.html index 19f4876cb..771d19f56 100644 --- a/layouts/article.html +++ b/layouts/article.html @@ -14,6 +14,7 @@ + <% languages.each do |lang| @@ -25,6 +26,8 @@ + + diff --git a/lib/blog.rb b/lib/blog.rb index 0167a9be1..afb451500 100644 --- a/lib/blog.rb +++ b/lib/blog.rb @@ -3,7 +3,7 @@ def blogimage(filename,title="no name", divclass=nil) imgpath=blogimagedir + filename if not divclass.nil? - if divclass !~ /\s*/ + if divclass !~ /^\s*$/ cls=%{ class="#{divclass}"} end end diff --git a/lib/syntaxColorize.rb b/lib/syntaxColorize.rb index 802506e43..e1b714e3b 100644 --- a/lib/syntaxColorize.rb +++ b/lib/syntaxColorize.rb @@ -2,7 +2,6 @@ module Nanoc3::Helpers module SyntaxColorize - require 'nanoc3/helpers/capturing' include Nanoc3::Helpers::Capturing def syntax_colorize(lang, type=:ultraviolet, &block) diff --git a/lib/tag.rb b/lib/tag.rb index 4b3ac5bda..9234d3512 100644 --- a/lib/tag.rb +++ b/lib/tag.rb @@ -88,7 +88,7 @@ tagSize.sort{|a,b| a[0].downcase <=> b[0].downcase}.each do |t,s| protected=t.gsub(/\W/,'_') grouped=t.gsub(/&/,'&').gsub(/ /,' ').gsub(//,'>') - tagCloud <<= %{#{grouped} } + tagCloud <<= %{#{grouped} } end tagCloud <<= %{
} language=@item.path diff --git a/lib/ultraviolet.rb b/lib/ultraviolet.rb index f9412b524..2ee4ce2da 100644 --- a/lib/ultraviolet.rb +++ b/lib/ultraviolet.rb @@ -1,23 +1,22 @@ class UltraVioletFilter < Nanoc3::Filter identifier :ultraviolet + def protect(str) + str.gsub(%r{<([^>]*)>}) do + "<#{$1}>" + end + end + def run(content, params={}) require 'rubygems' - require 'uv' - code_rule = %r{((.+?))}m + code_rule = %r{(\n?(.+?))}m new_content=content.gsub(code_rule) do |full| - @lang, @filename, @code = $2, $4, $5 - if @lang =~ /^(zsh|bash|sh|csh|shell)$/ - @lang='shell-unix-generic' - end + @full, @lang, @filename, @code = $1, $2, $4, $5 @codeprefix='' - @codesuffix='' if not @filename.nil? and @filename != "" create_file_for_code end - @codeprefix+ - Uv.parse(@code, "xhtml", @lang, false, @config[:ultraviolet_theme])+ - @codesuffix + @codeprefix+"\n\n
"+protect(@code)+"
\n\n" end return new_content end @@ -28,13 +27,10 @@ class UltraVioletFilter < Nanoc3::Filter webpath = @item.path url = webpath + 'code/' + @filename - @codeprefix=%{
\n} - @codesuffix=%{\n
} + @codeprefix=%{
➥ #{@filename}
\n} code_path = "output#{webpath}code" - puts %{\t\tEcriture de #{code_path}/#{@filename}} FileUtils.mkdir_p code_path File.open(%{#{code_path}/#{@filename}}, 'w'){|f|f.write(@code)} end - end diff --git a/output/Scratch/css/solarized.css b/output/Scratch/css/solarized.css index bc9676089..44f428adb 100644 --- a/output/Scratch/css/solarized.css +++ b/output/Scratch/css/solarized.css @@ -126,3 +126,93 @@ pre .Keyword, pre .CssConstructorArgument { color: #859900; } +/* + +Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull + +*/ + +pre code { + display: block; padding: 0.5em; + background: #002b36; color: #839496; +} + +pre .comment, +pre .template_comment, +pre .diff .header, +pre .doctype, +pre .lisp .string, +pre .javadoc { + color: #586e75; + font-style: italic; +} + +pre .keyword, +pre .css .rule .keyword, +pre .winutils, +pre .javascript .title, +pre .method, +pre .addition, +pre .css .tag, +pre .lisp .title { + color: #859900; +} + +pre .number, +pre .command, +pre .string, +pre .tag .value, +pre .phpdoc, +pre .tex .formula, +pre .regexp, +pre .hexcolor { + color: #2aa198; +} + +pre .title, +pre .localvars, +pre .function .title, +pre .chunk, +pre .decorator, +pre .builtin, +pre .built_in, +pre .lisp .title, +pre .identifier, +pre .title .keymethods, +pre .id { + color: #268bd2; +} + +pre .attribute, +pre .variable, +pre .instancevar, +pre .lisp .body, +pre .smalltalk .number, +pre .constant, +pre .class .title, +pre .parent, +pre .haskell .label { + color: #b58900; +} + +pre .preprocessor, +pre .pi, +pre .shebang, +pre .symbol, +pre .diff .change, +pre .special, +pre .keymethods, +pre .attr_selector, +pre .important, +pre .subst, +pre .cdata { + color: #cb4b16; +} + +pre .deletion { + color: #dc322f; +} + +pre .tex .formula { + background: #073642; +} diff --git a/output/Scratch/js/article.js b/output/Scratch/js/article.js new file mode 100644 index 000000000..f81df35a6 --- /dev/null +++ b/output/Scratch/js/article.js @@ -0,0 +1,3 @@ +$(document).ready( function() { + hljs.initHighlighting(); +}); diff --git a/output/Scratch/js/h/highlight.zip b/output/Scratch/js/h/highlight.zip new file mode 100644 index 000000000..e62017a53 Binary files /dev/null and b/output/Scratch/js/h/highlight.zip differ diff --git a/output/Scratch/js/highlight/AUTHORS.en.txt b/output/Scratch/js/highlight/AUTHORS.en.txt new file mode 100644 index 000000000..6230093d9 --- /dev/null +++ b/output/Scratch/js/highlight/AUTHORS.en.txt @@ -0,0 +1,55 @@ +Syntax highlighting with language autodetection. + +URL: http://softwaremaniacs.org/soft/highlight/en/ + +Original author and current maintainer: +Ivan Sagalaev + +Contributors: + +- Peter Leonov +- Victor Karamzin +- Vsevolod Solovyov +- Anton Kovalyov +- Nikita Ledyaev +- Konstantin Evdokimenko +- Dmitri Roudakov +- Yuri Ivanov +- Vladimir Ermakov +- Vladimir Gubarkov +- Brian Beck +- MajestiC +- Vasily Polovnyov +- Vladimir Epifanov +- Alexander Makarov (http://rmcreative.ru/) +- Vah +- Shuen-Huei Guan +- Jason Diamond +- Michal Gabrukiewicz +- Ruslan Keba +- Sergey Baranov +- Zaripov Yura +- Oleg Volchkov +- Vasily Mikhailitchenko +- Jan Berkel +- Vladimir Moskva +- Loren Segal +- Andrew Fedorov +- Igor Kalnitsky +- Jeremy Hull +- Valerii Hiora +- Nikolay Zakharov +- Dmitry Kovega +- Sergey Ignatov +- Antono Vasiljev +- Stephan Kountso +- pumbur +- John Crepezzi +- Andrey Vlasovskikh +- Alexander Myadzel +- Evgeny Stepanischev +- Dmytrii Nagirniak +- Oleg Efimov +- Luigi Maselli +- Denis Bardadym +- Aahan Krish diff --git a/output/Scratch/js/highlight/AUTHORS.ru.txt b/output/Scratch/js/highlight/AUTHORS.ru.txt new file mode 100644 index 000000000..d9bfa4bb3 --- /dev/null +++ b/output/Scratch/js/highlight/AUTHORS.ru.txt @@ -0,0 +1,55 @@ +Подсветка синтаксиса с автоопределением языка. + +URL: http://softwaremaniacs.org/soft/highlight/ + +Первоначальный автор и ведущий проекта: +Иван Сагалаев + +Внесли свой вклад: + +- Петр Леонов +- Виктор Карамзин +- Всеволод Соловьёв +- Антон Ковалёв +- Никита Ледяев +- Константин Евдокименко +- Дмитрий Рудаков +- Юрий Иванов +- Владимир Ермаков +- Владимир Губарьков +- Брайан Бек +- MajestiC +- Василий Половнёв +- Владимир Епифанов +- Александр Макаров (http://rmcreative.ru/) +- Vah +- Шуэн-Хуэй Гуан +- Джейсон Даймонд +- Михал Габрукевич +- Руслан Кеба +- Сергей Баранов +- Зарипов Юра +- Олег Волчков +- Василий Михайличенко +- Ян Беркель +- Владимир Москва +- Лорен Сегал +- Андрей Фёдоров +- Игорь Кальницкий +- Джереми Халл +- Валерий Хиора +- Николай Захаров +- Дмитрий Ковега +- Сергей Игнатов +- Антоно Васильев +- Степан Кунцьо +- pumbur +- Джон Крепецци +- Андрей Власовских +- Александр Мядзель +- Евгений Степанищев +- Дмитрий Нагирняк +- Олег Ефимов +- Луиджи Мазелли +- Денис Бардадым +- Аахан Криш diff --git a/output/Scratch/js/highlight/LICENSE b/output/Scratch/js/highlight/LICENSE new file mode 100644 index 000000000..422deb735 --- /dev/null +++ b/output/Scratch/js/highlight/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2006, Ivan Sagalaev +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of highlight.js nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/output/Scratch/js/highlight/README.md b/output/Scratch/js/highlight/README.md new file mode 100644 index 000000000..9811dce4b --- /dev/null +++ b/output/Scratch/js/highlight/README.md @@ -0,0 +1,139 @@ +# Highlight.js + +Highlight.js highlights syntax in code examples on blogs, forums and, +in fact, on any web page. It's very easy to use because it works +automatically: finds blocks of code, detects a language, highlights it. + +Autodetection can be fine tuned when it fails by itself (see "Heuristics"). + + +## Installation and usage + +The download package includes the file "highlight.pack.js" which is a full +compressed version of the library intended for use in production. All +uncompressed source files are also available, feel free to look into them! + +The script is installed by linking to a single file and making a single +initialization call: + +```html + + +``` + +Also you can replace TAB ('\x09') characters used for indentation in your code +with some fixed number of spaces or with a `` to give them special +styling: + +```html + +``` + +The script looks in your page for fragments `
...
` +that are traditionally used to mark up code examples. Their content is +marked up by logical pieces with defined class names. + + +### Custom initialization + +If you use different markup for code blocks you can initialize them manually +with `highlightBlock(code, tabReplace)` function. It takes a DOM element +containing the code to highlight and optionally a string with which to replace +TAB characters. + +Initialization using, for example, jQuery might look like this: + +```javascript +$(document).ready(function() { + $('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')}); +}); +``` + +If your code container relies on `
` tags instead of line breaks (i.e. if +it's not `
`) pass `true` into third parameter of `highlightBlock`:
+
+```javascript
+$('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)});
+```
+
+### Styling
+
+Elements of code marked up with classes can be styled as desired:
+
+```css
+.comment {
+  color: gray;
+}
+
+.keyword {
+  font-weight: bold;
+}
+
+.python .string {
+  color: blue;
+}
+
+.html .atribute .value {
+  color: green;
+}
+```
+
+Highlight.js comes with several style themes located in "styles" directory that
+can be used directly or as a base for your own experiments.
+
+**Note**: provided styles work for code defined inside `
` blocks. If you use
+custom markup you should modify styles accordingly.
+
+For full reference list of classes see [classref.txt][cr].
+
+[cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt
+
+
+## Export
+
+File export.html contains a little program that allows you to paste in a code
+snippet and then copy and paste the resulting HTML code generated by the
+highlighter. This is useful in situations when you can't use the script itself
+on a site.
+
+
+## Heuristics
+
+Autodetection of a code's language is done using a simple heuristic:
+the program tries to highlight a fragment with all available languages and
+counts all syntactic structures that it finds along the way. The language
+with greatest count wins.
+
+This means that in short fragments the probability of an error is high
+(and it really happens sometimes). In this cases you can set the fragment's
+language explicitly by assigning a class to the `` element:
+
+```html
+
...
+``` + +You can use class names recommended in HTML5: "language-html", +"language-php". Classes also can be assigned to the `
` element.
+
+To disable highlighting of a fragment altogether use "no-highlight" class:
+
+```html
+
...
+``` + +## Meta + +- Version: 6.2 +- URL: http://softwaremaniacs.org/soft/highlight/en/ +- Author: Ivan Sagalaev () + +For the license terms see LICENSE files. +For the list of contributors see AUTHORS.en.txt file. diff --git a/output/Scratch/js/highlight/README.ru.md b/output/Scratch/js/highlight/README.ru.md new file mode 100644 index 000000000..ec0c156d6 --- /dev/null +++ b/output/Scratch/js/highlight/README.ru.md @@ -0,0 +1,144 @@ +# Highlight.js + +Highlight.js нужен для подсветки синтаксиса в примерах кода в блогах, +форумах и вообще на любых веб-страницах. Пользоваться им очень просто, +потому что работает он автоматически: сам находит блоки кода, сам +определяет язык, сам подсвечивает. + +Автоопределением языка можно управлять, когда оно не справляется само (см. +дальше "Эвристика"). + + +## Подключение и использование + +В загруженном архиве лежит файл "highlight.pack.js" -- полная сжатая версия +библиотеки для работы. Все несжатые исходные файлы также есть в пакете, поэтому +не стесняйтесь в них смотреть! + +Скрипт подключается одним файлом и одним вызовом инициализирующей +функции: + +```html + + +``` + +Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на +фиксированное количество пробелов или на отдельный ``, чтобы задать ему +какой-нибудь специальный стиль: + +```html + +``` + +Дальше скрипт ищет на странице конструкции `
...
`, +которые традиционно используются для написания кода, и код в них +размечается на куски, помеченные разными значениями классов. + + +### Инициализация вручную + +Если вы используете другие теги для блоков кода, вы можете инициализировать их +явно с помощью функции `highlightBlock(code, tabReplace)`. Она принимает +DOM-элемент с текстом расцвечиваемого кода и опционально - строчку для замены +символов TAB. + +Например с использованием jQuery код инициализации может выглядеть так: + +```javascript +$(document).ready(function() { + $('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')}); +}); +``` + +Если ваш блок кода использует `
` вместо переводов строки (т.е. если это не +`
`), передайте `true` третьим параметром в `highlightBlock`:
+
+```javascript
+$('div.code').each(function(i, e) {hljs.highlightBlock(e, null, true)});
+```
+
+### Выбор стилей
+
+Размеченным классами элементам кода можно задать желаемые стили например так:
+
+```css
+.comment {
+  color: gray;
+}
+
+.keyword {
+  font-weight: bold;
+}
+
+.python .string {
+  color: blue;
+}
+
+.html .atribute .value {
+  color: green;
+}
+```
+
+В комплекте с highlight.js идут несколько стилевых тем в директории styles,
+которые можно использовать напрямую или как основу для собственных экспериментов.
+
+**Внимание**: приложенные стили работают для кода, определённого внутри блоков
+`
`. Если вы используете собственную разметку, стили нужно исправить
+соответствующим образом.
+
+Полный список классов приведён в файле [crossref.txt][cr].
+
+[cr]: http://github.com/isagalaev/highlight.js/blob/master/classref.txt
+
+
+## Экспорт
+
+В файле export.html находится небольшая программка, которая показывает и дает
+скопировать непосредственно HTML-код подсветки для любого заданного фрагмента кода.
+Это может понадобится например на сайте, на котором нельзя подключить сам скрипт
+highlight.js.
+
+
+## Эвристика
+
+Определение языка, на котором написан фрагмент, делается с помощью
+довольно простой эвристики: программа пытается расцветить фрагмент всеми
+языками подряд, и для каждого языка считает количество подошедших
+синтаксически конструкций и ключевых слов. Для какого языка нашлось больше,
+тот и выбирается.
+
+Это означает, что в коротких фрагментах высока вероятность ошибки, что
+периодически и случается. Чтобы указать язык фрагмента явно, надо написать
+его название в виде класса к элементу ``:
+
+```html
+
...
+``` + +Можно использовать рекомендованные в HTML5 названия классов: +"language-html", "language-php". Также можно назначать классы на элемент +`
`.
+
+Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
+
+```html
+
...
+``` + +## Координаты + +- Версия: 6.2 +- URL: http://softwaremaniacs.org/soft/highlight/ +- Автор: Иван Сагалаев () + +Лицензионное соглашение читайте в файле LICENSE. +Список соавторов читайте в файле AUTHORS.ru.txt diff --git a/output/Scratch/js/highlight/classref.txt b/output/Scratch/js/highlight/classref.txt new file mode 100644 index 000000000..b7707f418 --- /dev/null +++ b/output/Scratch/js/highlight/classref.txt @@ -0,0 +1,497 @@ +This is a full list of available classes corresponding to languages' +syntactic structures. The parentheses after language name contain identifiers +used as class names in `` element. + +Python ("python"): + + keyword keyword + built_in built-in objects (None, False, True and Ellipsis) + number number + string string (of any type) + comment comment + decorator @-decorator for functions + function function header "def some_name(...):" + class class header "class SomeName(...):" + title name of a function or a class inside a header + params everything inside parentheses in a function's or class' header + +Python profiler results ("profile"): + + number number + string string + builtin builtin function entry + filename filename in an entry + summary profiling summary + header header of table of results + keyword column header + function function name in an entry (including parentheses) + title actual name of a function in an entry (excluding parentheses) + +Ruby ("ruby"): + + keyword keyword + string string + subst in-string substitution (#{...}) + comment comment + yardoctag YARD tag + function function header "def some_name(...):" + class class header "class SomeName(...):" + title name of a function or a class inside a header + parent name of a parent class + symbol symbol + instancevar instance variable + +Perl ("perl"): + + keyword keyword + comment comment + number number + string string + regexp regular expression + sub subroutine header (from "sub" till "{") + variable variable starting with "$", "%", "@" + operator operator + pod plain old doc + +PHP ("php"): + + keyword keyword + number number + string string (of any type) + comment comment + phpdoc phpdoc params in comments + variable variable starting with "$" + preprocessor preprocessor marks: "" + +Scala ("scala"): + + keyword keyword + number number + string string + comment comment + annotaion annotation + javadoc javadoc comment + javadoctag @-tag in javadoc + class class header + title class name inside a header + params everything in parentheses inside a class header + inheritance keywords "extends" and "with" inside class header + +Go language ("go"): + comment comment + string string constant + number number + keyword language keywords + constant true false nil iota + typename built-in plain types (int, string etc.) + built_in built-in functions + +XML ("xml"): + + tag any tag from "<" till ">" + comment comment + pi processing instruction () + cdata CDATA section + attribute attribute + value attribute's value + +HTML ("html"): + + keyword HTML tag + tag any tag from "<" till ">" + comment comment + doctype declaration + attribute tag's attribute with or without value + value attribute's value + +CSS ("css"): + + tag HTML tag in selectors + id #some_name in selectors + class .some_name in selectors + at_rule @-rule till first "{" or ";" + attr_selector attribute selector (square brackets in a[href^=http://]) + pseudo pseudo classes and elemens (:after, ::after etc.) + comment comment + rules everything from "{" till "}" + property property name inside a rule + value property value inside a rule, from ":" till ";" or + till the end of rule block + number number within a value + string string within a value + hexcolor hex color (#FFFFFF) within a value + function CSS function within a value + params everything between "(" and ")" within a function + important "!important" symbol + +Markdown ("markdown"): + + header header + bullet list bullet + emphasis emphasis + strong strong emphasis + blockquote blockquote + code code + horizontal_rule horizontal rule + link_label link label + link_url link url + +Django ("django"): + + keyword HTML tag in HTML, default tags and default filters in templates + tag any tag from "<" till ">" + comment comment + doctype declaration + attribute tag's attribute with or withou value + value attribute's value + template_tag template tag {% .. %} + variable template variable {{ .. }} + template_comment template comment, both {# .. #} and {% comment %} + filter filter from "|" till the next filter or the end of tag + argument filter argument + +JavaScript ("javascript"): + + keyword keyword + comment comment + number number + literal special literal: "true", "false" and "null" + string string + regexp regular expression + function header of a function + title name of a function inside a header + params parentheses and everything inside them in a function's header + +CoffeeScript ("coffeescript"): + + keyword keyword + comment comment + number number + literal special literal: "true", "false" and "null" + string string + regexp regular expression + function header of a function + title name of a function variable inside a header + params parentheses and everything inside them in a function's header + +VBScript ("vbscript"): + + keyword keyword + number number + string string + comment comment + built_in built-in function + +Lua ("lua"): + + keyword keyword + number number + string string + comment comment + built_in built-in operator + function header of a function + title name of a function inside a header + params everything inside parentheses in a function's header + long_brackets multiline string in [=[ .. ]=] + +Delphi ("delphi"): + + keyword keyword + comment comment (of any type) + number number + string string + function header of a function, procedure, constructor and destructor + title name of a function, procedure, constructor or destructor + inside a header + params everything inside parentheses in a function's header + class class' body from "= class" till "end;" + +Java ("java"): + + keyword keyword + number number + string string + comment commment + annotaion annotation + javadoc javadoc comment + class class header from "class" till "{" + title class name inside a header + params everything in parentheses inside a class header + inheritance keywords "extends" and "implements" inside class header + +C++ ("cpp"): + + keyword keyword + number number + string string and character + comment comment + preprocessor preprocessor directive + stl_container instantiation of STL containers ("vector<...>") + +Objective C ("objectivec"): + keyword keyword + built_in Cocoa/Cocoa Touch constants and classes + number number + string string + comment comment + preprocessor preprocessor directive + class interface/implementation, protocol and forward class declaration + +Vala ("vala"): + + keyword keyword + number number + string string + comment comment + class class definitions + title in class definition + constant ALL_UPPER_CASE + +C# ("cs"): + + keyword keyword + number number + string string + comment commment + xmlDocTag xmldoc tag ("///", "", "<..>") + +RenderMan RSL ("rsl"): + + keyword keyword + number number + string string (including @"..") + comment comment + preprocessor preprocessor directive + shader sahder keywords + shading shading keywords + built_in built-in function + +RenderMan RIB ("rib"): + + keyword keyword + number number + string string + comment comment + commands command + +Maya Embedded Language ("mel"): + + keyword keyword + number number + string string + comment comment + variable variable + +SQL ("sql"): + + keyword keyword (mostly SQL'92 and SQL'99) + number number + string string (of any type: "..", '..', `..`) + comment comment + aggregate aggregate function + +Smalltalk ("smalltalk"): + + keyword keyword + number number + string string + comment commment + symbol symbol + array array + class name of a class + char char + localvars block of local variables + +Lisp ("lisp"): + + keyword keyword + number number + string string + comment commment + variable variable + literal b, t and nil + list non-quoted list + title first symbol in a non-quoted list + body remainder of the non-quoted list + quoted quoted list, both "(quote .. )" and "'(..)" + +Ini ("ini"): + + title title of a section + value value of a setting of any type + string string + number number + keyword boolean value keyword + +Apache ("apache"): + + keyword keyword + number number + comment commment + literal On and Off + sqbracket variables in rewrites "%{..}" + cbracket options in rewrites "[..]" + tag begin and end of a configuration section + +Nginx ("nginx"): + + keyword keyword + string string + number number + comment comment + built_in built-in constant + variable $-variable + +Diff ("diff"): + + header file header + chunk chunk header within a file + addition added lines + deletion deleted lines + change changed lines + +DOS ("dos"): + + keyword keyword + flow batch control keyword + stream DOS special files ("con", "prn", ...) + winutils some commands (see dos.js specifically) + envvar environment variables + +Bash ("bash"): + + keyword keyword + string string + number number + comment comment + literal special literal: "true" и "false" + variable variable + shebang script interpreter header + +CMake ("cmake") + + keyword keyword + number number + string string + comment commment + envvar $-variable + +Axapta ("axapta"): + + keyword keyword + number number + string string + comment commment + class class header from "class" till "{" + title class name inside a header + params everything in parentheses inside a class header + inheritance keywords "extends" and "implements" inside class header + preprocessor preprocessor directive + +1C ("1c"): + + keyword keyword + number number + date date + string string + comment commment + function header of function or procudure + title function name inside a header + params everything in parentheses inside a function header + preprocessor preprocessor directive + +AVR assembler ("avrasm"): + + keyword keyword + built_in pre-defined register + number number + string string + comment commment + label label + preprocessor preprocessor directive + localvars substitution in .macro + +VHDL ("vhdl") + + keyword keyword + number number + string string + comment commment + literal signal logical value + +Parser3 ("parser3"): + + keyword keyword + number number + comment commment + variable variable starting with "$" + preprocessor preprocessor directive + title user-defined name starting with "@" + +TeX ("tex"): + + comment comment + number number + command command + parameter parameter + formula formula + special special symbol + +Haskell ("haskell"): + + keyword keyword + built_in built-in typeclass/functions (Bool, Int) + number number + string string + comment comment + class type classes and other data types + title function name + label type class name + +Erlang ("erlang"): + + comment comment + string string + number number + keyword keyword + record_name record access (#record_name) + title name of declaration function + variable variable (starts with capital letter or with _) + pp.keywords module's attribute (-attribute) + function_name atom or atom:atom in case of function call + +Rust ("rust"): + + comment comment + string string + number number + keyword keyword + title name of declaration + preprocessor preprocessor directive + +ActionScript ("actionscript"): + + comment comment + string string + number number + keyword keywords + literal literal + reserved reserved keyword + title name of declaration (package, class or function) + preprocessor preprocessor directive (import, include) + type type of returned value (for functions) + package package (named or not) + class class/interface + function function + param params of function + rest_arg rest argument of function + +Matlab ("matlab"): + + comment comment + string string + number number + keyword keyword + title function name + function function + param params of function diff --git a/output/Scratch/js/highlight/export.html b/output/Scratch/js/highlight/export.html new file mode 100644 index 000000000..86ac89284 --- /dev/null +++ b/output/Scratch/js/highlight/export.html @@ -0,0 +1,87 @@ + + + + + + + + Highlited code export + + + + + + + + + + + + + + + + + + +
Write a code snippetGet HTML to paste anywhere (for actual styles and colors see sample.css)
+ + + + + +
+
+
+ Export script: Vladimir Gubarkov
+ Highlighting: highlight.js +
+ + diff --git a/output/Scratch/js/highlight/highlight.js b/output/Scratch/js/highlight/highlight.js new file mode 100644 index 000000000..72fbc3a46 --- /dev/null +++ b/output/Scratch/js/highlight/highlight.js @@ -0,0 +1,643 @@ +/* +Syntax highlighting with language autodetection. +http://softwaremaniacs.org/soft/highlight/ +*/ + +var hljs = new function() { + + /* Utility functions */ + + function escape(value) { + return value.replace(/&/gm, '&').replace(/'; + } + + while (stream1.length || stream2.length) { + var current = selectStream().splice(0, 1)[0]; + result += escape(value.substr(processed, current.offset - processed)); + processed = current.offset; + if ( current.event == 'start') { + result += open(current.node); + nodeStack.push(current.node); + } else if (current.event == 'stop') { + var node, i = nodeStack.length; + do { + i--; + node = nodeStack[i]; + result += (''); + } while (node != current.node); + nodeStack.splice(i, 1); + while (i < nodeStack.length) { + result += open(nodeStack[i]); + i++; + } + } + } + return result + escape(value.substr(processed)); + } + + /* Initialization */ + + function compileModes() { + + function compileMode(mode, language, is_default) { + if (mode.compiled) + return; + var group; + + if (!is_default) { + mode.beginRe = langRe(language, mode.begin ? mode.begin : '\\B|\\b'); + if (!mode.end && !mode.endsWithParent) + mode.end = '\\B|\\b'; + if (mode.end) + mode.endRe = langRe(language, mode.end); + } + if (mode.illegal) + mode.illegalRe = langRe(language, mode.illegal); + if (mode.relevance === undefined) + mode.relevance = 1; + if (mode.keywords) { + mode.lexemsRe = langRe(language, mode.lexems || hljs.IDENT_RE, true); + for (var className in mode.keywords) { + if (!mode.keywords.hasOwnProperty(className)) + continue; + if (mode.keywords[className] instanceof Object) { + group = mode.keywords[className]; + } else { + group = mode.keywords; + className = 'keyword'; + } + for (var keyword in group) { + if (!group.hasOwnProperty(keyword)) + continue; + mode.keywords[keyword] = [className, group[keyword]]; + } + } + } + if (!mode.contains) { + mode.contains = []; + } + // compiled flag is set before compiling submodes to avoid self-recursion + // (see lisp where quoted_list contains quoted_list) + mode.compiled = true; + for (var i = 0; i < mode.contains.length; i++) { + if (mode.contains[i] == 'self') { + mode.contains[i] = mode; + } + compileMode(mode.contains[i], language, false); + } + if (mode.starts) { + compileMode(mode.starts, language, false); + } + } + + for (var i in languages) { + if (!languages.hasOwnProperty(i)) + continue; + compileMode(languages[i].defaultMode, languages[i], true); + } + } + + /* + Core highlighting function. Accepts a language name and a string with the + code to highlight. Returns an object with the following properties: + + - relevance (int) + - keyword_count (int) + - value (an HTML string with highlighting markup) + + */ + function highlight(language_name, value) { + if (!compileModes.called) { + compileModes(); + compileModes.called = true; + } + + function subMode(lexem, mode) { + for (var i = 0; i < mode.contains.length; i++) { + if (mode.contains[i].beginRe.test(lexem)) { + return mode.contains[i]; + } + } + } + + function endOfMode(mode_index, lexem) { + if (modes[mode_index].end && modes[mode_index].endRe.test(lexem)) + return 1; + if (modes[mode_index].endsWithParent) { + var level = endOfMode(mode_index - 1, lexem); + return level ? level + 1 : 0; + } + return 0; + } + + function isIllegal(lexem, mode) { + return mode.illegal && mode.illegalRe.test(lexem); + } + + function compileTerminators(mode, language) { + var terminators = []; + + for (var i = 0; i < mode.contains.length; i++) { + terminators.push(mode.contains[i].begin); + } + + var index = modes.length - 1; + do { + if (modes[index].end) { + terminators.push(modes[index].end); + } + index--; + } while (modes[index + 1].endsWithParent); + + if (mode.illegal) { + terminators.push(mode.illegal); + } + + return langRe(language, '(' + terminators.join('|') + ')', true); + } + + function eatModeChunk(value, index) { + var mode = modes[modes.length - 1]; + if (!mode.terminators) { + mode.terminators = compileTerminators(mode, language); + } + mode.terminators.lastIndex = index; + var match = mode.terminators.exec(value); + if (match) + return [value.substr(index, match.index - index), match[0], false]; + else + return [value.substr(index), '', true]; + } + + function keywordMatch(mode, match) { + var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0]; + var value = mode.keywords[match_str]; + if (value && value instanceof Array) + return value; + return false; + } + + function processKeywords(buffer, mode) { + buffer = escape(buffer); + if (!mode.keywords) + return buffer; + var result = ''; + var last_index = 0; + mode.lexemsRe.lastIndex = 0; + var match = mode.lexemsRe.exec(buffer); + while (match) { + result += buffer.substr(last_index, match.index - last_index); + var keyword_match = keywordMatch(mode, match); + if (keyword_match) { + keyword_count += keyword_match[1]; + result += '' + match[0] + ''; + } else { + result += match[0]; + } + last_index = mode.lexemsRe.lastIndex; + match = mode.lexemsRe.exec(buffer); + } + return result + buffer.substr(last_index, buffer.length - last_index); + } + + function processBuffer(buffer, mode) { + if (mode.subLanguage && languages[mode.subLanguage]) { + var result = highlight(mode.subLanguage, buffer); + keyword_count += result.keyword_count; + return result.value; + } else { + return processKeywords(buffer, mode); + } + } + + function startNewMode(mode, lexem) { + var markup = mode.className?'':''; + if (mode.returnBegin) { + result += markup; + mode.buffer = ''; + } else if (mode.excludeBegin) { + result += escape(lexem) + markup; + mode.buffer = ''; + } else { + result += markup; + mode.buffer = lexem; + } + modes.push(mode); + relevance += mode.relevance; + } + + function processModeInfo(buffer, lexem, end) { + var current_mode = modes[modes.length - 1]; + if (end) { + result += processBuffer(current_mode.buffer + buffer, current_mode); + return false; + } + + var new_mode = subMode(lexem, current_mode); + if (new_mode) { + result += processBuffer(current_mode.buffer + buffer, current_mode); + startNewMode(new_mode, lexem); + return new_mode.returnBegin; + } + + var end_level = endOfMode(modes.length - 1, lexem); + if (end_level) { + var markup = current_mode.className?'':''; + if (current_mode.returnEnd) { + result += processBuffer(current_mode.buffer + buffer, current_mode) + markup; + } else if (current_mode.excludeEnd) { + result += processBuffer(current_mode.buffer + buffer, current_mode) + markup + escape(lexem); + } else { + result += processBuffer(current_mode.buffer + buffer + lexem, current_mode) + markup; + } + while (end_level > 1) { + markup = modes[modes.length - 2].className?'':''; + result += markup; + end_level--; + modes.length--; + } + var last_ended_mode = modes[modes.length - 1]; + modes.length--; + modes[modes.length - 1].buffer = ''; + if (last_ended_mode.starts) { + startNewMode(last_ended_mode.starts, ''); + } + return current_mode.returnEnd; + } + + if (isIllegal(lexem, current_mode)) + throw 'Illegal'; + } + + var language = languages[language_name]; + var modes = [language.defaultMode]; + var relevance = 0; + var keyword_count = 0; + var result = ''; + try { + var mode_info, index = 0; + language.defaultMode.buffer = ''; + do { + mode_info = eatModeChunk(value, index); + var return_lexem = processModeInfo(mode_info[0], mode_info[1], mode_info[2]); + index += mode_info[0].length; + if (!return_lexem) { + index += mode_info[1].length; + } + } while (!mode_info[2]); + if(modes.length > 1) + throw 'Illegal'; + return { + relevance: relevance, + keyword_count: keyword_count, + value: result + }; + } catch (e) { + if (e == 'Illegal') { + return { + relevance: 0, + keyword_count: 0, + value: escape(value) + }; + } else { + throw e; + } + } + } + + /* + Highlighting with language detection. Accepts a string with the code to + highlight. Returns an object with the following properties: + + - language (detected language) + - relevance (int) + - keyword_count (int) + - value (an HTML string with highlighting markup) + - second_best (object with the same structure for second-best heuristically + detected language, may be absent) + + */ + function highlightAuto(text) { + var result = { + keyword_count: 0, + relevance: 0, + value: escape(text) + }; + var second_best = result; + for (var key in languages) { + if (!languages.hasOwnProperty(key)) + continue; + var current = highlight(key, text); + current.language = key; + if (current.keyword_count + current.relevance > second_best.keyword_count + second_best.relevance) { + second_best = current; + } + if (current.keyword_count + current.relevance > result.keyword_count + result.relevance) { + second_best = result; + result = current; + } + } + if (second_best.language) { + result.second_best = second_best; + } + return result; + } + + /* + Post-processing of the highlighted markup: + + - replace TABs with something more useful + - replace real line-breaks with '
' for non-pre containers + + */ + function fixMarkup(value, tabReplace, useBR) { + if (tabReplace) { + value = value.replace(/^((<[^>]+>|\t)+)/gm, function(match, p1, offset, s) { + return p1.replace(/\t/g, tabReplace); + }); + } + if (useBR) { + value = value.replace(/\n/g, '
'); + } + return value; + } + + /* + Applies highlighting to a DOM node containing code. Accepts a DOM node and + two optional parameters for fixMarkup. + */ + function highlightBlock(block, tabReplace, useBR) { + var text = blockText(block, useBR); + var language = blockLanguage(block); + var result, pre; + if (language == 'no-highlight') + return; + if (language) { + result = highlight(language, text); + } else { + result = highlightAuto(text); + language = result.language; + } + var original = nodeStream(block); + if (original.length) { + pre = document.createElement('pre'); + pre.innerHTML = result.value; + result.value = mergeStreams(original, nodeStream(pre), text); + } + result.value = fixMarkup(result.value, tabReplace, useBR); + + var class_name = block.className; + if (!class_name.match('(\\s|^)(language-)?' + language + '(\\s|$)')) { + class_name = class_name ? (class_name + ' ' + language) : language; + } + if (/MSIE [678]/.test(navigator.userAgent) && block.tagName == 'CODE' && block.parentNode.tagName == 'PRE') { + // This is for backwards compatibility only. IE needs this strange + // hack becasue it cannot just cleanly replace block contents. + pre = block.parentNode; + var container = document.createElement('div'); + container.innerHTML = '
' + result.value + '
'; + block = container.firstChild.firstChild; + container.firstChild.className = pre.className; + pre.parentNode.replaceChild(container.firstChild, pre); + } else { + block.innerHTML = result.value; + } + block.className = class_name; + block.result = { + language: language, + kw: result.keyword_count, + re: result.relevance + }; + if (result.second_best) { + block.second_best = { + language: result.second_best.language, + kw: result.second_best.keyword_count, + re: result.second_best.relevance + }; + } + } + + /* + Applies highlighting to all
..
blocks on a page. + */ + function initHighlighting() { + if (initHighlighting.called) + return; + initHighlighting.called = true; + var pres = document.getElementsByTagName('pre'); + for (var i = 0; i < pres.length; i++) { + var code = findCode(pres[i]); + if (code) + highlightBlock(code, hljs.tabReplace); + } + } + + /* + Attaches highlighting to the page load event. + */ + function initHighlightingOnLoad() { + if (window.addEventListener) { + window.addEventListener('DOMContentLoaded', initHighlighting, false); + window.addEventListener('load', initHighlighting, false); + } else if (window.attachEvent) + window.attachEvent('onload', initHighlighting); + else + window.onload = initHighlighting; + } + + var languages = {}; // a shortcut to avoid writing "this." everywhere + + /* Interface definition */ + + this.LANGUAGES = languages; + this.highlight = highlight; + this.highlightAuto = highlightAuto; + this.fixMarkup = fixMarkup; + this.highlightBlock = highlightBlock; + this.initHighlighting = initHighlighting; + this.initHighlightingOnLoad = initHighlightingOnLoad; + + // Common regexps + this.IDENT_RE = '[a-zA-Z][a-zA-Z0-9_]*'; + this.UNDERSCORE_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_]*'; + this.NUMBER_RE = '\\b\\d+(\\.\\d+)?'; + this.C_NUMBER_RE = '\\b(0[xX][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float + this.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b... + this.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~'; + + // Common modes + this.BACKSLASH_ESCAPE = { + begin: '\\\\.', relevance: 0 + }; + this.APOS_STRING_MODE = { + className: 'string', + begin: '\'', end: '\'', + illegal: '\\n', + contains: [this.BACKSLASH_ESCAPE], + relevance: 0 + }; + this.QUOTE_STRING_MODE = { + className: 'string', + begin: '"', end: '"', + illegal: '\\n', + contains: [this.BACKSLASH_ESCAPE], + relevance: 0 + }; + this.C_LINE_COMMENT_MODE = { + className: 'comment', + begin: '//', end: '$' + }; + this.C_BLOCK_COMMENT_MODE = { + className: 'comment', + begin: '/\\*', end: '\\*/' + }; + this.HASH_COMMENT_MODE = { + className: 'comment', + begin: '#', end: '$' + }; + this.NUMBER_MODE = { + className: 'number', + begin: this.NUMBER_RE, + relevance: 0 + }; + this.C_NUMBER_MODE = { + className: 'number', + begin: this.C_NUMBER_RE, + relevance: 0 + }; + this.BINARY_NUMBER_MODE = { + className: 'number', + begin: this.BINARY_NUMBER_RE, + relevance: 0 + }; + + // Utility functions + this.inherit = function(parent, obj) { + var result = {} + for (var key in parent) + result[key] = parent[key]; + if (obj) + for (var key in obj) + result[key] = obj[key]; + return result; + } +}(); diff --git a/output/Scratch/js/highlight/highlight.pack.js b/output/Scratch/js/highlight/highlight.pack.js new file mode 100644 index 000000000..b0b5859e4 --- /dev/null +++ b/output/Scratch/js/highlight/highlight.pack.js @@ -0,0 +1 @@ +var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/"}while(y.length||z.length){var v=u().splice(0,1)[0];w+=m(x.substr(r,v.offset-r));r=v.offset;if(v.event=="start"){w+=s(v.node);t.push(v.node)}else{if(v.event=="stop"){var p,q=t.length;do{q--;p=t[q];w+=("")}while(p!=v.node);t.splice(q,1);while(q'+L[0]+""}else{N+=L[0]}P=O.lR.lastIndex;L=O.lR.exec(M)}return N+M.substr(P,M.length-P)}function K(r,M){if(M.sL&&d[M.sL]){var L=e(M.sL,r);t+=L.keyword_count;return L.value}else{return F(r,M)}}function I(M,r){var L=M.cN?'':"";if(M.rB){q+=L;M.buffer=""}else{if(M.eB){q+=m(r)+L;M.buffer=""}else{q+=L;M.buffer=r}}C.push(M);B+=M.r}function E(O,L,Q){var R=C[C.length-1];if(Q){q+=K(R.buffer+O,R);return false}var M=z(L,R);if(M){q+=K(R.buffer+O,R);I(M,L);return M.rB}var r=w(C.length-1,L);if(r){var N=R.cN?"":"";if(R.rE){q+=K(R.buffer+O,R)+N}else{if(R.eE){q+=K(R.buffer+O,R)+N+m(L)}else{q+=K(R.buffer+O+L,R)+N}}while(r>1){N=C[C.length-2].cN?"":"";q+=N;r--;C.length--}var P=C[C.length-1];C.length--;C[C.length-1].buffer="";if(P.starts){I(P.starts,"")}return R.rE}if(x(L,R)){throw"Illegal"}}var H=d[J];var C=[H.dM];var B=0;var t=0;var q="";try{var y,v=0;H.dM.buffer="";do{y=s(D,v);var u=E(y[0],y[1],y[2]);v+=y[0].length;if(!u){v+=y[1].length}}while(!y[2]);if(C.length>1){throw"Illegal"}return{r:B,keyword_count:t,value:q}}catch(G){if(G=="Illegal"){return{r:0,keyword_count:0,value:m(D)}}else{throw G}}}function f(t){var r={keyword_count:0,r:0,value:m(t)};var q=r;for(var p in d){if(!d.hasOwnProperty(p)){continue}var s=e(p,t);s.language=p;if(s.keyword_count+s.r>q.keyword_count+q.r){q=s}if(s.keyword_count+s.r>r.keyword_count+r.r){q=r;r=s}}if(q.language){r.second_best=q}return r}function h(r,q,p){if(q){r=r.replace(/^((<[^>]+>|\t)+)/gm,function(t,w,v,u){return w.replace(/\t/g,q)})}if(p){r=r.replace(/\n/g,"
")}return r}function o(u,x,q){var y=g(u,q);var s=a(u);var w,r;if(s=="no-highlight"){return}if(s){w=e(s,y)}else{w=f(y);s=w.language}var p=b(u);if(p.length){r=document.createElement("pre");r.innerHTML=w.value;w.value=l(p,b(r),y)}w.value=h(w.value,x,q);var t=u.className;if(!t.match("(\\s|^)(language-)?"+s+"(\\s|$)")){t=t?(t+" "+s):s}if(/MSIE [678]/.test(navigator.userAgent)&&u.tagName=="CODE"&&u.parentNode.tagName=="PRE"){r=u.parentNode;var v=document.createElement("div");v.innerHTML="
"+w.value+"
";u=v.firstChild.firstChild;v.firstChild.cN=r.cN;r.parentNode.replaceChild(v.firstChild,r)}else{u.innerHTML=w.value}u.className=t;u.result={language:s,kw:w.keyword_count,re:w.r};if(w.second_best){u.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function k(){if(k.called){return}k.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BINARY_NUMBER_MODE={cN:"number",b:this.BINARY_NUMBER_RE,r:0};this.inherit=function(p,s){var r={};for(var q in p){r[q]=p[q]}if(s){for(var q in s){r[q]=s[q]}}return r}}();hljs.LANGUAGES.bash=function(){var d={"true":1,"false":1};var c={cN:"variable",b:"\\$([a-zA-Z0-9_]+)\\b"};var a={cN:"variable",b:"\\$\\{(([^}])|(\\\\}))+\\}",c:[hljs.CNM]};var f={cN:"string",b:'"',e:'"',i:"\\n",c:[hljs.BE,c,a],r:0};var b={cN:"string",b:"'",e:"'",r:0};var e={cN:"test_condition",b:"",e:"",c:[f,b,c,a,hljs.CNM],k:{literal:d},r:0};return{dM:{k:{keyword:{"if":1,then:1,"else":1,fi:1,"for":1,"break":1,"continue":1,"while":1,"in":1,"do":1,done:1,echo:1,exit:1,"return":1,set:1,declare:1},literal:d},c:[{cN:"shebang",b:"(#!\\/bin\\/bash)|(#!\\/bin\\/sh)",r:10},c,a,hljs.HCM,hljs.CNM,f,b,hljs.inherit(e,{b:"\\[ ",e:" \\]",r:0}),hljs.inherit(e,{b:"\\[\\[ ",e:" \\]\\]"})]}}}();hljs.LANGUAGES.erlang=function(){var h="[a-z'][a-zA-Z0-9_']*";var m="("+h+":"+h+"|"+h+")";var d={keyword:{after:1,and:1,andalso:10,band:1,begin:1,bnot:1,bor:1,bsl:1,bzr:1,bxor:1,"case":1,"catch":1,cond:1,div:1,end:1,fun:1,let:1,not:1,of:1,orelse:10,query:1,receive:1,rem:1,"try":1,when:1,xor:1},literal:{"false":1,"true":1}};var k={cN:"comment",b:"%",e:"$",r:0};var f={cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0};var c={b:"fun\\s+"+h+"/\\d+"};var n={b:m+"\\(",e:"\\)",rB:true,r:0,c:[{cN:"function_name",b:m,r:0},{b:"\\(",e:"\\)",eW:true,rE:true,r:0}]};var g={cN:"tuple",b:"{",e:"}",r:0};var a={cN:"variable",b:"\\b_([A-Z][A-Za-z0-9_]*)?",r:0};var l={cN:"variable",b:"[A-Z][a-zA-Z0-9_]*",r:0};var i={b:"#",e:"}",i:".",r:0,rB:true,c:[{cN:"record_name",b:"#"+hljs.UIR,r:0},{b:"{",eW:true,r:0}]};var j={k:d,b:"(fun|receive|if|try|case)",e:"end"};j.c=[k,c,hljs.inherit(hljs.ASM,{cN:""}),j,n,hljs.QSM,f,g,a,l,i];var b=[k,c,j,n,hljs.QSM,f,g,a,l,i];n.c[1].c=b;g.c=b;i.c[1].c=b;var e={cN:"params",b:"\\(",e:"\\)",eW:true,c:b};return{dM:{k:d,i:"(",eW:true,c:b}]},k,{cN:"pp",b:"^-",e:"\\.",r:0,eE:true,rB:true,l:"-"+hljs.IR,k:{"-module":1,"-record":1,"-undef":1,"-export":1,"-ifdef":1,"-ifndef":1,"-author":1,"-copyright":1,"-doc":1,"-vsn":1,"-import":1,"-include":1,"-include_lib":1,"-compile":1,"-define":1,"-else":1,"-endif":1,"-file":1,"-behaviour":1,"-behavior":1},c:[e]},f,hljs.QSM,i,a,l,g]}}}();hljs.LANGUAGES.cs={dM:{k:{"abstract":1,as:1,base:1,bool:1,"break":1,"byte":1,"case":1,"catch":1,"char":1,checked:1,"class":1,"const":1,"continue":1,decimal:1,"default":1,delegate:1,"do":1,"double":1,"else":1,"enum":1,event:1,explicit:1,extern:1,"false":1,"finally":1,fixed:1,"float":1,"for":1,foreach:1,"goto":1,"if":1,implicit:1,"in":1,"int":1,"interface":1,internal:1,is:1,lock:1,"long":1,namespace:1,"new":1,"null":1,object:1,operator:1,out:1,override:1,params:1,"private":1,"protected":1,"public":1,readonly:1,ref:1,"return":1,sbyte:1,sealed:1,"short":1,sizeof:1,stackalloc:1,"static":1,string:1,struct:1,"switch":1,"this":1,"throw":1,"true":1,"try":1,"typeof":1,uint:1,ulong:1,unchecked:1,unsafe:1,ushort:1,using:1,virtual:1,"volatile":1,"void":1,"while":1,ascending:1,descending:1,from:1,get:1,group:1,into:1,join:1,let:1,orderby:1,partial:1,select:1,set:1,value:1,"var":1,where:1,yield:1},c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",b:"///|"},{cN:"xmlDocTag",b:""}]},hljs.CLCM,hljs.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:{"if":1,"else":1,elif:1,endif:1,define:1,undef:1,warning:1,error:1,line:1,region:1,endregion:1,pragma:1,checksum:1}},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},hljs.ASM,hljs.QSM,hljs.CNM]}};hljs.LANGUAGES.ruby=function(){var c="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var i="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var a={keyword:{and:1,"false":1,then:1,defined:1,module:1,"in":1,"return":1,redo:1,"if":1,BEGIN:1,retry:1,end:1,"for":1,"true":1,self:1,when:1,next:1,until:1,"do":1,begin:1,unless:1,END:1,rescue:1,nil:1,"else":1,"break":1,undef:1,not:1,"super":1,"class":1,"case":1,require:1,yield:1,alias:1,"while":1,ensure:1,elsif:1,or:1,def:1},keymethods:{__id__:1,__send__:1,abort:1,abs:1,"all?":1,allocate:1,ancestors:1,"any?":1,arity:1,assoc:1,at:1,at_exit:1,autoload:1,"autoload?":1,"between?":1,binding:1,binmode:1,"block_given?":1,call:1,callcc:1,caller:1,capitalize:1,"capitalize!":1,casecmp:1,"catch":1,ceil:1,center:1,chomp:1,"chomp!":1,chop:1,"chop!":1,chr:1,"class":1,class_eval:1,"class_variable_defined?":1,class_variables:1,clear:1,clone:1,close:1,close_read:1,close_write:1,"closed?":1,coerce:1,collect:1,"collect!":1,compact:1,"compact!":1,concat:1,"const_defined?":1,const_get:1,const_missing:1,const_set:1,constants:1,count:1,crypt:1,"default":1,default_proc:1,"delete":1,"delete!":1,delete_at:1,delete_if:1,detect:1,display:1,div:1,divmod:1,downcase:1,"downcase!":1,downto:1,dump:1,dup:1,each:1,each_byte:1,each_index:1,each_key:1,each_line:1,each_pair:1,each_value:1,each_with_index:1,"empty?":1,entries:1,eof:1,"eof?":1,"eql?":1,"equal?":1,"eval":1,exec:1,exit:1,"exit!":1,extend:1,fail:1,fcntl:1,fetch:1,fileno:1,fill:1,find:1,find_all:1,first:1,flatten:1,"flatten!":1,floor:1,flush:1,for_fd:1,foreach:1,fork:1,format:1,freeze:1,"frozen?":1,fsync:1,getc:1,gets:1,global_variables:1,grep:1,gsub:1,"gsub!":1,"has_key?":1,"has_value?":1,hash:1,hex:1,id:1,include:1,"include?":1,included_modules:1,index:1,indexes:1,indices:1,induced_from:1,inject:1,insert:1,inspect:1,instance_eval:1,instance_method:1,instance_methods:1,"instance_of?":1,"instance_variable_defined?":1,instance_variable_get:1,instance_variable_set:1,instance_variables:1,"integer?":1,intern:1,invert:1,ioctl:1,"is_a?":1,isatty:1,"iterator?":1,join:1,"key?":1,keys:1,"kind_of?":1,lambda:1,last:1,length:1,lineno:1,ljust:1,load:1,local_variables:1,loop:1,lstrip:1,"lstrip!":1,map:1,"map!":1,match:1,max:1,"member?":1,merge:1,"merge!":1,method:1,"method_defined?":1,method_missing:1,methods:1,min:1,module_eval:1,modulo:1,name:1,nesting:1,"new":1,next:1,"next!":1,"nil?":1,nitems:1,"nonzero?":1,object_id:1,oct:1,open:1,pack:1,partition:1,pid:1,pipe:1,pop:1,popen:1,pos:1,prec:1,prec_f:1,prec_i:1,print:1,printf:1,private_class_method:1,private_instance_methods:1,"private_method_defined?":1,private_methods:1,proc:1,protected_instance_methods:1,"protected_method_defined?":1,protected_methods:1,public_class_method:1,public_instance_methods:1,"public_method_defined?":1,public_methods:1,push:1,putc:1,puts:1,quo:1,raise:1,rand:1,rassoc:1,read:1,read_nonblock:1,readchar:1,readline:1,readlines:1,readpartial:1,rehash:1,reject:1,"reject!":1,remainder:1,reopen:1,replace:1,require:1,"respond_to?":1,reverse:1,"reverse!":1,reverse_each:1,rewind:1,rindex:1,rjust:1,round:1,rstrip:1,"rstrip!":1,scan:1,seek:1,select:1,send:1,set_trace_func:1,shift:1,singleton_method_added:1,singleton_methods:1,size:1,sleep:1,slice:1,"slice!":1,sort:1,"sort!":1,sort_by:1,split:1,sprintf:1,squeeze:1,"squeeze!":1,srand:1,stat:1,step:1,store:1,strip:1,"strip!":1,sub:1,"sub!":1,succ:1,"succ!":1,sum:1,superclass:1,swapcase:1,"swapcase!":1,sync:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,taint:1,"tainted?":1,tell:1,test:1,"throw":1,times:1,to_a:1,to_ary:1,to_f:1,to_hash:1,to_i:1,to_int:1,to_io:1,to_proc:1,to_s:1,to_str:1,to_sym:1,tr:1,"tr!":1,tr_s:1,"tr_s!":1,trace_var:1,transpose:1,trap:1,truncate:1,"tty?":1,type:1,ungetc:1,uniq:1,"uniq!":1,unpack:1,unshift:1,untaint:1,untrace_var:1,upcase:1,"upcase!":1,update:1,upto:1,"value?":1,values:1,values_at:1,warn:1,write:1,write_nonblock:1,"zero?":1,zip:1}};var d={cN:"yardoctag",b:"@[A-Za-z]+"};var k=[{cN:"comment",b:"#",e:"$",c:[d]},{cN:"comment",b:"^\\=begin",e:"^\\=end",c:[d],r:10},{cN:"comment",b:"^__END__",e:"\\n$"}];var e={cN:"subst",b:"#\\{",e:"}",l:c,k:a};var g=[hljs.BE,e];var f=[{cN:"string",b:"'",e:"'",c:g,r:0},{cN:"string",b:'"',e:'"',c:g,r:0},{cN:"string",b:"%[qw]?\\(",e:"\\)",c:g,r:10},{cN:"string",b:"%[qw]?\\[",e:"\\]",c:g,r:10},{cN:"string",b:"%[qw]?{",e:"}",c:g,r:10},{cN:"string",b:"%[qw]?<",e:">",c:g,r:10},{cN:"string",b:"%[qw]?/",e:"/",c:g,r:10},{cN:"string",b:"%[qw]?%",e:"%",c:g,r:10},{cN:"string",b:"%[qw]?-",e:"-",c:g,r:10},{cN:"string",b:"%[qw]?\\|",e:"\\|",c:g,r:10}];var h={cN:"function",b:"\\bdef\\s+",e:" |$|;",l:c,k:a,c:[{cN:"title",b:i,l:c,k:a},{cN:"params",b:"\\(",e:"\\)",l:c,k:a}].concat(k)};var j={cN:"identifier",b:c,l:c,k:a,r:0};var b=k.concat(f.concat([{cN:"class",b:"\\b(class|module)\\b",e:"$|;",k:{"class":1,module:1},c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+hljs.IR+"::)?"+hljs.IR}]}].concat(k)},h,{cN:"constant",b:"(::)?([A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:f.concat([j]),r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},j,{b:"("+hljs.RSR+")\\s*",c:k.concat([{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[hljs.BE]}]),r:0}]));e.c=b;h.c[1].c=b;return{dM:{l:c,k:a,c:b}}}();hljs.LANGUAGES.rust=function(){var c={cN:"title",b:hljs.UIR};var d={cN:"string",b:'"',e:'"',c:[hljs.BE],r:0};var b={cN:"number",b:"\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)",r:0};var a={alt:1,any:1,as:1,assert:1,be:1,bind:1,block:1,bool:1,"break":1,"char":1,check:1,claim:1,"const":1,cont:1,dir:1,"do":1,"else":1,"enum":1,"export":1,f32:1,f64:1,fail:1,"false":1,"float":1,fn:10,"for":1,i16:1,i32:1,i64:1,i8:1,"if":1,iface:10,impl:10,"import":1,"in":1,"int":1,let:1,log:1,mod:1,mutable:1,"native":1,note:1,of:1,prove:1,pure:10,resource:1,ret:1,self:1,str:1,syntax:1,"true":1,type:1,u16:1,u32:1,u64:1,u8:1,uint:1,unchecked:1,unsafe:1,use:1,vec:1,"while":1};return{dM:{k:a,i:"]+"}]}]};return{cI:true,dM:{c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:{style:1}},c:[a],starts:{cN:"css",e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:{script:1}},c:[a],starts:{cN:"javascript",e:"<\/script>",rE:true,sL:"javascript"}},{cN:"vbscript",b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"",c:[{cN:"title",b:"[^ />]+"},a]}]}}}();hljs.LANGUAGES.markdown={cI:true,dM:{c:[{cN:"header",b:"^#{1,3}",e:"$"},{cN:"header",b:"^.+?\\n[=-]{2,}$"},{b:"<",e:">",sL:"xml"},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",b:"[*_].+?[*_]"},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",b:"`.+?`"},{cN:"code",b:"^ ",e:"$",r:0},{cN:"horizontal_rule",b:"^-{3,}",e:"$"},{b:"\\[.+?\\]\\(.+?\\)",rB:true,c:[{cN:"link_label",b:"\\[.+\\]"},{cN:"link_url",b:"\\(",e:"\\)",eB:true,eE:true}]}]}};hljs.LANGUAGES.css=function(){var a={cN:"function",b:hljs.IR+"\\(",e:"\\)",c:[{eW:true,eE:true,c:[hljs.NM,hljs.ASM,hljs.QSM]}]};return{cI:true,dM:{i:"[=/|']",c:[hljs.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:{"font-face":1,page:1}},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:{"import":1,page:1,media:1,charset:1},c:[a,hljs.ASM,hljs.QSM,hljs.NM]},{cN:"tag",b:hljs.IR,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[hljs.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[a,hljs.NM,hljs.QSM,hljs.ASM,hljs.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}}();hljs.LANGUAGES.lisp=function(){var k="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#]*";var m="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?";var a={cN:"literal",b:"\\b(t{1}|nil)\\b"};var f=[{cN:"number",b:m},{cN:"number",b:"#b[0-1]+(/[0-1]+)?"},{cN:"number",b:"#o[0-7]+(/[0-7]+)?"},{cN:"number",b:"#x[0-9a-f]+(/[0-9a-f]+)?"},{cN:"number",b:"#c\\("+m+" +"+m,e:"\\)"}];var b={cN:"string",b:'"',e:'"',c:[hljs.BE],r:0};var l={cN:"comment",b:";",e:"$"};var c={cN:"variable",b:"\\*",e:"\\*"};var j={cN:"keyword",b:"[:&]"+k};var h={b:"\\(",e:"\\)",c:["self",a,b].concat(f)};var e={cN:"quoted",b:"['`]\\(",e:"\\)",c:f.concat([b,c,j,h])};var d={cN:"quoted",b:"\\(quote ",e:"\\)",k:{title:{quote:1}},c:f.concat([b,c,j,h])};var i={cN:"list",b:"\\(",e:"\\)"};var g={cN:"body",eW:true,eE:true};i.c=[{cN:"title",b:k},g];g.c=[e,d,i,a].concat(f).concat([b,l,c,j]);return{cI:true,dM:{i:"[^\\s]",c:f.concat([a,b,l,e,d,i])}}}();hljs.LANGUAGES.profile={dM:{c:[hljs.CNM,{cN:"builtin",b:"{",e:"}$",eB:true,eE:true,c:[hljs.ASM,hljs.QSM],r:0},{cN:"filename",b:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",e:":",eE:true},{cN:"header",b:"(ncalls|tottime|cumtime)",e:"$",k:{ncalls:1,tottime:10,cumtime:10,filename:1},r:10},{cN:"summary",b:"function calls",e:"$",c:[hljs.CNM],r:10},hljs.ASM,hljs.QSM,{cN:"function",b:"\\(",e:"\\)$",c:[{cN:"title",b:hljs.UIR,r:0}],r:0}]}};hljs.LANGUAGES.java={dM:{k:{"false":1,"synchronized":1,"int":1,"abstract":1,"float":1,"private":1,"char":1,"interface":1,"boolean":1,"static":1,"null":1,"if":1,"const":1,"for":1,"true":1,"while":1,"long":1,"throw":1,strictfp:1,"finally":1,"protected":1,"extends":1,"import":1,"native":1,"final":1,"implements":1,"return":1,"void":1,"enum":1,"else":1,"break":1,"transient":1,"new":1,"catch":1,"instanceof":1,"byte":1,"super":1,"class":1,"volatile":1,"case":1,assert:1,"short":1,"package":1,"default":1,"double":1,"public":1,"try":1,"this":1,"switch":1,"continue":1,"throws":1},c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"@[A-Za-z]+"}],r:10},hljs.CLCM,hljs.CBLCLM,hljs.ASM,hljs.QSM,{cN:"class",b:"(class |interface )",e:"{",k:{"class":1,"interface":1},i:":",c:[{b:"(implements|extends)",k:{"extends":1,"implements":1},r:10},{cN:"title",b:hljs.UIR}]},hljs.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}};hljs.LANGUAGES.php={cI:true,dM:{k:{and:1,include_once:1,list:1,"abstract":1,global:1,"private":1,echo:1,"interface":1,as:1,"static":1,endswitch:1,array:1,"null":1,"if":1,endwhile:1,or:1,"const":1,"for":1,endforeach:1,self:1,"var":1,"while":1,isset:1,"public":1,"protected":1,exit:1,foreach:1,"throw":1,elseif:1,"extends":1,include:1,__FILE__:1,empty:1,require_once:1,"function":1,"do":1,xor:1,"return":1,"implements":1,parent:1,clone:1,use:1,__CLASS__:1,__LINE__:1,"else":1,"break":1,print:1,"eval":1,"new":1,"catch":1,__METHOD__:1,"class":1,"case":1,exception:1,php_user_filter:1,"default":1,die:1,require:1,__FUNCTION__:1,enddeclare:1,"final":1,"try":1,"this":1,"switch":1,"continue":1,endfor:1,endif:1,declare:1,unset:1,"true":1,"false":1,namespace:1,trait:1,"goto":1,"instanceof":1,__DIR__:1,__NAMESPACE__:1,__halt_compiler:1},c:[hljs.CLCM,hljs.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"}]},{cN:"comment",eB:true,b:"__halt_compiler[^;]+;",e:"[\\n\\r]$"},hljs.CNM,hljs.BINARY_NUMBER_MODE,hljs.inherit(hljs.ASM,{i:null}),hljs.inherit(hljs.QSM,{i:null}),{cN:"string",b:'b"',e:'"',c:[hljs.BE]},{cN:"string",b:"b'",e:"'",c:[hljs.BE]},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[hljs.BE]},{cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"},{cN:"preprocessor",b:"<\\?php",r:10},{cN:"preprocessor",b:"\\?>"}]}};hljs.LANGUAGES.haskell=function(){var a={cN:"label",b:"\\b[A-Z][\\w']*",r:0};var b={cN:"container",b:"\\(",e:"\\)",c:[{cN:"label",b:"\\b[A-Z][\\w\\(\\)\\.']*"},{cN:"title",b:"[_a-z][\\w']*"}]};return{dM:{k:{keyword:{let:1,"in":1,"if":1,then:1,"else":1,"case":1,of:1,where:1,"do":1,module:1,"import":1,hiding:1,qualified:1,type:1,data:1,newtype:1,deriving:1,"class":1,instance:1,"null":1,not:1,as:1}},c:[{cN:"comment",b:"--",e:"$"},{cN:"comment",b:"{-",e:"-}"},{cN:"string",b:"\\s+'",e:"'",c:[hljs.BE],r:0},hljs.QSM,{cN:"import",b:"\\bimport",e:"$",k:{"import":1,qualified:1,as:1,hiding:1},c:[b]},{cN:"module",b:"\\bmodule",e:"where",k:{module:1,where:1},c:[b]},{cN:"class",b:"\\b(class|instance|data|(new)?type)",e:"(where|$)",k:{"class":1,where:1,instance:1,data:1,type:1,newtype:1,deriving:1},c:[a]},hljs.CNM,{cN:"shebang",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},a,{cN:"title",b:"^[_a-z][\\w']*"}]}}}();hljs.LANGUAGES["1c"]=function(){var b="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*";var e={"возврат":1,"дата":1,"для":1,"если":1,"и":1,"или":1,"иначе":1,"иначеесли":1,"исключение":1,"конецесли":1,"конецпопытки":1,"конецпроцедуры":1,"конецфункции":1,"конеццикла":1,"константа":1,"не":1,"перейти":1,"перем":1,"перечисление":1,"по":1,"пока":1,"попытка":1,"прервать":1,"продолжить":1,"процедура":1,"строка":1,"тогда":1,"фс":1,"функция":1,"цикл":1,"число":1,"экспорт":1};var d={ansitooem:1,oemtoansi:1,"ввестивидсубконто":1,"ввестидату":1,"ввестизначение":1,"ввестиперечисление":1,"ввестипериод":1,"ввестиплансчетов":1,"ввестистроку":1,"ввестичисло":1,"вопрос":1,"восстановитьзначение":1,"врег":1,"выбранныйплансчетов":1,"вызватьисключение":1,"датагод":1,"датамесяц":1,"датачисло":1,"добавитьмесяц":1,"завершитьработусистемы":1,"заголовоксистемы":1,"записьжурналарегистрации":1,"запуститьприложение":1,"зафиксироватьтранзакцию":1,"значениевстроку":1,"значениевстрокувнутр":1,"значениевфайл":1,"значениеизстроки":1,"значениеизстрокивнутр":1,"значениеизфайла":1,"имякомпьютера":1,"имяпользователя":1,"каталогвременныхфайлов":1,"каталогиб":1,"каталогпользователя":1,"каталогпрограммы":1,"кодсимв":1,"командасистемы":1,"конгода":1,"конецпериодаби":1,"конецрассчитанногопериодаби":1,"конецстандартногоинтервала":1,"конквартала":1,"конмесяца":1,"коннедели":1,"лев":1,"лог":1,"лог10":1,"макс":1,"максимальноеколичествосубконто":1,"мин":1,"монопольныйрежим":1,"названиеинтерфейса":1,"названиенабораправ":1,"назначитьвид":1,"назначитьсчет":1,"найти":1,"найтипомеченныенаудаление":1,"найтиссылки":1,"началопериодаби":1,"началостандартногоинтервала":1,"начатьтранзакцию":1,"начгода":1,"начквартала":1,"начмесяца":1,"начнедели":1,"номерднягода":1,"номерднянедели":1,"номернеделигода":1,"нрег":1,"обработкаожидания":1,"окр":1,"описаниеошибки":1,"основнойжурналрасчетов":1,"основнойплансчетов":1,"основнойязык":1,"открытьформу":1,"открытьформумодально":1,"отменитьтранзакцию":1,"очиститьокносообщений":1,"периодстр":1,"полноеимяпользователя":1,"получитьвремята":1,"получитьдатута":1,"получитьдокументта":1,"получитьзначенияотбора":1,"получитьпозициюта":1,"получитьпустоезначение":1,"получитьта":1,"прав":1,"праводоступа":1,"предупреждение":1,"префиксавтонумерации":1,"пустаястрока":1,"пустоезначение":1,"рабочаядаттьпустоезначение":1,"рабочаядата":1,"разделительстраниц":1,"разделительстрок":1,"разм":1,"разобратьпозициюдокумента":1,"рассчитатьрегистрына":1,"рассчитатьрегистрыпо":1,"сигнал":1,"симв":1,"символтабуляции":1,"создатьобъект":1,"сокрл":1,"сокрлп":1,"сокрп":1," сообщить":1,"состояние":1,"сохранитьзначение":1,"сред":1,"статусвозврата":1,"стрдлина":1,"стрзаменить":1,"стрколичествострок":1,"стрполучитьстроку":1," стрчисловхождений":1,"сформироватьпозициюдокумента":1,"счетпокоду":1,"текущаядата":1,"текущеевремя":1,"типзначения":1,"типзначениястр":1,"удалитьобъекты":1,"установитьтана":1,"установитьтапо":1,"фиксшаблон":1,"формат":1,"цел":1,"шаблон":1};var a={cN:"dquote",b:'""'};var c={cN:"string",b:'"',e:'"|$',c:[a],r:0};var f={cN:"string",b:"\\|",e:'"|$',c:[a]};return{cI:true,dM:{l:b,k:{keyword:e,built_in:d},c:[hljs.CLCM,hljs.NM,c,f,{cN:"function",b:"(процедура|функция)",e:"$",l:b,k:{"процедура":1,"экспорт":1,"функция":1},c:[{cN:"title",b:b},{cN:"tail",eW:true,c:[{cN:"params",b:"\\(",e:"\\)",l:b,k:{"знач":1},c:[c,f]},{cN:"export",b:"экспорт",eW:true,l:b,k:{"экспорт":1},c:[hljs.CLCM]}]},hljs.CLCM]},{cN:"preprocessor",b:"#",e:"$"},{cN:"date",b:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}}();hljs.LANGUAGES.python=function(){var a=[{cN:"string",b:"(u|b)?r?'''",e:"'''",r:10},{cN:"string",b:'(u|b)?r?"""',e:'"""',r:10},{cN:"string",b:"(u|r|ur)'",e:"'",c:[hljs.BE],r:10},{cN:"string",b:'(u|r|ur)"',e:'"',c:[hljs.BE],r:10},{cN:"string",b:"(b|br)'",e:"'",c:[hljs.BE]},{cN:"string",b:'(b|br)"',e:'"',c:[hljs.BE]}].concat([hljs.ASM,hljs.QSM]);var b={cN:"title",b:hljs.UIR};var c={cN:"params",b:"\\(",e:"\\)",c:a.concat([hljs.CNM])};return{dM:{k:{keyword:{and:1,elif:1,is:1,global:1,as:1,"in":1,"if":1,from:1,raise:1,"for":1,except:1,"finally":1,print:1,"import":1,pass:1,"return":1,exec:1,"else":1,"break":1,not:1,"with":1,"class":1,assert:1,yield:1,"try":1,"while":1,"continue":1,del:1,or:1,def:1,lambda:1,nonlocal:10},built_in:{None:1,True:1,False:1,Ellipsis:1,NotImplemented:1}},i:"(|\\?)",c:a.concat([hljs.HCM,{cN:"function",b:"\\bdef ",e:":",i:"$",k:{def:1},c:[b,c],r:10},{cN:"class",b:"\\bclass ",e:":",i:"[${]",k:{"class":1},c:[b,c],r:10},hljs.CNM,{cN:"decorator",b:"@",e:"$"}])}}}();hljs.LANGUAGES.smalltalk=function(){var b="[a-z][a-zA-Z0-9_]*";var c={cN:"char",b:"\\$.{1}"};var a={cN:"symbol",b:"#"+hljs.UIR};return{dM:{k:{self:1,"super":1,nil:1,"true":1,"false":1,thisContext:1},c:[{cN:"comment",b:'"',e:'"',r:0},hljs.ASM,{cN:"class",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},{cN:"method",b:b+":"},hljs.CNM,a,c,{cN:"localvars",b:"\\|\\s*(("+b+")\\s*)+\\|"},{cN:"array",b:"\\#\\(",e:"\\)",c:[hljs.ASM,c,hljs.CNM,a]}]}}}();hljs.LANGUAGES.tex=function(){var c={cN:"command",b:"\\\\[a-zA-Zа-яА-я]+[\\*]?",r:10};var b={cN:"command",b:"\\\\[^a-zA-Zа-яА-я0-9]",r:0};var a={cN:"special",b:"[{}\\[\\]\\&#~]",r:0};return{dM:{c:[{b:"\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",rB:true,c:[c,b,{cN:"number",b:" *=",e:"-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",eB:true}],r:10},c,b,a,{cN:"formula",b:"\\$\\$",e:"\\$\\$",c:[c,b,a],r:0},{cN:"formula",b:"\\$",e:"\\$",c:[c,b,a],r:0},{cN:"comment",b:"%",e:"$",r:0}]}}}();hljs.LANGUAGES.actionscript=function(){var c="[a-zA-Z_$][a-zA-Z0-9_$]*";var a="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)";var d={cN:"rest_arg",b:"[.]{3}",e:c,r:10};var b={cN:"title",b:c};return{dM:{k:{keyword:{as:1,"break":1,"case":1,"catch":1,"class":1,"const":1,"continue":1,"default":1,"delete":1,"do":1,dynamic:5,each:1,"else":1,"extends":1,"final":1,"finally":1,"for":1,"function":1,get:1,"if":1,"implements":1,"import":1,"in":1,include:1,"instanceof":1,"interface":1,internal:1,is:1,namespace:1,"native":1,"new":1,override:1,"package":1,"private":1,"protected":1,"public":1,"return":1,set:1,"static":1,"super":5,"switch":1,"this":1,"throw":1,"try":1,"typeof":1,use:1,"var":1,"void":1,"while":1,"with":1},literal:{"true":1,"false":1,"null":1,"undefined":1},reserved:{"abstract":0,"boolean":0,"byte":0,cast:0,"char":0,"debugger":0,"double":0,"enum":0,"export":0,"float":0,"goto":0,intrinsic:0,"long":0,prototype:0,"short":0,"synchronized":0,"throws":0,to:0,"transient":0,type:0,virtual:0,"volatile":0}},c:[hljs.ASM,hljs.QSM,hljs.CLCM,hljs.CBLCLM,hljs.CNM,{cN:"package",b:"package ?",e:"{",k:{"package":1},c:[b]},{cN:"class",b:"(class|interface) ",e:"{",k:{"class":1,"interface":1},c:[{b:"(implements|extends)",k:{"extends":1,"implements":1},r:5},b]},{cN:"preprocessor",b:"(import|include)\\b",e:";",k:{"import":1,include:1}},{cN:"function",b:"function ",e:"[{;]",k:{"function":1},c:[b,{cN:"params",b:"\\(",e:"\\)",c:[hljs.ASM,hljs.QSM,hljs.CLCM,hljs.CBLCLM,d]},{cN:"type",b:":",e:a,r:10}]}]}}}();hljs.LANGUAGES.sql={cI:true,dM:{i:"[^\\s]",c:[{cN:"operator",b:"(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b",e:";|$",k:{keyword:{all:1,partial:1,global:1,month:1,current_timestamp:1,using:1,go:1,revoke:1,smallint:1,indicator:1,"end-exec":1,disconnect:1,zone:1,"with":1,character:1,assertion:1,to:1,add:1,current_user:1,usage:1,input:1,local:1,alter:1,match:1,collate:1,real:1,then:1,rollback:1,get:1,read:1,timestamp:1,session_user:1,not:1,integer:1,bit:1,unique:1,day:1,minute:1,desc:1,insert:1,execute:1,like:1,ilike:2,level:1,decimal:1,drop:1,"continue":1,isolation:1,found:1,where:1,constraints:1,domain:1,right:1,national:1,some:1,module:1,transaction:1,relative:1,second:1,connect:1,escape:1,close:1,system_user:1,"for":1,deferred:1,section:1,cast:1,current:1,sqlstate:1,allocate:1,intersect:1,deallocate:1,numeric:1,"public":1,preserve:1,full:1,"goto":1,initially:1,asc:1,no:1,key:1,output:1,collation:1,group:1,by:1,union:1,session:1,both:1,last:1,language:1,constraint:1,column:1,of:1,space:1,foreign:1,deferrable:1,prior:1,connection:1,unknown:1,action:1,commit:1,view:1,or:1,first:1,into:1,"float":1,year:1,primary:1,cascaded:1,except:1,restrict:1,set:1,references:1,names:1,table:1,outer:1,open:1,select:1,size:1,are:1,rows:1,from:1,prepare:1,distinct:1,leading:1,create:1,only:1,next:1,inner:1,authorization:1,schema:1,corresponding:1,option:1,declare:1,precision:1,immediate:1,"else":1,timezone_minute:1,external:1,varying:1,translation:1,"true":1,"case":1,exception:1,join:1,hour:1,"default":1,"double":1,scroll:1,value:1,cursor:1,descriptor:1,values:1,dec:1,fetch:1,procedure:1,"delete":1,and:1,"false":1,"int":1,is:1,describe:1,"char":1,as:1,at:1,"in":1,varchar:1,"null":1,trailing:1,any:1,absolute:1,current_time:1,end:1,grant:1,privileges:1,when:1,cross:1,check:1,write:1,current_date:1,pad:1,begin:1,temporary:1,exec:1,time:1,update:1,catalog:1,user:1,sql:1,date:1,on:1,identity:1,timezone_hour:1,natural:1,whenever:1,interval:1,work:1,order:1,cascade:1,diagnostics:1,nchar:1,having:1,left:1,call:1,"do":1,handler:1,load:1,replace:1,truncate:1,start:1,lock:1,show:1,pragma:1},aggregate:{count:1,sum:1,min:1,max:1,avg:1}},c:[{cN:"string",b:"'",e:"'",c:[hljs.BE,{b:"''"}],r:0},{cN:"string",b:'"',e:'"',c:[hljs.BE,{b:'""'}],r:0},{cN:"string",b:"`",e:"`",c:[hljs.BE]},hljs.CNM,{b:"\\n"}]},hljs.CBLCLM,{cN:"comment",b:"--",e:"$"}]}};hljs.LANGUAGES.vala={dM:{k:{keyword:{"char":1,uchar:1,unichar:1,"int":1,uint:1,"long":1,ulong:1,"short":1,ushort:1,int8:1,int16:1,int32:1,int64:1,uint8:1,uint16:1,uint32:1,uint64:1,"float":1,"double":1,bool:1,struct:1,"enum":1,string:1,"void":1,weak:5,unowned:5,owned:5,async:5,signal:5,"static":1,"abstract":1,"interface":1,override:1,"while":1,"do":1,"for":1,foreach:1,"else":1,"switch":1,"case":1,"break":1,"default":1,"return":1,"try":1,"catch":1,"public":1,"private":1,"protected":1,internal:1,using:1,"new":1,"this":1,get:1,set:1,"const":1,stdout:1,stdin:1,stderr:1,"var":1,DBus:2,GLib:2,CCode:10,Gee:10,Object:1},literal:{"false":1,"true":1,"null":1}},c:[{cN:"class",b:"(class |interface |delegate |namespace )",e:"{",k:{"class":1,"interface":1},c:[{b:"(implements|extends)",k:{"extends":1,"implements":1}},{cN:"title",b:hljs.UIR}]},hljs.CLCM,hljs.CBLCLM,{cN:"string",b:'"""',e:'"""',r:5},hljs.ASM,hljs.QSM,hljs.CNM,{cN:"preprocessor",b:"^#",e:"$",r:2},{cN:"constant",b:" [A-Z_]+ ",r:0}]}};hljs.LANGUAGES.ini={cI:true,dM:{i:"[^\\s]",c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9_\\[\\]]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:{on:1,off:1,"true":1,"false":1,yes:1,no:1},c:[hljs.QSM,hljs.NM]}]}]}};hljs.LANGUAGES.axapta={dM:{k:{"false":1,"int":1,"abstract":1,"private":1,"char":1,"interface":1,"boolean":1,"static":1,"null":1,"if":1,"for":1,"true":1,"while":1,"long":1,"throw":1,"finally":1,"protected":1,"extends":1,"final":1,"implements":1,"return":1,"void":1,"enum":1,"else":1,"break":1,"new":1,"catch":1,"byte":1,"super":1,"class":1,"case":1,"short":1,"default":1,"double":1,"public":1,"try":1,"this":1,"switch":1,"continue":1,reverse:1,firstfast:1,firstonly:1,forupdate:1,nofetch:1,sum:1,avg:1,minof:1,maxof:1,count:1,order:1,group:1,by:1,asc:1,desc:1,index:1,hint:1,like:1,dispaly:1,edit:1,client:1,server:1,ttsbegin:1,ttscommit:1,str:1,real:1,date:1,container:1,anytype:1,common:1,div:1,mod:1},c:[hljs.CLCM,hljs.CBLCLM,hljs.ASM,hljs.QSM,hljs.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"class",b:"(class |interface )",e:"{",i:":",k:{"class":1,"interface":1},c:[{cN:"inheritance",b:"(implements|extends)",k:{"extends":1,"implements":1},r:10},{cN:"title",b:hljs.UIR}]}]}};hljs.LANGUAGES.perl=function(){var c={getpwent:1,getservent:1,quotemeta:1,msgrcv:1,scalar:1,kill:1,dbmclose:1,undef:1,lc:1,ma:1,syswrite:1,tr:1,send:1,umask:1,sysopen:1,shmwrite:1,vec:1,qx:1,utime:1,local:1,oct:1,semctl:1,localtime:1,readpipe:1,"do":1,"return":1,format:1,read:1,sprintf:1,dbmopen:1,pop:1,getpgrp:1,not:1,getpwnam:1,rewinddir:1,qq:1,fileno:1,qw:1,endprotoent:1,wait:1,sethostent:1,bless:1,s:1,opendir:1,"continue":1,each:1,sleep:1,endgrent:1,shutdown:1,dump:1,chomp:1,connect:1,getsockname:1,die:1,socketpair:1,close:1,flock:1,exists:1,index:1,shmget:1,sub:1,"for":1,endpwent:1,redo:1,lstat:1,msgctl:1,setpgrp:1,abs:1,exit:1,select:1,print:1,ref:1,gethostbyaddr:1,unshift:1,fcntl:1,syscall:1,"goto":1,getnetbyaddr:1,join:1,gmtime:1,symlink:1,semget:1,splice:1,x:1,getpeername:1,recv:1,log:1,setsockopt:1,cos:1,last:1,reverse:1,gethostbyname:1,getgrnam:1,study:1,formline:1,endhostent:1,times:1,chop:1,length:1,gethostent:1,getnetent:1,pack:1,getprotoent:1,getservbyname:1,rand:1,mkdir:1,pos:1,chmod:1,y:1,substr:1,endnetent:1,printf:1,next:1,open:1,msgsnd:1,readdir:1,use:1,unlink:1,getsockopt:1,getpriority:1,rindex:1,wantarray:1,hex:1,system:1,getservbyport:1,endservent:1,"int":1,chr:1,untie:1,rmdir:1,prototype:1,tell:1,listen:1,fork:1,shmread:1,ucfirst:1,setprotoent:1,"else":1,sysseek:1,link:1,getgrgid:1,shmctl:1,waitpid:1,unpack:1,getnetbyname:1,reset:1,chdir:1,grep:1,split:1,require:1,caller:1,lcfirst:1,until:1,warn:1,"while":1,values:1,shift:1,telldir:1,getpwuid:1,my:1,getprotobynumber:1,"delete":1,and:1,sort:1,uc:1,defined:1,srand:1,accept:1,"package":1,seekdir:1,getprotobyname:1,semop:1,our:1,rename:1,seek:1,"if":1,q:1,chroot:1,sysread:1,setpwent:1,no:1,crypt:1,getc:1,chown:1,sqrt:1,write:1,setnetent:1,setpriority:1,foreach:1,tie:1,sin:1,msgget:1,map:1,stat:1,getlogin:1,unless:1,elsif:1,truncate:1,exec:1,keys:1,glob:1,tied:1,closedir:1,ioctl:1,socket:1,readlink:1,"eval":1,xor:1,readline:1,binmode:1,setservent:1,eof:1,ord:1,bind:1,alarm:1,pipe:1,atan2:1,getgrent:1,exp:1,time:1,push:1,setgrent:1,gt:1,lt:1,or:1,ne:1,m:1};var e={cN:"subst",b:"[$@]\\{",e:"\\}",k:c,r:10};var b={cN:"variable",b:"\\$\\d"};var a={cN:"variable",b:"[\\$\\%\\@\\*](\\^\\w\\b|#\\w+(\\:\\:\\w+)*|[^\\s\\w{]|{\\w+}|\\w+(\\:\\:\\w*)*)"};var h=[hljs.BE,e,b,a];var g={b:"->",c:[{b:hljs.IR},{b:"{",e:"}"}]};var d={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var f=[b,a,hljs.HCM,d,g,{cN:"string",b:"q[qwxr]?\\s*\\(",e:"\\)",c:h,r:5},{cN:"string",b:"q[qwxr]?\\s*\\[",e:"\\]",c:h,r:5},{cN:"string",b:"q[qwxr]?\\s*\\{",e:"\\}",c:h,r:5},{cN:"string",b:"q[qwxr]?\\s*\\|",e:"\\|",c:h,r:5},{cN:"string",b:"q[qwxr]?\\s*\\<",e:"\\>",c:h,r:5},{cN:"string",b:"qw\\s+q",e:"q",c:h,r:5},{cN:"string",b:"'",e:"'",c:[hljs.BE],r:0},{cN:"string",b:'"',e:'"',c:h,r:0},{cN:"string",b:"`",e:"`",c:[hljs.BE]},{cN:"string",b:"{\\w+}",r:0},{cN:"string",b:"-?\\w+\\s*\\=\\>",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"("+hljs.RSR+"|split|return|print|reverse|grep)\\s*",k:{split:1,"return":1,print:1,reverse:1,grep:1},r:0,c:[hljs.HCM,d,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[hljs.BE],r:0}]},{cN:"sub",b:"\\bsub\\b",e:"(\\s*\\(.*?\\))?[;{]",k:{sub:1},r:5},{cN:"operator",b:"-\\w\\b",r:0},{cN:"pod",b:"\\=\\w",e:"\\=cut"}];e.c=f;g.c[1].c=f;return{dM:{k:c,c:f}}}();hljs.LANGUAGES.scala=function(){var a={cN:"annotation",b:"@[A-Za-z]+"};var b={cN:"string",b:'u?r?"""',e:'"""',r:10};return{dM:{k:{type:1,yield:1,lazy:1,override:1,def:1,"with":1,val:1,"var":1,"false":1,"true":1,sealed:1,"abstract":1,"private":1,trait:1,object:1,"null":1,"if":1,"for":1,"while":1,"throw":1,"finally":1,"protected":1,"extends":1,"import":1,"final":1,"return":1,"else":1,"break":1,"new":1,"catch":1,"super":1,"class":1,"case":1,"package":1,"default":1,"try":1,"this":1,match:1,"continue":1,"throws":1},c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"@[A-Za-z]+"}],r:10},hljs.CLCM,hljs.CBLCLM,hljs.ASM,hljs.QSM,b,{cN:"class",b:"((case )?class |object |trait )",e:"({|$)",i:":",k:{"case":1,"class":1,trait:1,object:1},c:[{b:"(extends|with)",k:{"extends":1,"with":1},r:10},{cN:"title",b:hljs.UIR},{cN:"params",b:"\\(",e:"\\)",c:[hljs.ASM,hljs.QSM,b,a]}]},hljs.CNM,a]}}}();hljs.LANGUAGES.cmake={cI:true,dM:{k:{add_custom_command:2,add_custom_target:2,add_definitions:2,add_dependencies:2,add_executable:2,add_library:2,add_subdirectory:2,add_test:2,aux_source_directory:2,"break":1,build_command:2,cmake_minimum_required:3,cmake_policy:3,configure_file:1,create_test_sourcelist:1,define_property:1,"else":1,elseif:1,enable_language:2,enable_testing:2,endforeach:1,endfunction:1,endif:1,endmacro:1,endwhile:1,execute_process:2,"export":1,find_file:1,find_library:2,find_package:2,find_path:1,find_program:1,fltk_wrap_ui:2,foreach:1,"function":1,get_cmake_property:3,get_directory_property:1,get_filename_component:1,get_property:1,get_source_file_property:1,get_target_property:1,get_test_property:1,"if":1,include:1,include_directories:2,include_external_msproject:1,include_regular_expression:2,install:1,link_directories:1,load_cache:1,load_command:1,macro:1,mark_as_advanced:1,message:1,option:1,output_required_files:1,project:1,qt_wrap_cpp:2,qt_wrap_ui:2,remove_definitions:2,"return":1,separate_arguments:1,set:1,set_directory_properties:1,set_property:1,set_source_files_properties:1,set_target_properties:1,set_tests_properties:1,site_name:1,source_group:1,string:1,target_link_libraries:2,try_compile:2,try_run:2,unset:1,variable_watch:2,"while":1,build_name:1,exec_program:1,export_library_dependencies:1,install_files:1,install_programs:1,install_targets:1,link_libraries:1,make_directory:1,remove:1,subdir_depends:1,subdirs:1,use_mangled_mesa:1,utility_source:1,variable_requires:1,write_file:1},c:[{cN:"envvar",b:"\\${",e:"}"},hljs.HCM,hljs.QSM,hljs.NM]}};hljs.LANGUAGES.objectivec=function(){var a={keyword:{"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"export":1,sizeof:2,typedef:2,"const":1,struct:1,"for":1,union:1,unsigned:1,"long":1,"volatile":2,"static":1,"protected":1,bool:1,mutable:1,"if":1,"public":1,"do":1,"return":1,"goto":1,"void":2,"enum":1,"else":1,"break":1,extern:1,"true":1,"class":1,asm:1,"case":1,"short":1,"default":1,"double":1,"throw":1,register:1,explicit:1,signed:1,typename:1,"try":1,"this":1,"switch":1,"continue":1,wchar_t:1,inline:1,readonly:1,assign:1,property:1,protocol:10,self:1,"synchronized":1,end:1,synthesize:50,id:1,optional:1,required:1,implementation:10,nonatomic:1,"interface":1,"super":1,unichar:1,"finally":2,dynamic:2,nil:1},built_in:{YES:5,NO:5,NULL:1,IBOutlet:50,IBAction:50,NSString:50,NSDictionary:50,CGRect:50,CGPoint:50,NSRange:50,release:1,retain:1,autorelease:50,UIButton:50,UILabel:50,UITextView:50,UIWebView:50,MKMapView:50,UISegmentedControl:50,NSObject:50,UITableViewDelegate:50,UITableViewDataSource:50,NSThread:50,UIActivityIndicator:50,UITabbar:50,UIToolBar:50,UIBarButtonItem:50,UIImageView:50,NSAutoreleasePool:50,UITableView:50,BOOL:1,NSInteger:20,CGFloat:20,NSException:50,NSLog:50,NSMutableString:50,NSMutableArray:50,NSMutableDictionary:50,NSURL:50}};return{dM:{k:a,i:""}]},{cN:"preprocessor",b:"#",e:"$"},{cN:"class",b:"interface|class|protocol|implementation",e:"({|$)",k:{"interface":1,"class":1,protocol:5,implementation:5},c:[{cN:"id",b:hljs.UIR}]}]}}}();hljs.LANGUAGES.avrasm={cI:true,dM:{k:{keyword:{adc:1,add:1,adiw:1,and:1,andi:1,asr:1,bclr:1,bld:1,brbc:1,brbs:1,brcc:1,brcs:1,"break":1,breq:1,brge:1,brhc:1,brhs:1,brid:1,brie:1,brlo:1,brlt:1,brmi:1,brne:1,brpl:1,brsh:1,brtc:1,brts:1,brvc:1,brvs:1,bset:1,bst:1,call:1,cbi:1,cbr:1,clc:1,clh:1,cli:1,cln:1,clr:1,cls:1,clt:1,clv:1,clz:1,com:1,cp:1,cpc:1,cpi:1,cpse:1,dec:1,eicall:1,eijmp:1,elpm:1,eor:1,fmul:1,fmuls:1,fmulsu:1,icall:1,ijmp:1,"in":1,inc:1,jmp:1,ld:1,ldd:1,ldi:1,lds:1,lpm:1,lsl:1,lsr:1,mov:1,movw:1,mul:1,muls:1,mulsu:1,neg:1,nop:1,or:1,ori:1,out:1,pop:1,push:1,rcall:1,ret:1,reti:1,rjmp:1,rol:1,ror:1,sbc:1,sbr:1,sbrc:1,sbrs:1,sec:1,seh:1,sbi:1,sbci:1,sbic:1,sbis:1,sbiw:1,sei:1,sen:1,ser:1,ses:1,set:1,sev:1,sez:1,sleep:1,spm:1,st:1,std:1,sts:1,sub:1,subi:1,swap:1,tst:1,wdr:1},built_in:{r0:1,r1:1,r2:1,r3:1,r4:1,r5:1,r6:1,r7:1,r8:1,r9:1,r10:1,r11:1,r12:1,r13:1,r14:1,r15:1,r16:1,r17:1,r18:1,r19:1,r20:1,r21:1,r22:1,r23:1,r24:1,r25:1,r26:1,r27:1,r28:1,r29:1,r30:1,r31:1,x:1,xh:1,xl:1,y:1,yh:1,yl:1,z:1,zh:1,zl:1,ucsr1c:1,udr1:1,ucsr1a:1,ucsr1b:1,ubrr1l:1,ubrr1h:1,ucsr0c:1,ubrr0h:1,tccr3c:1,tccr3a:1,tccr3b:1,tcnt3h:1,tcnt3l:1,ocr3ah:1,ocr3al:1,ocr3bh:1,ocr3bl:1,ocr3ch:1,ocr3cl:1,icr3h:1,icr3l:1,etimsk:1,etifr:1,tccr1c:1,ocr1ch:1,ocr1cl:1,twcr:1,twdr:1,twar:1,twsr:1,twbr:1,osccal:1,xmcra:1,xmcrb:1,eicra:1,spmcsr:1,spmcr:1,portg:1,ddrg:1,ping:1,portf:1,ddrf:1,sreg:1,sph:1,spl:1,xdiv:1,rampz:1,eicrb:1,eimsk:1,gimsk:1,gicr:1,eifr:1,gifr:1,timsk:1,tifr:1,mcucr:1,mcucsr:1,tccr0:1,tcnt0:1,ocr0:1,assr:1,tccr1a:1,tccr1b:1,tcnt1h:1,tcnt1l:1,ocr1ah:1,ocr1al:1,ocr1bh:1,ocr1bl:1,icr1h:1,icr1l:1,tccr2:1,tcnt2:1,ocr2:1,ocdr:1,wdtcr:1,sfior:1,eearh:1,eearl:1,eedr:1,eecr:1,porta:1,ddra:1,pina:1,portb:1,ddrb:1,pinb:1,portc:1,ddrc:1,pinc:1,portd:1,ddrd:1,pind:1,spdr:1,spsr:1,spcr:1,udr0:1,ucsr0a:1,ucsr0b:1,ubrr0l:1,acsr:1,admux:1,adcsr:1,adch:1,adcl:1,porte:1,ddre:1,pine:1,pinf:1}},c:[hljs.CBLCLM,{cN:"comment",b:";",e:"$"},hljs.CNM,hljs.BINARY_NUMBER_MODE,{cN:"number",b:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},hljs.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"label",b:"^[A-Za-z0-9_.$]+:"},{cN:"preprocessor",b:"#",e:"$"},{cN:"preprocessor",b:"\\.[a-zA-Z]+"},{cN:"localvars",b:"@[0-9]+"}]}};hljs.LANGUAGES.vhdl={cI:true,dM:{k:{keyword:{abs:1,access:1,after:1,alias:1,all:1,and:1,architecture:2,array:1,assert:1,attribute:1,begin:1,block:1,body:1,buffer:1,bus:1,"case":1,component:2,configuration:1,constant:1,disconnect:2,downto:2,"else":1,elsif:1,end:1,entity:2,exit:1,file:1,"for":1,"function":1,generate:2,generic:2,group:1,guarded:2,"if":0,impure:2,"in":1,inertial:1,inout:1,is:1,label:1,library:1,linkage:1,literal:1,loop:1,map:1,mod:1,nand:1,"new":1,next:1,nor:1,not:1,"null":1,of:1,on:1,open:1,or:1,others:1,out:1,"package":1,port:2,postponed:1,procedure:1,process:1,pure:2,range:1,record:1,register:1,reject:1,"return":1,rol:1,ror:1,select:1,severity:1,signal:1,shared:1,sla:1,sli:1,sra:1,srl:1,subtype:2,then:1,to:1,transport:1,type:1,units:1,until:1,use:1,variable:1,wait:1,when:1,"while":1,"with":1,xnor:1,xor:1},type:{"boolean":1,bit:1,character:1,severity_level:2,integer:1,time:1,delay_length:2,natural:1,positive:1,string:1,bit_vector:2,file_open_kind:2,file_open_status:2,std_ulogic:2,std_ulogic_vector:2,std_logic:2,std_logic_vector:2}},i:"{",c:[{cN:"comment",b:"--",e:"$"},hljs.QSM,hljs.CNM,{cN:"literal",b:"'(U|X|0|1|Z|W|L|H|-)",e:"'",c:[hljs.BE]}]}};hljs.LANGUAGES.coffeescript=function(){var d={keyword:{"in":1,"if":1,"for":1,"while":1,"finally":1,"new":1,"do":1,"return":1,"else":1,"break":1,"catch":1,"instanceof":1,"throw":1,"try":1,"this":1,"switch":1,"continue":1,"typeof":1,"delete":1,"debugger":1,"class":1,"extends":1,"super":1,then:1,unless:1,until:1,loop:2,of:2,by:1,when:2,and:1,or:1,is:1,isnt:2,not:1},literal:{"true":1,"false":1,"null":1,"undefined":1,yes:1,no:1,on:1,off:1},reserved:{"case":1,"default":1,"function":1,"var":1,"void":1,"with":1,"const":1,let:1,"enum":1,"export":1,"import":1,"native":1,__hasProp:1,__extends:1,__slice:1,__bind:1,__indexOf:1}};var a="[A-Za-z$_][0-9A-Za-z$_]*";var b={cN:"subst",b:"#\\{",e:"}",k:d,c:[hljs.CNM,hljs.BINARY_NUMBER_MODE]};var c={cN:"string",b:'"',e:'"',r:0,c:[hljs.BE,b]};var h={cN:"string",b:'"""',e:'"""',c:[hljs.BE,b]};var g={cN:"comment",b:"###",e:"###"};var f={cN:"regexp",b:"///",e:"///",c:[hljs.HCM]};var i={cN:"function",b:a+"\\s*=\\s*(\\(.+\\))?\\s*[-=]>",rB:true,c:[{cN:"title",b:a},{cN:"params",b:"\\(",e:"\\)"}]};var e={cN:"javascript",b:"`",e:"`",eB:true,eE:true,sL:"javascript"};return{dM:{k:d,c:[hljs.CNM,hljs.BINARY_NUMBER_MODE,hljs.ASM,h,c,g,hljs.HCM,f,e,i]}}}();hljs.LANGUAGES.nginx=function(){var c={cN:"variable",b:"\\$\\d+"};var b={cN:"variable",b:"\\${",e:"}"};var a={cN:"variable",b:"[\\$\\@]"+hljs.UIR};return{dM:{c:[hljs.HCM,{b:hljs.UIR,e:";|{",rE:true,k:{accept_mutex:1,accept_mutex_delay:1,access_log:1,add_after_body:1,add_before_body:1,add_header:1,addition_types:1,alias:1,allow:1,ancient_browser:1,ancient_browser_value:1,auth_basic:1,auth_basic_user_file:1,autoindex:1,autoindex_exact_size:1,autoindex_localtime:1,"break":1,charset:1,charset_map:1,charset_types:1,client_body_buffer_size:1,client_body_in_file_only:1,client_body_in_single_buffer:1,client_body_temp_path:1,client_body_timeout:1,client_header_buffer_size:1,client_header_timeout:1,client_max_body_size:1,connection_pool_size:1,connections:1,create_full_put_path:1,daemon:1,dav_access:1,dav_methods:1,debug_connection:1,debug_points:1,default_type:1,deny:1,directio:1,directio_alignment:1,echo:1,echo_after_body:1,echo_before_body:1,echo_blocking_sleep:1,echo_duplicate:1,echo_end:1,echo_exec:1,echo_flush:1,echo_foreach_split:1,echo_location:1,echo_location_async:1,echo_read_request_body:1,echo_request_body:1,echo_reset_timer:1,echo_sleep:1,echo_subrequest:1,echo_subrequest_async:1,empty_gif:1,env:1,error_log:1,error_page:1,events:1,expires:1,fastcgi_bind:1,fastcgi_buffer_size:1,fastcgi_buffers:1,fastcgi_busy_buffers_size:1,fastcgi_cache:1,fastcgi_cache_key:1,fastcgi_cache_methods:1,fastcgi_cache_min_uses:1,fastcgi_cache_path:1,fastcgi_cache_use_stale:1,fastcgi_cache_valid:1,fastcgi_catch_stderr:1,fastcgi_connect_timeout:1,fastcgi_hide_header:1,fastcgi_ignore_client_abort:1,fastcgi_ignore_headers:1,fastcgi_index:1,fastcgi_intercept_errors:1,fastcgi_max_temp_file_size:1,fastcgi_next_upstream:1,fastcgi_param:1,fastcgi_pass:1,fastcgi_pass_header:1,fastcgi_pass_request_body:1,fastcgi_pass_request_headers:1,fastcgi_read_timeout:1,fastcgi_send_lowat:1,fastcgi_send_timeout:1,fastcgi_split_path_info:1,fastcgi_store:1,fastcgi_store_access:1,fastcgi_temp_file_write_size:1,fastcgi_temp_path:1,fastcgi_upstream_fail_timeout:1,fastcgi_upstream_max_fails:1,flv:1,geo:1,geoip_city:1,geoip_country:1,gzip:1,gzip_buffers:1,gzip_comp_level:1,gzip_disable:1,gzip_hash:1,gzip_http_version:1,gzip_min_length:1,gzip_no_buffer:1,gzip_proxied:1,gzip_static:1,gzip_types:1,gzip_vary:1,gzip_window:1,http:1,"if":1,if_modified_since:1,ignore_invalid_headers:1,image_filter:1,image_filter_buffer:1,image_filter_jpeg_quality:1,image_filter_transparency:1,include:1,index:1,internal:1,ip_hash:1,js:1,js_load:1,js_require:1,js_utf8:1,keepalive_requests:1,keepalive_timeout:1,kqueue_changes:1,kqueue_events:1,large_client_header_buffers:1,limit_conn:1,limit_conn_log_level:1,limit_except:1,limit_rate:1,limit_rate_after:1,limit_req:1,limit_req_log_level:1,limit_req_zone:1,limit_zone:1,lingering_time:1,lingering_timeout:1,listen:1,location:1,lock_file:1,log_format:1,log_not_found:1,log_subrequest:1,map:1,map_hash_bucket_size:1,map_hash_max_size:1,master_process:1,memcached_bind:1,memcached_buffer_size:1,memcached_connect_timeout:1,memcached_next_upstream:1,memcached_pass:1,memcached_read_timeout:1,memcached_send_timeout:1,memcached_upstream_fail_timeout:1,memcached_upstream_max_fails:1,merge_slashes:1,min_delete_depth:1,modern_browser:1,modern_browser_value:1,more_clear_headers:1,more_clear_input_headers:1,more_set_headers:1,more_set_input_headers:1,msie_padding:1,msie_refresh:1,multi_accept:1,open_file_cache:1,open_file_cache_errors:1,open_file_cache_events:1,open_file_cache_min_uses:1,open_file_cache_retest:1,open_file_cache_valid:1,open_log_file_cache:1,optimize_server_names:1,output_buffers:1,override_charset:1,perl:1,perl_modules:1,perl_require:1,perl_set:1,pid:1,port_in_redirect:1,post_action:1,postpone_gzipping:1,postpone_output:1,proxy_bind:1,proxy_buffer_size:1,proxy_buffering:1,proxy_buffers:1,proxy_busy_buffers_size:1,proxy_cache:1,proxy_cache_key:1,proxy_cache_methods:1,proxy_cache_min_uses:1,proxy_cache_path:1,proxy_cache_use_stale:1,proxy_cache_valid:1,proxy_connect_timeout:1,proxy_headers_hash_bucket_size:1,proxy_headers_hash_max_size:1,proxy_hide_header:1,proxy_ignore_client_abort:1,proxy_ignore_headers:1,proxy_intercept_errors:1,proxy_max_temp_file_size:1,proxy_method:1,proxy_next_upstream:1,proxy_pass:1,proxy_pass_header:1,proxy_pass_request_body:1,proxy_pass_request_headers:1,proxy_read_timeout:1,proxy_redirect:1,proxy_send_lowat:1,proxy_send_timeout:1,proxy_set_body:1,proxy_set_header:1,proxy_store:1,proxy_store_access:1,proxy_temp_file_write_size:1,proxy_temp_path:1,proxy_upstream_fail_timeout:1,proxy_upstream_max_fails:1,push_authorized_channels_only:1,push_channel_group:1,push_max_channel_id_length:1,push_max_channel_subscribers:1,push_max_message_buffer_length:1,push_max_reserved_memory:1,push_message_buffer_length:1,push_message_timeout:1,push_min_message_buffer_length:1,push_min_message_recipients:1,push_publisher:1,push_store_messages:1,push_subscriber:1,push_subscriber_concurrency:1,random_index:1,read_ahead:1,real_ip_header:1,recursive_error_pages:1,request_pool_size:1,reset_timedout_connection:1,resolver:1,resolver_timeout:1,"return":1,rewrite:1,rewrite_log:1,root:1,satisfy:1,satisfy_any:1,send_lowat:1,send_timeout:1,sendfile:1,sendfile_max_chunk:1,server:1,server_name:1,server_name_in_redirect:1,server_names_hash_bucket_size:1,server_names_hash_max_size:1,server_tokens:1,set:1,set_real_ip_from:1,source_charset:1,ssi:1,ssi_ignore_recycled_buffers:1,ssi_min_file_chunk:1,ssi_silent_errors:1,ssi_types:1,ssi_value_length:1,ssl:1,ssl_certificate:1,ssl_certificate_key:1,ssl_ciphers:1,ssl_client_certificate:1,ssl_crl:1,ssl_dhparam:1,ssl_prefer_server_ciphers:1,ssl_protocols:1,ssl_session_cache:1,ssl_session_timeout:1,ssl_verify_client:1,ssl_verify_depth:1,sub_filter:1,sub_filter_once:1,sub_filter_types:1,tcp_nodelay:1,tcp_nopush:1,timer_resolution:1,try_files:1,types:1,types_hash_bucket_size:1,types_hash_max_size:1,underscores_in_headers:1,uninitialized_variable_warn:1,upstream:1,use:1,user:1,userid:1,userid_domain:1,userid_expires:1,userid_mark:1,userid_name:1,userid_p3p:1,userid_path:1,userid_service:1,valid_referers:1,variables_hash_bucket_size:1,variables_hash_max_size:1,worker_connections:1,worker_cpu_affinity:1,worker_priority:1,worker_processes:1,worker_rlimit_core:1,worker_rlimit_nofile:1,worker_rlimit_sigpending:1,working_directory:1,xml_entities:1,xslt_stylesheet:1,xslt_types:1},r:0,c:[hljs.HCM,{b:"\\s",e:"[;{]",rB:true,rE:true,l:"[a-z/]+",k:{built_in:{on:1,off:1,yes:1,no:1,"true":1,"false":1,none:1,blocked:1,debug:1,info:1,notice:1,warn:1,error:1,crit:1,select:1,permanent:1,redirect:1,kqueue:1,rtsig:1,epoll:1,poll:1,"/dev/poll":1}},r:0,c:[hljs.HCM,{cN:"string",b:'"',e:'"',c:[hljs.BE,c,b,a],r:0},{cN:"string",b:"'",e:"'",c:[hljs.BE,c,b,a],r:0},{cN:"string",b:"([a-z]+):/",e:"[;\\s]",rE:true},{cN:"regexp",b:"\\s\\^",e:"\\s|{|;",rE:true,c:[hljs.BE,c,b,a]},{cN:"regexp",b:"~\\*?\\s+",e:"\\s|{|;",rE:true,c:[hljs.BE,c,b,a]},{cN:"regexp",b:"\\*(\\.[a-z\\-]+)+",c:[hljs.BE,c,b,a]},{cN:"regexp",b:"([a-z\\-]+\\.)+\\*",c:[hljs.BE,c,b,a]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b"},{cN:"number",b:"\\s\\d+[kKmMgGdshdwy]*\\b",r:0},c,b,a]}]}]}}}();hljs.LANGUAGES.erlang_repl={dM:{k:{special_functions:{spawn:10,spawn_link:10,self:2},reserved:{after:1,and:1,andalso:5,band:1,begin:1,bnot:1,bor:1,bsl:1,bsr:1,bxor:1,"case":1,"catch":0,cond:1,div:1,end:1,fun:0,"if":0,let:1,not:0,of:1,or:1,orelse:5,query:1,receive:0,rem:1,"try":0,when:1,xor:1}},c:[{cN:"input_number",b:"^[0-9]+> ",r:10},{cN:"comment",b:"%",e:"$"},{cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},hljs.ASM,hljs.QSM,{cN:"constant",b:"\\?(::)?([A-Z]\\w*(::)?)+"},{cN:"arrow",b:"->"},{cN:"ok",b:"ok"},{cN:"exclamation_mark",b:"!"},{cN:"function_or_atom",b:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",r:0},{cN:"variable",b:"[A-Z][a-zA-Z0-9_']*",r:0}]}};hljs.LANGUAGES.django=function(){function c(f,e){return(e==undefined||(!f.cN&&e.cN=="tag")||f.cN=="value")}function d(j,e){var h={};for(var g in j){if(g!="contains"){h[g]=j[g]}var k=[];for(var f=0;j.c&&f"},hljs.QSM]}}}();hljs.LANGUAGES.cpp=function(){var a={keyword:{"false":1,"int":1,"float":1,"while":1,"private":1,"char":1,"catch":1,"export":1,virtual:1,operator:2,sizeof:2,dynamic_cast:2,typedef:2,const_cast:2,"const":1,struct:1,"for":1,static_cast:2,union:1,namespace:1,unsigned:1,"long":1,"throw":1,"volatile":2,"static":1,"protected":1,bool:1,template:1,mutable:1,"if":1,"public":1,friend:2,"do":1,"return":1,"goto":1,auto:1,"void":2,"enum":1,"else":1,"break":1,"new":1,extern:1,using:1,"true":1,"class":1,asm:1,"case":1,typeid:1,"short":1,reinterpret_cast:2,"default":1,"double":1,register:1,explicit:1,signed:1,typename:1,"try":1,"this":1,"switch":1,"continue":1,wchar_t:1,inline:1,"delete":1,alignof:1,char16_t:1,char32_t:1,constexpr:1,decltype:1,noexcept:1,nullptr:1,static_assert:1,thread_local:1,restrict:1,_Bool:1,complex:1},built_in:{std:1,string:1,cin:1,cout:1,cerr:1,clog:1,stringstream:1,istringstream:1,ostringstream:1,auto_ptr:1,deque:1,list:1,queue:1,stack:1,vector:1,map:1,set:1,bitset:1,multiset:1,multimap:1,unordered_set:1,unordered_map:1,unordered_multiset:1,unordered_multimap:1,array:1,shared_ptr:1}};return{dM:{k:a,i:"",k:a,r:10,c:["self"]}]}}}();hljs.LANGUAGES.matlab={dM:{k:{keyword:{"break":1,"case":1,"catch":1,classdef:1,"continue":1,"else":1,elseif:1,end:1,enumerated:1,events:1,"for":1,"function":1,global:1,"if":1,methods:1,otherwise:1,parfor:1,persistent:1,properties:1,"return":1,spmd:1,"switch":1,"try":1,"while":1},built_in:{sin:1,sind:1,sinh:1,asin:1,asind:1,asinh:1,cos:1,cosd:1,cosh:1,acos:1,acosd:1,acosh:1,tan:1,tand:1,tanh:1,atan:1,atand:1,atan2:1,atanh:1,sec:1,secd:1,sech:1,asec:1,asecd:1,asech:1,csc:1,cscd:1,csch:1,acsc:1,acscd:1,acsch:1,cot:1,cotd:1,coth:1,acot:1,acotd:1,acoth:1,hypot:1,exp:1,expm1:1,log:1,log1p:1,log10:1,log2:1,pow2:1,realpow:1,reallog:1,realsqrt:1,sqrt:1,nthroot:1,nextpow2:1,abs:1,angle:1,complex:1,conj:1,imag:1,real:1,unwrap:1,isreal:1,cplxpair:1,fix:1,floor:1,ceil:1,round:1,mod:1,rem:1,sign:1,airy:1,besselj:1,bessely:1,besselh:1,besseli:1,besselk:1,beta:1,betainc:1,betaln:1,ellipj:1,ellipke:1,erf:1,erfc:1,erfcx:1,erfinv:1,expint:1,gamma:1,gammainc:1,gammaln:1,psi:1,legendre:1,cross:1,dot:1,factor:1,isprime:1,primes:1,gcd:1,lcm:1,rat:1,rats:1,perms:1,nchoosek:1,factorial:1,cart2sph:1,cart2pol:1,pol2cart:1,sph2cart:1,hsv2rgb:1,rgb2hsv:1,zeros:1,ones:1,eye:1,repmat:1,rand:1,randn:1,linspace:1,logspace:1,freqspace:1,meshgrid:1,accumarray:1,size:1,length:1,ndims:1,numel:1,disp:1,isempty:1,isequal:1,isequalwithequalnans:1,cat:1,reshape:1,diag:1,blkdiag:1,tril:1,triu:1,fliplr:1,flipud:1,flipdim:1,rot90:1,find:1,end:1,sub2ind:1,ind2sub:1,bsxfun:1,ndgrid:1,permute:1,ipermute:1,shiftdim:1,circshift:1,squeeze:1,isscalar:1,isvector:1,ans:1,eps:1,realmax:1,realmin:1,pi:1,i:1,inf:1,nan:1,isnan:1,isinf:1,isfinite:1,j:1,why:1,compan:1,gallery:1,hadamard:1,hankel:1,hilb:1,invhilb:1,magic:1,pascal:1,rosser:1,toeplitz:1,vander:1,wilkinson:1},},i:'(//|"|#|/\\*|\\s+/\\w+)',c:[{cN:"function",b:"function",e:"$",k:{"function":1},c:[{cN:"title",b:hljs.UIR},{cN:"params",b:"\\(",e:"\\)"},{cN:"params",b:"\\[",e:"\\]"}]},{cN:"string",b:"'",e:"'",c:[hljs.BE,{b:"''"}]},{cN:"comment",b:"\\%",e:"$"},hljs.CNM]}};hljs.LANGUAGES.parser3={dM:{sL:"html",c:[{cN:"comment",b:"^#",e:"$"},{cN:"comment",b:"\\^rem{",e:"}",r:10,c:[{b:"{",e:"}",c:["self"]}]},{cN:"preprocessor",b:"^@(?:BASE|USE|CLASS|OPTIONS)$",r:10},{cN:"title",b:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{cN:"variable",b:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{cN:"keyword",b:"\\^[\\w\\-\\.\\:]+"},{cN:"number",b:"\\^#[0-9a-fA-F]+"},hljs.CNM]}};hljs.LANGUAGES.go=function(){var a={keyword:{"break":1,"default":1,func:1,"interface":1,select:1,"case":1,map:1,struct:1,chan:1,"else":1,"goto":1,"package":1,"switch":1,"const":1,fallthrough:1,"if":1,range:1,type:1,"continue":1,"for":1,"import":1,"return":1,"var":1,go:1,defer:1},constant:{"true":1,"false":1,iota:1,nil:1},typename:{bool:1,"byte":1,complex64:1,complex128:1,float32:1,float64:1,int8:1,int16:1,int32:1,int64:1,string:1,uint8:1,uint16:1,uint32:1,uint64:1,"int":1,uint:1,uintptr:1,rune:1},built_in:{append:1,cap:1,close:1,complex:1,copy:1,imag:1,len:1,make:1,"new":1,panic:1,print:1,println:1,real:1,recover:1,"delete":1}};return{dM:{k:a,i:" +Contributors: Sergey Baranov +*/ + +hljs.LANGUAGES['1c'] = function(){ + var IDENT_RE_RU = '[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*'; + var OneS_KEYWORDS = { + 'возврат':1,'дата':1,'для':1,'если':1,'и':1,'или':1,'иначе':1,'иначеесли':1,'исключение':1,'конецесли':1, + 'конецпопытки':1,'конецпроцедуры':1,'конецфункции':1,'конеццикла':1,'константа':1,'не':1,'перейти':1,'перем':1, + 'перечисление':1,'по':1,'пока':1,'попытка':1,'прервать':1,'продолжить':1,'процедура':1,'строка':1,'тогда':1, + 'фс':1,'функция':1,'цикл':1,'число':1,'экспорт':1 + }; + var OneS_BUILT_IN = { + 'ansitooem':1,'oemtoansi':1,'ввестивидсубконто':1,'ввестидату':1,'ввестизначение':1,'ввестиперечисление':1, + 'ввестипериод':1,'ввестиплансчетов':1,'ввестистроку':1,'ввестичисло':1,'вопрос':1,'восстановитьзначение':1, + 'врег':1,'выбранныйплансчетов':1,'вызватьисключение':1,'датагод':1,'датамесяц':1,'датачисло':1,'добавитьмесяц':1, + 'завершитьработусистемы':1,'заголовоксистемы':1,'записьжурналарегистрации':1,'запуститьприложение':1, + 'зафиксироватьтранзакцию':1,'значениевстроку':1,'значениевстрокувнутр':1,'значениевфайл':1,'значениеизстроки':1, + 'значениеизстрокивнутр':1,'значениеизфайла':1,'имякомпьютера':1,'имяпользователя':1,'каталогвременныхфайлов':1, + 'каталогиб':1,'каталогпользователя':1,'каталогпрограммы':1,'кодсимв':1,'командасистемы':1,'конгода':1, + 'конецпериодаби':1,'конецрассчитанногопериодаби':1,'конецстандартногоинтервала':1,'конквартала':1,'конмесяца':1, + 'коннедели':1,'лев':1,'лог':1,'лог10':1,'макс':1,'максимальноеколичествосубконто':1,'мин':1,'монопольныйрежим':1, + 'названиеинтерфейса':1,'названиенабораправ':1,'назначитьвид':1,'назначитьсчет':1,'найти':1, + 'найтипомеченныенаудаление':1,'найтиссылки':1,'началопериодаби':1,'началостандартногоинтервала':1, + 'начатьтранзакцию':1,'начгода':1,'начквартала':1,'начмесяца':1,'начнедели':1,'номерднягода':1,'номерднянедели':1, + 'номернеделигода':1,'нрег':1,'обработкаожидания':1,'окр':1,'описаниеошибки':1,'основнойжурналрасчетов':1, + 'основнойплансчетов':1,'основнойязык':1,'открытьформу':1,'открытьформумодально':1,'отменитьтранзакцию':1, + 'очиститьокносообщений':1,'периодстр':1,'полноеимяпользователя':1,'получитьвремята':1,'получитьдатута':1, + 'получитьдокументта':1,'получитьзначенияотбора':1,'получитьпозициюта':1,'получитьпустоезначение':1, + 'получитьта':1,'прав':1,'праводоступа':1,'предупреждение':1,'префиксавтонумерации':1,'пустаястрока':1, + 'пустоезначение':1,'рабочаядаттьпустоезначение':1,'рабочаядата':1,'разделительстраниц':1,'разделительстрок':1, + 'разм':1,'разобратьпозициюдокумента':1,'рассчитатьрегистрына':1,'рассчитатьрегистрыпо':1,'сигнал':1,'симв':1, + 'символтабуляции':1,'создатьобъект':1,'сокрл':1,'сокрлп':1,'сокрп':1,' сообщить':1,'состояние':1, + 'сохранитьзначение':1,'сред':1,'статусвозврата':1,'стрдлина':1,'стрзаменить':1,'стрколичествострок':1, + 'стрполучитьстроку':1,' стрчисловхождений':1,'сформироватьпозициюдокумента':1,'счетпокоду':1,'текущаядата':1, + 'текущеевремя':1,'типзначения':1,'типзначениястр':1,'удалитьобъекты':1,'установитьтана':1,'установитьтапо':1, + 'фиксшаблон':1,'формат':1,'цел':1,'шаблон':1 + }; + var DQUOTE = {className: 'dquote', begin: '""'}; + var STR_START = { + className: 'string', + begin: '"', end: '"|$', + contains: [DQUOTE], + relevance: 0 + }; + var STR_CONT = { + className: 'string', + begin: '\\|', end: '"|$', + contains: [DQUOTE] + }; + + return { + case_insensitive: true, + defaultMode: { + lexems: IDENT_RE_RU, + keywords: {'keyword':OneS_KEYWORDS,'built_in':OneS_BUILT_IN}, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.NUMBER_MODE, + STR_START, STR_CONT, + { + className: 'function', + begin: '(процедура|функция)', end: '$', + lexems: IDENT_RE_RU, + keywords: {'процедура': 1, 'экспорт': 1, 'функция': 1}, + contains: [ + {className: 'title', begin: IDENT_RE_RU}, + { + className: 'tail', + endsWithParent: true, + contains: [ + { + className: 'params', + begin: '\\(', end: '\\)', + lexems: IDENT_RE_RU, + keywords: {'знач':1}, + contains: [STR_START, STR_CONT] + }, + { + className: 'export', + begin: 'экспорт', endsWithParent: true, + lexems: IDENT_RE_RU, + keywords: {'экспорт': 1}, + contains: [hljs.C_LINE_COMMENT_MODE] + } + ] + }, + hljs.C_LINE_COMMENT_MODE + ] + }, + {className: 'preprocessor', begin: '#', end: '$'}, + {className: 'date', begin: '\'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})\''} + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/actionscript.js b/output/Scratch/js/highlight/languages/actionscript.js new file mode 100644 index 000000000..255c69c37 --- /dev/null +++ b/output/Scratch/js/highlight/languages/actionscript.js @@ -0,0 +1,94 @@ +/* +Language: ActionScript +Author: Alexander Myadzel +*/ + +hljs.LANGUAGES.actionscript = function() { + 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 + }; + var TITLE_MODE = {className: 'title', begin: IDENT_RE}; + + return { + defaultMode: { + keywords: { + 'keyword': { + 'as': 1, 'break': 1, 'case': 1, 'catch': 1, 'class': 1, 'const': 1, 'continue': 1, 'default': 1, + 'delete': 1, 'do': 1, 'dynamic': 5, 'each': 1, 'else': 1, 'extends': 1, 'final': 1, 'finally': 1, + 'for': 1, 'function': 1, 'get': 1, 'if': 1, 'implements': 1, 'import': 1, 'in': 1, 'include': 1, + 'instanceof': 1, 'interface': 1, 'internal': 1, 'is': 1, 'namespace': 1, 'native': 1, 'new': 1, + 'override': 1, 'package': 1, 'private': 1, 'protected': 1, 'public': 1, 'return': 1, 'set': 1, + 'static': 1, 'super': 5, 'switch': 1, 'this': 1, 'throw': 1, 'try': 1, 'typeof': 1, 'use': 1, + 'var': 1, 'void': 1, 'while': 1, 'with': 1 + }, + 'literal': {'true': 1, 'false': 1, 'null': 1, 'undefined': 1}, + 'reserved': { + 'abstract': 0, 'boolean': 0, 'byte': 0, 'cast': 0, 'char': 0, 'debugger': 0, 'double': 0, 'enum': 0, + 'export': 0, 'float': 0, 'goto': 0, 'intrinsic': 0, 'long': 0, 'prototype': 0, 'short': 0, + 'synchronized': 0, 'throws': 0, 'to': 0, 'transient': 0, 'type': 0, 'virtual': 0, 'volatile': 0 + } + }, + contains: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_NUMBER_MODE, + { + className: 'package', + begin: 'package ?', end: '{', + keywords: {'package': 1}, + contains: [TITLE_MODE] + }, + { + className: 'class', + begin: '(class|interface) ', end: '{', + keywords: {'class': 1, 'interface': 1}, + contains: [ + { + begin: '(implements|extends)', + keywords: {'extends': 1, 'implements': 1}, + relevance: 5 + }, + TITLE_MODE + ] + }, + { + className: 'preprocessor', + begin: '(import|include)\\b', end: ';', + keywords: {'import': 1, 'include': 1} + }, + { + className: 'function', + begin: 'function ', end: '[{;]', + keywords: {'function': 1}, + contains: [ + 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 + ] + }, + { + className: 'type', + begin: ':', + end: IDENT_FUNC_RETURN_TYPE_RE, + relevance: 10 + } + ] + } + ] + } + } +}(); diff --git a/output/Scratch/js/highlight/languages/apache.js b/output/Scratch/js/highlight/languages/apache.js new file mode 100644 index 000000000..d6bdfe33d --- /dev/null +++ b/output/Scratch/js/highlight/languages/apache.js @@ -0,0 +1,434 @@ +/* +Language: Apache +Author: Ruslan Keba +Website: http://rukeba.com/ +Description: language definition for Apache configuration files (httpd.conf & .htaccess) +Version: 1.1 +Date: 2008-12-27 +*/ + +hljs.LANGUAGES.apache = function(){ + var NUMBER = {className: 'number', begin: '[\\$%]\\d+'}; + return { + case_insensitive: true, + defaultMode: { + keywords: { + 'keyword': { + 'acceptfilter': 1, + 'acceptmutex': 1, + 'acceptpathinfo': 1, + 'accessfilename': 1, + 'action': 1, + 'addalt': 1, + 'addaltbyencoding': 1, + 'addaltbytype': 1, + 'addcharset': 1, + 'adddefaultcharset': 1, + 'adddescription': 1, + 'addencoding': 1, + 'addhandler': 1, + 'addicon': 1, + 'addiconbyencoding': 1, + 'addiconbytype': 1, + 'addinputfilter': 1, + 'addlanguage': 1, + 'addmoduleinfo': 1, + 'addoutputfilter': 1, + 'addoutputfilterbytype': 1, + 'addtype': 1, + 'alias': 1, + 'aliasmatch': 1, + 'allow': 1, + 'allowconnect': 1, + 'allowencodedslashes': 1, + 'allowoverride': 1, + 'anonymous': 1, + 'anonymous_logemail': 1, + 'anonymous_mustgiveemail': 1, + 'anonymous_nouserid': 1, + 'anonymous_verifyemail': 1, + 'authbasicauthoritative': 1, + 'authbasicprovider': 1, + 'authdbduserpwquery': 1, + 'authdbduserrealmquery': 1, + 'authdbmgroupfile': 1, + 'authdbmtype': 1, + 'authdbmuserfile': 1, + 'authdefaultauthoritative': 1, + 'authdigestalgorithm': 1, + 'authdigestdomain': 1, + 'authdigestnccheck': 1, + 'authdigestnonceformat': 1, + 'authdigestnoncelifetime': 1, + 'authdigestprovider': 1, + 'authdigestqop': 1, + 'authdigestshmemsize': 1, + 'authgroupfile': 1, + 'authldapbinddn': 1, + 'authldapbindpassword': 1, + 'authldapcharsetconfig': 1, + 'authldapcomparednonserver': 1, + 'authldapdereferencealiases': 1, + 'authldapgroupattribute': 1, + 'authldapgroupattributeisdn': 1, + 'authldapremoteuserattribute': 1, + 'authldapremoteuserisdn': 1, + 'authldapurl': 1, + 'authname': 1, + 'authnprovideralias': 1, + 'authtype': 1, + 'authuserfile': 1, + 'authzdbmauthoritative': 1, + 'authzdbmtype': 1, + 'authzdefaultauthoritative': 1, + 'authzgroupfileauthoritative': 1, + 'authzldapauthoritative': 1, + 'authzownerauthoritative': 1, + 'authzuserauthoritative': 1, + 'balancermember': 1, + 'browsermatch': 1, + 'browsermatchnocase': 1, + 'bufferedlogs': 1, + 'cachedefaultexpire': 1, + 'cachedirlength': 1, + 'cachedirlevels': 1, + 'cachedisable': 1, + 'cacheenable': 1, + 'cachefile': 1, + 'cacheignorecachecontrol': 1, + 'cacheignoreheaders': 1, + 'cacheignorenolastmod': 1, + 'cacheignorequerystring': 1, + 'cachelastmodifiedfactor': 1, + 'cachemaxexpire': 1, + 'cachemaxfilesize': 1, + 'cacheminfilesize': 1, + 'cachenegotiateddocs': 1, + 'cacheroot': 1, + 'cachestorenostore': 1, + 'cachestoreprivate': 1, + 'cgimapextension': 1, + 'charsetdefault': 1, + 'charsetoptions': 1, + 'charsetsourceenc': 1, + 'checkcaseonly': 1, + 'checkspelling': 1, + 'chrootdir': 1, + 'contentdigest': 1, + 'cookiedomain': 1, + 'cookieexpires': 1, + 'cookielog': 1, + 'cookiename': 1, + 'cookiestyle': 1, + 'cookietracking': 1, + 'coredumpdirectory': 1, + 'customlog': 1, + 'dav': 1, + 'davdepthinfinity': 1, + 'davgenericlockdb': 1, + 'davlockdb': 1, + 'davmintimeout': 1, + 'dbdexptime': 1, + 'dbdkeep': 1, + 'dbdmax': 1, + 'dbdmin': 1, + 'dbdparams': 1, + 'dbdpersist': 1, + 'dbdpreparesql': 1, + 'dbdriver': 1, + 'defaulticon': 1, + 'defaultlanguage': 1, + 'defaulttype': 1, + 'deflatebuffersize': 1, + 'deflatecompressionlevel': 1, + 'deflatefilternote': 1, + 'deflatememlevel': 1, + 'deflatewindowsize': 1, + 'deny': 1, + 'directoryindex': 1, + 'directorymatch': 1, + 'directoryslash': 1, + 'documentroot': 1, + 'dumpioinput': 1, + 'dumpiologlevel': 1, + 'dumpiooutput': 1, + 'enableexceptionhook': 1, + 'enablemmap': 1, + 'enablesendfile': 1, + 'errordocument': 1, + 'errorlog': 1, + 'example': 1, + 'expiresactive': 1, + 'expiresbytype': 1, + 'expiresdefault': 1, + 'extendedstatus': 1, + 'extfilterdefine': 1, + 'extfilteroptions': 1, + 'fileetag': 1, + 'filterchain': 1, + 'filterdeclare': 1, + 'filterprotocol': 1, + 'filterprovider': 1, + 'filtertrace': 1, + 'forcelanguagepriority': 1, + 'forcetype': 1, + 'forensiclog': 1, + 'gracefulshutdowntimeout': 1, + 'group': 1, + 'header': 1, + 'headername': 1, + 'hostnamelookups': 1, + 'identitycheck': 1, + 'identitychecktimeout': 1, + 'imapbase': 1, + 'imapdefault': 1, + 'imapmenu': 1, + 'include': 1, + 'indexheadinsert': 1, + 'indexignore': 1, + 'indexoptions': 1, + 'indexorderdefault': 1, + 'indexstylesheet': 1, + 'isapiappendlogtoerrors': 1, + 'isapiappendlogtoquery': 1, + 'isapicachefile': 1, + 'isapifakeasync': 1, + 'isapilognotsupported': 1, + 'isapireadaheadbuffer': 1, + 'keepalive': 1, + 'keepalivetimeout': 1, + 'languagepriority': 1, + 'ldapcacheentries': 1, + 'ldapcachettl': 1, + 'ldapconnectiontimeout': 1, + 'ldapopcacheentries': 1, + 'ldapopcachettl': 1, + 'ldapsharedcachefile': 1, + 'ldapsharedcachesize': 1, + 'ldaptrustedclientcert': 1, + 'ldaptrustedglobalcert': 1, + 'ldaptrustedmode': 1, + 'ldapverifyservercert': 1, + 'limitinternalrecursion': 1, + 'limitrequestbody': 1, + 'limitrequestfields': 1, + 'limitrequestfieldsize': 1, + 'limitrequestline': 1, + 'limitxmlrequestbody': 1, + 'listen': 1, + 'listenbacklog': 1, + 'loadfile': 1, + 'loadmodule': 1, + 'lockfile': 1, + 'logformat': 1, + 'loglevel': 1, + 'maxclients': 1, + 'maxkeepaliverequests': 1, + 'maxmemfree': 1, + 'maxrequestsperchild': 1, + 'maxrequestsperthread': 1, + 'maxspareservers': 1, + 'maxsparethreads': 1, + 'maxthreads': 1, + 'mcachemaxobjectcount': 1, + 'mcachemaxobjectsize': 1, + 'mcachemaxstreamingbuffer': 1, + 'mcacheminobjectsize': 1, + 'mcacheremovalalgorithm': 1, + 'mcachesize': 1, + 'metadir': 1, + 'metafiles': 1, + 'metasuffix': 1, + 'mimemagicfile': 1, + 'minspareservers': 1, + 'minsparethreads': 1, + 'mmapfile': 1, + 'mod_gzip_on': 1, + 'mod_gzip_add_header_count': 1, + 'mod_gzip_keep_workfiles': 1, + 'mod_gzip_dechunk': 1, + 'mod_gzip_min_http': 1, + 'mod_gzip_minimum_file_size': 1, + 'mod_gzip_maximum_file_size': 1, + 'mod_gzip_maximum_inmem_size': 1, + 'mod_gzip_temp_dir': 1, + 'mod_gzip_item_include': 1, + 'mod_gzip_item_exclude': 1, + 'mod_gzip_command_version': 1, + 'mod_gzip_can_negotiate': 1, + 'mod_gzip_handle_methods': 1, + 'mod_gzip_static_suffix': 1, + 'mod_gzip_send_vary': 1, + 'mod_gzip_update_static': 1, + 'modmimeusepathinfo': 1, + 'multiviewsmatch': 1, + 'namevirtualhost': 1, + 'noproxy': 1, + 'nwssltrustedcerts': 1, + 'nwsslupgradeable': 1, + 'options': 1, + 'order': 1, + 'passenv': 1, + 'pidfile': 1, + 'protocolecho': 1, + 'proxybadheader': 1, + 'proxyblock': 1, + 'proxydomain': 1, + 'proxyerroroverride': 1, + 'proxyftpdircharset': 1, + 'proxyiobuffersize': 1, + 'proxymaxforwards': 1, + 'proxypass': 1, + 'proxypassinterpolateenv': 1, + 'proxypassmatch': 1, + 'proxypassreverse': 1, + 'proxypassreversecookiedomain': 1, + 'proxypassreversecookiepath': 1, + 'proxypreservehost': 1, + 'proxyreceivebuffersize': 1, + 'proxyremote': 1, + 'proxyremotematch': 1, + 'proxyrequests': 1, + 'proxyset': 1, + 'proxystatus': 1, + 'proxytimeout': 1, + 'proxyvia': 1, + 'readmename': 1, + 'receivebuffersize': 1, + 'redirect': 1, + 'redirectmatch': 1, + 'redirectpermanent': 1, + 'redirecttemp': 1, + 'removecharset': 1, + 'removeencoding': 1, + 'removehandler': 1, + 'removeinputfilter': 1, + 'removelanguage': 1, + 'removeoutputfilter': 1, + 'removetype': 1, + 'requestheader': 1, + 'require': 2, + 'rewritebase': 1, + 'rewritecond': 10, + 'rewriteengine': 1, + 'rewritelock': 1, + 'rewritelog': 1, + 'rewriteloglevel': 1, + 'rewritemap': 1, + 'rewriteoptions': 1, + 'rewriterule': 10, + 'rlimitcpu': 1, + 'rlimitmem': 1, + 'rlimitnproc': 1, + 'satisfy': 1, + 'scoreboardfile': 1, + 'script': 1, + 'scriptalias': 1, + 'scriptaliasmatch': 1, + 'scriptinterpretersource': 1, + 'scriptlog': 1, + 'scriptlogbuffer': 1, + 'scriptloglength': 1, + 'scriptsock': 1, + 'securelisten': 1, + 'seerequesttail': 1, + 'sendbuffersize': 1, + 'serveradmin': 1, + 'serveralias': 1, + 'serverlimit': 1, + 'servername': 1, + 'serverpath': 1, + 'serverroot': 1, + 'serversignature': 1, + 'servertokens': 1, + 'setenv': 1, + 'setenvif': 1, + 'setenvifnocase': 1, + 'sethandler': 1, + 'setinputfilter': 1, + 'setoutputfilter': 1, + 'ssienableaccess': 1, + 'ssiendtag': 1, + 'ssierrormsg': 1, + 'ssistarttag': 1, + 'ssitimeformat': 1, + 'ssiundefinedecho': 1, + 'sslcacertificatefile': 1, + 'sslcacertificatepath': 1, + 'sslcadnrequestfile': 1, + 'sslcadnrequestpath': 1, + 'sslcarevocationfile': 1, + 'sslcarevocationpath': 1, + 'sslcertificatechainfile': 1, + 'sslcertificatefile': 1, + 'sslcertificatekeyfile': 1, + 'sslciphersuite': 1, + 'sslcryptodevice': 1, + 'sslengine': 1, + 'sslhonorciperorder': 1, + 'sslmutex': 1, + 'ssloptions': 1, + 'sslpassphrasedialog': 1, + 'sslprotocol': 1, + 'sslproxycacertificatefile': 1, + 'sslproxycacertificatepath': 1, + 'sslproxycarevocationfile': 1, + 'sslproxycarevocationpath': 1, + 'sslproxyciphersuite': 1, + 'sslproxyengine': 1, + 'sslproxymachinecertificatefile': 1, + 'sslproxymachinecertificatepath': 1, + 'sslproxyprotocol': 1, + 'sslproxyverify': 1, + 'sslproxyverifydepth': 1, + 'sslrandomseed': 1, + 'sslrequire': 1, + 'sslrequiressl': 1, + 'sslsessioncache': 1, + 'sslsessioncachetimeout': 1, + 'sslusername': 1, + 'sslverifyclient': 1, + 'sslverifydepth': 1, + 'startservers': 1, + 'startthreads': 1, + 'substitute': 1, + 'suexecusergroup': 1, + 'threadlimit': 1, + 'threadsperchild': 1, + 'threadstacksize': 1, + 'timeout': 1, + 'traceenable': 1, + 'transferlog': 1, + 'typesconfig': 1, + 'unsetenv': 1, + 'usecanonicalname': 1, + 'usecanonicalphysicalport': 1, + 'user': 1, + 'userdir': 1, + 'virtualdocumentroot': 1, + 'virtualdocumentrootip': 1, + 'virtualscriptalias': 1, + 'virtualscriptaliasip': 1, + 'win32disableacceptex': 1, + 'xbithack': 1 + }, + 'literal': {'on': 1, 'off': 1} + }, + contains: [ + hljs.HASH_COMMENT_MODE, + { + className: 'sqbracket', + begin: '\\s\\[', end: '\\]$' + }, + { + className: 'cbracket', + begin: '[\\$%]\\{', end: '\\}', + contains: ['self', NUMBER] + }, + NUMBER, + {className: 'tag', begin: ''}, + hljs.QUOTE_STRING_MODE + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/avrasm.js b/output/Scratch/js/highlight/languages/avrasm.js new file mode 100644 index 000000000..5e3e9545b --- /dev/null +++ b/output/Scratch/js/highlight/languages/avrasm.js @@ -0,0 +1,75 @@ +/* +Language: AVR Assembler +Author: Vladimir Ermakov +*/ + +hljs.LANGUAGES.avrasm = +{ + case_insensitive: true, + defaultMode: { + keywords: { + 'keyword': { + /* mnemonic */ + 'adc': 1, 'add': 1 , 'adiw': 1 , 'and': 1 , 'andi': 1 , 'asr': 1 , 'bclr': 1 , 'bld': 1 , 'brbc': 1 , 'brbs': 1 , 'brcc': 1 , + 'brcs': 1, 'break': 1, 'breq': 1, 'brge': 1, 'brhc': 1, 'brhs': 1, 'brid': 1, 'brie': 1, 'brlo': 1, 'brlt': 1, 'brmi': 1, + 'brne': 1, 'brpl': 1, 'brsh': 1, 'brtc': 1, 'brts': 1, 'brvc': 1, 'brvs': 1, 'bset': 1, 'bst': 1, 'call': 1, 'cbi': 1, + 'cbr': 1, 'clc': 1, 'clh': 1, 'cli': 1, 'cln': 1, 'clr': 1, 'cls': 1, 'clt': 1, 'clv': 1, 'clz': 1, 'com': 1, 'cp': 1, + 'cpc': 1, 'cpi': 1, 'cpse': 1, 'dec': 1, 'eicall': 1, 'eijmp': 1, 'elpm': 1, 'eor': 1, 'fmul': 1, 'fmuls': 1, 'fmulsu': 1, + 'icall': 1, 'ijmp': 1, 'in': 1, 'inc': 1, 'jmp': 1, 'ld': 1, 'ldd': 1, 'ldi': 1, 'lds': 1, 'lpm': 1, 'lsl': 1, 'lsr': 1, + 'mov': 1, 'movw': 1, 'mul': 1, 'muls': 1, 'mulsu': 1, 'neg': 1, 'nop': 1, 'or': 1, 'ori': 1, 'out': 1, 'pop': 1, 'push': 1, + 'rcall': 1, 'ret': 1, 'reti': 1, 'rjmp': 1, 'rol': 1, 'ror': 1, 'sbc': 1, 'sbr': 1, 'sbrc': 1, 'sbrs': 1, 'sec': 1, 'seh': 1, + 'sbi': 1, 'sbci': 1, 'sbic': 1, 'sbis': 1, 'sbiw': 1, 'sei': 1, 'sen': 1, 'ser': 1, 'ses': 1, 'set': 1, 'sev': 1, 'sez': 1, + 'sleep': 1, 'spm': 1, 'st': 1, 'std': 1, 'sts': 1, 'sub': 1, 'subi': 1, 'swap': 1, 'tst': 1, 'wdr': 1 + }, + 'built_in': { + /* general purpose registers */ + 'r0': 1, 'r1': 1, 'r2': 1, 'r3': 1, 'r4': 1, 'r5': 1, 'r6': 1, 'r7': 1, 'r8': 1, 'r9': 1, 'r10': 1, 'r11': 1, 'r12': 1, + 'r13': 1, 'r14': 1, 'r15': 1, 'r16': 1, 'r17': 1, 'r18': 1, 'r19': 1, 'r20': 1, 'r21': 1, 'r22': 1, 'r23': 1, 'r24': 1, + 'r25': 1, 'r26': 1, 'r27': 1, 'r28': 1, 'r29': 1, 'r30': 1, 'r31': 1, + 'x': 1 /* R27:R26 */, 'xh': 1 /* R27 */, 'xl': 1 /* R26 */, + 'y': 1 /* R29:R28 */, 'yh': 1 /* R29 */, 'yl': 1 /* R28 */, + 'z': 1 /* R31:R30 */, 'zh': 1 /* R31 */, 'zl': 1 /* R30 */, + /* IO Registers (ATMega128) */ + 'ucsr1c': 1, 'udr1': 1, 'ucsr1a': 1, 'ucsr1b': 1, 'ubrr1l': 1, 'ubrr1h': 1, 'ucsr0c': 1, 'ubrr0h': 1, 'tccr3c': 1, + 'tccr3a': 1, 'tccr3b': 1, 'tcnt3h': 1, 'tcnt3l': 1, 'ocr3ah': 1, 'ocr3al': 1, 'ocr3bh': 1, 'ocr3bl': 1, 'ocr3ch': 1, + 'ocr3cl': 1, 'icr3h': 1, 'icr3l': 1, 'etimsk': 1, 'etifr': 1, 'tccr1c': 1, 'ocr1ch': 1, 'ocr1cl': 1, 'twcr': 1, + 'twdr': 1, 'twar': 1, 'twsr': 1, 'twbr': 1, 'osccal': 1, 'xmcra': 1, 'xmcrb': 1, 'eicra': 1, 'spmcsr': 1, 'spmcr': 1, + 'portg': 1, 'ddrg': 1, 'ping': 1, 'portf': 1, 'ddrf': 1, 'sreg': 1, 'sph': 1, 'spl': 1, 'xdiv': 1, 'rampz': 1, + 'eicrb': 1, 'eimsk': 1, 'gimsk': 1, 'gicr': 1, 'eifr': 1, 'gifr': 1, 'timsk': 1, 'tifr': 1, 'mcucr': 1, + 'mcucsr': 1, 'tccr0': 1, 'tcnt0': 1, 'ocr0': 1, 'assr': 1, 'tccr1a': 1, 'tccr1b': 1, 'tcnt1h': 1, 'tcnt1l': 1, + 'ocr1ah': 1, 'ocr1al': 1, 'ocr1bh': 1, 'ocr1bl': 1, 'icr1h': 1, 'icr1l': 1, 'tccr2': 1, 'tcnt2': 1, 'ocr2': 1, + 'ocdr': 1, 'wdtcr': 1, 'sfior': 1, 'eearh': 1, 'eearl': 1, 'eedr': 1, 'eecr': 1, 'porta': 1, 'ddra': 1, 'pina': 1, + 'portb': 1, 'ddrb': 1, 'pinb': 1, 'portc': 1, 'ddrc': 1, 'pinc': 1, 'portd': 1, 'ddrd': 1, 'pind': 1, 'spdr': 1, + 'spsr': 1, 'spcr': 1, 'udr0': 1, 'ucsr0a': 1, 'ucsr0b': 1, 'ubrr0l': 1, 'acsr': 1, 'admux': 1, 'adcsr': 1, 'adch': 1, + 'adcl': 1, 'porte': 1, 'ddre': 1, 'pine': 1, 'pinf': 1 + } + }, + contains: [ + hljs.C_BLOCK_COMMENT_MODE, + {className: 'comment', begin: ';', end: '$'}, + hljs.C_NUMBER_MODE, // 0x..., decimal, float + hljs.BINARY_NUMBER_MODE, // 0b... + { + className: 'number', + begin: '\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)' // $..., 0o... + }, + hljs.QUOTE_STRING_MODE, + { + className: 'string', + begin: '\'', end: '[^\\\\]\'', + illegal: '[^\\\\][^\']' + }, + {className: 'label', begin: '^[A-Za-z0-9_.$]+:'}, + {className: 'preprocessor', begin: '#', end: '$'}, + { // директивы «.include» «.macro» и т.д. + className: 'preprocessor', + begin: '\\.[a-zA-Z]+' + }, + { // подстановка в «.macro» + className: 'localvars', + begin: '@[0-9]+' + } + ] + } +}; + diff --git a/output/Scratch/js/highlight/languages/axapta.js b/output/Scratch/js/highlight/languages/axapta.js new file mode 100644 index 000000000..6c49ea045 --- /dev/null +++ b/output/Scratch/js/highlight/languages/axapta.js @@ -0,0 +1,48 @@ +/* +Language: Axapta +Author: Dmitri Roudakov +*/ + +hljs.LANGUAGES.axapta = { + defaultMode: { + keywords: { + 'false': 1, 'int': 1, 'abstract': 1, 'private': 1, 'char': 1, 'interface': 1, 'boolean': 1, 'static': 1, + 'null': 1, 'if': 1, 'for': 1, 'true': 1, 'while': 1, 'long': 1, 'throw': 1, 'finally': 1, 'protected': 1, + 'extends': 1, 'final': 1, 'implements': 1, 'return': 1, 'void': 1, 'enum': 1, 'else': 1, 'break': 1, 'new': 1, + 'catch': 1, 'byte': 1, 'super': 1, 'class': 1, 'case': 1, 'short': 1, 'default': 1, 'double': 1, 'public': 1, + 'try': 1, 'this': 1, 'switch': 1, 'continue': 1, 'reverse': 1, 'firstfast': 1, 'firstonly': 1, 'forupdate': 1, + 'nofetch': 1, 'sum': 1, 'avg': 1, 'minof': 1, 'maxof': 1, 'count': 1, 'order': 1, 'group': 1, 'by': 1, 'asc': 1, + 'desc': 1, 'index': 1, 'hint': 1, 'like': 1, 'dispaly': 1, 'edit': 1, 'client': 1, 'server': 1, 'ttsbegin': 1, + 'ttscommit': 1, 'str': 1, 'real': 1, 'date': 1, 'container': 1, 'anytype': 1, 'common': 1, 'div': 1, 'mod': 1 + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: 'preprocessor', + begin: '#', end: '$' + }, + { + className: 'class', + begin: '(class |interface )', end: '{', + illegal: ':', + keywords: {'class': 1, 'interface': 1}, + contains: [ + { + className: 'inheritance', + begin: '(implements|extends)', + keywords: {'extends': 1, 'implements': 1}, + relevance: 10 + }, + { + className: 'title', + begin: hljs.UNDERSCORE_IDENT_RE + } + ] + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/bash.js b/output/Scratch/js/highlight/languages/bash.js new file mode 100644 index 000000000..18149489b --- /dev/null +++ b/output/Scratch/js/highlight/languages/bash.js @@ -0,0 +1,65 @@ +/* +Language: Bash +Author: vah +*/ + +hljs.LANGUAGES.bash = function(){ + var BASH_LITERAL = {'true' : 1, 'false' : 1}; + var VAR1 = { + className: 'variable', + begin: '\\$([a-zA-Z0-9_]+)\\b' + }; + var VAR2 = { + className: 'variable', + begin: '\\$\\{(([^}])|(\\\\}))+\\}', + contains: [hljs.C_NUMBER_MODE] + }; + var QUOTE_STRING = { + className: 'string', + begin: '"', end: '"', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE, VAR1, VAR2], + relevance: 0 + }; + var APOS_STRING = { + className: 'string', + begin: '\'', end: '\'', + relevance: 0 + }; + var TEST_CONDITION = { + className: 'test_condition', + begin: '', end: '', + contains: [QUOTE_STRING, APOS_STRING, VAR1, VAR2, hljs.C_NUMBER_MODE], + keywords: { + 'literal': BASH_LITERAL + }, + relevance: 0 + }; + + return { + defaultMode: { + keywords: { + 'keyword': { + 'if' : 1, 'then' : 1, 'else' : 1, 'fi' : 1, 'for' : 1, 'break' : 1, 'continue' : 1, 'while' : 1, 'in' : 1, + 'do' : 1, 'done' : 1, 'echo' : 1, 'exit' : 1, 'return' : 1, 'set' : 1, 'declare' : 1 + }, + 'literal': BASH_LITERAL + }, + contains: [ + { + className: 'shebang', + begin: '(#!\\/bin\\/bash)|(#!\\/bin\\/sh)', + relevance: 10 + }, + VAR1, + VAR2, + hljs.HASH_COMMENT_MODE, + hljs.C_NUMBER_MODE, + QUOTE_STRING, + APOS_STRING, + hljs.inherit(TEST_CONDITION, {begin: '\\[ ', end: ' \\]', relevance: 0}), + hljs.inherit(TEST_CONDITION, {begin: '\\[\\[ ', end: ' \\]\\]'}) + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/cmake.js b/output/Scratch/js/highlight/languages/cmake.js new file mode 100644 index 000000000..8aa933795 --- /dev/null +++ b/output/Scratch/js/highlight/languages/cmake.js @@ -0,0 +1,42 @@ +/* +Language: CMake +Description: CMake is an open-source cross-platform system for build automation. +Author: Igor Kalnitsky +Website: http://kalnitsky.org.ua/ +*/ + +hljs.LANGUAGES.cmake = { + case_insensitive: true, + defaultMode: { + keywords: { + 'add_custom_command': 2, 'add_custom_target': 2, 'add_definitions': 2, 'add_dependencies': 2, + 'add_executable': 2, 'add_library': 2, 'add_subdirectory': 2, 'add_test': 2, 'aux_source_directory': 2, + 'break': 1, 'build_command': 2, 'cmake_minimum_required': 3, 'cmake_policy': 3, 'configure_file': 1, + 'create_test_sourcelist': 1, 'define_property': 1, 'else': 1, 'elseif': 1, 'enable_language': 2, + 'enable_testing': 2, 'endforeach': 1, 'endfunction': 1, 'endif': 1, 'endmacro': 1, 'endwhile': 1, + 'execute_process': 2, 'export': 1, 'find_file': 1, 'find_library': 2, 'find_package': 2, 'find_path': 1, + 'find_program': 1, 'fltk_wrap_ui': 2, 'foreach': 1, 'function': 1, 'get_cmake_property': 3, + 'get_directory_property': 1, 'get_filename_component': 1, 'get_property': 1, 'get_source_file_property': 1, + 'get_target_property': 1, 'get_test_property': 1, 'if': 1, 'include': 1, 'include_directories': 2, + 'include_external_msproject': 1, 'include_regular_expression': 2, 'install': 1, 'link_directories': 1, + 'load_cache': 1, 'load_command': 1, 'macro': 1, 'mark_as_advanced': 1, 'message': 1, 'option': 1, + 'output_required_files': 1, 'project': 1, 'qt_wrap_cpp': 2, 'qt_wrap_ui': 2, 'remove_definitions': 2, + 'return': 1, 'separate_arguments': 1, 'set': 1, 'set_directory_properties': 1, 'set_property': 1, + 'set_source_files_properties': 1, 'set_target_properties': 1, 'set_tests_properties': 1, 'site_name': 1, + 'source_group': 1, 'string': 1, 'target_link_libraries': 2, 'try_compile': 2, 'try_run': 2, 'unset': 1, + 'variable_watch': 2, 'while': 1, 'build_name': 1, 'exec_program': 1, 'export_library_dependencies': 1, + 'install_files': 1, 'install_programs': 1, 'install_targets': 1, 'link_libraries': 1, 'make_directory': 1, + 'remove': 1, 'subdir_depends': 1, 'subdirs': 1, 'use_mangled_mesa': 1, 'utility_source': 1, + 'variable_requires': 1, 'write_file': 1 + }, + contains: [ + { + className: 'envvar', + begin: '\\${', end: '}' + }, + hljs.HASH_COMMENT_MODE, + hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/coffeescript.js b/output/Scratch/js/highlight/languages/coffeescript.js new file mode 100755 index 000000000..7cd5cecfd --- /dev/null +++ b/output/Scratch/js/highlight/languages/coffeescript.js @@ -0,0 +1,112 @@ +/* +Language: CoffeeScript +Author: Dmytrii Nagirniak +Contributors: Oleg Efimov +Description: CoffeeScript is a programming language that transcompiles to JavaScript. For info about language see http://coffeescript.org/ +*/ + +hljs.LANGUAGES.coffeescript = function() { + var keywords = { + 'keyword': { + // JS keywords + 'in': 1, 'if': 1, 'for': 1, 'while': 1, 'finally': 1, + 'new': 1, 'do': 1, 'return': 1, 'else': 1, + 'break': 1, 'catch': 1, 'instanceof': 1, 'throw': 1, + 'try': 1, 'this': 1, 'switch': 1, 'continue': 1, 'typeof': 1, + 'delete': 1, 'debugger': 1, + 'class': 1, 'extends': 1, 'super': 1, + // Coffee keywords + 'then': 1, 'unless': 1, 'until': 1, 'loop': 2, 'of': 2, 'by': 1, 'when': 2, + 'and': 1, 'or': 1, 'is': 1, 'isnt': 2, 'not': 1 + }, + 'literal': { + // JS literals + 'true': 1, 'false': 1, 'null': 1, 'undefined': 1, + // Coffee literals + 'yes': 1, 'no': 1, 'on': 1, 'off': 1 + }, + 'reserved': { + 'case': 1, 'default': 1, 'function': 1, 'var': 1, 'void': 1, 'with': 1, + 'const': 1, 'let': 1, 'enum': 1, 'export': 1, 'import': 1, 'native': 1, + '__hasProp': 1 , '__extends': 1 , '__slice': 1 , '__bind': 1 , '__indexOf': 1 + } + }; + + var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*'; + + var COFFEE_QUOTE_STRING_SUBST_MODE = { + className: 'subst', + begin: '#\\{', end: '}', + keywords: keywords, + contains: [hljs.C_NUMBER_MODE, hljs.BINARY_NUMBER_MODE] + }; + + var COFFEE_QUOTE_STRING_MODE = { + className: 'string', + begin: '"', end: '"', + relevance: 0, + contains: [hljs.BACKSLASH_ESCAPE, COFFEE_QUOTE_STRING_SUBST_MODE] + }; + + var COFFEE_HEREDOC_MODE = { + className: 'string', + begin: '"""', end: '"""', + contains: [hljs.BACKSLASH_ESCAPE, COFFEE_QUOTE_STRING_SUBST_MODE] + }; + + var COFFEE_HERECOMMENT_MODE = { + className: 'comment', + begin: '###', end: '###' + }; + + var COFFEE_HEREGEX_MODE = { + className: 'regexp', + begin: '///', end: '///', + contains: [hljs.HASH_COMMENT_MODE] + }; + + var COFFEE_FUNCTION_DECLARATION_MODE = { + className: 'function', + begin: JS_IDENT_RE + '\\s*=\\s*(\\(.+\\))?\\s*[-=]>', + returnBegin: true, + contains: [ + { + className: 'title', + begin: JS_IDENT_RE + }, + { + className: 'params', + begin: '\\(', end: '\\)' + } + ] + }; + + var COFFEE_EMBEDDED_JAVASCRIPT = { + className: 'javascript', + begin: '`', end: '`', + excludeBegin: true, excludeEnd: true, + subLanguage: 'javascript' + }; + + return { + defaultMode: { + keywords: keywords, + contains: [ + // Numbers + hljs.C_NUMBER_MODE, + hljs.BINARY_NUMBER_MODE, + // Strings + hljs.APOS_STRING_MODE, + COFFEE_HEREDOC_MODE, // Should be before COFFEE_QUOTE_STRING_MODE for greater priority + COFFEE_QUOTE_STRING_MODE, + // Comments + COFFEE_HERECOMMENT_MODE, // Should be before hljs.HASH_COMMENT_MODE for greater priority + hljs.HASH_COMMENT_MODE, + // CoffeeScript specific modes + COFFEE_HEREGEX_MODE, + COFFEE_EMBEDDED_JAVASCRIPT, + COFFEE_FUNCTION_DECLARATION_MODE + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/cpp.js b/output/Scratch/js/highlight/languages/cpp.js new file mode 100644 index 000000000..f9872a73b --- /dev/null +++ b/output/Scratch/js/highlight/languages/cpp.js @@ -0,0 +1,66 @@ +/* +Language: C++ +Contributors: Evgeny Stepanischev +*/ + +hljs.LANGUAGES.cpp = function(){ + var CPP_KEYWORDS = { + 'keyword': { + 'false': 1, 'int': 1, 'float': 1, 'while': 1, 'private': 1, 'char': 1, + 'catch': 1, 'export': 1, 'virtual': 1, 'operator': 2, 'sizeof': 2, + 'dynamic_cast': 2, 'typedef': 2, 'const_cast': 2, 'const': 1, + 'struct': 1, 'for': 1, 'static_cast': 2, 'union': 1, 'namespace': 1, + 'unsigned': 1, 'long': 1, 'throw': 1, 'volatile': 2, 'static': 1, + 'protected': 1, 'bool': 1, 'template': 1, 'mutable': 1, 'if': 1, + 'public': 1, 'friend': 2, 'do': 1, 'return': 1, 'goto': 1, 'auto': 1, + 'void': 2, 'enum': 1, 'else': 1, 'break': 1, 'new': 1, 'extern': 1, + 'using': 1, 'true': 1, 'class': 1, 'asm': 1, 'case': 1, 'typeid': 1, + 'short': 1, 'reinterpret_cast': 2, 'default': 1, 'double': 1, + 'register': 1, 'explicit': 1, 'signed': 1, 'typename': 1, 'try': 1, + 'this': 1, 'switch': 1, 'continue': 1, 'wchar_t': 1, 'inline': 1, + 'delete': 1, 'alignof': 1, 'char16_t': 1, 'char32_t': 1, 'constexpr': 1, + 'decltype': 1, 'noexcept': 1, 'nullptr': 1, 'static_assert': 1, + 'thread_local': 1, 'restrict': 1, '_Bool':1, 'complex': 1 + }, + 'built_in': { + 'std': 1, 'string': 1, 'cin': 1, 'cout': 1, 'cerr': 1, 'clog': 1, + 'stringstream': 1, 'istringstream': 1, 'ostringstream': 1, 'auto_ptr': 1, + 'deque': 1, 'list': 1, 'queue': 1, 'stack': 1, 'vector': 1, 'map': 1, + 'set': 1, 'bitset': 1, 'multiset': 1, 'multimap': 1, 'unordered_set': 1, + 'unordered_map': 1, 'unordered_multiset': 1, 'unordered_multimap': 1, + 'array': 1, 'shared_ptr': 1 + } + }; + return { + defaultMode: { + keywords: CPP_KEYWORDS, + illegal: '', + keywords: CPP_KEYWORDS, + relevance: 10, + contains: ['self'] + } + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/cs.js b/output/Scratch/js/highlight/languages/cs.js new file mode 100644 index 000000000..af4386178 --- /dev/null +++ b/output/Scratch/js/highlight/languages/cs.js @@ -0,0 +1,58 @@ +/* +Language: C# +Author: Jason Diamond +*/ + +hljs.LANGUAGES.cs = { + defaultMode: { + keywords: { + // Normal keywords. + 'abstract': 1, 'as': 1, 'base': 1, 'bool': 1, 'break': 1, 'byte': 1, 'case': 1, 'catch': 1, 'char': 1, + 'checked': 1, 'class': 1, 'const': 1, 'continue': 1, 'decimal': 1, 'default': 1, 'delegate': 1, 'do': 1, + 'double': 1, 'else': 1, 'enum': 1, 'event': 1, 'explicit': 1, 'extern': 1, 'false': 1, 'finally': 1, 'fixed': 1, + 'float': 1, 'for': 1, 'foreach': 1, 'goto': 1, 'if': 1, 'implicit': 1, 'in': 1, 'int': 1, 'interface': 1, + 'internal': 1, 'is': 1, 'lock': 1, 'long': 1, 'namespace': 1, 'new': 1, 'null': 1, 'object': 1, 'operator': 1, + 'out': 1, 'override': 1, 'params': 1, 'private': 1, 'protected': 1, 'public': 1, 'readonly': 1, 'ref': 1, + 'return': 1, 'sbyte': 1, 'sealed': 1, 'short': 1, 'sizeof': 1, 'stackalloc': 1, 'static': 1, 'string': 1, + 'struct': 1, 'switch': 1, 'this': 1, 'throw': 1, 'true': 1, 'try': 1, 'typeof': 1, 'uint': 1, 'ulong': 1, + 'unchecked': 1, 'unsafe': 1, 'ushort': 1, 'using': 1, 'virtual': 1, 'volatile': 1, 'void': 1, 'while': 1, + // Contextual keywords. + 'ascending': 1, 'descending': 1, 'from': 1, 'get': 1, 'group': 1, 'into': 1, 'join': 1, 'let': 1, 'orderby': 1, + 'partial': 1, 'select': 1, 'set': 1, 'value': 1, 'var': 1, 'where': 1, 'yield': 1 + }, + contains: [ + { + className: 'comment', + begin: '///', end: '$', returnBegin: true, + contains: [ + { + className: 'xmlDocTag', + begin: '///|' + }, + { + className: 'xmlDocTag', + begin: '' + } + ] + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'preprocessor', + begin: '#', end: '$', + keywords: { + 'if': 1, 'else': 1, 'elif': 1, 'endif': 1, 'define': 1, 'undef': 1, 'warning': 1, + 'error': 1, 'line': 1, 'region': 1, 'endregion': 1, 'pragma': 1, 'checksum': 1 + } + }, + { + className: 'string', + begin: '@"', end: '"', + contains: [{begin: '""'}] + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/css.js b/output/Scratch/js/highlight/languages/css.js new file mode 100644 index 000000000..b6e4db97d --- /dev/null +++ b/output/Scratch/js/highlight/languages/css.js @@ -0,0 +1,101 @@ +/* +Language: CSS +*/ + +hljs.LANGUAGES.css = function() { + var FUNCTION = { + className: 'function', + begin: hljs.IDENT_RE + '\\(', end: '\\)', + contains: [{ + endsWithParent: true, excludeEnd: true, + contains: [hljs.NUMBER_MODE, hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE] + }] + }; + return { + case_insensitive: true, + defaultMode: { + illegal: '[=/|\']', + contains: [ + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'id', begin: '\\#[A-Za-z0-9_-]+' + }, + { + className: 'class', begin: '\\.[A-Za-z0-9_-]+', + relevance: 0 + }, + { + className: 'attr_selector', + begin: '\\[', end: '\\]', + illegal: '$' + }, + { + className: 'pseudo', + begin: ':(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\"\\\']+' + }, + { + className: 'at_rule', + begin: '@(font-face|page)', + lexems: '[a-z-]+', + keywords: {'font-face': 1, 'page': 1} + }, + { + className: 'at_rule', + begin: '@', end: '[{;]', // at_rule eating first "{" is a good thing + // because it doesn't let it to be parsed as + // a rule set but instead drops parser into + // the defaultMode which is how it should be. + excludeEnd: true, + keywords: {'import': 1, 'page': 1, 'media': 1, 'charset': 1}, + contains: [ + FUNCTION, + hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, + hljs.NUMBER_MODE + ] + }, + { + className: 'tag', begin: hljs.IDENT_RE, + relevance: 0 + }, + { + className: 'rules', + begin: '{', end: '}', + illegal: '[^\\s]', + relevance: 0, + contains: [ + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'rule', + begin: '[^\\s]', returnBegin: true, end: ';', endsWithParent: true, + contains: [ + { + className: 'attribute', + begin: '[A-Z\\_\\.\\-]+', end: ':', + excludeEnd: true, + illegal: '[^\\s]', + starts: { + className: 'value', + endsWithParent: true, excludeEnd: true, + contains: [ + FUNCTION, + hljs.NUMBER_MODE, + hljs.QUOTE_STRING_MODE, + hljs.APOS_STRING_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'hexcolor', begin: '\\#[0-9A-F]+' + }, + { + className: 'important', begin: '!important' + } + ] + } + } + ] + } + ] + } + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/delphi.js b/output/Scratch/js/highlight/languages/delphi.js new file mode 100644 index 000000000..eb50b8fa8 --- /dev/null +++ b/output/Scratch/js/highlight/languages/delphi.js @@ -0,0 +1,88 @@ +/* +Language: Delphi +*/ + +hljs.LANGUAGES.delphi = function(){ + var DELPHI_KEYWORDS = { + 'and': 1, 'safecall': 1, 'cdecl': 1, 'then': 1, 'string': 1, 'exports': 1, 'library': 1, 'not': 1, 'pascal': 1, + 'set': 1, 'virtual': 1, 'file': 1, 'in': 1, 'array': 1, 'label': 1, 'packed': 1, 'end.': 1, 'index': 1, + 'while': 1, 'const': 1, 'raise': 1, 'for': 1, 'to': 1, 'implementation': 1, 'with': 1, 'except': 1, + 'overload': 1, 'destructor': 1, 'downto': 1, 'finally': 1, 'program': 1, 'exit': 1, 'unit': 1, 'inherited': 1, + 'override': 1, 'if': 1, 'type': 1, 'until': 1, 'function': 1, 'do': 1, 'begin': 1, 'repeat': 1, 'goto': 1, + 'nil': 1, 'far': 1, 'initialization': 1, 'object': 1, 'else': 1, 'var': 1, 'uses': 1, 'external': 1, + 'resourcestring': 1, 'interface': 1, 'end': 1, 'finalization': 1, 'class': 1, 'asm': 1, 'mod': 1, 'case': 1, + 'on': 1, 'shr': 1, 'shl': 1, 'of': 1, 'register': 1, 'xorwrite': 1, 'threadvar': 1, 'try': 1, 'record': 1, + 'near': 1, 'stored': 1, 'constructor': 1, 'stdcall': 1, 'inline': 1, 'div': 1, 'out': 1, 'or': 1, 'procedure': 1 + }; + var DELPHI_CLASS_KEYWORDS = { + 'safecall': 1, 'stdcall': 1, 'pascal': 1, 'stored': 1, 'const': 1, 'implementation': 1, 'finalization': 1, + 'except': 1, 'to': 1, 'finally': 1, 'program': 1, 'inherited': 1, 'override': 1, 'then': 1, 'exports': 1, + 'string': 1, 'read': 1, 'not': 1, 'mod': 1, 'shr': 1, 'try': 1, 'div': 1, 'shl': 1, 'set': 1, 'library': 1, + 'message': 1, 'packed': 1, 'index': 1, 'for': 1, 'near': 1, 'overload': 1, 'label': 1, 'downto': 1, 'exit': 1, + 'public': 1, 'goto': 1, 'interface': 1, 'asm': 1, 'on': 1, 'of': 1, 'constructor': 1, 'or': 1, 'private': 1, + 'array': 1, 'unit': 1, 'raise': 1, 'destructor': 1, 'var': 1, 'type': 1, 'until': 1, 'function': 1, 'else': 1, + 'external': 1, 'with': 1, 'case': 1, 'default': 1, 'record': 1, 'while': 1, 'protected': 1, 'property': 1, + 'procedure': 1, 'published': 1, 'and': 1, 'cdecl': 1, 'do': 1, 'threadvar': 1, 'file': 1, 'in': 1, 'if': 1, + 'end': 1, 'virtual': 1, 'write': 1, 'far': 1, 'out': 1, 'begin': 1, 'repeat': 1, 'nil': 1, 'initialization': 1, + 'object': 1, 'uses': 1, 'resourcestring': 1, 'class': 1, 'register': 1, 'xorwrite': 1, 'inline': 1, 'static': 1 + }; + var CURLY_COMMENT = { + className: 'comment', + begin: '{', end: '}', + relevance: 0 + }; + var PAREN_COMMENT = { + className: 'comment', + begin: '\\(\\*', end: '\\*\\)', + relevance: 10 + }; + var STRING = { + className: 'string', + begin: '\'', end: '\'', + contains: [{begin: '\'\''}], + relevance: 0 + }; + var CHAR_STRING = { + className: 'string', begin: '(#\\d+)+' + }; + var FUNCTION = { + className: 'function', + begin: '(procedure|constructor|destructor|function)\\b', end: '[:;]', + keywords: {'function': 1, 'constructor': 10, 'destructor': 10, 'procedure': 10}, + contains: [ + { + className: 'title', begin: hljs.IDENT_RE + }, + { + className: 'params', + begin: '\\(', end: '\\)', + keywords: DELPHI_KEYWORDS, + contains: [STRING, CHAR_STRING] + }, + CURLY_COMMENT, PAREN_COMMENT + ] + }; + return { + case_insensitive: true, + defaultMode: { + keywords: DELPHI_KEYWORDS, + illegal: '("|\\$[G-Zg-z]|\\/\\*| +*/ + +hljs.LANGUAGES.diff = { + case_insensitive: true, + defaultMode: { + contains: [ + { + className: 'chunk', + begin: '^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$', + relevance: 10 + }, + { + className: 'chunk', + begin: '^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$', + relevance: 10 + }, + { + className: 'chunk', + begin: '^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$', + relevance: 10 + }, + { + className: 'header', + begin: 'Index: ', end: '$' + }, + { + className: 'header', + begin: '=====', end: '=====$' + }, + { + className: 'header', + begin: '^\\-\\-\\-', end: '$' + }, + { + className: 'header', + begin: '^\\*{3} ', end: '$' + }, + { + className: 'header', + begin: '^\\+\\+\\+', end: '$' + }, + { + className: 'header', + begin: '\\*{5}', end: '\\*{5}$' + }, + { + className: 'addition', + begin: '^\\+', end: '$' + }, + { + className: 'deletion', + begin: '^\\-', end: '$' + }, + { + className: 'change', + begin: '^\\!', end: '$' + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/django.js b/output/Scratch/js/highlight/languages/django.js new file mode 100644 index 000000000..f5037c1e6 --- /dev/null +++ b/output/Scratch/js/highlight/languages/django.js @@ -0,0 +1,81 @@ +/* +Language: Django +Requires: xml.js +*/ + +hljs.LANGUAGES.django = function() { + + function allowsDjangoSyntax(mode, parent) { + return ( + parent == undefined || // defaultMode + (!mode.className && parent.className == 'tag') || // tag_internal + mode.className == 'value' // value + ); + } + + function copy(mode, parent) { + var result = {}; + for (var key in mode) { + if (key != 'contains') { + result[key] = mode[key]; + } + var contains = []; + for (var i = 0; mode.contains && i < mode.contains.length; i++) { + contains.push(copy(mode.contains[i], mode)); + } + if (allowsDjangoSyntax(mode, parent)) { + contains = DJANGO_CONTAINS.concat(contains); + } + if (contains.length) { + result.contains = contains; + } + } + return result; + } + + var FILTER = { + className: 'filter', + begin: '\\|[A-Za-z]+\\:?', excludeEnd: true, + keywords: { + 'truncatewords': 1, 'removetags': 1, 'linebreaksbr': 1, 'yesno': 1, 'get_digit': 1, 'timesince': 1, 'random': 1, + 'striptags': 1, 'filesizeformat': 1, 'escape': 1, 'linebreaks': 1, 'length_is': 1, 'ljust': 1, 'rjust': 1, + 'cut': 1, 'urlize': 1, 'fix_ampersands': 1, 'title': 1, 'floatformat': 1, 'capfirst': 1, 'pprint': 1, + 'divisibleby': 1, 'add': 1, 'make_list': 1, 'unordered_list': 1, 'urlencode': 1, 'timeuntil': 1, + 'urlizetrunc': 1, 'wordcount': 1, 'stringformat': 1, 'linenumbers': 1, 'slice': 1, 'date': 1, 'dictsort': 1, + 'dictsortreversed': 1, 'default_if_none': 1, 'pluralize': 1, 'lower': 1, 'join': 1, 'center': 1, 'default': 1, + 'truncatewords_html': 1, 'upper': 1, 'length': 1, 'phone2numeric': 1, 'wordwrap': 1, 'time': 1, 'addslashes': 1, + 'slugify': 1, 'first': 1 + }, + contains: [ + {className: 'argument', begin: '"', end: '"'} + ] + }; + + var DJANGO_CONTAINS = [ + { + className: 'template_comment', + begin: '{%\\s*comment\\s*%}', end: '{%\\s*endcomment\\s*%}' + }, + { + className: 'template_comment', + begin: '{#', end: '#}' + }, + { + className: 'template_tag', + begin: '{%', end: '%}', + keywords: {'comment': 1, 'endcomment': 1, 'load': 1, 'templatetag': 1, 'ifchanged': 1, 'endifchanged': 1, 'if': 1, 'endif': 1, 'firstof': 1, 'for': 1, 'endfor': 1, 'in': 1, 'ifnotequal': 1, 'endifnotequal': 1, 'widthratio': 1, 'extends': 1, 'include': 1, 'spaceless': 1, 'endspaceless': 1, 'regroup': 1, 'by': 1, 'as': 1, 'ifequal': 1, 'endifequal': 1, 'ssi': 1, 'now': 1, 'with': 1, 'cycle': 1, 'url': 1, 'filter': 1, 'endfilter': 1, 'debug': 1, 'block': 1, 'endblock': 1, 'else': 1}, + contains: [FILTER] + }, + { + className: 'variable', + begin: '{{', end: '}}', + contains: [FILTER] + } + ]; + + return { + case_insensitive: true, + defaultMode: copy(hljs.LANGUAGES.xml.defaultMode) + }; + +}(); diff --git a/output/Scratch/js/highlight/languages/dos.js b/output/Scratch/js/highlight/languages/dos.js new file mode 100644 index 000000000..a2fee614d --- /dev/null +++ b/output/Scratch/js/highlight/languages/dos.js @@ -0,0 +1,35 @@ +/* +Language: DOS .bat +Author: Alexander Makarov (http://rmcreative.ru/) +*/ + +hljs.LANGUAGES.dos = { + case_insensitive: true, + defaultMode: { + keywords: { + 'flow': {'if':1, 'else':1, 'goto':1, 'for':1, 'in':1, 'do':1, 'call':1, 'exit':1, 'not':1, 'exist':1, 'errorlevel':1, 'defined':1, 'equ':1, 'neq':1, 'lss':1, 'leq':1, 'gtr':1, 'geq':1}, + 'keyword':{'shift':1, 'cd':1, 'dir':1, 'echo':1, 'setlocal':1, 'endlocal':1, 'set':1, 'pause':1, 'copy':1}, + 'stream':{'prn':1, 'nul':1, 'lpt3':1, 'lpt2':1, 'lpt1':1, 'con':1, 'com4':1, 'com3':1, 'com2':1, 'com1':1, 'aux':1}, + 'winutils':{'ping':1, 'net':1, 'ipconfig':1, 'taskkill':1, 'xcopy':1, 'ren':1, 'del':1} + }, + contains: [ + { + className: 'envvar', begin: '%%[^ ]' + }, + { + className: 'envvar', begin: '%[^ ]+?%' + }, + { + className: 'envvar', begin: '![^ ]+?!' + }, + { + className: 'number', begin: '\\b\\d+', + relevance: 0 + }, + { + className: 'comment', + begin: '@?rem', end: '$' + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/erlang-repl.js b/output/Scratch/js/highlight/languages/erlang-repl.js new file mode 100644 index 000000000..c5524765a --- /dev/null +++ b/output/Scratch/js/highlight/languages/erlang-repl.js @@ -0,0 +1,85 @@ +/* + Language: Erlang REPL + Author: Sergey Ignatov + */ + +hljs.LANGUAGES.erlang_repl = { + defaultMode: { + keywords: { + 'special_functions':{ + 'spawn':10, + 'spawn_link':10, + 'self':2 + }, + 'reserved':{ + 'after':1, + 'and':1, + 'andalso':5, + 'band':1, + 'begin':1, + 'bnot':1, + 'bor':1, + 'bsl':1, + 'bsr':1, + 'bxor':1, + 'case':1, + 'catch':0, + 'cond':1, + 'div':1, + 'end':1, + 'fun':0, + 'if':0, + 'let':1, + 'not':0, + 'of':1, + 'or':1, + 'orelse':5, + 'query':1, + 'receive':0, + 'rem':1, + 'try':0, + 'when':1, + 'xor':1 + } + }, + contains: [ + { + className: 'input_number', begin: '^[0-9]+> ', + relevance: 10 + }, + { + className: 'comment', + begin: '%', end: '$' + }, + { + className: 'number', + begin: '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)', + relevance: 0 + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'constant', begin: '\\?(::)?([A-Z]\\w*(::)?)+' + }, + { + className: 'arrow', begin: '->' + }, + { + className: 'ok', begin: 'ok' + }, + { + className: 'exclamation_mark', begin: '!' + }, + { + className: 'function_or_atom', + begin: '(\\b[a-z\'][a-zA-Z0-9_\']*:[a-z\'][a-zA-Z0-9_\']*)|(\\b[a-z\'][a-zA-Z0-9_\']*)', + relevance: 0 + }, + { + className: 'variable', + begin: '[A-Z][a-zA-Z0-9_\']*', + relevance: 0 + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/erlang.js b/output/Scratch/js/highlight/languages/erlang.js new file mode 100644 index 000000000..cae906a04 --- /dev/null +++ b/output/Scratch/js/highlight/languages/erlang.js @@ -0,0 +1,206 @@ +/* +Language: Erlang +Description: Erlang is a general-purpose functional language, with strict evaluation, single assignment, and dynamic typing. +Author: Nikolay Zakharov , Dmitry Kovega +*/ + +hljs.LANGUAGES.erlang = function(){ + var BASIC_ATOM_RE = '[a-z\'][a-zA-Z0-9_\']*'; + var FUNCTION_NAME_RE = '(' + BASIC_ATOM_RE + ':' + BASIC_ATOM_RE + '|' + BASIC_ATOM_RE + ')'; + var ERLANG_RESERVED = { + 'keyword': { + 'after': 1, + 'and': 1, + 'andalso': 10, + 'band': 1, + 'begin': 1, + 'bnot': 1, + 'bor': 1, + 'bsl': 1, + 'bzr': 1, + 'bxor': 1, + 'case': 1, + 'catch': 1, + 'cond': 1, + 'div': 1, + 'end': 1, + 'fun': 1, + 'let': 1, + 'not': 1, + 'of': 1, + 'orelse': 10, + 'query': 1, + 'receive': 1, + 'rem': 1, + 'try': 1, + 'when': 1, + 'xor': 1 + }, + 'literal': {'false': 1, 'true': 1} + }; + + var COMMENT = { + className: 'comment', + begin: '%', end: '$', + relevance: 0 + }; + var NUMBER = { + className: 'number', + begin: '\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)', + relevance: 0 + }; + var NAMED_FUN = { + begin: 'fun\\s+' + BASIC_ATOM_RE + '/\\d+' + }; + var FUNCTION_CALL = { + begin: FUNCTION_NAME_RE + '\\(', end: '\\)', + returnBegin: true, + relevance: 0, + contains: [ + { + className: 'function_name', begin: FUNCTION_NAME_RE, + relevance: 0 + }, + { + begin: '\\(', end: '\\)', endsWithParent: true, + returnEnd: true, + relevance: 0 + // "contains" defined later + } + ] + }; + var TUPLE = { + className: 'tuple', + begin: '{', end: '}', + relevance: 0 + // "contains" defined later + }; + var VAR1 = { + className: 'variable', + begin: '\\b_([A-Z][A-Za-z0-9_]*)?', + relevance: 0 + }; + var VAR2 = { + className: 'variable', + begin: '[A-Z][a-zA-Z0-9_]*', + relevance: 0 + }; + var RECORD_ACCESS = { + begin: '#', end: '}', + illegal: '.', + relevance: 0, + returnBegin: true, + contains: [ + { + className: 'record_name', + begin: '#' + hljs.UNDERSCORE_IDENT_RE, + relevance: 0 + }, + { + begin: '{', endsWithParent: true, + relevance: 0 + // "contains" defined later + } + ] + }; + + var BLOCK_STATEMENTS = { + keywords: ERLANG_RESERVED, + begin: '(fun|receive|if|try|case)', end: 'end' + }; + BLOCK_STATEMENTS.contains = [ + COMMENT, + NAMED_FUN, + hljs.inherit(hljs.APOS_STRING_MODE, {className: ''}), + BLOCK_STATEMENTS, + FUNCTION_CALL, + hljs.QUOTE_STRING_MODE, + NUMBER, + TUPLE, + VAR1, VAR2, + RECORD_ACCESS + ]; + + var BASIC_MODES = [ + COMMENT, + NAMED_FUN, + BLOCK_STATEMENTS, + FUNCTION_CALL, + hljs.QUOTE_STRING_MODE, + NUMBER, + TUPLE, + VAR1, VAR2, + RECORD_ACCESS + ]; + FUNCTION_CALL.contains[1].contains = BASIC_MODES; + TUPLE.contains = BASIC_MODES; + RECORD_ACCESS.contains[1].contains = BASIC_MODES; + + var PARAMS = { + className: 'params', + begin: '\\(', end: '\\)', + endsWithParent: true, + contains: BASIC_MODES + }; + return { + defaultMode: { + keywords: ERLANG_RESERVED, + illegal: '(', endsWithParent: true, + contains: BASIC_MODES + } + ] + }, + COMMENT, + { + className: 'pp', + begin: '^-', end: '\\.', + relevance: 0, + excludeEnd: true, + returnBegin: true, + lexems: '-' + hljs.IDENT_RE, + keywords: { + '-module':1, + '-record':1, + '-undef':1, + '-export':1, + '-ifdef':1, + '-ifndef':1, + '-author':1, + '-copyright':1, + '-doc':1, + '-vsn':1, + '-import': 1, + '-include': 1, + '-include_lib': 1, + '-compile': 1, + '-define': 1, + '-else': 1, + '-endif': 1, + '-file': 1, + '-behaviour': 1, + '-behavior': 1 + }, + contains: [PARAMS] + }, + NUMBER, + hljs.QUOTE_STRING_MODE, + RECORD_ACCESS, + VAR1, VAR2, + TUPLE + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/go.js b/output/Scratch/js/highlight/languages/go.js new file mode 100644 index 000000000..daf620fab --- /dev/null +++ b/output/Scratch/js/highlight/languages/go.js @@ -0,0 +1,59 @@ +/* +Language: Go +Author: Stephan Kountso aka StepLg +Contributors: Evgeny Stepanischev +Description: Google go language (golang). For info about language see http://golang.org/ +*/ + +hljs.LANGUAGES.go = function(){ + var GO_KEYWORDS = { + 'keyword': { + 'break' : 1, 'default' : 1, 'func' : 1, 'interface' : 1, 'select' : 1, + 'case' : 1, 'map' : 1, 'struct' : 1, 'chan' : 1, + 'else' : 1, 'goto' : 1, 'package' : 1, 'switch' : 1, 'const' : 1, + 'fallthrough' : 1, 'if' : 1, 'range' : 1, 'type' : 1, 'continue' : 1, + 'for' : 1, 'import' : 1, 'return' : 1, 'var' : 1, 'go': 1, 'defer' : 1 + }, + 'constant': { + 'true': 1, 'false': 1, 'iota': 1, 'nil': 1 + }, + 'typename': { + 'bool': 1, 'byte': 1, 'complex64': 1, 'complex128': 1, 'float32': 1, + 'float64': 1, 'int8': 1, 'int16': 1, 'int32': 1, 'int64': 1, 'string': 1, + 'uint8': 1, 'uint16': 1, 'uint32': 1, 'uint64': 1, 'int': 1, 'uint': 1, + 'uintptr': 1, 'rune': 1 + }, + 'built_in': { + 'append': 1, 'cap': 1, 'close': 1, 'complex': 1, 'copy': 1, 'imag': 1, + 'len': 1, 'make': 1, 'new': 1, 'panic': 1, 'print': 1, 'println': 1, + 'real': 1, 'recover': 1, 'delete': 1 + } + }; + return { + defaultMode: { + keywords: GO_KEYWORDS, + illegal: ' +*/ + +hljs.LANGUAGES.haskell = function(){ + var LABEL = { + className: 'label', + begin: '\\b[A-Z][\\w\']*', + relevance: 0 + }; + var CONTAINER = { + className: 'container', + begin: '\\(', end: '\\)', + contains: [ + {className: 'label', begin: '\\b[A-Z][\\w\\(\\)\\.\']*'}, + {className: 'title', begin: '[_a-z][\\w\']*'} + ] + }; + + return { + defaultMode: { + keywords: { + 'keyword': { + 'let': 1, 'in': 1, 'if': 1, 'then': 1, 'else': 1, 'case': 1, 'of': 1, + 'where': 1, 'do': 1, 'module': 1, 'import': 1, 'hiding': 1, + 'qualified': 1, 'type': 1, 'data': 1, 'newtype': 1, 'deriving': 1, + 'class': 1, 'instance': 1, 'null': 1, 'not': 1, 'as': 1 + } + }, + contains: [ + { + className: 'comment', + begin: '--', end: '$' + }, + { + className: 'comment', + begin: '{-', end: '-}' + }, + { + className: 'string', + begin: '\\s+\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0 + }, + hljs.QUOTE_STRING_MODE, + { + className: 'import', + begin: '\\bimport', end: '$', + keywords: {'import': 1, 'qualified': 1, 'as': 1, 'hiding': 1}, + contains: [CONTAINER] + }, + { + className: 'module', + begin: '\\bmodule', end: 'where', + keywords: {'module': 1, 'where': 1}, + contains: [CONTAINER] + }, + { + className: 'class', + begin: '\\b(class|instance|data|(new)?type)', end: '(where|$)', + keywords: {'class': 1, 'where': 1, 'instance': 1,'data': 1,'type': 1,'newtype': 1, 'deriving': 1}, + contains: [LABEL] + }, + hljs.C_NUMBER_MODE, + { + className: 'shebang', + begin: '#!\\/usr\\/bin\\/env\ runhaskell', end: '$' + }, + LABEL, + { + className: 'title', begin: '^[_a-z][\\w\']*' + } + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/ini.js b/output/Scratch/js/highlight/languages/ini.js new file mode 100644 index 000000000..b68251f1f --- /dev/null +++ b/output/Scratch/js/highlight/languages/ini.js @@ -0,0 +1,32 @@ +/* +Language: Ini +*/ + +hljs.LANGUAGES.ini = { + case_insensitive: true, + defaultMode: { + illegal: '[^\\s]', + contains: [ + { + className: 'comment', + begin: ';', end: '$' + }, + { + className: 'title', + begin: '^\\[', end: '\\]' + }, + { + className: 'setting', + begin: '^[a-z0-9_\\[\\]]+[ \\t]*=[ \\t]*', end: '$', + contains: [ + { + className: 'value', + endsWithParent: true, + keywords: {'on': 1, 'off': 1, 'true': 1, 'false': 1, 'yes': 1, 'no': 1}, + contains: [hljs.QUOTE_STRING_MODE, hljs.NUMBER_MODE] + } + ] + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/java.js b/output/Scratch/js/highlight/languages/java.js new file mode 100644 index 000000000..0bc745ef7 --- /dev/null +++ b/output/Scratch/js/highlight/languages/java.js @@ -0,0 +1,53 @@ +/* +Language: Java +Author: Vsevolod Solovyov +*/ + +hljs.LANGUAGES.java = { + defaultMode: { + keywords: { + 'false': 1, 'synchronized': 1, 'int': 1, 'abstract': 1, 'float': 1, 'private': 1, 'char': 1, 'interface': 1, + 'boolean': 1, 'static': 1, 'null': 1, 'if': 1, 'const': 1, 'for': 1, 'true': 1, 'while': 1, 'long': 1, + 'throw': 1, 'strictfp': 1, 'finally': 1, 'protected': 1, 'extends': 1, 'import': 1, 'native': 1, 'final': 1, + 'implements': 1, 'return': 1, 'void': 1, 'enum': 1, 'else': 1, 'break': 1, 'transient': 1, 'new': 1, 'catch': 1, + 'instanceof': 1, 'byte': 1, 'super': 1, 'class': 1, 'volatile': 1, 'case': 1, 'assert': 1, 'short': 1, + 'package': 1, 'default': 1, 'double': 1, 'public': 1, 'try': 1, 'this': 1, 'switch': 1, 'continue': 1, + 'throws': 1 + }, + contains: [ + { + className: 'javadoc', + begin: '/\\*\\*', end: '\\*/', + contains: [{ + className: 'javadoctag', begin: '@[A-Za-z]+' + }], + relevance: 10 + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'class', + begin: '(class |interface )', end: '{', + keywords: {'class': 1, 'interface': 1}, + illegal: ':', + contains: [ + { + begin: '(implements|extends)', + keywords: {'extends': 1, 'implements': 1}, + relevance: 10 + }, + { + className: 'title', + begin: hljs.UNDERSCORE_IDENT_RE + } + ] + }, + hljs.C_NUMBER_MODE, + { + className: 'annotation', begin: '@[A-Za-z]+' + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/javascript.js b/output/Scratch/js/highlight/languages/javascript.js new file mode 100644 index 000000000..4f63cd556 --- /dev/null +++ b/output/Scratch/js/highlight/languages/javascript.js @@ -0,0 +1,57 @@ +/* +Language: JavaScript +*/ + +hljs.LANGUAGES.javascript = { + defaultMode: { + keywords: { + 'keyword': { + 'in': 1, 'if': 1, 'for': 1, 'while': 1, 'finally': 1, 'var': 1, 'new': 1, 'function': 1, 'do': 1, + 'return': 1, 'void': 1, 'else': 1, 'break': 1, 'catch': 1, 'instanceof': 1, 'with': 1, 'throw': 1, + 'case': 1, 'default': 1, 'try': 1, 'this': 1, 'switch': 1, 'continue': 1, 'typeof': 1, 'delete': 1 + }, + 'literal': {'true': 1, 'false': 1, 'null': 1} + }, + contains: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + hljs.C_NUMBER_MODE, + { // regexp container + begin: '(' + hljs.RE_STARTERS_RE + '|case|return|throw)\\s*', + keywords: {'return': 1, 'throw': 1, 'case': 1}, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'regexp', + begin: '/', end: '/[gim]*', + contains: [{begin: '\\\\/'}] + } + ], + relevance: 0 + }, + { + className: 'function', + begin: '\\bfunction\\b', end: '{', + keywords: {'function': 1}, + contains: [ + { + className: 'title', begin: '[A-Za-z$_][0-9A-Za-z$_]*' + }, + { + className: 'params', + begin: '\\(', end: '\\)', + contains: [ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE + ] + } + ] + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/lisp.js b/output/Scratch/js/highlight/languages/lisp.js new file mode 100644 index 000000000..e49e4756a --- /dev/null +++ b/output/Scratch/js/highlight/languages/lisp.js @@ -0,0 +1,88 @@ +/* +Language: Lisp +Description: Generic lisp syntax +Author: Vasily Polovnyov +*/ + +hljs.LANGUAGES.lisp = function(){ + var LISP_IDENT_RE = '[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#]*'; + var LISP_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?'; + var LITERAL = { + className: 'literal', + begin: '\\b(t{1}|nil)\\b' + }; + var NUMBERS = [ + { + className: 'number', begin: LISP_SIMPLE_NUMBER_RE + }, + { + className: 'number', begin: '#b[0-1]+(/[0-1]+)?' + }, + { + className: 'number', begin: '#o[0-7]+(/[0-7]+)?' + }, + { + className: 'number', begin: '#x[0-9a-f]+(/[0-9a-f]+)?' + }, + { + className: 'number', begin: '#c\\(' + LISP_SIMPLE_NUMBER_RE + ' +' + LISP_SIMPLE_NUMBER_RE, end: '\\)' + } + ] + var STRING = { + className: 'string', + begin: '"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0 + }; + var COMMENT = { + className: 'comment', + begin: ';', end: '$' + }; + var VARIABLE = { + className: 'variable', + begin: '\\*', end: '\\*' + }; + var KEYWORD = { + className: 'keyword', + begin: '[:&]' + LISP_IDENT_RE + }; + var QUOTED_LIST = { + begin: '\\(', end: '\\)', + contains: ['self', LITERAL, STRING].concat(NUMBERS) + }; + var QUOTED1 = { + className: 'quoted', + begin: '[\'`]\\(', end: '\\)', + contains: NUMBERS.concat([STRING, VARIABLE, KEYWORD, QUOTED_LIST]) + }; + var QUOTED2 = { + className: 'quoted', + begin: '\\(quote ', end: '\\)', + keywords: {'title': {'quote': 1}}, + contains: NUMBERS.concat([STRING, VARIABLE, KEYWORD, QUOTED_LIST]) + }; + var LIST = { + className: 'list', + begin: '\\(', end: '\\)' + }; + var BODY = { + className: 'body', + endsWithParent: true, excludeEnd: true + }; + LIST.contains = [{className: 'title', begin: LISP_IDENT_RE}, BODY]; + BODY.contains = [QUOTED1, QUOTED2, LIST, LITERAL].concat(NUMBERS).concat([STRING, COMMENT, VARIABLE, KEYWORD]); + + return { + case_insensitive: true, + defaultMode: { + illegal: '[^\\s]', + contains: NUMBERS.concat([ + LITERAL, + STRING, + COMMENT, + QUOTED1, QUOTED2, + LIST + ]) + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/lua.js b/output/Scratch/js/highlight/languages/lua.js new file mode 100644 index 000000000..827504f4d --- /dev/null +++ b/output/Scratch/js/highlight/languages/lua.js @@ -0,0 +1,75 @@ +/* +Language: Lua +Author: Andrew Fedorov +*/ + +hljs.LANGUAGES.lua = function() { + var OPENING_LONG_BRACKET = '\\[=*\\['; + var CLOSING_LONG_BRACKET = '\\]=*\\]'; + var LONG_BRACKETS = { + begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET, + contains: ['self'] + }; + var COMMENTS = [ + { + className: 'comment', + begin: '--(?!' + OPENING_LONG_BRACKET + ')', end: '$' + }, + { + className: 'comment', + begin: '--' + OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET, + contains: [LONG_BRACKETS], + relevance: 10 + } + ] + return { + defaultMode: { + lexems: hljs.UNDERSCORE_IDENT_RE, + keywords: { + 'keyword': { + 'and': 1, 'break': 1, 'do': 1, 'else': 1, 'elseif': 1, 'end': 1, + 'false': 1, 'for': 1, 'if': 1, 'in': 1, 'local': 1, 'nil': 1, + 'not': 1, 'or': 1, 'repeat': 1, 'return': 1, 'then': 1, 'true': 1, + 'until': 1, 'while': 1 + }, + 'built_in': { + '_G': 1, '_VERSION': 1, 'assert': 1, 'collectgarbage': 1, 'dofile': 1, + 'error': 1, 'getfenv': 1, 'getmetatable': 1, 'ipairs': 1, 'load': 1, + 'loadfile': 1, 'loadstring': 1, 'module': 1, 'next': 1, 'pairs': 1, + 'pcall': 1, 'print': 1, 'rawequal': 1, 'rawget': 1, 'rawset': 1, + 'require': 1, 'select': 1, 'setfenv': 1, 'setmetatable': 1, + 'tonumber': 1, 'tostring': 1, 'type': 1, 'unpack': 1, 'xpcall': 1, + 'coroutine': 1, 'debug': 1, 'io': 1, 'math': 1, 'os': 1, 'package': 1, + 'string': 1, 'table': 1 + } + }, + contains: COMMENTS.concat([ + { + className: 'function', + begin: '\\bfunction\\b', end: '\\)', + keywords: {'function': 1}, + contains: [ + { + className: 'title', + begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*' + }, + { + className: 'params', + begin: '\\(', endsWithParent: true, + contains: COMMENTS + } + ].concat(COMMENTS) + }, + hljs.C_NUMBER_MODE, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'string', + begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET, + contains: [LONG_BRACKETS], + relevance: 10 + } + ]) + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/markdown.js b/output/Scratch/js/highlight/languages/markdown.js new file mode 100644 index 000000000..06b3181dc --- /dev/null +++ b/output/Scratch/js/highlight/languages/markdown.js @@ -0,0 +1,79 @@ +/* +Language: Markdown +Requires: xml.js +Author: John Crepezzi +Website: http://seejohncode.com/ +*/ + +hljs.LANGUAGES.markdown = { + case_insensitive: true, + defaultMode: { + contains: [ + // highlight headers + { + className: 'header', + begin: '^#{1,3}', end: '$' + }, + { + className: 'header', + begin: '^.+?\\n[=-]{2,}$' + }, + // inline html + { + begin: '<', end: '>', + subLanguage: 'xml' + }, + // lists (indicators only) + { + className: 'bullet', + begin: '^([*+-]|(\\d+\\.))\\s+' + }, + // strong segments + { + className: 'strong', + begin: '[*_]{2}.+?[*_]{2}' + }, + // emphasis segments + { + className: 'emphasis', + begin: '[*_].+?[*_]' + }, + // blockquotes + { + className: 'blockquote', + begin: '^>\\s+', end: '$' + }, + // code snippets + { + className: 'code', + begin: '`.+?`' + }, + { + className: 'code', + begin: '^ ', end: '$', + relevance: 0 + }, + // horizontal rules + { + className: 'horizontal_rule', + begin: '^-{3,}', end: '$' + }, + // using links - title and link + { + begin: '\\[.+?\\]\\(.+?\\)', + returnBegin: true, + contains: [ + { + className: 'link_label', + begin: '\\[.+\\]' + }, + { + className: 'link_url', + begin: '\\(', end: '\\)', + excludeBegin: true, excludeEnd: true + } + ] + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/matlab.js b/output/Scratch/js/highlight/languages/matlab.js new file mode 100644 index 000000000..d162f5acb --- /dev/null +++ b/output/Scratch/js/highlight/languages/matlab.js @@ -0,0 +1,74 @@ +/* +Language: Matlab +Author: Denis Bardadym +*/ + +hljs.LANGUAGES.matlab = { + defaultMode: { + keywords: { + 'keyword': { + 'break': 1, 'case': 1,'catch': 1,'classdef': 1,'continue': 1,'else': 1,'elseif': 1,'end': 1,'enumerated': 1, + 'events': 1,'for': 1,'function': 1,'global': 1,'if': 1,'methods': 1,'otherwise': 1,'parfor': 1, + 'persistent': 1,'properties': 1,'return': 1,'spmd': 1,'switch': 1,'try': 1,'while': 1 + }, + 'built_in': { + 'sin': 1,'sind': 1,'sinh': 1,'asin': 1,'asind': 1,'asinh': 1,'cos': 1,'cosd': 1,'cosh': 1, + 'acos': 1,'acosd': 1,'acosh': 1,'tan': 1,'tand': 1,'tanh': 1,'atan': 1,'atand': 1,'atan2': 1, + 'atanh': 1,'sec': 1,'secd': 1,'sech': 1,'asec': 1,'asecd': 1,'asech': 1,'csc': 1,'cscd': 1, + 'csch': 1,'acsc': 1,'acscd': 1,'acsch': 1,'cot': 1,'cotd': 1,'coth': 1,'acot': 1,'acotd': 1, + 'acoth': 1,'hypot': 1,'exp': 1,'expm1': 1,'log': 1,'log1p': 1,'log10': 1,'log2': 1,'pow2': 1, + 'realpow': 1,'reallog': 1,'realsqrt': 1,'sqrt': 1,'nthroot': 1,'nextpow2': 1,'abs': 1, + 'angle': 1,'complex': 1,'conj': 1,'imag': 1,'real': 1,'unwrap': 1,'isreal': 1,'cplxpair': 1, + 'fix': 1,'floor': 1,'ceil': 1,'round': 1,'mod': 1,'rem': 1,'sign': 1, + 'airy': 1,'besselj': 1,'bessely': 1,'besselh': 1,'besseli': 1,'besselk': 1,'beta': 1, + 'betainc': 1,'betaln': 1,'ellipj': 1,'ellipke': 1,'erf': 1,'erfc': 1,'erfcx': 1, + 'erfinv': 1,'expint': 1,'gamma': 1,'gammainc': 1,'gammaln': 1,'psi': 1,'legendre': 1, + 'cross': 1,'dot': 1,'factor': 1,'isprime': 1,'primes': 1,'gcd': 1,'lcm': 1,'rat': 1, + 'rats': 1,'perms': 1,'nchoosek': 1,'factorial': 1,'cart2sph': 1,'cart2pol': 1, + 'pol2cart': 1,'sph2cart': 1,'hsv2rgb': 1,'rgb2hsv': 1, + 'zeros': 1,'ones': 1,'eye': 1,'repmat': 1,'rand': 1,'randn': 1,'linspace': 1,'logspace': 1, + 'freqspace': 1,'meshgrid': 1,'accumarray': 1,'size': 1,'length': 1,'ndims': 1,'numel': 1, + 'disp': 1,'isempty': 1,'isequal': 1,'isequalwithequalnans': 1,'cat': 1,'reshape': 1, + 'diag': 1,'blkdiag': 1,'tril': 1,'triu': 1,'fliplr': 1,'flipud': 1,'flipdim': 1,'rot90': 1, + 'find': 1,'end': 1,'sub2ind': 1,'ind2sub': 1,'bsxfun': 1,'ndgrid': 1,'permute': 1, + 'ipermute': 1,'shiftdim': 1,'circshift': 1,'squeeze': 1,'isscalar': 1,'isvector': 1, + 'ans': 1,'eps': 1,'realmax': 1,'realmin': 1,'pi': 1,'i': 1,'inf': 1,'nan': 1,'isnan': 1, + 'isinf': 1,'isfinite': 1,'j': 1,'why': 1,'compan': 1,'gallery': 1,'hadamard': 1,'hankel': 1, + 'hilb': 1,'invhilb': 1,'magic': 1,'pascal': 1,'rosser': 1,'toeplitz': 1,'vander': 1, + 'wilkinson': 1 + }, + }, + illegal: '(//|"|#|/\\*|\\s+/\\w+)', + contains: [ + { + className: 'function', + begin: 'function', end: '$', + keywords: {'function': 1}, + contains: [ + { + className: 'title', + begin: hljs.UNDERSCORE_IDENT_RE + }, + { + className: 'params', + begin: '\\(', end: '\\)' + }, + { + className: 'params', + begin: '\\[', end: '\\]' + } + ] + }, + { + className: 'string', + begin: '\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}] + }, + { + className: 'comment', + begin: '\\%', end: '$' + }, + hljs.C_NUMBER_MODE + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/mel.js b/output/Scratch/js/highlight/languages/mel.js new file mode 100644 index 000000000..32a5a33a3 --- /dev/null +++ b/output/Scratch/js/highlight/languages/mel.js @@ -0,0 +1,45 @@ +/* +Language: MEL +Description: Maya Embedded Language +Author: Shuen-Huei Guan +*/ + +hljs.LANGUAGES.mel = { + defaultMode: { + keywords: { + 'int': 1, 'float': 1, 'string': 1, 'vector': 1, 'matrix': 1, + 'if': 1, 'else': 1, 'switch': 1, 'case': 1, 'default': 1, 'while': 1, 'do': 1, 'for': 1, 'in': 1, 'break': 1, 'continue': 1, + 'global': 1, 'proc': 1, 'return': 1, + 'about': 1, 'abs': 1, 'addAttr': 1, 'addAttributeEditorNodeHelp': 1, 'addDynamic': 1, 'addNewShelfTab': 1, + 'addPP': 1, 'addPanelCategory': 1, 'addPrefixToName': 1, 'advanceToNextDrivenKey': 1, 'affectedNet': 1, 'affects': 1, + 'aimConstraint': 1, 'air': 1, 'alias': 1, 'aliasAttr': 1, 'align': 1, 'alignCtx': 1, 'alignCurve': 1, 'alignSurface': 1, + 'allViewFit': 1, 'ambientLight': 1, 'angle': 1, 'angleBetween': 1, 'animCone': 1, 'animCurveEditor': 1, 'animDisplay': 1, + 'animView': 1, 'annotate': 1, 'appendStringArray': 1, 'applicationName': 1, 'applyAttrPreset': 1, 'applyTake': 1, 'arcLenDimContext': 1, + 'arcLengthDimension': 1, 'arclen': 1, 'arrayMapper': 1, 'art3dPaintCtx': 1, 'artAttrCtx': 1, 'artAttrPaintVertexCtx': 1, 'artAttrSkinPaintCtx': 1, + 'artAttrTool': 1, 'artBuildPaintMenu': 1, 'artFluidAttrCtx': 1, 'artPuttyCtx': 1, 'artSelectCtx': 1, 'artSetPaintCtx': 1, 'artUserPaintCtx': 1, + 'assignCommand': 1, 'assignInputDevice': 1, 'assignViewportFactories': 1, 'attachCurve': 1, 'attachDeviceAttr': 1, 'attachSurface': 1, 'attrColorSliderGrp': 1, 'attrCompatibility': 1, 'attrControlGrp': 1, 'attrEnumOptionMenu': 1, 'attrEnumOptionMenuGrp': 1, 'attrFieldGrp': 1, 'attrFieldSliderGrp': 1, 'attrNavigationControlGrp': 1, 'attrPresetEditWin': 1, 'attributeExists': 1, 'attributeInfo': 1, 'attributeMenu': 1, 'attributeQuery': 1, 'autoKeyframe': 1, 'autoPlace': 1, 'bakeClip': 1, 'bakeFluidShading': 1, 'bakePartialHistory': 1, 'bakeResults': 1, 'bakeSimulation': 1, 'basename': 1, 'basenameEx': 1, 'batchRender': 1, 'bessel': 1, 'bevel': 1, 'bevelPlus': 1, 'binMembership': 1, 'bindSkin': 1, 'blend2': 1, 'blendShape': 1, 'blendShapeEditor': 1, 'blendShapePanel': 1, 'blendTwoAttr': 1, 'blindDataType': 1, 'boneLattice': 1, 'boundary': 1, 'boxDollyCtx': 1, 'boxZoomCtx': 1, 'bufferCurve': 1, 'buildBookmarkMenu': 1, 'buildKeyframeMenu': 1, 'button': 1, 'buttonManip': 1, 'CBG': 1, 'cacheFile': 1, 'cacheFileCombine': 1, 'cacheFileMerge': 1, 'cacheFileTrack': 1, 'camera': 1, 'cameraView': 1, 'canCreateManip': 1, 'canvas': 1, 'capitalizeString': 1, 'catch': 1, 'catchQuiet': 1, 'ceil': 1, 'changeSubdivComponentDisplayLevel': 1, 'changeSubdivRegion': 1, 'channelBox': 1, 'character': 1, 'characterMap': 1, 'characterOutlineEditor': 1, 'characterize': 1, 'chdir': 1, 'checkBox': 1, 'checkBoxGrp': 1, 'checkDefaultRenderGlobals': 1, 'choice': 1, 'circle': 1, 'circularFillet': 1, 'clamp': 1, 'clear': 1, 'clearCache': 1, 'clip': 1, 'clipEditor': 1, 'clipEditorCurrentTimeCtx': 1, 'clipSchedule': 1, 'clipSchedulerOutliner': 1, 'clipTrimBefore': 1, 'closeCurve': 1, 'closeSurface': 1, 'cluster': 1, 'cmdFileOutput': 1, 'cmdScrollFieldExecuter': 1, 'cmdScrollFieldReporter': 1, 'cmdShell': 1, 'coarsenSubdivSelectionList': 1, 'collision': 1, 'color': 1, 'colorAtPoint': 1, 'colorEditor': 1, 'colorIndex': 1, 'colorIndexSliderGrp': 1, 'colorSliderButtonGrp': 1, 'colorSliderGrp': 1, 'columnLayout': 1, 'commandEcho': 1, 'commandLine': 1, 'commandPort': 1, 'compactHairSystem': 1, 'componentEditor': 1, 'compositingInterop': 1, 'computePolysetVolume': 1, 'condition': 1, 'cone': 1, 'confirmDialog': 1, 'connectAttr': 1, 'connectControl': 1, 'connectDynamic': 1, 'connectJoint': 1, 'connectionInfo': 1, 'constrain': 1, 'constrainValue': 1, 'constructionHistory': 1, 'container': 1, 'containsMultibyte': 1, 'contextInfo': 1, 'control': 1, 'convertFromOldLayers': 1, 'convertIffToPsd': 1, 'convertLightmap': 1, 'convertSolidTx': 1, 'convertTessellation': 1, 'convertUnit': 1, 'copyArray': 1, 'copyFlexor': 1, 'copyKey': 1, 'copySkinWeights': 1, 'cos': 1, 'cpButton': 1, 'cpCache': 1, 'cpClothSet': 1, 'cpCollision': 1, 'cpConstraint': 1, 'cpConvClothToMesh': 1, 'cpForces': 1, 'cpGetSolverAttr': 1, 'cpPanel': 1, 'cpProperty': 1, 'cpRigidCollisionFilter': 1, 'cpSeam': 1, 'cpSetEdit': 1, 'cpSetSolverAttr': 1, 'cpSolver': 1, 'cpSolverTypes': 1, 'cpTool': 1, 'cpUpdateClothUVs': 1, 'createDisplayLayer': 1, 'createDrawCtx': 1, 'createEditor': 1, 'createLayeredPsdFile': 1, 'createMotionField': 1, 'createNewShelf': 1, 'createNode': 1, 'createRenderLayer': 1, 'createSubdivRegion': 1, 'cross': 1, 'crossProduct': 1, 'ctxAbort': 1, 'ctxCompletion': 1, 'ctxEditMode': 1, 'ctxTraverse': 1, 'currentCtx': 1, 'currentTime': 1, 'currentTimeCtx': 1, 'currentUnit': 1, 'currentUnit': 1, 'curve': 1, 'curveAddPtCtx': 1, 'curveCVCtx': 1, 'curveEPCtx': 1, 'curveEditorCtx': 1, 'curveIntersect': 1, 'curveMoveEPCtx': 1, 'curveOnSurface': 1, 'curveSketchCtx': 1, 'cutKey': 1, 'cycleCheck': 1, 'cylinder': 1, 'dagPose': 1, 'date': 1, 'defaultLightListCheckBox': 1, 'defaultNavigation': 1, 'defineDataServer': 1, 'defineVirtualDevice': 1, 'deformer': 1, 'deg_to_rad': 1, 'delete': 1, 'deleteAttr': 1, 'deleteShadingGroupsAndMaterials': 1, 'deleteShelfTab': 1, 'deleteUI': 1, 'deleteUnusedBrushes': 1, 'delrandstr': 1, 'detachCurve': 1, 'detachDeviceAttr': 1, 'detachSurface': 1, 'deviceEditor': 1, 'devicePanel': 1, 'dgInfo': 1, 'dgdirty': 1, 'dgeval': 1, 'dgtimer': 1, 'dimWhen': 1, 'directKeyCtx': 1, 'directionalLight': 1, 'dirmap': 1, 'dirname': 1, 'disable': 1, 'disconnectAttr': 1, 'disconnectJoint': 1, 'diskCache': 1, 'displacementToPoly': 1, 'displayAffected': 1, 'displayColor': 1, 'displayCull': 1, 'displayLevelOfDetail': 1, 'displayPref': 1, 'displayRGBColor': 1, 'displaySmoothness': 1, 'displayStats': 1, 'displayString': 1, 'displaySurface': 1, 'distanceDimContext': 1, 'distanceDimension': 1, 'doBlur': 1, 'dolly': 1, 'dollyCtx': 1, 'dopeSheetEditor': 1, 'dot': 1, 'dotProduct': 1, 'doubleProfileBirailSurface': 1, 'drag': 1, 'dragAttrContext': 1, 'draggerContext': 1, 'dropoffLocator': 1, 'duplicate': 1, 'duplicateCurve': 1, 'duplicateSurface': 1, 'dynCache': 1, 'dynControl': 1, 'dynExport': 1, 'dynExpression': 1, 'dynGlobals': 1, 'dynPaintEditor': 1, 'dynParticleCtx': 1, 'dynPref': 1, 'dynRelEdPanel': 1, 'dynRelEditor': 1, 'dynamicLoad': 1, 'editAttrLimits': 1, 'editDisplayLayerGlobals': 1, 'editDisplayLayerMembers': 1, 'editRenderLayerAdjustment': 1, 'editRenderLayerGlobals': 1, 'editRenderLayerMembers': 1, 'editor': 1, 'editorTemplate': 1, 'effector': 1, 'emit': 1, 'emitter': 1, 'enableDevice': 1, 'encodeString': 1, 'endString': 1, 'endsWith': 1, 'env': 1, 'equivalent': 1, 'equivalentTol': 1, 'erf': 1, 'error': 1, 'eval': 1, 'eval': 1, 'evalDeferred': 1, 'evalEcho': 1, 'event': 1, 'exactWorldBoundingBox': 1, 'exclusiveLightCheckBox': 1, 'exec': 1, 'executeForEachObject': 1, 'exists': 1, 'exp': 1, 'expression': 1, 'expressionEditorListen': 1, 'extendCurve': 1, 'extendSurface': 1, 'extrude': 1, 'fcheck': 1, 'fclose': 1, 'feof': 1, 'fflush': 1, 'fgetline': 1, 'fgetword': 1, 'file': 1, 'fileBrowserDialog': 1, 'fileDialog': 1, 'fileExtension': 1, 'fileInfo': 1, 'filetest': 1, 'filletCurve': 1, 'filter': 1, 'filterCurve': 1, 'filterExpand': 1, 'filterStudioImport': 1, 'findAllIntersections': 1, 'findAnimCurves': 1, 'findKeyframe': 1, 'findMenuItem': 1, 'findRelatedSkinCluster': 1, 'finder': 1, 'firstParentOf': 1, 'fitBspline': 1, 'flexor': 1, 'floatEq': 1, 'floatField': 1, 'floatFieldGrp': 1, 'floatScrollBar': 1, 'floatSlider': 1, 'floatSlider2': 1, 'floatSliderButtonGrp': 1, 'floatSliderGrp': 1, 'floor': 1, 'flow': 1, 'fluidCacheInfo': 1, 'fluidEmitter': 1, 'fluidVoxelInfo': 1, 'flushUndo': 1, 'fmod': 1, 'fontDialog': 1, 'fopen': 1, 'formLayout': 1, 'format': 1, 'fprint': 1, 'frameLayout': 1, 'fread': 1, 'freeFormFillet': 1, 'frewind': 1, 'fromNativePath': 1, 'fwrite': 1, 'gamma': 1, 'gauss': 1, 'geometryConstraint': 1, 'getApplicationVersionAsFloat': 1, 'getAttr': 1, 'getClassification': 1, 'getDefaultBrush': 1, 'getFileList': 1, 'getFluidAttr': 1, 'getInputDeviceRange': 1, 'getMayaPanelTypes': 1, 'getModifiers': 1, 'getPanel': 1, 'getParticleAttr': 1, 'getPluginResource': 1, 'getenv': 1, 'getpid': 1, 'glRender': 1, 'glRenderEditor': 1, 'globalStitch': 1, 'gmatch': 1, 'goal': 1, 'gotoBindPose': 1, 'grabColor': 1, 'gradientControl': 1, 'gradientControlNoAttr': 1, 'graphDollyCtx': 1, 'graphSelectContext': 1, 'graphTrackCtx': 1, 'gravity': 1, 'grid': 1, 'gridLayout': 1, 'group': 1, 'groupObjectsByName': 1, 'HfAddAttractorToAS': 1, 'HfAssignAS': 1, 'HfBuildEqualMap': 1, 'HfBuildFurFiles': 1, 'HfBuildFurImages': 1, 'HfCancelAFR': 1, 'HfConnectASToHF': 1, 'HfCreateAttractor': 1, 'HfDeleteAS': 1, 'HfEditAS': 1, 'HfPerformCreateAS': 1, 'HfRemoveAttractorFromAS': 1, 'HfSelectAttached': 1, 'HfSelectAttractors': 1, 'HfUnAssignAS': 1, 'hardenPointCurve': 1, 'hardware': 1, 'hardwareRenderPanel': 1, 'headsUpDisplay': 1, 'headsUpMessage': 1, 'help': 1, 'helpLine': 1, 'hermite': 1, 'hide': 1, 'hilite': 1, 'hitTest': 1, 'hotBox': 1, 'hotkey': 1, 'hotkeyCheck': 1, 'hsv_to_rgb': 1, 'hudButton': 1, 'hudSlider': 1, 'hudSliderButton': 1, 'hwReflectionMap': 1, 'hwRender': 1, 'hwRenderLoad': 1, 'hyperGraph': 1, 'hyperPanel': 1, 'hyperShade': 1, 'hypot': 1, 'iconTextButton': 1, 'iconTextCheckBox': 1, 'iconTextRadioButton': 1, 'iconTextRadioCollection': 1, 'iconTextScrollList': 1, 'iconTextStaticLabel': 1, 'ikHandle': 1, 'ikHandleCtx': 1, 'ikHandleDisplayScale': 1, 'ikSolver': 1, 'ikSplineHandleCtx': 1, 'ikSystem': 1, 'ikSystemInfo': 1, 'ikfkDisplayMethod': 1, 'illustratorCurves': 1, 'image': 1, 'imfPlugins': 1, 'inheritTransform': 1, 'insertJoint': 1, 'insertJointCtx': 1, 'insertKeyCtx': 1, 'insertKnotCurve': 1, 'insertKnotSurface': 1, 'instance': 1, 'instanceable': 1, 'instancer': 1, 'intField': 1, 'intFieldGrp': 1, 'intScrollBar': 1, 'intSlider': 1, 'intSliderGrp': 1, 'interToUI': 1, 'internalVar': 1, 'intersect': 1, 'iprEngine': 1, 'isAnimCurve': 1, 'isConnected': 1, 'isDirty': 1, 'isParentOf': 1, 'isSameObject': 1, 'isTrue': 1, 'isValidObjectName': 1, 'isValidString': 1, 'isValidUiName': 1, 'isolateSelect': 1, 'itemFilter': 1, 'itemFilterAttr': 1, 'itemFilterRender': 1, 'itemFilterType': 1, 'joint': 1, 'jointCluster': 1, 'jointCtx': 1, 'jointDisplayScale': 1, 'jointLattice': 1, 'keyTangent': 1, 'keyframe': 1, 'keyframeOutliner': 1, 'keyframeRegionCurrentTimeCtx': 1, 'keyframeRegionDirectKeyCtx': 1, 'keyframeRegionDollyCtx': 1, 'keyframeRegionInsertKeyCtx': 1, 'keyframeRegionMoveKeyCtx': 1, 'keyframeRegionScaleKeyCtx': 1, 'keyframeRegionSelectKeyCtx': 1, 'keyframeRegionSetKeyCtx': 1, 'keyframeRegionTrackCtx': 1, 'keyframeStats': 1, 'lassoContext': 1, 'lattice': 1, 'latticeDeformKeyCtx': 1, 'launch': 1, 'launchImageEditor': 1, 'layerButton': 1, 'layeredShaderPort': 1, 'layeredTexturePort': 1, 'layout': 1, 'layoutDialog': 1, 'lightList': 1, 'lightListEditor': 1, 'lightListPanel': 1, 'lightlink': 1, 'lineIntersection': 1, 'linearPrecision': 1, 'linstep': 1, 'listAnimatable': 1, 'listAttr': 1, 'listCameras': 1, 'listConnections': 1, 'listDeviceAttachments': 1, 'listHistory': 1, 'listInputDeviceAxes': 1, 'listInputDeviceButtons': 1, 'listInputDevices': 1, 'listMenuAnnotation': 1, 'listNodeTypes': 1, 'listPanelCategories': 1, 'listRelatives': 1, 'listSets': 1, 'listTransforms': 1, 'listUnselected': 1, 'listerEditor': 1, 'loadFluid': 1, 'loadNewShelf': 1, 'loadPlugin': 1, 'loadPluginLanguageResources': 1, 'loadPrefObjects': 1, 'localizedPanelLabel': 1, 'lockNode': 1, 'loft': 1, 'log': 1, 'longNameOf': 1, 'lookThru': 1, 'ls': 1, 'lsThroughFilter': 1, 'lsType': 1, 'lsUI': 1, 'Mayatomr': 1, 'mag': 1, 'makeIdentity': 1, 'makeLive': 1, 'makePaintable': 1, 'makeRoll': 1, 'makeSingleSurface': 1, 'makeTubeOn': 1, 'makebot': 1, 'manipMoveContext': 1, 'manipMoveLimitsCtx': 1, 'manipOptions': 1, 'manipRotateContext': 1, 'manipRotateLimitsCtx': 1, 'manipScaleContext': 1, 'manipScaleLimitsCtx': 1, 'marker': 1, 'match': 1, 'max': 1, 'memory': 1, 'menu': 1, 'menuBarLayout': 1, 'menuEditor': 1, 'menuItem': 1, 'menuItemToShelf': 1, 'menuSet': 1, 'menuSetPref': 1, 'messageLine': 1, 'min': 1, 'minimizeApp': 1, 'mirrorJoint': 1, 'modelCurrentTimeCtx': 1, 'modelEditor': 1, 'modelPanel': 1, 'mouse': 1, 'movIn': 1, 'movOut': 1, 'move': 1, 'moveIKtoFK': 1, 'moveKeyCtx': 1, 'moveVertexAlongDirection': 1, 'multiProfileBirailSurface': 1, 'mute': 1, 'nParticle': 1, 'nameCommand': 1, 'nameField': 1, 'namespace': 1, 'namespaceInfo': 1, 'newPanelItems': 1, 'newton': 1, 'nodeCast': 1, 'nodeIconButton': 1, 'nodeOutliner': 1, 'nodePreset': 1, 'nodeType': 1, 'noise': 1, 'nonLinear': 1, 'normalConstraint': 1, 'normalize': 1, 'nurbsBoolean': 1, 'nurbsCopyUVSet': 1, 'nurbsCube': 1, 'nurbsEditUV': 1, 'nurbsPlane': 1, 'nurbsSelect': 1, 'nurbsSquare': 1, 'nurbsToPoly': 1, 'nurbsToPolygonsPref': 1, 'nurbsToSubdiv': 1, 'nurbsToSubdivPref': 1, 'nurbsUVSet': 1, 'nurbsViewDirectionVector': 1, 'objExists': 1, 'objectCenter': 1, 'objectLayer': 1, 'objectType': 1, 'objectTypeUI': 1, 'obsoleteProc': 1, 'oceanNurbsPreviewPlane': 1, 'offsetCurve': 1, 'offsetCurveOnSurface': 1, 'offsetSurface': 1, 'openGLExtension': 1, 'openMayaPref': 1, 'optionMenu': 1, 'optionMenuGrp': 1, 'optionVar': 1, 'orbit': 1, 'orbitCtx': 1, 'orientConstraint': 1, 'outlinerEditor': 1, 'outlinerPanel': 1, 'overrideModifier': 1, 'paintEffectsDisplay': 1, 'pairBlend': 1, 'palettePort': 1, 'paneLayout': 1, 'panel': 1, 'panelConfiguration': 1, 'panelHistory': 1, 'paramDimContext': 1, 'paramDimension': 1, 'paramLocator': 1, 'parent': 1, 'parentConstraint': 1, 'particle': 1, 'particleExists': 1, 'particleInstancer': 1, 'particleRenderInfo': 1, 'partition': 1, 'pasteKey': 1, 'pathAnimation': 1, 'pause': 1, 'pclose': 1, 'percent': 1, 'performanceOptions': 1, 'pfxstrokes': 1, 'pickWalk': 1, 'picture': 1, 'pixelMove': 1, 'planarSrf': 1, 'plane': 1, 'play': 1, 'playbackOptions': 1, 'playblast': 1, 'plugAttr': 1, 'plugNode': 1, 'pluginInfo': 1, 'pluginResourceUtil': 1, 'pointConstraint': 1, 'pointCurveConstraint': 1, 'pointLight': 1, 'pointMatrixMult': 1, 'pointOnCurve': 1, 'pointOnSurface': 1, 'pointPosition': 1, 'poleVectorConstraint': 1, 'polyAppend': 1, 'polyAppendFacetCtx': 1, 'polyAppendVertex': 1, 'polyAutoProjection': 1, 'polyAverageNormal': 1, 'polyAverageVertex': 1, 'polyBevel': 1, 'polyBlendColor': 1, 'polyBlindData': 1, 'polyBoolOp': 1, 'polyBridgeEdge': 1, 'polyCacheMonitor': 1, 'polyCheck': 1, 'polyChipOff': 1, 'polyClipboard': 1, 'polyCloseBorder': 1, 'polyCollapseEdge': 1, 'polyCollapseFacet': 1, 'polyColorBlindData': 1, 'polyColorDel': 1, 'polyColorPerVertex': 1, 'polyColorSet': 1, 'polyCompare': 1, 'polyCone': 1, 'polyCopyUV': 1, 'polyCrease': 1, 'polyCreaseCtx': 1, 'polyCreateFacet': 1, 'polyCreateFacetCtx': 1, 'polyCube': 1, 'polyCut': 1, 'polyCutCtx': 1, 'polyCylinder': 1, 'polyCylindricalProjection': 1, 'polyDelEdge': 1, 'polyDelFacet': 1, 'polyDelVertex': 1, 'polyDuplicateAndConnect': 1, 'polyDuplicateEdge': 1, 'polyEditUV': 1, 'polyEditUVShell': 1, 'polyEvaluate': 1, 'polyExtrudeEdge': 1, 'polyExtrudeFacet': 1, 'polyExtrudeVertex': 1, 'polyFlipEdge': 1, 'polyFlipUV': 1, 'polyForceUV': 1, 'polyGeoSampler': 1, 'polyHelix': 1, 'polyInfo': 1, 'polyInstallAction': 1, 'polyLayoutUV': 1, 'polyListComponentConversion': 1, 'polyMapCut': 1, 'polyMapDel': 1, 'polyMapSew': 1, 'polyMapSewMove': 1, 'polyMergeEdge': 1, 'polyMergeEdgeCtx': 1, 'polyMergeFacet': 1, 'polyMergeFacetCtx': 1, 'polyMergeUV': 1, 'polyMergeVertex': 1, 'polyMirrorFace': 1, 'polyMoveEdge': 1, 'polyMoveFacet': 1, 'polyMoveFacetUV': 1, 'polyMoveUV': 1, 'polyMoveVertex': 1, 'polyNormal': 1, 'polyNormalPerVertex': 1, 'polyNormalizeUV': 1, 'polyOptUvs': 1, 'polyOptions': 1, 'polyOutput': 1, 'polyPipe': 1, 'polyPlanarProjection': 1, 'polyPlane': 1, 'polyPlatonicSolid': 1, 'polyPoke': 1, 'polyPrimitive': 1, 'polyPrism': 1, 'polyProjection': 1, 'polyPyramid': 1, 'polyQuad': 1, 'polyQueryBlindData': 1, 'polyReduce': 1, 'polySelect': 1, 'polySelectConstraint': 1, 'polySelectConstraintMonitor': 1, 'polySelectCtx': 1, 'polySelectEditCtx': 1, 'polySeparate': 1, 'polySetToFaceNormal': 1, 'polySewEdge': 1, 'polyShortestPathCtx': 1, 'polySmooth': 1, 'polySoftEdge': 1, 'polySphere': 1, 'polySphericalProjection': 1, 'polySplit': 1, 'polySplitCtx': 1, 'polySplitEdge': 1, 'polySplitRing': 1, 'polySplitVertex': 1, 'polyStraightenUVBorder': 1, 'polySubdivideEdge': 1, 'polySubdivideFacet': 1, 'polyToSubdiv': 1, 'polyTorus': 1, 'polyTransfer': 1, 'polyTriangulate': 1, 'polyUVSet': 1, 'polyUnite': 1, 'polyWedgeFace': 1, 'popen': 1, 'popupMenu': 1, 'pose': 1, 'pow': 1, 'preloadRefEd': 1, 'print': 1, 'progressBar': 1, 'progressWindow': 1, 'projFileViewer': 1, 'projectCurve': 1, 'projectTangent': 1, 'projectionContext': 1, 'projectionManip': 1, 'promptDialog': 1, 'propModCtx': 1, 'propMove': 1, 'psdChannelOutliner': 1, 'psdEditTextureFile': 1, 'psdExport': 1, 'psdTextureFile': 1, 'putenv': 1, 'pwd': 1, 'python': 1, 'querySubdiv': 1, 'quit': 1, 'rad_to_deg': 1, 'radial': 1, 'radioButton': 1, 'radioButtonGrp': 1, 'radioCollection': 1, 'radioMenuItemCollection': 1, 'rampColorPort': 1, 'rand': 1, 'randomizeFollicles': 1, 'randstate': 1, 'rangeControl': 1, 'readTake': 1, 'rebuildCurve': 1, 'rebuildSurface': 1, 'recordAttr': 1, 'recordDevice': 1, 'redo': 1, 'reference': 1, 'referenceEdit': 1, 'referenceQuery': 1, 'refineSubdivSelectionList': 1, 'refresh': 1, 'refreshAE': 1, 'registerPluginResource': 1, 'rehash': 1, 'reloadImage': 1, 'removeJoint': 1, 'removeMultiInstance': 1, 'removePanelCategory': 1, 'rename': 1, 'renameAttr': 1, 'renameSelectionList': 1, 'renameUI': 1, 'render': 1, 'renderGlobalsNode': 1, 'renderInfo': 1, 'renderLayerButton': 1, 'renderLayerParent': 1, 'renderLayerPostProcess': 1, 'renderLayerUnparent': 1, 'renderManip': 1, 'renderPartition': 1, 'renderQualityNode': 1, 'renderSettings': 1, 'renderThumbnailUpdate': 1, 'renderWindowEditor': 1, 'renderWindowSelectContext': 1, 'renderer': 1, 'reorder': 1, 'reorderDeformers': 1, 'requires': 1, 'reroot': 1, 'resampleFluid': 1, 'resetAE': 1, 'resetPfxToPolyCamera': 1, 'resetTool': 1, 'resolutionNode': 1, 'retarget': 1, 'reverseCurve': 1, 'reverseSurface': 1, 'revolve': 1, 'rgb_to_hsv': 1, 'rigidBody': 1, 'rigidSolver': 1, 'roll': 1, 'rollCtx': 1, 'rootOf': 1, 'rot': 1, 'rotate': 1, 'rotationInterpolation': 1, 'roundConstantRadius': 1, 'rowColumnLayout': 1, 'rowLayout': 1, 'runTimeCommand': 1, 'runup': 1, 'sampleImage': 1, 'saveAllShelves': 1, 'saveAttrPreset': 1, 'saveFluid': 1, 'saveImage': 1, 'saveInitialState': 1, 'saveMenu': 1, 'savePrefObjects': 1, 'savePrefs': 1, 'saveShelf': 1, 'saveToolSettings': 1, 'scale': 1, 'scaleBrushBrightness': 1, 'scaleComponents': 1, 'scaleConstraint': 1, 'scaleKey': 1, 'scaleKeyCtx': 1, 'sceneEditor': 1, 'sceneUIReplacement': 1, 'scmh': 1, 'scriptCtx': 1, 'scriptEditorInfo': 1, 'scriptJob': 1, 'scriptNode': 1, 'scriptTable': 1, 'scriptToShelf': 1, 'scriptedPanel': 1, 'scriptedPanelType': 1, 'scrollField': 1, 'scrollLayout': 1, 'sculpt': 1, 'searchPathArray': 1, 'seed': 1, 'selLoadSettings': 1, 'select': 1, 'selectContext': 1, 'selectCurveCV': 1, 'selectKey': 1, 'selectKeyCtx': 1, 'selectKeyframeRegionCtx': 1, 'selectMode': 1, 'selectPref': 1, 'selectPriority': 1, 'selectType': 1, 'selectedNodes': 1, 'selectionConnection': 1, 'separator': 1, 'setAttr': 1, 'setAttrEnumResource': 1, 'setAttrMapping': 1, 'setAttrNiceNameResource': 1, 'setConstraintRestPosition': 1, 'setDefaultShadingGroup': 1, 'setDrivenKeyframe': 1, 'setDynamic': 1, 'setEditCtx': 1, 'setEditor': 1, 'setFluidAttr': 1, 'setFocus': 1, 'setInfinity': 1, 'setInputDeviceMapping': 1, 'setKeyCtx': 1, 'setKeyPath': 1, 'setKeyframe': 1, 'setKeyframeBlendshapeTargetWts': 1, 'setMenuMode': 1, 'setNodeNiceNameResource': 1, 'setNodeTypeFlag': 1, 'setParent': 1, 'setParticleAttr': 1, 'setPfxToPolyCamera': 1, 'setPluginResource': 1, 'setProject': 1, 'setStampDensity': 1, 'setStartupMessage': 1, 'setState': 1, 'setToolTo': 1, 'setUITemplate': 1, 'setXformManip': 1, 'sets': 1, 'shadingConnection': 1, 'shadingGeometryRelCtx': 1, 'shadingLightRelCtx': 1, 'shadingNetworkCompare': 1, 'shadingNode': 1, 'shapeCompare': 1, 'shelfButton': 1, 'shelfLayout': 1, 'shelfTabLayout': 1, 'shellField': 1, 'shortNameOf': 1, 'showHelp': 1, 'showHidden': 1, 'showManipCtx': 1, 'showSelectionInTitle': 1, 'showShadingGroupAttrEditor': 1, 'showWindow': 1, 'sign': 1, 'simplify': 1, 'sin': 1, 'singleProfileBirailSurface': 1, 'size': 1, 'sizeBytes': 1, 'skinCluster': 1, 'skinPercent': 1, 'smoothCurve': 1, 'smoothTangentSurface': 1, 'smoothstep': 1, 'snap2to2': 1, 'snapKey': 1, 'snapMode': 1, 'snapTogetherCtx': 1, 'snapshot': 1, 'soft': 1, 'softMod': 1, 'softModCtx': 1, 'sort': 1, 'sound': 1, 'soundControl': 1, 'source': 1, 'spaceLocator': 1, 'sphere': 1, 'sphrand': 1, 'spotLight': 1, 'spotLightPreviewPort': 1, 'spreadSheetEditor': 1, 'spring': 1, 'sqrt': 1, 'squareSurface': 1, 'srtContext': 1, 'stackTrace': 1, 'startString': 1, 'startsWith': 1, 'stitchAndExplodeShell': 1, 'stitchSurface': 1, 'stitchSurfacePoints': 1, 'strcmp': 1, 'stringArrayCatenate': 1, 'stringArrayContains': 1, 'stringArrayCount': 1, 'stringArrayInsertAtIndex': 1, 'stringArrayIntersector': 1, 'stringArrayRemove': 1, 'stringArrayRemoveAtIndex': 1, 'stringArrayRemoveDuplicates': 1, 'stringArrayRemoveExact': 1, 'stringArrayToString': 1, 'stringToStringArray': 1, 'strip': 1, 'stripPrefixFromName': 1, 'stroke': 1, 'subdAutoProjection': 1, 'subdCleanTopology': 1, 'subdCollapse': 1, 'subdDuplicateAndConnect': 1, 'subdEditUV': 1, 'subdListComponentConversion': 1, 'subdMapCut': 1, 'subdMapSewMove': 1, 'subdMatchTopology': 1, 'subdMirror': 1, 'subdToBlind': 1, 'subdToPoly': 1, 'subdTransferUVsToCache': 1, 'subdiv': 1, 'subdivCrease': 1, 'subdivDisplaySmoothness': 1, 'substitute': 1, 'substituteAllString': 1, 'substituteGeometry': 1, 'substring': 1, 'surface': 1, 'surfaceSampler': 1, 'surfaceShaderList': 1, 'swatchDisplayPort': 1, 'switchTable': 1, 'symbolButton': 1, 'symbolCheckBox': 1, 'sysFile': 1, 'system': 1, 'tabLayout': 1, 'tan': 1, 'tangentConstraint': 1, 'texLatticeDeformContext': 1, 'texManipContext': 1, 'texMoveContext': 1, 'texMoveUVShellContext': 1, 'texRotateContext': 1, 'texScaleContext': 1, 'texSelectContext': 1, 'texSelectShortestPathCtx': 1, 'texSmudgeUVContext': 1, 'texWinToolCtx': 1, 'text': 1, 'textCurves': 1, 'textField': 1, 'textFieldButtonGrp': 1, 'textFieldGrp': 1, 'textManip': 1, 'textScrollList': 1, 'textToShelf': 1, 'textureDisplacePlane': 1, 'textureHairColor': 1, 'texturePlacementContext': 1, 'textureWindow': 1, 'threadCount': 1, 'threePointArcCtx': 1, 'timeControl': 1, 'timePort': 1, 'timerX': 1, 'toNativePath': 1, 'toggle': 1, 'toggleAxis': 1, 'toggleWindowVisibility': 1, 'tokenize': 1, 'tokenizeList': 1, 'tolerance': 1, 'tolower': 1, 'toolButton': 1, 'toolCollection': 1, 'toolDropped': 1, 'toolHasOptions': 1, 'toolPropertyWindow': 1, 'torus': 1, 'toupper': 1, 'trace': 1, 'track': 1, 'trackCtx': 1, 'transferAttributes': 1, 'transformCompare': 1, 'transformLimits': 1, 'translator': 1, 'trim': 1, 'trunc': 1, 'truncateFluidCache': 1, 'truncateHairCache': 1, 'tumble': 1, 'tumbleCtx': 1, 'turbulence': 1, 'twoPointArcCtx': 1, 'uiRes': 1, 'uiTemplate': 1, 'unassignInputDevice': 1, 'undo': 1, 'undoInfo': 1, 'ungroup': 1, 'uniform': 1, 'unit': 1, 'unloadPlugin': 1, 'untangleUV': 1, 'untitledFileName': 1, 'untrim': 1, 'upAxis': 1, 'updateAE': 1, 'userCtx': 1, 'uvLink': 1, 'uvSnapshot': 1, 'validateShelfName': 1, 'vectorize': 1, 'view2dToolCtx': 1, 'viewCamera': 1, 'viewClipPlane': 1, 'viewFit': 1, 'viewHeadOn': 1, 'viewLookAt': 1, 'viewManip': 1, 'viewPlace': 1, 'viewSet': 1, 'visor': 1, 'volumeAxis': 1, 'vortex': 1, 'waitCursor': 1, 'warning': 1, 'webBrowser': 1, 'webBrowserPrefs': 1, 'whatIs': 1, 'window': 1, 'windowPref': 1, 'wire': 1, 'wireContext': 1, 'workspace': 1, 'wrinkle': 1, 'wrinkleContext': 1, 'writeTake': 1, 'xbmLangPathList': 1, 'xform': 1 + }, + illegal: ' +*/ + +hljs.LANGUAGES.nginx = function() { + var VAR1 = { + className: 'variable', + begin: '\\$\\d+' + }; + var VAR2 = { + className: 'variable', + begin: '\\${', end: '}' + }; + var VAR3 = { + className: 'variable', + begin: '[\\$\\@]' + hljs.UNDERSCORE_IDENT_RE + }; + + return { + defaultMode: { + contains: [ + hljs.HASH_COMMENT_MODE, + { // directive + begin: hljs.UNDERSCORE_IDENT_RE, end: ';|{', returnEnd: true, + keywords: { + accept_mutex: 1, accept_mutex_delay: 1, access_log: 1, + add_after_body: 1, add_before_body: 1, add_header: 1, + addition_types: 1, alias: 1, allow: 1, ancient_browser: 1, + ancient_browser_value: 1, auth_basic: 1, auth_basic_user_file: 1, + autoindex: 1, autoindex_exact_size: 1, autoindex_localtime: 1, + 'break': 1, charset: 1, charset_map: 1, + charset_types: 1, client_body_buffer_size: 1, + client_body_in_file_only: 1, client_body_in_single_buffer: 1, + client_body_temp_path: 1, client_body_timeout: 1, + client_header_buffer_size: 1, client_header_timeout: 1, + client_max_body_size: 1, connection_pool_size: 1, connections: 1, + create_full_put_path: 1, daemon: 1, dav_access: 1, dav_methods: 1, + debug_connection: 1, debug_points: 1, default_type: 1, deny: 1, + directio: 1, directio_alignment: 1, echo: 1, echo_after_body: 1, + echo_before_body: 1, echo_blocking_sleep: 1, echo_duplicate: 1, + echo_end: 1, echo_exec: 1, echo_flush: 1, echo_foreach_split: 1, + echo_location: 1, echo_location_async: 1, echo_read_request_body: 1, + echo_request_body: 1, echo_reset_timer: 1, echo_sleep: 1, + echo_subrequest: 1, echo_subrequest_async: 1, empty_gif: 1, + env: 1, error_log: 1, error_page: 1, + events: 1, expires: 1, fastcgi_bind: 1, fastcgi_buffer_size: 1, + fastcgi_buffers: 1, fastcgi_busy_buffers_size: 1, fastcgi_cache: 1, + fastcgi_cache_key: 1, fastcgi_cache_methods: 1, + fastcgi_cache_min_uses: 1, fastcgi_cache_path: 1, + fastcgi_cache_use_stale: 1, fastcgi_cache_valid: 1, + fastcgi_catch_stderr: 1, fastcgi_connect_timeout: 1, + fastcgi_hide_header: 1, fastcgi_ignore_client_abort: 1, + fastcgi_ignore_headers: 1, fastcgi_index: 1, + fastcgi_intercept_errors: 1, fastcgi_max_temp_file_size: 1, + fastcgi_next_upstream: 1, fastcgi_param: 1, fastcgi_pass: 1, + fastcgi_pass_header: 1, fastcgi_pass_request_body: 1, + fastcgi_pass_request_headers: 1, fastcgi_read_timeout: 1, + fastcgi_send_lowat: 1, fastcgi_send_timeout: 1, + fastcgi_split_path_info: 1, fastcgi_store: 1, fastcgi_store_access: 1, + fastcgi_temp_file_write_size: 1, fastcgi_temp_path: 1, + fastcgi_upstream_fail_timeout: 1, fastcgi_upstream_max_fails: 1, + flv: 1, geo: 1, geoip_city: 1, geoip_country: 1, gzip: 1, + gzip_buffers: 1, gzip_comp_level: 1, gzip_disable: 1, gzip_hash: 1, + gzip_http_version: 1, gzip_min_length: 1, gzip_no_buffer: 1, + gzip_proxied: 1, gzip_static: 1, gzip_types: 1, gzip_vary: 1, + gzip_window: 1, http: 1, 'if': 1, if_modified_since: 1, + ignore_invalid_headers: 1, image_filter: 1, image_filter_buffer: 1, + image_filter_jpeg_quality: 1, image_filter_transparency: 1, include: 1, + index: 1, internal: 1, ip_hash: 1, js: 1, js_load: 1, js_require: 1, + js_utf8: 1, keepalive_requests: 1, keepalive_timeout: 1, + kqueue_changes: 1, kqueue_events: 1, large_client_header_buffers: 1, + limit_conn: 1, limit_conn_log_level: 1, limit_except: 1, limit_rate: 1, + limit_rate_after: 1, limit_req: 1, limit_req_log_level: 1, + limit_req_zone: 1, limit_zone: 1, lingering_time: 1, + lingering_timeout: 1, listen: 1, location: 1, lock_file: 1, + log_format: 1, log_not_found: 1, log_subrequest: 1, map: 1, + map_hash_bucket_size: 1, map_hash_max_size: 1, master_process: 1, + memcached_bind: 1, memcached_buffer_size: 1, + memcached_connect_timeout: 1, memcached_next_upstream: 1, + memcached_pass: 1, memcached_read_timeout: 1, + memcached_send_timeout: 1, memcached_upstream_fail_timeout: 1, + memcached_upstream_max_fails: 1, merge_slashes: 1, min_delete_depth: 1, + modern_browser: 1, modern_browser_value: 1, more_clear_headers: 1, + more_clear_input_headers: 1, more_set_headers: 1, + more_set_input_headers: 1, msie_padding: 1, msie_refresh: 1, + multi_accept: 1, open_file_cache: 1, open_file_cache_errors: 1, + open_file_cache_events: 1, open_file_cache_min_uses: 1, + open_file_cache_retest: 1, open_file_cache_valid: 1, + open_log_file_cache: 1, optimize_server_names: 1, output_buffers: 1, + override_charset: 1, perl: 1, perl_modules: 1, + perl_require: 1, perl_set: 1, pid: 1, port_in_redirect: 1, + post_action: 1, postpone_gzipping: 1, postpone_output: 1, + proxy_bind: 1, proxy_buffer_size: 1, proxy_buffering: 1, + proxy_buffers: 1, proxy_busy_buffers_size: 1, proxy_cache: 1, + proxy_cache_key: 1, proxy_cache_methods: 1, proxy_cache_min_uses: 1, + proxy_cache_path: 1, proxy_cache_use_stale: 1, proxy_cache_valid: 1, + proxy_connect_timeout: 1, proxy_headers_hash_bucket_size: 1, + proxy_headers_hash_max_size: 1, proxy_hide_header: 1, + proxy_ignore_client_abort: 1, proxy_ignore_headers: 1, + proxy_intercept_errors: 1, proxy_max_temp_file_size: 1, + proxy_method: 1, proxy_next_upstream: 1, proxy_pass: 1, + proxy_pass_header: 1, proxy_pass_request_body: 1, + proxy_pass_request_headers: 1, proxy_read_timeout: 1, + proxy_redirect: 1, proxy_send_lowat: 1, proxy_send_timeout: 1, + proxy_set_body: 1, proxy_set_header: 1, proxy_store: 1, + proxy_store_access: 1, proxy_temp_file_write_size: 1, + proxy_temp_path: 1, proxy_upstream_fail_timeout: 1, + proxy_upstream_max_fails: 1, push_authorized_channels_only: 1, + push_channel_group: 1, push_max_channel_id_length: 1, + push_max_channel_subscribers: 1, push_max_message_buffer_length: 1, + push_max_reserved_memory: 1, push_message_buffer_length: 1, + push_message_timeout: 1, push_min_message_buffer_length: 1, + push_min_message_recipients: 1, push_publisher: 1, + push_store_messages: 1, push_subscriber: 1, + push_subscriber_concurrency: 1, random_index: 1, read_ahead: 1, + real_ip_header: 1, recursive_error_pages: 1, request_pool_size: 1, + reset_timedout_connection: 1, resolver: 1, resolver_timeout: 1, + 'return': 1, rewrite: 1, rewrite_log: 1, root: 1, satisfy: 1, + satisfy_any: 1, send_lowat: 1, send_timeout: 1, sendfile: 1, + sendfile_max_chunk: 1, server: 1, server_name: 1, + server_name_in_redirect: 1, server_names_hash_bucket_size: 1, + server_names_hash_max_size: 1, server_tokens: 1, 'set': 1, + set_real_ip_from: 1, source_charset: 1, ssi: 1, + ssi_ignore_recycled_buffers: 1, ssi_min_file_chunk: 1, + ssi_silent_errors: 1, ssi_types: 1, ssi_value_length: 1, ssl: 1, + ssl_certificate: 1, ssl_certificate_key: 1, ssl_ciphers: 1, + ssl_client_certificate: 1, ssl_crl: 1, ssl_dhparam: 1, + ssl_prefer_server_ciphers: 1, ssl_protocols: 1, ssl_session_cache: 1, + ssl_session_timeout: 1, ssl_verify_client: 1, ssl_verify_depth: 1, + sub_filter: 1, sub_filter_once: 1, sub_filter_types: 1, tcp_nodelay: 1, + tcp_nopush: 1, timer_resolution: 1, try_files: 1, types: 1, + types_hash_bucket_size: 1, types_hash_max_size: 1, + underscores_in_headers: 1, uninitialized_variable_warn: 1, upstream: 1, + use: 1, user: 1, userid: 1, userid_domain: 1, userid_expires: 1, userid_mark: 1, + userid_name: 1, userid_p3p: 1, userid_path: 1, userid_service: 1, + valid_referers: 1, variables_hash_bucket_size: 1, + variables_hash_max_size: 1, worker_connections: 1, + worker_cpu_affinity: 1, worker_priority: 1, worker_processes: 1, + worker_rlimit_core: 1, worker_rlimit_nofile: 1, + worker_rlimit_sigpending: 1, working_directory: 1, xml_entities: 1, + xslt_stylesheet: 1, xslt_types: 1 + }, + relevance: 0, + contains: [ + hljs.HASH_COMMENT_MODE, + { + begin: '\\s', end: '[;{]', returnBegin: true, returnEnd: true, + lexems: '[a-z/]+', + keywords: { + 'built_in': { + 'on': 1, 'off': 1, 'yes': 1, 'no': 1, 'true': 1, 'false': 1, + 'none': 1, 'blocked': 1, 'debug': 1, 'info': 1, 'notice': 1, + 'warn': 1, 'error': 1, 'crit': 1, 'select': 1, 'permanent': 1, + 'redirect': 1, 'kqueue': 1, 'rtsig': 1, 'epoll': 1, 'poll': 1, + '/dev/poll': 1 + } + }, + relevance: 0, + contains: [ + hljs.HASH_COMMENT_MODE, + { + className: 'string', + begin: '"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE, VAR1, VAR2, VAR3], + relevance: 0 + }, + { + className: 'string', + begin: "'", end: "'", + contains: [hljs.BACKSLASH_ESCAPE, VAR1, VAR2, VAR3], + relevance: 0 + }, + { + className: 'string', + begin: '([a-z]+):/', end: '[;\\s]', returnEnd: true + }, + { + className: 'regexp', + begin: "\\s\\^", end: "\\s|{|;", returnEnd: true, + contains: [hljs.BACKSLASH_ESCAPE, VAR1, VAR2, VAR3] + }, + // regexp locations (~, ~*) + { + className: 'regexp', + begin: "~\\*?\\s+", end: "\\s|{|;", returnEnd: true, + contains: [hljs.BACKSLASH_ESCAPE, VAR1, VAR2, VAR3] + }, + // *.example.com + { + className: 'regexp', + begin: "\\*(\\.[a-z\\-]+)+", + contains: [hljs.BACKSLASH_ESCAPE, VAR1, VAR2, VAR3] + }, + // sub.example.* + { + className: 'regexp', + begin: "([a-z\\-]+\\.)+\\*", + contains: [hljs.BACKSLASH_ESCAPE, VAR1, VAR2, VAR3] + }, + // IP + { + className: 'number', + begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b' + }, + // units + { + className: 'number', + begin: '\\s\\d+[kKmMgGdshdwy]*\\b', + relevance: 0 + }, + VAR1, VAR2, VAR3 + ] + } + ] + } + ] + } + } +}(); diff --git a/output/Scratch/js/highlight/languages/objectivec.js b/output/Scratch/js/highlight/languages/objectivec.js new file mode 100644 index 000000000..a76fe535f --- /dev/null +++ b/output/Scratch/js/highlight/languages/objectivec.js @@ -0,0 +1,94 @@ +/* +Language: Objective C +Author: Valerii Hiora +*/ + +hljs.LANGUAGES.objectivec = function(){ + var OBJC_KEYWORDS = { + 'keyword': { + 'false': 1, 'int': 1, 'float': 1, 'while': 1, 'private': 1, 'char': 1, + 'catch': 1, 'export': 1, 'sizeof': 2, 'typedef': 2, 'const': 1, + 'struct': 1, 'for': 1, 'union': 1, 'unsigned': 1, 'long': 1, + 'volatile': 2, 'static': 1, 'protected': 1, 'bool': 1, 'mutable': 1, + 'if': 1, 'public': 1, 'do': 1, 'return': 1, 'goto': 1, 'void': 2, + 'enum': 1, 'else': 1, 'break': 1, 'extern': 1, 'true': 1, 'class': 1, + 'asm': 1, 'case': 1, 'short': 1, 'default': 1, 'double': 1, 'throw': 1, + 'register': 1, 'explicit': 1, 'signed': 1, 'typename': 1, 'try': 1, + 'this': 1, 'switch': 1, 'continue': 1, 'wchar_t': 1, 'inline': 1, + 'readonly': 1, 'assign': 1, 'property': 1, 'protocol': 10, 'self': 1, + 'synchronized': 1, 'end': 1, 'synthesize': 50, 'id': 1, 'optional': 1, + 'required': 1, 'implementation': 10, 'nonatomic': 1,'interface': 1, + 'super': 1, 'unichar': 1, 'finally': 2, 'dynamic': 2, 'nil': 1 + }, + 'built_in': { + 'YES': 5, 'NO': 5, 'NULL': 1, 'IBOutlet': 50, 'IBAction': 50, + 'NSString': 50, 'NSDictionary': 50, 'CGRect': 50, 'CGPoint': 50, + 'NSRange': 50, 'release': 1, 'retain': 1, 'autorelease': 50, + 'UIButton': 50, 'UILabel': 50, 'UITextView': 50, 'UIWebView': 50, + 'MKMapView': 50, 'UISegmentedControl': 50, 'NSObject': 50, + 'UITableViewDelegate': 50, 'UITableViewDataSource': 50, 'NSThread': 50, + 'UIActivityIndicator': 50, 'UITabbar': 50, 'UIToolBar': 50, + 'UIBarButtonItem': 50, 'UIImageView': 50, 'NSAutoreleasePool': 50, + 'UITableView': 50, 'BOOL': 1, 'NSInteger': 20, 'CGFloat': 20, + 'NSException': 50, 'NSLog': 50, 'NSMutableString': 50, + 'NSMutableArray': 50, 'NSMutableDictionary': 50, 'NSURL': 50 + } + }; + return { + defaultMode: { + keywords: OBJC_KEYWORDS, + illegal: '' + } + ] + }, + { + className: 'preprocessor', + begin: '#', + end: '$' + }, + { + className: 'class', + begin: 'interface|class|protocol|implementation', + end: '({|$)', + keywords: { + 'interface': 1, + 'class': 1, + 'protocol': 5, + 'implementation': 5 + }, + contains: [{ + className: 'id', + begin: hljs.UNDERSCORE_IDENT_RE + } + ] + } + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/parser3.js b/output/Scratch/js/highlight/languages/parser3.js new file mode 100644 index 000000000..2b5fe43bc --- /dev/null +++ b/output/Scratch/js/highlight/languages/parser3.js @@ -0,0 +1,50 @@ +/* +Language: Parser3 +Requires: xml.js +Author: Oleg Volchkov +*/ + +hljs.LANGUAGES.parser3 = { + defaultMode: { + subLanguage: 'html', + contains: [ + { + className: 'comment', + begin: '^#', end: '$' + }, + { + className: 'comment', + begin: '\\^rem{', end: '}', + relevance: 10, + contains: [ + { + begin: '{', end: '}', + contains: ['self'] + } + ] + }, + { + className: 'preprocessor', + begin: '^@(?:BASE|USE|CLASS|OPTIONS)$', + relevance: 10 + }, + { + className: 'title', + begin: '@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$' + }, + { + className: 'variable', + begin: '\\$\\{?[\\w\\-\\.\\:]+\\}?' + }, + { + className: 'keyword', + begin: '\\^[\\w\\-\\.\\:]+' + }, + { + className: 'number', + begin: '\\^#[0-9a-fA-F]+' + }, + hljs.C_NUMBER_MODE + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/perl.js b/output/Scratch/js/highlight/languages/perl.js new file mode 100644 index 000000000..8ead1157b --- /dev/null +++ b/output/Scratch/js/highlight/languages/perl.js @@ -0,0 +1,181 @@ +/* +Language: Perl +Author: Peter Leonov +*/ + +hljs.LANGUAGES.perl = function(){ + var PERL_KEYWORDS = { + 'getpwent': 1, 'getservent': 1, 'quotemeta': 1, 'msgrcv': 1, 'scalar': 1, 'kill': 1, 'dbmclose': 1, 'undef': 1, + 'lc': 1, 'ma': 1, 'syswrite': 1, 'tr': 1, 'send': 1, 'umask': 1, 'sysopen': 1, 'shmwrite': 1, 'vec': 1, 'qx': 1, + 'utime': 1, 'local': 1, 'oct': 1, 'semctl': 1, 'localtime': 1, 'readpipe': 1, 'do': 1, 'return': 1, 'format': 1, + 'read': 1, 'sprintf': 1, 'dbmopen': 1, 'pop': 1, 'getpgrp': 1, 'not': 1, 'getpwnam': 1, 'rewinddir': 1, 'qq': 1, + 'fileno': 1, 'qw': 1, 'endprotoent': 1, 'wait': 1, 'sethostent': 1, 'bless': 1, 's': 1, 'opendir': 1, + 'continue': 1, 'each': 1, 'sleep': 1, 'endgrent': 1, 'shutdown': 1, 'dump': 1, 'chomp': 1, 'connect': 1, + 'getsockname': 1, 'die': 1, 'socketpair': 1, 'close': 1, 'flock': 1, 'exists': 1, 'index': 1, 'shmget': 1, + 'sub': 1, 'for': 1, 'endpwent': 1, 'redo': 1, 'lstat': 1, 'msgctl': 1, 'setpgrp': 1, 'abs': 1, 'exit': 1, + 'select': 1, 'print': 1, 'ref': 1, 'gethostbyaddr': 1, 'unshift': 1, 'fcntl': 1, 'syscall': 1, 'goto': 1, + 'getnetbyaddr': 1, 'join': 1, 'gmtime': 1, 'symlink': 1, 'semget': 1, 'splice': 1, 'x': 1, 'getpeername': 1, + 'recv': 1, 'log': 1, 'setsockopt': 1, 'cos': 1, 'last': 1, 'reverse': 1, 'gethostbyname': 1, 'getgrnam': 1, + 'study': 1, 'formline': 1, 'endhostent': 1, 'times': 1, 'chop': 1, 'length': 1, 'gethostent': 1, 'getnetent': 1, + 'pack': 1, 'getprotoent': 1, 'getservbyname': 1, 'rand': 1, 'mkdir': 1, 'pos': 1, 'chmod': 1, 'y': 1, 'substr': 1, + 'endnetent': 1, 'printf': 1, 'next': 1, 'open': 1, 'msgsnd': 1, 'readdir': 1, 'use': 1, 'unlink': 1, + 'getsockopt': 1, 'getpriority': 1, 'rindex': 1, 'wantarray': 1, 'hex': 1, 'system': 1, 'getservbyport': 1, + 'endservent': 1, 'int': 1, 'chr': 1, 'untie': 1, 'rmdir': 1, 'prototype': 1, 'tell': 1, 'listen': 1, 'fork': 1, + 'shmread': 1, 'ucfirst': 1, 'setprotoent': 1, 'else': 1, 'sysseek': 1, 'link': 1, 'getgrgid': 1, 'shmctl': 1, + 'waitpid': 1, 'unpack': 1, 'getnetbyname': 1, 'reset': 1, 'chdir': 1, 'grep': 1, 'split': 1, 'require': 1, + 'caller': 1, 'lcfirst': 1, 'until': 1, 'warn': 1, 'while': 1, 'values': 1, 'shift': 1, 'telldir': 1, 'getpwuid': 1, + 'my': 1, 'getprotobynumber': 1, 'delete': 1, 'and': 1, 'sort': 1, 'uc': 1, 'defined': 1, 'srand': 1, 'accept': 1, + 'package': 1, 'seekdir': 1, 'getprotobyname': 1, 'semop': 1, 'our': 1, 'rename': 1, 'seek': 1, 'if': 1, 'q': 1, + 'chroot': 1, 'sysread': 1, 'setpwent': 1, 'no': 1, 'crypt': 1, 'getc': 1, 'chown': 1, 'sqrt': 1, 'write': 1, + 'setnetent': 1, 'setpriority': 1, 'foreach': 1, 'tie': 1, 'sin': 1, 'msgget': 1, 'map': 1, 'stat': 1, + 'getlogin': 1, 'unless': 1, 'elsif': 1, 'truncate': 1, 'exec': 1, 'keys': 1, 'glob': 1, 'tied': 1, 'closedir': 1, + 'ioctl': 1, 'socket': 1, 'readlink': 1, 'eval': 1, 'xor': 1, 'readline': 1, 'binmode': 1, 'setservent': 1, + 'eof': 1, 'ord': 1, 'bind': 1, 'alarm': 1, 'pipe': 1, 'atan2': 1, 'getgrent': 1, 'exp': 1, 'time': 1, 'push': 1, + 'setgrent': 1, 'gt': 1, 'lt': 1, 'or': 1, 'ne': 1, 'm': 1 + }; + var SUBST = { + className: 'subst', + begin: '[$@]\\{', end: '\\}', + keywords: PERL_KEYWORDS, + relevance: 10 + }; + var VAR1 = { + className: 'variable', + begin: '\\$\\d' + }; + var VAR2 = { + className: 'variable', + begin: '[\\$\\%\\@\\*](\\^\\w\\b|#\\w+(\\:\\:\\w+)*|[^\\s\\w{]|{\\w+}|\\w+(\\:\\:\\w*)*)' + }; + var STRING_CONTAINS = [hljs.BACKSLASH_ESCAPE, SUBST, VAR1, VAR2]; + var METHOD = { + begin: '->', + contains: [ + {begin: hljs.IDENT_RE}, + {begin: '{', end: '}'} + ] + }; + var COMMENT = { + className: 'comment', + begin: '^(__END__|__DATA__)', end: '\\n$', + relevance: 5 + } + var PERL_DEFAULT_CONTAINS = [ + VAR1, VAR2, + hljs.HASH_COMMENT_MODE, + COMMENT, + METHOD, + { + className: 'string', + begin: 'q[qwxr]?\\s*\\(', end: '\\)', + contains: STRING_CONTAINS, + relevance: 5 + }, + { + className: 'string', + begin: 'q[qwxr]?\\s*\\[', end: '\\]', + contains: STRING_CONTAINS, + relevance: 5 + }, + { + className: 'string', + begin: 'q[qwxr]?\\s*\\{', end: '\\}', + contains: STRING_CONTAINS, + relevance: 5 + }, + { + className: 'string', + begin: 'q[qwxr]?\\s*\\|', end: '\\|', + contains: STRING_CONTAINS, + relevance: 5 + }, + { + className: 'string', + begin: 'q[qwxr]?\\s*\\<', end: '\\>', + contains: STRING_CONTAINS, + relevance: 5 + }, + { + className: 'string', + begin: 'qw\\s+q', end: 'q', + contains: STRING_CONTAINS, + relevance: 5 + }, + { + className: 'string', + begin: '\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0 + }, + { + className: 'string', + begin: '"', end: '"', + contains: STRING_CONTAINS, + relevance: 0 + }, + { + className: 'string', + begin: '`', end: '`', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + className: 'string', + begin: '{\\w+}', + relevance: 0 + }, + { + className: 'string', + begin: '\-?\\w+\\s*\\=\\>', + relevance: 0 + }, + { + className: 'number', + begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', + relevance: 0 + }, + { // regexp container + begin: '(' + hljs.RE_STARTERS_RE + '|split|return|print|reverse|grep)\\s*', + keywords: {'split': 1, 'return': 1, 'print': 1, 'reverse': 1, 'grep': 1}, + relevance: 0, + contains: [ + hljs.HASH_COMMENT_MODE, + COMMENT, + { + className: 'regexp', + begin: '(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*', + relevance: 10 + }, + { + className: 'regexp', + begin: '(m|qr)?/', end: '/[a-z]*', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0 // allows empty "//" which is a common comment delimiter in other languages + } + ] + }, + { + className: 'sub', + begin: '\\bsub\\b', end: '(\\s*\\(.*?\\))?[;{]', + keywords: {'sub':1}, + relevance: 5 + }, + { + className: 'operator', + begin: '-\\w\\b', + relevance: 0 + }, + { + className: 'pod', + begin: '\\=\\w', end: '\\=cut' + } + ]; + SUBST.contains = PERL_DEFAULT_CONTAINS; + METHOD.contains[1].contains = PERL_DEFAULT_CONTAINS; + + return { + defaultMode: { + keywords: PERL_KEYWORDS, + contains: PERL_DEFAULT_CONTAINS + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/php.js b/output/Scratch/js/highlight/languages/php.js new file mode 100644 index 000000000..64d8de13f --- /dev/null +++ b/output/Scratch/js/highlight/languages/php.js @@ -0,0 +1,77 @@ +/* +Language: PHP +Author: Victor Karamzin +Contributors: Evgeny Stepanischev +*/ + +hljs.LANGUAGES.php = { + case_insensitive: true, + defaultMode: { + keywords: { + 'and': 1, 'include_once': 1, 'list': 1, 'abstract': 1, 'global': 1, + 'private': 1, 'echo': 1, 'interface': 1, 'as': 1, 'static': 1, + 'endswitch': 1, 'array': 1, 'null': 1, 'if': 1, 'endwhile': 1, 'or': 1, + 'const': 1, 'for': 1, 'endforeach': 1, 'self': 1, 'var': 1, 'while': 1, + 'isset': 1, 'public': 1, 'protected': 1, 'exit': 1, 'foreach': 1, + 'throw': 1, 'elseif': 1, 'extends': 1, 'include': 1, '__FILE__': 1, + 'empty': 1, 'require_once': 1, 'function': 1, 'do': 1, 'xor': 1, + 'return': 1, 'implements': 1, 'parent': 1, 'clone': 1, 'use': 1, + '__CLASS__': 1, '__LINE__': 1, 'else': 1, 'break': 1, 'print': 1, + 'eval': 1, 'new': 1, 'catch': 1, '__METHOD__': 1, 'class': 1, 'case': 1, + 'exception': 1, 'php_user_filter': 1, 'default': 1, 'die': 1, + 'require': 1, '__FUNCTION__': 1, 'enddeclare': 1, 'final': 1, 'try': 1, + 'this': 1, 'switch': 1, 'continue': 1, 'endfor': 1, 'endif': 1, + 'declare': 1, 'unset': 1, 'true': 1, 'false': 1, 'namespace': 1, 'trait':1, + 'goto':1, 'instanceof':1, '__DIR__':1, '__NAMESPACE__':1, '__halt_compiler':1 + }, + contains: [ + hljs.C_LINE_COMMENT_MODE, + hljs.HASH_COMMENT_MODE, + { + className: 'comment', + begin: '/\\*', end: '\\*/', + contains: [{ + className: 'phpdoc', + begin: '\\s@[A-Za-z]+' + }] + }, + { + className: 'comment', + excludeBegin: true, + begin: '__halt_compiler[^;]+;', end: '[\\n\\r]$' + }, + hljs.C_NUMBER_MODE, // 0x..., 0..., decimal, float + hljs.BINARY_NUMBER_MODE, // 0b... + hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}), + hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}), + { + className: 'string', + begin: 'b"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + className: 'string', + begin: 'b\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + className: 'string', + begin: '<<<[\'"]?\\w+[\'"]?$', end: '^\\w+;', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + className: 'variable', + begin: '\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' + }, + { + className: 'preprocessor', + begin: '<\\?php', + relevance: 10 + }, + { + className: 'preprocessor', + begin: '\\?>' + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/profile.js b/output/Scratch/js/highlight/languages/profile.js new file mode 100644 index 000000000..09715b7e6 --- /dev/null +++ b/output/Scratch/js/highlight/languages/profile.js @@ -0,0 +1,49 @@ +/* +Language: Python profile +Description: Python profiler results +Author: Brian Beck +*/ + +hljs.LANGUAGES.profile = { + defaultMode: { + contains: [ + hljs.C_NUMBER_MODE, + { + className: 'builtin', + begin: '{', end: '}$', + excludeBegin: true, excludeEnd: true, + contains: [hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE], + relevance: 0 + }, + { + className: 'filename', + begin: '[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}', end: ':', + excludeEnd: true + }, + { + className: 'header', + begin: '(ncalls|tottime|cumtime)', end: '$', + keywords: {'ncalls': 1, 'tottime': 10, 'cumtime': 10, 'filename': 1}, + relevance: 10 + }, + { + className: 'summary', + begin: 'function calls', end: '$', + contains: [hljs.C_NUMBER_MODE], + relevance: 10 + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + className: 'function', + begin: '\\(', end: '\\)$', + contains: [{ + className: 'title', + begin: hljs.UNDERSCORE_IDENT_RE, + relevance: 0 + }], + relevance: 0 + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/python.js b/output/Scratch/js/highlight/languages/python.js new file mode 100644 index 000000000..7617f7a21 --- /dev/null +++ b/output/Scratch/js/highlight/languages/python.js @@ -0,0 +1,90 @@ +/* +Language: Python +*/ + +hljs.LANGUAGES.python = function() { + var STRINGS = [ + { + className: 'string', + begin: '(u|b)?r?\'\'\'', end: '\'\'\'', + relevance: 10 + }, + { + className: 'string', + begin: '(u|b)?r?"""', end: '"""', + relevance: 10 + }, + { + className: 'string', + begin: '(u|r|ur)\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 10 + }, + { + className: 'string', + begin: '(u|r|ur)"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 10 + }, + { + className: 'string', + begin: '(b|br)\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE] + }, + { + className: 'string', + begin: '(b|br)"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE] + } + ].concat([ + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE + ]); + var TITLE = { + className: 'title', begin: hljs.UNDERSCORE_IDENT_RE + }; + var PARAMS = { + className: 'params', + begin: '\\(', end: '\\)', + contains: STRINGS.concat([hljs.C_NUMBER_MODE]) + }; + + return { + defaultMode: { + keywords: { + 'keyword': { + 'and': 1, 'elif': 1, 'is': 1, 'global': 1, 'as': 1, 'in': 1, 'if': 1, 'from': 1, 'raise': 1, 'for': 1, + 'except': 1, 'finally': 1, 'print': 1, 'import': 1, 'pass': 1, 'return': 1, 'exec': 1, 'else': 1, + 'break': 1, 'not': 1, 'with': 1, 'class': 1, 'assert': 1, 'yield': 1, 'try': 1, 'while': 1, 'continue': 1, + 'del': 1, 'or': 1, 'def': 1, 'lambda': 1, 'nonlocal': 10 + }, + 'built_in': {'None': 1, 'True': 1, 'False': 1, 'Ellipsis': 1, 'NotImplemented': 1} + }, + illegal: '(|\\?)', + contains: STRINGS.concat([ + hljs.HASH_COMMENT_MODE, + { + className: 'function', + begin: '\\bdef ', end: ':', + illegal: '$', + keywords: {'def': 1}, + contains: [TITLE, PARAMS], + relevance: 10 + }, + { + className: 'class', + begin: '\\bclass ', end: ':', + illegal: '[${]', + keywords: {'class': 1}, + contains: [TITLE, PARAMS], + relevance: 10 + }, + hljs.C_NUMBER_MODE, + { + className: 'decorator', + begin: '@', end: '$' + } + ]) + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/renderman.js b/output/Scratch/js/highlight/languages/renderman.js new file mode 100644 index 000000000..5988ef5a2 --- /dev/null +++ b/output/Scratch/js/highlight/languages/renderman.js @@ -0,0 +1,230 @@ +/* +Language: RenderMan +Description: RenderMan Languages RIB and RSL +Author: Konstantin Evdokimenko +Contributors: Shuen-Huei Guan +*/ + +hljs.LANGUAGES.rib = { + defaultMode: { + keywords: { + 'keyword': { + 'ArchiveRecord': 1, + 'AreaLightSource': 1, + 'Atmosphere': 1, + 'Attribute': 1, + 'AttributeBegin': 1, + 'AttributeEnd': 1, + 'Basis': 1, + 'Begin': 1, + 'Blobby': 1, + 'Bound': 1, + 'Clipping': 1, + 'ClippingPlane': 1, + 'Color': 1, + 'ColorSamples': 1, + 'ConcatTransform': 1, + 'Cone': 1, + 'CoordinateSystem': 1, + 'CoordSysTransform': 1, + 'CropWindow': 1, + 'Curves': 1, + 'Cylinder': 1, + 'DepthOfField': 1, + 'Detail': 1, + 'DetailRange': 1, + 'Disk': 1, + 'Displacement': 1, + 'Display': 1, + 'End': 1, + 'ErrorHandler': 1, + 'Exposure': 1, + 'Exterior': 1, + 'Format': 1, + 'FrameAspectRatio': 1, + 'FrameBegin': 1, + 'FrameEnd': 1, + 'GeneralPolygon': 1, + 'GeometricApproximation': 1, + 'Geometry': 1, + 'Hider': 1, + 'Hyperboloid': 1, + 'Identity': 1, + 'Illuminate': 1, + 'Imager': 1, + 'Interior': 1, + 'LightSource': 1, + 'MakeCubeFaceEnvironment': 1, + 'MakeLatLongEnvironment': 1, + 'MakeShadow': 1, + 'MakeTexture': 1, + 'Matte': 1, + 'MotionBegin': 1, + 'MotionEnd': 1, + 'NuPatch': 1, + 'ObjectBegin': 1, + 'ObjectEnd': 1, + 'ObjectInstance': 1, + 'Opacity': 1, + 'Option': 1, + 'Orientation': 1, + 'Paraboloid': 1, + 'Patch': 1, + 'PatchMesh': 1, + 'Perspective': 1, + 'PixelFilter': 1, + 'PixelSamples': 1, + 'PixelVariance': 1, + 'Points': 1, + 'PointsGeneralPolygons': 1, + 'PointsPolygons': 1, + 'Polygon': 1, + 'Procedural': 1, + 'Projection': 1, + 'Quantize': 1, + 'ReadArchive': 1, + 'RelativeDetail': 1, + 'ReverseOrientation': 1, + 'Rotate': 1, + 'Scale': 1, + 'ScreenWindow': 1, + 'ShadingInterpolation': 1, + 'ShadingRate': 1, + 'Shutter': 1, + 'Sides': 1, + 'Skew': 1, + 'SolidBegin': 1, + 'SolidEnd': 1, + 'Sphere': 1, + 'SubdivisionMesh': 1, + 'Surface': 1, + 'TextureCoordinates': 1, + 'Torus': 1, + 'Transform': 1, + 'TransformBegin': 1, + 'TransformEnd': 1, + 'TransformPoints': 1, + 'Translate': 1, + 'TrimCurve': 1, + 'WorldBegin': 1, + 'WorldEnd': 1 + } + }, + illegal: ' +Contributors: Peter Leonov , Vasily Polovnyov , Loren Segal +*/ + +hljs.LANGUAGES.ruby = function(){ + var RUBY_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?'; + var RUBY_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?'; + var RUBY_KEYWORDS = { + 'keyword': { + 'and': 1, 'false': 1, 'then': 1, 'defined': 1, 'module': 1, 'in': 1, 'return': 1, 'redo': 1, 'if': 1, + 'BEGIN': 1, 'retry': 1, 'end': 1, 'for': 1, 'true': 1, 'self': 1, 'when': 1, 'next': 1, 'until': 1, 'do': 1, + 'begin': 1, 'unless': 1, 'END': 1, 'rescue': 1, 'nil': 1, 'else': 1, 'break': 1, 'undef': 1, 'not': 1, + 'super': 1, 'class': 1, 'case': 1, 'require': 1, 'yield': 1, 'alias': 1, 'while': 1, 'ensure': 1, + 'elsif': 1, 'or': 1, 'def': 1 + }, + 'keymethods': { + '__id__': 1, '__send__': 1, 'abort': 1, 'abs': 1, 'all?': 1, 'allocate': 1, 'ancestors': 1, 'any?': 1, + 'arity': 1, 'assoc': 1, 'at': 1, 'at_exit': 1, 'autoload': 1, 'autoload?': 1, 'between?': 1, 'binding': 1, + 'binmode': 1, 'block_given?': 1, 'call': 1, 'callcc': 1, 'caller': 1, 'capitalize': 1, 'capitalize!': 1, + 'casecmp': 1, 'catch': 1, 'ceil': 1, 'center': 1, 'chomp': 1, 'chomp!': 1, 'chop': 1, 'chop!': 1, 'chr': 1, + 'class': 1, 'class_eval': 1, 'class_variable_defined?': 1, 'class_variables': 1, 'clear': 1, 'clone': 1, + 'close': 1, 'close_read': 1, 'close_write': 1, 'closed?': 1, 'coerce': 1, 'collect': 1, 'collect!': 1, + 'compact': 1, 'compact!': 1, 'concat': 1, 'const_defined?': 1, 'const_get': 1, 'const_missing': 1, + 'const_set': 1, 'constants': 1, 'count': 1, 'crypt': 1, 'default': 1, 'default_proc': 1, 'delete': 1, + 'delete!': 1, 'delete_at': 1, 'delete_if': 1, 'detect': 1, 'display': 1, 'div': 1, 'divmod': 1, + 'downcase': 1, 'downcase!': 1, 'downto': 1, 'dump': 1, 'dup': 1, 'each': 1, 'each_byte': 1, + 'each_index': 1, 'each_key': 1, 'each_line': 1, 'each_pair': 1, 'each_value': 1, 'each_with_index': 1, + 'empty?': 1, 'entries': 1, 'eof': 1, 'eof?': 1, 'eql?': 1, 'equal?': 1, 'eval': 1, 'exec': 1, 'exit': 1, + 'exit!': 1, 'extend': 1, 'fail': 1, 'fcntl': 1, 'fetch': 1, 'fileno': 1, 'fill': 1, 'find': 1, 'find_all': 1, + 'first': 1, 'flatten': 1, 'flatten!': 1, 'floor': 1, 'flush': 1, 'for_fd': 1, 'foreach': 1, 'fork': 1, + 'format': 1, 'freeze': 1, 'frozen?': 1, 'fsync': 1, 'getc': 1, 'gets': 1, 'global_variables': 1, 'grep': 1, + 'gsub': 1, 'gsub!': 1, 'has_key?': 1, 'has_value?': 1, 'hash': 1, 'hex': 1, 'id': 1, 'include': 1, + 'include?': 1, 'included_modules': 1, 'index': 1, 'indexes': 1, 'indices': 1, 'induced_from': 1, + 'inject': 1, 'insert': 1, 'inspect': 1, 'instance_eval': 1, 'instance_method': 1, 'instance_methods': 1, + 'instance_of?': 1, 'instance_variable_defined?': 1, 'instance_variable_get': 1, 'instance_variable_set': 1, + 'instance_variables': 1, 'integer?': 1, 'intern': 1, 'invert': 1, 'ioctl': 1, 'is_a?': 1, 'isatty': 1, + 'iterator?': 1, 'join': 1, 'key?': 1, 'keys': 1, 'kind_of?': 1, 'lambda': 1, 'last': 1, 'length': 1, + 'lineno': 1, 'ljust': 1, 'load': 1, 'local_variables': 1, 'loop': 1, 'lstrip': 1, 'lstrip!': 1, 'map': 1, + 'map!': 1, 'match': 1, 'max': 1, 'member?': 1, 'merge': 1, 'merge!': 1, 'method': 1, 'method_defined?': 1, + 'method_missing': 1, 'methods': 1, 'min': 1, 'module_eval': 1, 'modulo': 1, 'name': 1, 'nesting': 1, 'new': 1, + 'next': 1, 'next!': 1, 'nil?': 1, 'nitems': 1, 'nonzero?': 1, 'object_id': 1, 'oct': 1, 'open': 1, 'pack': 1, + 'partition': 1, 'pid': 1, 'pipe': 1, 'pop': 1, 'popen': 1, 'pos': 1, 'prec': 1, 'prec_f': 1, 'prec_i': 1, + 'print': 1, 'printf': 1, 'private_class_method': 1, 'private_instance_methods': 1, 'private_method_defined?': 1, + 'private_methods': 1, 'proc': 1, 'protected_instance_methods': 1, 'protected_method_defined?': 1, + 'protected_methods': 1, 'public_class_method': 1, 'public_instance_methods': 1, 'public_method_defined?': 1, + 'public_methods': 1, 'push': 1, 'putc': 1, 'puts': 1, 'quo': 1, 'raise': 1, 'rand': 1, 'rassoc': 1, 'read': 1, + 'read_nonblock': 1, 'readchar': 1, 'readline': 1, 'readlines': 1, 'readpartial': 1, 'rehash': 1, 'reject': 1, + 'reject!': 1, 'remainder': 1, 'reopen': 1, 'replace': 1, 'require': 1, 'respond_to?': 1, 'reverse': 1, + 'reverse!': 1, 'reverse_each': 1, 'rewind': 1, 'rindex': 1, 'rjust': 1, 'round': 1, 'rstrip': 1, 'rstrip!': 1, + 'scan': 1, 'seek': 1, 'select': 1, 'send': 1, 'set_trace_func': 1, 'shift': 1, 'singleton_method_added': 1, + 'singleton_methods': 1, 'size': 1, 'sleep': 1, 'slice': 1, 'slice!': 1, 'sort': 1, 'sort!': 1, 'sort_by': 1, + 'split': 1, 'sprintf': 1, 'squeeze': 1, 'squeeze!': 1, 'srand': 1, 'stat': 1, 'step': 1, 'store': 1, 'strip': 1, + 'strip!': 1, 'sub': 1, 'sub!': 1, 'succ': 1, 'succ!': 1, 'sum': 1, 'superclass': 1, 'swapcase': 1, 'swapcase!': 1, + 'sync': 1, 'syscall': 1, 'sysopen': 1, 'sysread': 1, 'sysseek': 1, 'system': 1, 'syswrite': 1, 'taint': 1, + 'tainted?': 1, 'tell': 1, 'test': 1, 'throw': 1, 'times': 1, 'to_a': 1, 'to_ary': 1, 'to_f': 1, 'to_hash': 1, + 'to_i': 1, 'to_int': 1, 'to_io': 1, 'to_proc': 1, 'to_s': 1, 'to_str': 1, 'to_sym': 1, 'tr': 1, 'tr!': 1, + 'tr_s': 1, 'tr_s!': 1, 'trace_var': 1, 'transpose': 1, 'trap': 1, 'truncate': 1, 'tty?': 1, 'type': 1, + 'ungetc': 1, 'uniq': 1, 'uniq!': 1, 'unpack': 1, 'unshift': 1, 'untaint': 1, 'untrace_var': 1, 'upcase': 1, + 'upcase!': 1, 'update': 1, 'upto': 1, 'value?': 1, 'values': 1, 'values_at': 1, 'warn': 1, 'write': 1, + 'write_nonblock': 1, 'zero?': 1, 'zip': 1 + } + }; + var YARDOCTAG = { + className: 'yardoctag', + begin: '@[A-Za-z]+' + }; + var COMMENTS = [ + { + className: 'comment', + begin: '#', end: '$', + contains: [YARDOCTAG] + }, + { + className: 'comment', + begin: '^\\=begin', end: '^\\=end', + contains: [YARDOCTAG], + relevance: 10 + }, + { + className: 'comment', + begin: '^__END__', end: '\\n$' + } + ]; + var SUBST = { + className: 'subst', + begin: '#\\{', end: '}', + lexems: RUBY_IDENT_RE, + keywords: RUBY_KEYWORDS + }; + var STR_CONTAINS = [hljs.BACKSLASH_ESCAPE, SUBST]; + var STRINGS = [ + { + className: 'string', + begin: '\'', end: '\'', + contains: STR_CONTAINS, + relevance: 0 + }, + { + className: 'string', + begin: '"', end: '"', + contains: STR_CONTAINS, + relevance: 0 + }, + { + className: 'string', + begin: '%[qw]?\\(', end: '\\)', + contains: STR_CONTAINS, + relevance: 10 + }, + { + className: 'string', + begin: '%[qw]?\\[', end: '\\]', + contains: STR_CONTAINS, + relevance: 10 + }, + { + className: 'string', + begin: '%[qw]?{', end: '}', + contains: STR_CONTAINS, + relevance: 10 + }, + { + className: 'string', + begin: '%[qw]?<', end: '>', + contains: STR_CONTAINS, + relevance: 10 + }, + { + className: 'string', + begin: '%[qw]?/', end: '/', + contains: STR_CONTAINS, + relevance: 10 + }, + { + className: 'string', + begin: '%[qw]?%', end: '%', + contains: STR_CONTAINS, + relevance: 10 + }, + { + className: 'string', + begin: '%[qw]?-', end: '-', + contains: STR_CONTAINS, + relevance: 10 + }, + { + className: 'string', + begin: '%[qw]?\\|', end: '\\|', + contains: STR_CONTAINS, + relevance: 10 + } + ]; + var FUNCTION = { + className: 'function', + begin: '\\bdef\\s+', end: ' |$|;', + lexems: RUBY_IDENT_RE, + keywords: RUBY_KEYWORDS, + contains: [ + { + className: 'title', + begin: RUBY_METHOD_RE, + lexems: RUBY_IDENT_RE, + keywords: RUBY_KEYWORDS + }, + { + className: 'params', + begin: '\\(', end: '\\)', + lexems: RUBY_IDENT_RE, + keywords: RUBY_KEYWORDS + } + ].concat(COMMENTS) + }; + var IDENTIFIER = { + className: 'identifier', + begin: RUBY_IDENT_RE, + lexems: RUBY_IDENT_RE, + keywords: RUBY_KEYWORDS, + relevance: 0 + }; + + var RUBY_DEFAULT_CONTAINS = COMMENTS.concat(STRINGS.concat([ + { + className: 'class', + begin: '\\b(class|module)\\b', end: '$|;', + keywords: {'class': 1, 'module': 1}, + contains: [ + { + className: 'title', + begin: '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?', + relevance: 0 + }, + { + className: 'inheritance', + begin: '<\\s*', + contains: [{ + className: 'parent', + begin: '(' + hljs.IDENT_RE + '::)?' + hljs.IDENT_RE + }] + } + ].concat(COMMENTS) + }, + FUNCTION, + { + className: 'constant', + begin: '(::)?([A-Z]\\w*(::)?)+', + relevance: 0 + }, + { + className: 'symbol', + begin: ':', + contains: STRINGS.concat([IDENTIFIER]), + relevance: 0 + }, + { + className: 'number', + begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b', + relevance: 0 + }, + { + className: 'number', + begin: '\\?\\w' + }, + { + className: 'variable', + begin: '(\\$\\W)|((\\$|\\@\\@?)(\\w+))' + }, + IDENTIFIER, + { // regexp container + begin: '(' + hljs.RE_STARTERS_RE + ')\\s*', + contains: COMMENTS.concat([ + { + className: 'regexp', + begin: '/', end: '/[a-z]*', + illegal: '\\n', + contains: [hljs.BACKSLASH_ESCAPE] + } + ]), + relevance: 0 + } + ])); + SUBST.contains = RUBY_DEFAULT_CONTAINS; + FUNCTION.contains[1].contains = RUBY_DEFAULT_CONTAINS; + + return { + defaultMode: { + lexems: RUBY_IDENT_RE, + keywords: RUBY_KEYWORDS, + contains: RUBY_DEFAULT_CONTAINS + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/rust.js b/output/Scratch/js/highlight/languages/rust.js new file mode 100644 index 000000000..f97d8f64a --- /dev/null +++ b/output/Scratch/js/highlight/languages/rust.js @@ -0,0 +1,80 @@ +/* +Language: Rust +Author: Andrey Vlasovskikh +*/ + +hljs.LANGUAGES.rust = function() { + var TITLE = { + className: 'title', + begin: hljs.UNDERSCORE_IDENT_RE + }; + var QUOTE_STRING = { + className: 'string', + begin: '"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE], + relevance: 0 + }; + var NUMBER = { + className: 'number', + begin: '\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)', + relevance: 0 + }; + var KEYWORDS = { + 'alt': 1, 'any': 1, 'as': 1, 'assert': 1, + 'be': 1, 'bind': 1, 'block': 1, 'bool': 1, 'break': 1, + 'char': 1, 'check': 1, 'claim': 1, 'const': 1, 'cont': 1, + 'dir': 1, 'do': 1, + 'else': 1, 'enum': 1, 'export': 1, + 'f32': 1, 'f64': 1, 'fail': 1, 'false': 1, 'float': 1, 'fn': 10, 'for': 1, + 'i16': 1, 'i32': 1, 'i64': 1, 'i8': 1, 'if': 1, 'iface': 10, 'impl': 10, 'import': 1, 'in': 1, 'int': 1, + 'let': 1, 'log': 1, + 'mod': 1, 'mutable': 1, + 'native': 1, 'note': 1, + 'of': 1, + 'prove': 1, 'pure': 10, + 'resource': 1, 'ret': 1, + 'self': 1, 'str': 1, 'syntax': 1, + 'true': 1, 'type': 1, + 'u16': 1, 'u32': 1, 'u64': 1, 'u8': 1, 'uint': 1, 'unchecked': 1, 'unsafe': 1, 'use': 1, + 'vec': 1, + 'while': 1 + }; + return { + defaultMode: { + keywords: KEYWORDS, + illegal: ' +*/ + +hljs.LANGUAGES.scala = function() { + var ANNOTATION = { + className: 'annotation', begin: '@[A-Za-z]+' + }; + var STRING = { + className: 'string', + begin: 'u?r?"""', end: '"""', + relevance: 10 + }; + return { + defaultMode: { + keywords: { + 'type': 1, 'yield': 1, 'lazy': 1, 'override': 1, 'def': 1, 'with': 1, 'val':1, 'var': 1, 'false': 1, 'true': 1, + 'sealed': 1, 'abstract': 1, 'private': 1, 'trait': 1, 'object': 1, 'null': 1, 'if': 1, 'for': 1, 'while': 1, + 'throw': 1, 'finally': 1, 'protected': 1, 'extends': 1, 'import': 1, 'final': 1, 'return': 1, 'else': 1, + 'break': 1, 'new': 1, 'catch': 1, 'super': 1, 'class': 1, 'case': 1,'package': 1, 'default': 1, 'try': 1, + 'this': 1, 'match': 1, 'continue': 1, 'throws': 1 + }, + contains: [ + { + className: 'javadoc', + begin: '/\\*\\*', end: '\\*/', + contains: [{ + className: 'javadoctag', + begin: '@[A-Za-z]+' + }], + relevance: 10 + }, + hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, + hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING, + { + className: 'class', + begin: '((case )?class |object |trait )', end: '({|$)', + illegal: ':', + keywords: {'case' : 1, 'class': 1, 'trait': 1, 'object': 1}, + contains: [ + { + begin: '(extends|with)', + keywords: {'extends': 1, 'with': 1}, + relevance: 10 + }, + { + className: 'title', + begin: hljs.UNDERSCORE_IDENT_RE + }, + { + className: 'params', + begin: '\\(', end: '\\)', + contains: [ + hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING, + ANNOTATION + ] + } + ] + }, + hljs.C_NUMBER_MODE, + ANNOTATION + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/smalltalk.js b/output/Scratch/js/highlight/languages/smalltalk.js new file mode 100644 index 000000000..4f3c4f29f --- /dev/null +++ b/output/Scratch/js/highlight/languages/smalltalk.js @@ -0,0 +1,55 @@ +/* +Language: Smalltalk +Author: Vladimir Gubarkov +*/ + +hljs.LANGUAGES.smalltalk = function() { + var VAR_IDENT_RE = '[a-z][a-zA-Z0-9_]*'; + var CHAR = { + className: 'char', + begin: '\\$.{1}' + }; + var SYMBOL = { + className: 'symbol', + begin: '#' + hljs.UNDERSCORE_IDENT_RE + }; + return { + defaultMode: { + keywords: {'self': 1, 'super': 1, 'nil': 1, 'true': 1, 'false': 1, 'thisContext': 1}, // only 6 + contains: [ + { + className: 'comment', + begin: '"', end: '"', + relevance: 0 + }, + hljs.APOS_STRING_MODE, + { + className: 'class', + begin: '\\b[A-Z][A-Za-z0-9_]*', + relevance: 0 + }, + { + className: 'method', + begin: VAR_IDENT_RE + ':' + }, + hljs.C_NUMBER_MODE, + SYMBOL, + CHAR, + { + className: 'localvars', + begin: '\\|\\s*((' + VAR_IDENT_RE + ')\\s*)+\\|' + }, + { + className: 'array', + begin: '\\#\\(', end: '\\)', + contains: [ + hljs.APOS_STRING_MODE, + CHAR, + hljs.C_NUMBER_MODE, + SYMBOL + ] + } + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/sql.js b/output/Scratch/js/highlight/languages/sql.js new file mode 100644 index 000000000..376da7f81 --- /dev/null +++ b/output/Scratch/js/highlight/languages/sql.js @@ -0,0 +1,90 @@ +/* +Language: SQL +*/ + +hljs.LANGUAGES.sql = { + case_insensitive: true, + defaultMode: { + illegal: '[^\\s]', + contains: [ + { + className: 'operator', + begin: '(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b', end: ';|$', + keywords: { + 'keyword': { + 'all': 1, 'partial': 1, 'global': 1, 'month': 1, + 'current_timestamp': 1, 'using': 1, 'go': 1, 'revoke': 1, + 'smallint': 1, 'indicator': 1, 'end-exec': 1, 'disconnect': 1, + 'zone': 1, 'with': 1, 'character': 1, 'assertion': 1, 'to': 1, + 'add': 1, 'current_user': 1, 'usage': 1, 'input': 1, 'local': 1, + 'alter': 1, 'match': 1, 'collate': 1, 'real': 1, 'then': 1, + 'rollback': 1, 'get': 1, 'read': 1, 'timestamp': 1, + 'session_user': 1, 'not': 1, 'integer': 1, 'bit': 1, 'unique': 1, + 'day': 1, 'minute': 1, 'desc': 1, 'insert': 1, 'execute': 1, + 'like': 1, 'ilike': 2, 'level': 1, 'decimal': 1, 'drop': 1, + 'continue': 1, 'isolation': 1, 'found': 1, 'where': 1, + 'constraints': 1, 'domain': 1, 'right': 1, 'national': 1, 'some': 1, + 'module': 1, 'transaction': 1, 'relative': 1, 'second': 1, + 'connect': 1, 'escape': 1, 'close': 1, 'system_user': 1, 'for': 1, + 'deferred': 1, 'section': 1, 'cast': 1, 'current': 1, 'sqlstate': 1, + 'allocate': 1, 'intersect': 1, 'deallocate': 1, 'numeric': 1, + 'public': 1, 'preserve': 1, 'full': 1, 'goto': 1, 'initially': 1, + 'asc': 1, 'no': 1, 'key': 1, 'output': 1, 'collation': 1, 'group': 1, + 'by': 1, 'union': 1, 'session': 1, 'both': 1, 'last': 1, + 'language': 1, 'constraint': 1, 'column': 1, 'of': 1, 'space': 1, + 'foreign': 1, 'deferrable': 1, 'prior': 1, 'connection': 1, + 'unknown': 1, 'action': 1, 'commit': 1, 'view': 1, 'or': 1, + 'first': 1, 'into': 1, 'float': 1, 'year': 1, 'primary': 1, + 'cascaded': 1, 'except': 1, 'restrict': 1, 'set': 1, 'references': 1, + 'names': 1, 'table': 1, 'outer': 1, 'open': 1, 'select': 1, + 'size': 1, 'are': 1, 'rows': 1, 'from': 1, 'prepare': 1, + 'distinct': 1, 'leading': 1, 'create': 1, 'only': 1, 'next': 1, + 'inner': 1, 'authorization': 1, 'schema': 1, 'corresponding': 1, + 'option': 1, 'declare': 1, 'precision': 1, 'immediate': 1, 'else': 1, + 'timezone_minute': 1, 'external': 1, 'varying': 1, 'translation': 1, + 'true': 1, 'case': 1, 'exception': 1, 'join': 1, 'hour': 1, + 'default': 1, 'double': 1, 'scroll': 1, 'value': 1, 'cursor': 1, + 'descriptor': 1, 'values': 1, 'dec': 1, 'fetch': 1, 'procedure': 1, + 'delete': 1, 'and': 1, 'false': 1, 'int': 1, 'is': 1, 'describe': 1, + 'char': 1, 'as': 1, 'at': 1, 'in': 1, 'varchar': 1, 'null': 1, + 'trailing': 1, 'any': 1, 'absolute': 1, 'current_time': 1, 'end': 1, + 'grant': 1, 'privileges': 1, 'when': 1, 'cross': 1, 'check': 1, + 'write': 1, 'current_date': 1, 'pad': 1, 'begin': 1, 'temporary': 1, + 'exec': 1, 'time': 1, 'update': 1, 'catalog': 1, 'user': 1, 'sql': 1, + 'date': 1, 'on': 1, 'identity': 1, 'timezone_hour': 1, 'natural': 1, + 'whenever': 1, 'interval': 1, 'work': 1, 'order': 1, 'cascade': 1, + 'diagnostics': 1, 'nchar': 1, 'having': 1, 'left': 1, 'call': 1, + 'do': 1, 'handler': 1, 'load': 1, 'replace': 1, 'truncate': 1, + 'start': 1, 'lock': 1, 'show': 1, 'pragma': 1}, + 'aggregate': {'count': 1, 'sum': 1, 'min': 1, 'max': 1, 'avg': 1} + }, + contains: [ + { + className: 'string', + begin: '\'', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}], + relevance: 0 + }, + { + className: 'string', + begin: '"', end: '"', + contains: [hljs.BACKSLASH_ESCAPE, {begin: '""'}], + relevance: 0 + }, + { + className: 'string', + begin: '`', end: '`', + contains: [hljs.BACKSLASH_ESCAPE] + }, + hljs.C_NUMBER_MODE, + {begin: '\\n'} + ] + }, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'comment', + begin: '--', end: '$' + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/tex.js b/output/Scratch/js/highlight/languages/tex.js new file mode 100644 index 000000000..36da6ecba --- /dev/null +++ b/output/Scratch/js/highlight/languages/tex.js @@ -0,0 +1,62 @@ +/* +Language: TeX +Author: Vladimir Moskva +Website: http://fulc.ru/ +*/ + +hljs.LANGUAGES.tex = function() { + var COMMAND1 = { + className: 'command', + begin: '\\\\[a-zA-Zа-яА-я]+[\\*]?', + relevance: 10 + }; + var COMMAND2 = { + className: 'command', + begin: '\\\\[^a-zA-Zа-яА-я0-9]', + relevance: 0 + }; + var SPECIAL = { + className: 'special', + begin: '[{}\\[\\]\\&#~]', + relevance: 0 + }; + + return { + defaultMode: { + contains: [ + { // parameter + begin: '\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?', + returnBegin: true, + contains: [ + COMMAND1, COMMAND2, + { + className: 'number', + begin: ' *=', end: '-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?', + excludeBegin: true + } + ], + relevance: 10 + }, + COMMAND1, COMMAND2, + SPECIAL, + { + className: 'formula', + begin: '\\$\\$', end: '\\$\\$', + contains: [COMMAND1, COMMAND2, SPECIAL], + relevance: 0 + }, + { + className: 'formula', + begin: '\\$', end: '\\$', + contains: [COMMAND1, COMMAND2, SPECIAL], + relevance: 0 + }, + { + className: 'comment', + begin: '%', end: '$', + relevance: 0 + } + ] + } + }; +}(); diff --git a/output/Scratch/js/highlight/languages/vala.js b/output/Scratch/js/highlight/languages/vala.js new file mode 100644 index 000000000..e730050b7 --- /dev/null +++ b/output/Scratch/js/highlight/languages/vala.js @@ -0,0 +1,74 @@ +/* +Language: Vala +Author: Antono Vasiljev +Description: Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C. +*/ + +hljs.LANGUAGES.vala = { + defaultMode: { + keywords: { + keyword: { + // Value types + 'char': 1, 'uchar': 1, 'unichar': 1, + 'int': 1, 'uint': 1, 'long': 1, 'ulong': 1, + 'short': 1, 'ushort': 1, + 'int8': 1, 'int16': 1, 'int32': 1, 'int64': 1, + 'uint8': 1, 'uint16': 1, 'uint32': 1, 'uint64': 1, + 'float': 1, 'double': 1, 'bool': 1, 'struct': 1, 'enum': 1, + 'string': 1, 'void': 1, + // Reference types + 'weak': 5, 'unowned': 5, 'owned': 5, + // Modifiers + 'async': 5, 'signal': 5, 'static': 1, 'abstract': 1, 'interface': 1, 'override': 1, + // Control Structures + 'while': 1, 'do': 1, 'for': 1, 'foreach': 1, 'else': 1, 'switch': 1, + 'case': 1, 'break': 1, 'default': 1, 'return': 1, 'try': 1, 'catch': 1, + // Visibility + 'public': 1, 'private': 1, 'protected': 1, 'internal': 1, + // Other + 'using': 1, 'new': 1, 'this': 1, 'get': 1, 'set': 1, 'const': 1, + 'stdout': 1, 'stdin': 1, 'stderr': 1, 'var': 1, + // Builtins + 'DBus': 2, 'GLib': 2, 'CCode': 10, 'Gee': 10, 'Object': 1 + }, + literal: { 'false': 1, 'true': 1, 'null': 1 } + }, + contains: [ + { + className: 'class', + begin: '(class |interface |delegate |namespace )', end: '{', + keywords: {'class': 1, 'interface': 1}, + contains: [ + { + begin: '(implements|extends)', + keywords: {'extends': 1, 'implements': 1} + }, + { + className: 'title', + begin: hljs.UNDERSCORE_IDENT_RE + } + ] + }, + hljs.C_LINE_COMMENT_MODE, + hljs.C_BLOCK_COMMENT_MODE, + { + className: 'string', + begin: '"""', end: '"""', + relevance: 5 + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: 'preprocessor', + begin: '^#', end: '$', + relevance: 2 + }, + { + className: 'constant', + begin: ' [A-Z_]+ ', + relevance: 0 + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/vbscript.js b/output/Scratch/js/highlight/languages/vbscript.js new file mode 100644 index 000000000..7f4394b29 --- /dev/null +++ b/output/Scratch/js/highlight/languages/vbscript.js @@ -0,0 +1,54 @@ +/* +Language: VBScript +Author: Nikita Ledyaev +Contributors: Michal Gabrukiewicz +*/ + +hljs.LANGUAGES.vbscript = { + case_insensitive: true, + defaultMode: { + keywords: { + 'keyword': { + 'call': 1, 'class': 1, 'const': 1, 'dim': 1, 'do': 1, 'loop': 1, 'erase': 1, 'execute': 1, 'executeglobal': 1, + 'exit': 1, 'for': 1, 'each': 1, 'next': 1, 'function': 1, 'if': 1, 'then': 1, 'else': 1, 'on': 1, 'error': 1, + 'option': 1, 'explicit': 1, 'new': 1, 'private': 1, 'property': 1, 'let': 1, 'get': 1, 'public': 1, + 'randomize': 1, 'redim': 1, 'rem': 1, 'select': 1, 'case': 1, 'set': 1, 'stop': 1, 'sub': 1, 'while': 1, + 'wend': 1, 'with': 1, 'end': 1, 'to': 1, 'elseif': 1, 'is': 1, 'or': 1, 'xor': 1, 'and': 1, 'not': 1, + 'class_initialize': 1, 'class_terminate': 1, 'default': 1, 'preserve': 1, 'in': 1, 'me': 1, 'byval': 1, + 'byref': 1, 'step': 1, 'resume': 1, 'goto': 1 + }, + 'built_in': { + 'lcase': 1, 'month': 1, 'vartype': 1, 'instrrev': 1, 'ubound': 1, 'setlocale': 1, 'getobject': 1, + 'rgb': 1, 'getref': 1, 'string': 1, 'weekdayname': 1, 'rnd': 1, 'dateadd': 1, 'monthname': 1, 'now': 1, + 'day': 1, 'minute': 1, 'isarray': 1, 'cbool': 1, 'round': 1, 'formatcurrency': 1, 'conversions': 1, + 'csng': 1, 'timevalue': 1, 'second': 1, 'year': 1, 'space': 1, 'abs': 1, 'clng': 1, 'timeserial': 1, + 'fixs': 1, 'len': 1, 'asc': 1, 'isempty': 1, 'maths': 1, 'dateserial': 1, 'atn': 1, 'timer': 1, + 'isobject': 1, 'filter': 1, 'weekday': 1, 'datevalue': 1, 'ccur': 1, 'isdate': 1, 'instr': 1, 'datediff': 1, + 'formatdatetime': 1, 'replace': 1, 'isnull': 1, 'right': 1, 'sgn': 1, 'array': 1, 'snumeric': 1, 'log': 1, + 'cdbl': 1, 'hex': 1, 'chr': 1, 'lbound': 1, 'msgbox': 1, 'ucase': 1, 'getlocale': 1, 'cos': 1, 'cdate': 1, + 'cbyte': 1, 'rtrim': 1, 'join': 1, 'hour': 1, 'oct': 1, 'typename': 1, 'trim': 1, 'strcomp': 1, 'int': 1, + 'createobject': 1, 'loadpicture': 1, 'tan': 1, 'formatnumber': 1, 'mid': 1, 'scriptenginebuildversion': 1, + 'scriptengine': 1, 'split': 1, 'scriptengineminorversion': 1, 'cint': 1, 'sin': 1, 'datepart': 1, 'ltrim': 1, + 'sqr': 1, 'scriptenginemajorversion': 1, 'time': 1, 'derived': 1, 'eval': 1, 'date': 1, 'formatpercent': 1, + 'exp': 1, 'inputbox': 1, 'left': 1, 'ascw': 1, 'chrw': 1, 'regexp': 1, 'server': 1, 'response': 1, + 'request': 1, 'cstr': 1, 'err': 1 + }, + 'literal': {'true': 1, 'false': 1, 'null': 1, 'nothing': 1, 'empty': 1} + }, + illegal: '//', + contains: [ + { // can't use standard QUOTE_STRING_MODE since it's compiled with its own escape and doesn't use the local one + className: 'string', + begin: '"', end: '"', + illegal: '\\n', + contains: [{begin: '""'}], + relevance: 0 + }, + { + className: 'comment', + begin: '\'', end: '$' + }, + hljs.C_NUMBER_MODE + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/vhdl.js b/output/Scratch/js/highlight/languages/vhdl.js new file mode 100644 index 000000000..9f5c359a5 --- /dev/null +++ b/output/Scratch/js/highlight/languages/vhdl.js @@ -0,0 +1,46 @@ +/* +Language: VHDL +Description: VHDL is a hardware description language used in electronic design automation to describe digital and mixed-signal systems. +Author: Igor Kalnitsky +Website: http://kalnitsky.org.ua/ +*/ + +hljs.LANGUAGES.vhdl = { + case_insensitive: true, + defaultMode: { + keywords: { + 'keyword': { + 'abs': 1, 'access': 1, 'after': 1, 'alias': 1, 'all': 1, 'and': 1, 'architecture': 2, 'array': 1, 'assert': 1, + 'attribute': 1, 'begin': 1, 'block': 1, 'body': 1, 'buffer': 1, 'bus': 1, 'case': 1, 'component': 2, + 'configuration': 1, 'constant': 1, 'disconnect': 2, 'downto': 2, 'else': 1, 'elsif': 1, 'end': 1, 'entity': 2, + 'exit': 1, 'file': 1, 'for': 1, 'function': 1, 'generate': 2, 'generic': 2, 'group': 1, 'guarded': 2, 'if': 0, + 'impure': 2, 'in': 1, 'inertial': 1, 'inout': 1, 'is': 1, 'label': 1, 'library': 1, 'linkage': 1, 'literal': 1, + 'loop': 1, 'map': 1, 'mod': 1, 'nand': 1, 'new': 1, 'next': 1, 'nor': 1, 'not': 1, 'null': 1, 'of': 1, 'on': 1, + 'open': 1, 'or': 1, 'others': 1, 'out': 1, 'package': 1, 'port': 2, 'postponed': 1, 'procedure': 1, + 'process': 1, 'pure': 2, 'range': 1, 'record': 1, 'register': 1, 'reject': 1, 'return': 1, 'rol': 1, 'ror': 1, + 'select': 1, 'severity': 1, 'signal': 1, 'shared': 1, 'sla': 1, 'sli': 1, 'sra': 1, 'srl': 1, 'subtype': 2, + 'then': 1, 'to': 1, 'transport': 1, 'type': 1, 'units': 1, 'until': 1, 'use': 1, 'variable': 1, 'wait': 1, + 'when': 1, 'while': 1, 'with': 1, 'xnor': 1, 'xor': 1 + }, + 'type': { + 'boolean': 1, 'bit': 1, 'character': 1, 'severity_level': 2, 'integer': 1, 'time': 1, 'delay_length': 2, + 'natural': 1, 'positive': 1, 'string': 1, 'bit_vector': 2, 'file_open_kind': 2, 'file_open_status': 2, + 'std_ulogic': 2, 'std_ulogic_vector': 2, 'std_logic': 2, 'std_logic_vector': 2 + } + }, + illegal: '{', + contains: [ + { + className: 'comment', + begin: '--', end: '$' + }, + hljs.QUOTE_STRING_MODE, + hljs.C_NUMBER_MODE, + { + className: 'literal', + begin: '\'(U|X|0|1|Z|W|L|H|-)', end: '\'', + contains: [hljs.BACKSLASH_ESCAPE] + } + ] + } +}; diff --git a/output/Scratch/js/highlight/languages/xml.js b/output/Scratch/js/highlight/languages/xml.js new file mode 100644 index 000000000..24f377eca --- /dev/null +++ b/output/Scratch/js/highlight/languages/xml.js @@ -0,0 +1,110 @@ +/* +Language: HTML, XML +*/ + +hljs.LANGUAGES.xml = function(){ + var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+'; + var TAG_INTERNALS = { + endsWithParent: true, + contains: [ + { + className: 'attribute', + begin: XML_IDENT_RE, + relevance: 0 + }, + { + begin: '="', returnBegin: true, end: '"', + contains: [{ + className: 'value', + begin: '"', endsWithParent: true + }] + }, + { + begin: '=\'', returnBegin: true, end: '\'', + contains: [{ + className: 'value', + begin: '\'', endsWithParent: true + }] + }, + { + begin: '=', + contains: [{ + className: 'value', + begin: '[^\\s/>]+' + }] + } + ] + }; + return { + case_insensitive: true, + defaultMode: { + contains: [ + { + className: 'pi', + begin: '<\\?', end: '\\?>', + relevance: 10 + }, + { + className: 'doctype', + begin: '', + relevance: 10, + contains: [{begin: '\\[', end: '\\]'}] + }, + { + className: 'comment', + begin: '', + relevance: 10 + }, + { + className: 'cdata', + begin: '<\\!\\[CDATA\\[', end: '\\]\\]>', + relevance: 10 + }, + { + className: 'tag', + /* + The lookahead pattern (?=...) ensures that 'begin' only matches + '|$)', end: '>', + keywords: {'title': {'style': 1}}, + contains: [TAG_INTERNALS], + starts: { + className: 'css', + end: '', returnEnd: true, + subLanguage: 'css' + } + }, + { + className: 'tag', + // See the comment in the + + + + + + + +

This is a demo/test page showing all languages supported by highlight.js. +Most snippets do not contain working code :-). + +

+

Styles

+
+ +

Automatically detected languages

+ +

...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Python + +
+@requires_authorization
+def somefunc(param1='', param2=0):
+    r'''A docstring'''
+    if param1 > param2: # interesting
+        print 'Gre\'ater'
+    return (param2 - param1 + 1) or None
+
+class SomeClass:
pass +
+ +
Python's profiler output + +
       261917242 function calls in 686.251 CPU seconds
+
+       ncalls  tottime  filename:lineno(function)
+       152824  513.894  {method 'sort' of 'list' objects}
+    129590630   83.894  rrule.py:842(__cmp__)
+    129590630   82.439  {cmp}
+       153900    1.296  rrule.py:399(_iter)
+304393/151570    0.963  rrule.py:102(_iter_cached)
+
+ +
Ruby + +
class A < B; def self.create(object = User) object end end
+class Zebra; def inspect; "X#{2 + self.object_id}" end end
+
+module ABC::DEF
+  include Comparable
+
+  # @param test
+  # @return [String] nothing
+  def foo(test)
+    Thread.new do |blockvar|
+      ABC::DEF.reverse(:a_symbol, :'a symbol' + 'test' + test)
+    end.join
+  end
+
+  def [](index) self[index] end
+  def ==(other) other == self end
+end
+
+anIdentifier = an_identifier
+Constant = 1
+
+ +
Perl + +
# loads object
+sub load
+{
+  my $flds = $c->db_load($id,@_) || do {
+    Carp::carp "Can`t load (class: $c, id: $id): '$!'"; return undef
+  };
+  my $o = $c->_perl_new();
+  $id12 = $id / 24 / 3600;
+  $o->{'ID'} = $id12 + 123;
+  $o->{'PAPA'} = $flds->{'PAPA'};
+  #$o->{'SHCUT'} = $flds->{'SHCUT'};
+  my $p = $o->props;
+  my $vt;
+  $string =~ m/^sought_text$/;
+  $items = split //, 'abc';
+  for my $key (keys %$p)
+  {
+    if(${$vt.'::property'}) {
+      $o->{$key . '_real'} = $flds->{$key};
+      tie $o->{$key}, 'CMSBuilder::Property', $o, $key;
+    } else {
+      $o->{$key} = $flds->{$key};
+      $o->kill();
+    }
+  }
+  $o->save if delete $o->{'_save_after_load'};
+  return $o;
+}
+
+foreach my $num (0..$#array) {
+  # something
+}
+
+ +
PHP + +
require_once 'Zend.php';
+require_once 'Zend/Uri/Exception.php';
+require_once 'Zend/Uri/Http.php';
+require_once 'Zend/Uri/Mailto.php';
+
+abstract class Zend_Uri
+{
+
+  /**
+   * Return a string representation of this URI.
+   *
+   * @see     getUri()
+   * @return  string
+   */
+  public function __toString()
+  {
+      return $this->getUri();
+  }
+
+  static public function factory($uri = 'http')
+  {
+      $uri = explode(':', $uri, 2);
+      $scheme = strtolower($uri[0]);
+      $schemeSpecific = isset($uri[1]) ? $uri[1] : '';
+      $desc = 'Multi
+line description';
+
+      // Security check: $scheme is used to load a class file,
+      // so only alphanumerics are allowed.
+      if (!ctype_alnum($scheme)) {
+          throw new Zend_Uri_Exception('Illegal scheme');
+      }
+  }
+}
+
+__halt_compiler () ; datahere
+datahere
+datahere */
+datahere
+
+
+ +
Scala + +
object abstractTypes extends Application {
+  abstract class SeqBuffer {
+    type T; val element: Seq[T]; def length = element.length
+  }
+}
+
+/** Turn command line arguments to uppercase */
+object Main {
+  def main(args: Array[String]) {
+    val res = for (a <- args) yield a.toUpperCase
+    println("Arguments: " + res.toString)
+  }
+}
+
+/** Maps are easy to use in Scala. */
+object Maps {
+  val colors = Map("red" -> 0xFF0000,
+                   "turquoise" -> 0x00FFFF,
+                   "black" -> 0x000000,
+                   "orange" -> 0xFF8040,
+                   "brown" -> 0x804000)
+  def main(args: Array[String]) {
+    for (name <- args) println(
+      colors.get(name) match {
+        case Some(code) =>
+          name + " has code: " + code
+        case None =>
+          "Unknown color: " + name
+      }
+    )
+  }
+}
+
+ +
Go + +
package main
+
+import (
+    "fmt"
+    "rand"
+    "os"
+)
+
+const (
+    Sunday = iota
+    Partyday
+    numberOfDays  // this constant is not exported
+)
+
+type Foo interface {
+    FooFunc(int, float32) (complex128, []int)
+}
+
+// simple comment
+type Bar struct {
+    os.File /* multi
+    line
+    comment */
+
+    PublicData chan int
+}
+
+func main() {
+    ch := make(chan int)
+    ch <- 1
+    x, ok := <- ch
+    ok = true
+    x = nil
+    float_var := 1.0e10
+    defer fmt.Println('\'')
+    defer fmt.Println(`exitting now\`)
+    var fv1 float64 = 0.75
+    go println(len("hello world!"))
+    return
+}
+
+
+ +
XML + +
<?xml version="1.0"?>
+<response value="ok" xml:lang="en">
+  <text>Ok</text>
+  <comment html_allowed="true"/>
+  <ns1:description><![CDATA[
+  CDATA is <not> magical.
+  ]]></ns1:description>
+  <a></a> <a/>
+</response>
+
+ +
HTML (with inline css and javascript) + +
<!DOCTYPE html5>
+<head>
+  <title>Title</title>
+
+  <style>
+    body {
+      width: 500px;
+    }
+  </style>
+
+  <script type="application/javascript">
+    function someFunction() {
+      return true;
+    }
+  </script>
+
+<body>
+  <p class="something" id='12'>Something</p>
+  <p class=something>Something</p>
+  <!-- comment -->
+  <p class>Something</p>
+  <p class="something" title="p">Something</p>
+</body>
+
+ +
Markdown + +
+# hello world
+
+you can write text [with links](http://example.com).
+
+* one _thing_ has *em*phasis
+* two __things__ are **bold**
+
+---
+
+hello world
+===========
+
+<this_is inline="xml"></this_is>
+
+> markdown is so cool
+
+    so are code segments
+
+1. one thing (yeah!)
+2. two thing `i can write code`, and `more` wipee!
+
+ +
Django templates + +
{% if articles|length %}
+{% for article in articles %}
+
+{# Striped table #}
+<tr class="{% cycle odd,even %}">
+  <td>{{ article|default:"Hi... "|escape }}</td>
+  <td {% if article.today %}class="today"{% endif %}>{{ article.date|date:"d.m.Y" }}</td>
+</tr>
+
+{% endfor %}
+{% endif %}
+
+{% comment %}
+Comments may be long and
+multiline.
+{% endcomment %}
+
+ +
CSS + +
body,
+html {
+  font: Tahoma, Arial, san-serif;
+  background: url('hatch.png');
+}
+
+@import url('print.css');
+
+@media screen and (-webkit-min-device-pixel-ratio: 0) {
+  body:first-of-type pre::after {
+    content: 'highlight: ' attr(class);
+  }
+}
+
+@page:right {
+ margin: 1cm 2cm 1.3cm 4cm;
+}
+
+@font-face {
+	font-family: Chunkfive;
+	src: url('Chunkfive.otf');
+}
+
+#content {
+  width: /* wide enough */ 100% /* 400px */;
+  height: 100%
+}
+
+p[lang=ru] {
+  color: #F0F0F0; background: white !important;
+}
+
+ +
JavaScript + +
function $initHighlight(block) {
+  if (block.className.search(/\bno\-highlight\b/) != -1)
+    return false;
+  try {
+    blockText(block);
+  } catch (e) {
+    if (e == 'Complex markup')
+      return;
+  }//try
+  var classes = block.className.split(/\s+/);
+  for (var i = 0 / 2; i < classes.length; i++) { // "0 / 2" should not be parsed as regexp start
+    if (LANGUAGES[classes[i]]) {
+      highlightLanguage(block, classes[i]);
+      return;
+    }//if
+  }//for
+  highlightAuto(block);
+}//initHighlight
+ +
CoffeeScript + +
grade = (student) ->
+  if student.excellentWork
+    "A+"
+  else if student.okayStuff
+    if student.triedHard then "B" else "B-"
+  else
+    "C"
+
+eldest = if 24 > 21 then "Liz" else "Ike"
+
+square = (x) -> x * x
+
+two = -> 2
+
+math =
+  root:   Math.sqrt
+  square: square
+  cube:   (x) -> x * square x
+
+race = (winner, runners...) ->
+  print winner, runners
+
+hi = `function() {
+  return [document.title, "Hello JavaScript"].join(": ");
+}`
+
+substr = "JavaScript numbers test #{ 010 / 0xf }"
+
+heredoc = """
+CoffeeScript numbers test #{ 010 / 0b10 }
+"""
+
+###
+CoffeeScript Compiler v1.2.0
+Released under the MIT License
+###
+
+OPERATOR = /// ^ (
+?: [-=]>             # function
+ | [-+*/%<>&|^!?=]=  # compound assign / compare
+ | >>>=?             # zero-fill right shift
+ | ([-+:])\1         # doubles
+ | ([&|<>])\2=?      # logic / shift
+ | \?\.              # soak access
+ | \.{2,3}           # range or splat
+) ///
+ +
ActionScript + +
package org.example.dummy {
+    import org.dummy.*;
+
+    /*define package inline interface*/
+    public interface IFooBarzable {
+        public function foo(... pairs):Array;
+    }
+
+    public class FooBar implements IFooBarzable {
+        static private var cnt:uint = 0;
+
+        private var bar:String;
+
+        //constructor
+        public function TestBar(bar:String):void {
+            bar = bar;
+
+            ++cnt;
+        }
+
+        public function foo(... pairs):Array {
+            pairs.push(bar);
+
+            return pairs;
+        }
+
+        protected function includeTestFile():void {
+            include "Test.as";
+        }
+    }
+}
+ +
VBScript + +
' creating configuration storage and initializing with default values
+Set cfg = CreateObject("Scripting.Dictionary")
+
+' reading ini file
+for i = 0 to ubound(ini_strings)
+    s = trim(ini_strings(i))
+
+    ' skipping empty strings and comments
+    if mid(s, 1, 1) <> "#" and len(s) > 0 then
+      ' obtaining key and value
+      parts = split(s, "=", -1, 1)
+
+      if ubound(parts)+1 = 2 then
+        parts(0) = trim(parts(0))
+        parts(1) = trim(parts(1))
+
+        ' reading configuration and filenames
+        select case lcase(parts(0))
+          case "uncompressed""_postfix" cfg.item("uncompressed""_postfix") = parts(1)
+          case "f"
+                    options = split(parts(1), "|", -1, 1)
+                    if ubound(options)+1 = 2 then
+                      ' 0: filename,  1: options
+                      ff.add trim(options(0)), trim(options(1))
+                    end if
+        end select
+      end if
+    end if
+next
+ +
Lua + +
--[[
+Simple signal/slot implementation
+]]
+local signal_mt = {
+    __index = {
+        register = table.insert
+    }
+}
+function signal_mt.__index:emit(... --[[ Comment in params ]])
+    for _, slot in ipairs(self) do
+        slot(self, ...)
+    end
+end
+local function create_signal()
+    return setmetatable({}, signal_mt)
+end
+
+-- Signal test
+local signal = create_signal()
+signal:register(function (signal, ...)
+    print(...)
+end)
+signal:emit('Answer to Life, the Universe, and Everything:', 42)
+
+--[==[ [=[ [[
+Nested ]]
+multi-line ]=]
+comment ]==]
+[==[ Nested
+[=[ multi-line
+[[ string
+]] ]=] ]==]
+
+ +
Delphi + +
TList=Class(TObject)
+Private
+  Some: String;
+Public
+  Procedure Inside; // Suxx
+End;{TList}
+
+Procedure CopyFile(InFileName,var OutFileName:String);
+Const
+  BufSize=4096; (* Huh? *)
+Var
+  InFile,OutFile:TStream;
+  Buffer:Array[1..BufSize] Of Byte;
+  ReadBufSize:Integer;
+Begin
+  InFile:=Nil;
+  OutFile:=Nil;
+  Try
+    InFile:=TFileStream.Create(InFileName,fmOpenRead);
+    OutFile:=TFileStream.Create(OutFileName,fmCreate);
+    Repeat
+      ReadBufSize:=InFile.Read(Buffer,BufSize);
+      OutFile.Write(Buffer,ReadBufSize);
+    Until ReadBufSize<>BufSize;
+    Log('File '''+InFileName+''' copied'#13#10);
+  Finally
+    InFile.Free;
+    OutFile.Free;
+  End;{Try}
+End;{CopyFile}
+
+ +
Java + +
package l2f.gameserver.model;
+
+import java.util.ArrayList;
+
+/**
+ * Mother class of all character objects of the world (PC, NPC...)<BR><BR>
+ *
+ */
+public abstract class L2Character extends L2Object
+{
+  protected static final Logger _log = Logger.getLogger(L2Character.class.getName());
+
+  public static final Short ABNORMAL_EFFECT_BLEEDING = 0x0001; // not sure
+  public static final Short ABNORMAL_EFFECT_POISON = 0x0002;
+
+  public void detachAI() {
+    _ai = null;
+    //jbf = null;
+    if (1 > 5) {
+      return;
+    }
+  }
+
+  public void moveTo(int x, int y, int z) {
+    moveTo(x, y, z, 0);
+  }
+
+  /** Task of AI notification */
+  @SuppressWarnings( { "nls", "unqualified-field-access", "boxing" })
+  public class NotifyAITask implements Runnable {
+    private final CtrlEvent _evt;
+
+    public void run() {
+      try {
+        getAI().notifyEvent(_evt, null, null);
+      } catch (Throwable t) {
+        _log.warning("Exception " + t);
+        t.printStackTrace();
+      }
+    }
+  }
+
+}
+
+ +
C++ + +
#include <iostream>
+
+int main(int argc, char *argv[]) {
+
+  /* An annoying "Hello World" example */
+  for (auto i = 0; i < 0xFFFF; i++)
+    cout << "Hello, World!" << endl;
+
+  char c = '\n';
+  unordered_map <string, vector<string> > m;
+  m["key"] = "\\\\"; // this is an error
+
+  return -2e3 + 12l;
+}
+
+ +
Objective C + +
+
+#import <UIKit/UIKit.h>
+#import "Dependency.h"
+
+@protocol WorldDataSource
+@optional
+- (NSString*)worldName;
+@required
+- (BOOL)allowsToLive;
+@end
+
+@interface Test : NSObject <HelloDelegate, WorldDataSource> {
+	NSString *_greeting;
+}
+
+@property (nonatomic, readonly) NSString *greeting;
+- (IBAction) show;
+@end
+
+@implementation Test
+
+@synthesize test=_test;
+
++ (id) test {
+	return [self testWithGreeting:@"Hello, world!\nFoo bar!"];
+}
+
++ (id) testWithGreeting:(NSString*)greeting {
+	return [[[self alloc] initWithGreeting:greeting] autorelease];
+}
+
+- (id) initWithGreeting:(NSString*)greeting {
+	if ( (self = [super init]) ) {
+		_greeting = [greeting retain];
+	}
+	return self;
+}
+
+- (void) dealloc {
+	[_greeting release];
+	[super dealloc];
+}
+
+@end
+
+
+ +
Vala + +
using DBus;
+
+namespace Test {
+  class Foo : Object {
+    public signal void some_event ();   // definition of the signal
+    public void method () {
+      some_event ();                    // emitting the signal (callbacks get invoked)
+    }
+  }
+}
+
+/* defining a class */
+class Track : GLib.Object {              /* subclassing 'GLib.Object' */
+	public double mass;                  /* a public field */
+	public double name { get; set; }     /* a public property */
+	private bool terminated = false;     /* a private field */
+	public void terminate() {            /* a public method */
+	  terminated = true;
+	}
+}
+
+const ALL_UPPER_CASE = "you should follow this convention";
+
+var t = new Track();      // same as: Track t = new Track();
+var s = "hello";          // same as: string s = "hello";
+var l = new List<int>();       // same as: List<int> l = new List<int>();
+var i = 10;               // same as: int i = 10;
+
+
+#if (ololo)
+Regex regex = /foo/;
+#endif
+
+/*
+ * Entry point can be outside class
+ */
+void main () {
+  var long_string = """
+    Example of "verbatim string".
+    Same as in @"string" in C#
+  """
+  var foo = new Foo ();
+  foo.some_event.connect (callback_a);      // connecting the callback functions
+  foo.some_event.connect (callback_b);
+  foo.method ();
+}
+
+ +
C# + +
using System;
+
+#pragma warning disable 414, 3021
+
+public class Program
+{
+    /// <summary>The entry point to the program.</summary>
+    /// <remarks>
+    /// Using the Visual Studio style, the tags in this comment
+    /// should be grey, but this text should be green.
+    /// This comment should be green on the inside:
+    /// <!-- I'm green! -->
+    /// </remarks>
+    public static int Main(string[] args)
+    {
+        Console.WriteLine("Hello, World!");
+        string s = @"This
+""string""
+spans
+multiple
+lines!";
+        return 0;
+    }
+}
+
+ +
RenderMan RSL + +
#define TEST_DEFINE 3.14
+/*	plastic surface shader
+ *
+ * 	Pixie is:
+ * 	(c) Copyright 1999-2003 Okan Arikan. All rights reserved.
+ */
+
+surface plastic (float Ka = 1, Kd = 0.5, Ks = 0.5, roughness = 0.1;
+                 color specularcolor = 1;) {
+  normal Nf = faceforward (normalize(N),I);
+  Ci = Cs * (Ka*ambient() + Kd*diffuse(Nf)) + specularcolor * Ks *
+       specular(Nf,-normalize(I),roughness);
+  Oi = Os;
+  Ci *= Oi;
+}
+
+ +
RenderMan RIB + +
FrameBegin 0
+Display "Scene" "framebuffer" "rgb"
+Option "searchpath" "shader" "+&:/home/kew"
+Option "trace" "int maxdepth" [4]
+Attribute "visibility" "trace" [1]
+Attribute "irradiance" "maxerror" [0.1]
+Attribute "visibility" "transmission" "opaque"
+Format 640 480 1.0
+ShadingRate 2
+PixelFilter "catmull-rom" 1 1
+PixelSamples 4 4
+Projection "perspective" "fov" 49.5502811377
+Scale 1 1 -1
+
+WorldBegin
+
+ReadArchive "Lamp.002_Light/instance.rib"
+Surface "plastic"
+ReadArchive "Cube.004_Mesh/instance.rib"
+# ReadArchive "Sphere.010_Mesh/instance.rib"
+# ReadArchive "Sphere.009_Mesh/instance.rib"
+ReadArchive "Sphere.006_Mesh/instance.rib"
+
+WorldEnd
+FrameEnd
+
+ +
MEL (Maya Embedded Language) + +
proc string[] getSelectedLights()
+
+{
+  string $selectedLights[];
+
+  string $select[] = `ls -sl -dag -leaf`;
+
+  for ( $shape in $select )
+  {
+    // Determine if this is a light.
+    //
+    string $class[] = getClassification( `nodeType $shape` );
+
+
+    if ( ( `size $class` ) > 0 && ( "light" == $class[0] ) )
+    {
+      $selectedLights[ `size $selectedLights` ] = $shape;
+    }
+  }
+
+  // Result is an array of all lights included in
+
+  // current selection list.
+  return $selectedLights;
+}
+
+ +
SQL + +
BEGIN;
+CREATE TABLE "cicero_topic" (
+    "id" serial NOT NULL PRIMARY KEY,
+    "forum_id" integer NOT NULL,
+    "subject" varchar(255) NOT NULL,
+    "created" timestamp with time zone NOT NULL
+);
+ALTER TABLE "cicero_topic"
+ADD CONSTRAINT forum_id_refs_id_4be56999
+FOREIGN KEY ("forum_id")
+REFERENCES "cicero_forum" ("id")
+DEFERRABLE INITIALLY DEFERRED;
+
+-- Initials
+insert into "cicero_forum"
+  ("slug", "name", "group", "ordering")
+values
+  ('test', 'Forum for te''sting', 'Test', 0);
+
+-- Test
+select count(*) from cicero_forum;
+
+COMMIT;
+
+ +
SmallTalk + +
Object>>method: num
+    "comment 123"
+    | var1 var2 |
+    (1 to: num) do: [:i | |var| ^i].
+    Klass with: var1.
+    Klass new.
+    arr := #('123' 123.345 #hello Transcript var $@).
+    arr := #().
+    var2 = arr at: 3.
+    ^ self abc
+
+heapExample
+    "HeapTest new heapExample"
+    "Multiline
+    decription"
+    | n rnd array time sorted |
+    n := 5000.
+    "# of elements to sort"
+    rnd := Random new.
+    array := (1 to: n)
+                collect: [:i | rnd next].
+    "First, the heap version"
+    time := Time
+                millisecondsToRun: [sorted := Heap withAll: array.
+    1
+        to: n
+        do: [:i |
+            sorted removeFirst.
+            sorted add: rnd next]].
+    Transcript cr; show: 'Time for Heap: ' , time printString , ' msecs'.
+    "The quicksort version"
+    time := Time
+                millisecondsToRun: [sorted := SortedCollection withAll: array.
+    1
+        to: n
+        do: [:i |
+            sorted removeFirst.
+            sorted add: rnd next]].
+    Transcript cr; show: 'Time for SortedCollection: ' , time printString , ' msecs'
+
+ +
Lisp + +
(defun prompt-for-cd ()
+   "Prompts
+    for CD"
+   (prompt-read "Title" 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6))
+   (prompt-read "Artist" &rest)
+   (or (parse-integer (prompt-read "Rating") :junk-allowed t) 0)
+  (if x (format t "yes") (format t "no" nil) ;and here comment
+  )
+  ;; second line comment
+  '(+ 1 2)
+  (defvar *lines*)                ; list of all lines
+  (position-if-not #'sys::whitespacep line :start beg))
+  (quote (privet 1 2 3))
+  '(hello world)
+  (* 5 7)
+  (1 2 34 5)
+  (:use "aaaa")
+  (let ((x 10) (y 20))
+    (print (+ x y))
+  )
+ +
Ini file + +
;Settings relating to the location and loading of the database
+[Database]
+ProfileDir=.
+ShowProfileMgr=smart
+Profile1_Name[] = "\|/_-=MegaDestoyer=-_\|/"
+DefaultProfile=True
+AutoCreate = no
+
+[AutoExec]
+Use="prompt"
+Glob=autoexec_*.ini
+AskAboutIgnoredPlugins=0
+
+ +
Apache + +
# rewrite`s rules for wordpress pretty url
+LoadModule rewrite_module  modules/mod_rewrite.so
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule . index.php [NC,L]
+
+ExpiresActive On
+ExpiresByType application/x-javascript  "access plus 1 days"
+
+<Location /maps/>
+  RewriteMap map txt:map.txt
+  RewriteMap lower int:tolower
+  RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC]
+  RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND
+  RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L]
+</Location>
+
+ +
nginx + +
user  www www;
+worker_processes  2;
+pid /var/run/nginx.pid;
+error_log  /var/log/nginx.error_log  debug | info | notice | warn | error | crit;
+
+events {
+    connections   2000;
+    use kqueue | rtsig | epoll | /dev/poll | select | poll;
+}
+
+http {
+    log_format main      '$remote_addr - $remote_user [$time_local] '
+                         '"$request" $status $bytes_sent '
+                         '"$http_referer" "$http_user_agent" '
+                         '"$gzip_ratio"';
+
+    send_timeout 3m;
+    client_header_buffer_size 1k;
+
+    gzip on;
+    gzip_min_length 1100;
+
+    #lingering_time 30;
+
+    server {
+        listen        one.example.com;
+        server_name   one.example.com  www.one.example.com;
+        access_log   /var/log/nginx.access_log  main;
+
+        location / {
+            proxy_pass         http://127.0.0.1/;
+            proxy_redirect     off;
+            proxy_set_header   Host             $host;
+            proxy_set_header   X-Real-IP        $remote_addr;
+            charset            koi8-r;
+        }
+
+        location ~* \.(jpg|jpeg|gif)$ {
+            root         /spool/www;
+        }
+    }
+}
+
+ +
Diff + +
Index: languages/ini.js
+===================================================================
+--- languages/ini.js    (revision 199)
++++ languages/ini.js    (revision 200)
+@@ -1,8 +1,7 @@
+ hljs.LANGUAGES.ini =
+ {
+   case_insensitive: true,
+-  defaultMode:
+-  {
++  defaultMode: {
+     contains: ['comment', 'title', 'setting'],
+     illegal: '[^\\s]'
+   },
+
+*** /path/to/original timestamp
+--- /path/to/new      timestamp
+***************
+*** 1,3 ****
+--- 1,9 ----
++ This is an important
++ notice! It should
++ therefore be located at
++ the beginning of this
++ document!
+
+! compress the size of the
+! changes.
+
+  It is important to spell
+
+ +
DOS batch files + +
cd \
+copy a b
+ping 192.168.0.1
+@rem ping 192.168.0.1
+net stop sharedaccess
+del %tmp% /f /s /q
+del %temp% /f /s /q
+ipconfig /flushdns
+taskkill /F /IM JAVA.EXE /T
+
+cd Photoshop/Adobe Photoshop CS3/AMT/
+if exist application.sif (
+    ren application.sif _application.sif
+) else (
+    ren _application.sif application.sif
+)
+
+taskkill /F /IM proquota.exe /T
+
+sfc /SCANNOW
+
+set path = test
+
+xcopy %1\*.* %2
+
+ +
Bash + +
#!/bin/bash
+
+###### BEGIN CONFIG
+ACCEPTED_HOSTS="/root/.hag_accepted.conf"
+BE_VERBOSE=false
+###### END CONFIG
+
+if [ "$UID" -ne 0 ]
+then
+ echo "Superuser rights is required"
+ echo 'Printing the # sign'
+ exit 2
+fi
+
+genApacheConf(){
+ if [[ "$2" = "www" ]]
+ then
+  full_domain=$1
+ else
+  full_domain=$2.$1
+ fi
+ host_root="${APACHE_HOME_DIR}$1/$2"
+ echo -e "# Host $1/$2 :"
+}
+
+ +
CMake + +
project(test)
+cmake_minimum_required(VERSION 2.6)
+
+# IF LINUX
+if (${CMAKE_SYSTEM_NAME} MATCHES Linux)
+    message("\nOS:\t\tLinux")
+endif()
+
+# IF WINDOWS
+if (${CMAKE_SYSTEM_NAME} MATCHES Windows)
+    message("\nOS:\t\tWindows")
+endif()
+
+set(test test0.cpp test1.cpp test2.cpp)
+
+include_directories(./)
+
+set(EXECUTABLE_OUTPUT_PATH ../bin)
+
+add_subdirectory(src)
+
+add_executable(test WIN32 ${test})
+
+target_link_libraries(test msimg32)
+
+ +
Axapta + +
class ExchRateLoadBatch extends RunBaseBatch {
+  ExchRateLoad rbc;
+  container currencies;
+  boolean actual;
+  boolean overwrite;
+  date beg;
+  date end;
+
+  #define.CurrentVersion(5)
+
+  #localmacro.CurrentList
+    currencies,
+    actual,
+    beg,
+    end
+  #endmacro
+}
+
+public boolean unpack(container packedClass) {
+  container       base;
+  boolean         ret;
+  Integer         version    = runbase::getVersion(packedClass);
+
+  switch (version) {
+    case #CurrentVersion:
+      [version, #CurrentList] = packedClass;
+      return true;
+    default:
+      return false;
+  }
+  return ret;
+}
+
+ +
1С + +

+#Если Клиент Тогда
+Перем СимвольныйКодКаталога = "ля-ля-ля"; //комментарий
+Функция Сообщить(Знач ТекстСообщения, ТекстСообщения2) Экспорт //комментарий к функции
+  x=ТекстСообщения+ТекстСообщения2+"
+  |строка1
+  |строка2
+  |строка3";
+КонецФункции
+#КонецЕсли
+
+// Процедура ПриНачалеРаботыСистемы
+//
+Процедура ПриНачалеРаботыСистемы()
+  Обработки.Помощник.ПолучитьФорму("Форма").Открыть();
+  d = '21.01.2008'
+КонецПроцедуры
+
+ +
AVR Assembler + +
;* Title:       Block Copy Routines
+;* Version:     1.1
+
+.include "8515def.inc"
+
+    rjmp    RESET   ;reset handle
+
+.def    flashsize=r16       ;size of block to be copied
+
+flash2ram:
+    lpm         ;get constant
+    st  Y+,r0       ;store in SRAM and increment Y-pointer
+    adiw    ZL,1        ;increment Z-pointer
+    dec flashsize
+    brne    flash2ram   ;if not end of table, loop more
+    ret
+
+.def    ramtemp =r1     ;temporary storage register
+.def    ramsize =r16        ;size of block to be copied
+
+ +
VHDL + +
------------------------------------
+-- RS Trigger with Assynch. Reset --
+------------------------------------
+
+library IEEE;
+use IEEE.STD_LOGIC_1164.all;
+
+entity RS_AR is
+	generic (T: Time := 0ns);
+
+	port(
+		 -- Default RS Trigger
+		 R  : in  STD_LOGIC;
+		 S  : in  STD_LOGIC;
+		 Q  : out STD_LOGIC;
+		 nQ : out STD_LOGIC;
+
+		 -- Special Input Signals
+		 AR : in  STD_LOGIC; -- assynch. reset
+		 C  : in  STD_LOGIC  -- synch. signal
+	     );
+end RS_AR;
+
+
+architecture RS_AR of RS_AR is
+	signal QT: std_logic; -- Q(t)
+begin
+
+	process(C, AR) is
+		subtype RS is std_logic_vector ( 1 downto 0 );
+	begin
+		if AR='0' then
+			QT <= '0';
+		else
+			if rising_edge(C) then
+
+				if not (R'stable(T) and S'stable(T)) then
+				QT <= 'X';
+				else
+
+				case RS'(R&S) is
+					when "01" => QT <= '1';
+					when "10" => QT <= '0';
+					when "11" => QT <= 'X';
+					when others => null;
+				end case;
+
+				end if;
+			end if;
+		end if;
+	end process;
+
+	Q  <= QT;
+	nQ <= not QT;
+
+end RS_AR;
+
+ +
Parser 3 + +
@CLASS
+base
+
+@USE
+module.p
+
+@BASE
+class
+
+# Comment for code
+@create[aParam1;aParam2][local1;local2]
+  ^connect[mysql://host/database?ClientCharset=windows-1251]
+  ^for[i](1;10){
+    <p class="paragraph">^eval($i+10)</p>
+    ^connect[mysql://host/database]{
+      $tab[^table::sql{select * from `table` where a='1'}]
+      $var_Name[some${value}]
+    }
+  }
+
+  ^rem{
+    Multiline comment with code: $var
+    ^while(true){
+      ^for[i](1;10){
+        ^sleep[]
+      }
+    }
+  }
+  ^taint[^#0A]
+
+@GET_base[]
+## Comment for code
+  # Isn't comment
+  $result[$.hash_item1[one] $.hash_item2[two]]
+
+ +
TeX + +
+\documentclass{article}
+\usepackage[koi8-r]{inputenc}
+\hoffset=0pt
+\voffset=.3em
+\tolerance=400
+\newcommand{\eTiX}{\TeX}
+\begin{document}
+\section*{Highlight.js}
+\begin{table}[c|c]
+$\frac 12\, + \, \frac 1{x^3}\text{Hello \! world}$ & \textbf{Goodbye\~ world} \\\eTiX $ \pi=400 $
+\end{table}
+Ch\'erie, \c{c}a ne me pla\^\i t pas! % comment \b
+G\"otterd\"ammerung~45\%=34.
+$$
+    \int\limits_{0}^{\pi}\frac{4}{x-7}=3
+$$
+\end{document}
+
+ +
Haskell + +
+module Shapes
+( Point(..)  ,
+  Shape(..)  ,
+  surface    ,
+  baseCircle ,
+  baseRect
+) where
+
+-- Single line comment
+{-
+multi
+line
+comment
+-}
+data Point = Point Float Float deriving (Show)
+data Shape = Circle Point Float | Rectangle Point Point deriving (Show)
+
+surface :: Shape -> Float
+surface (Circle _ r) = pi * r^2
+surface (Rectangle (Point x1 y1) (Point x2 y2)) = (abs $ x2 - x1) * (abs $ y2 - y1)
+
+baseCircle :: Float -> Shape
+baseCircle r = Circle(Point 0 0) r
+
+baseRect :: Float -> Float -> Shape
+baseRect w h = Rectangle (Point 0 0) (Point w h)
+
+ +
Erlang + +
-module(ssh_cli).
+
+-behaviour(ssh_channel).
+
+-include("ssh.hrl").
+%% backwards compatibility
+-export([listen/1, listen/2, listen/3, listen/4, stop/1]).
+
+%% state
+-record(state, {
+	  cm,
+	  channel
+	 }).
+
+test(Foo)->Foo.
+
+init([Shell, Exec]) ->
+    {ok, #state{shell = Shell, exec = Exec}};
+init([Shell]) ->
+    false = not true,
+    io:format("Hello, \"~p!~n", [atom_to_list('World')]),
+    {ok, #state{shell = Shell}}.
+
+concat([Single]) -> Single;
+concat(RList) ->
+    EpsilonFree = lists:filter(
+        fun (Element) ->
+            case Element of
+                epsilon -> false;
+                _ -> true
+            end
+        end,
+        RList),
+    case EpsilonFree of
+        [Single] -> Single;
+        Other -> {concat, Other}
+    end.
+
+union_dot_union({union, _}=U1, {union, _}=U2) ->
+    union(lists:flatten(
+        lists:map(
+            fun (X1) ->
+                lists:map(
+                    fun (X2) ->
+                        concat([X1, X2])
+                    end,
+                    union_to_list(U2)
+                )
+            end,
+            union_to_list(U1)
+        ))).
+
+ +
Erlang REPL + +
1> Str = "abcd".
+"abcd"
+2> L = test:length(Str).
+4
+3> Descriptor = {L, list_to_atom(Str)}.
+{4,abcd}
+4> L.
+4
+5> b().
+Descriptor = {4,abcd}
+L = 4
+Str = "abcd"
+ok
+6> f(L).
+ok
+7> b().
+Descriptor = {4,abcd}
+Str = "abcd"
+ok
+8> {L, _} = Descriptor.
+{4,abcd}
+9> L.
+4
+10> 2#101.
+5
+11> 1.85e+3.
+1850
+
+ +
Rust + +
+use std;
+
+import std::io;
+export fac, test1;
+
+123;                               // type int
+123u;                              // type uint
+123_u;                             // type uint
+0xff00;                            // type int
+0xff_u8;                           // type u8
+0b1111_1111_1001_0000_i32;         // type i32
+123.0;                             // type float
+0.1;                               // type float
+3f;                                // type float
+0.1f32;                            // type f32
+12E+99_f64;                        // type f64
+
+/* Factorial */
+fn fac(n: int) -> int {
+    let s: str = "This is
+a multi-line string.
+
+It ends with an unescaped '\"'.";
+    let c: char = 'Ф';
+
+    let result = 1, i = 1;
+    while i <= n { // No parens around the condition
+        result *= i;
+        i += 1;
+    }
+    ret result;
+}
+
+pure fn pure_length<T>(ls: list<T>) -> uint { /* ... */ }
+
+type t = map::hashtbl<int,str>;
+let x = id::<int>(10);
+
+// Define some modules.
+#[path = "foo.rs"]
+mod foo;
+
+iface seq<T> {
+    fn len() -> uint;
+}
+
+impl <T> of seq<T> for [T] {
+    fn len() -> uint { vec::len(self) }
+    fn iter(b: fn(T)) {
+        for elt in self { b(elt); }
+    }
+}
+
+enum list<T> {
+    nil;
+    cons(T, @list<T>);
+}
+
+let a: list<int> = cons(7, @cons(13, @nil));
+
+ +
Matlab + +
n = 20; % number of points
+points = [random('unid', 100, n, 1), random('unid', 100, n, 1)];
+len = zeros(1, n - 1);
+points = sortrows(points);
+%% Initial set of points
+plot(points(:,1),points(:,2));
+for i = 1: n-1
+    len(i) = points(i + 1, 1) - points(i, 1);
+end
+while(max(len) > 2 * min(len))
+    [d, i] = max(len);
+    k = on_margin(points, i, d, -1);
+    m = on_margin(points, i + 1, d, 1);
+    xm = 0; ym = 0;
+%% New point
+    if(i == 1 || i + 1 == n)
+        xm = mean(points([i,i+1],1))
+        ym = mean(points([i,i+1],2))
+    else
+        [xm, ym] = dlg1(points([k, i, i + 1, m], 1), ...
+            points([k, i, i + 1, m], 2))
+    end
+
+    points = [ points(1:i, :); [xm, ym]; points(i + 1:end, :)];
+end
+
+function [net] = get_fit_network(inputs, targets)
+    % Create Network
+    numHiddenNeurons = 20;  % Adjust as desired
+    net = newfit(inputs,targets,numHiddenNeurons);
+    net.trainParam.goal = 0.01;
+    net.trainParam.epochs = 1000;
+    % Train and Apply Network
+    [net,tr] = train(net,inputs,targets);
+end
+
+ +
+ + + + +

Special tests

+ + + + + + + + + + +
Explicit Python highlighting + +
for x in [1, 2, 3]:
+  count(x)
+
+ +
Language set on <pre> + +
for x in [1, 2, 3]:
+  count(x)
+
+ +
HTML5-style language class (language-python) + +
for x in [1, 2, 3]:
+  count(x)
+
+ +
Replacing TAB with 4 spaces + +
for x in [1, 2, 3]:
+	count(x)
+
+ +
Custom markup + +
<div id="contents">
+  <p>Hello, World!Goodbye, cruel world!
+</div>
+
+ +
Custom markup + TAB replacement + +
for x in [1, 2, 3]:
+	count(x)
+	if x == 3:
+		count(x + 1)
+
+ +
Non-pre container + +
for x in [1, 2, 3]:
+  count(x)
+
+ + +
Disabled highlighting + +
<div id="contents">
+  <p>Hello, World!
+</div>
+
+ +