tag.
*/
let num = 0;
$$('.line-highlight', pre).forEach(line => {
num += (line.textContent || '').length;
line.remove();
});
// Remove extra whitespace
if (num && /^(?: \n)+$/.test(env.code.slice(-num))) {
env.code = env.code.slice(0, -num);
}
});
const completeHook = Prism.hooks.add('complete', env => {
const pre = env.element.parentElement;
if (!isActiveFor(pre)) {
return;
}
if (fakeTimer !== undefined) {
clearTimeout(fakeTimer);
}
/** @type {LineHighlight} */
const lineHighlight = Prism.pluginRegistry.peek(Self)?.plugin;
const mutateDom = lineHighlight.highlightLines(pre);
mutateDom();
fakeTimer = setTimeout(applyHash, 1);
});
return combineCallbacks(removeEventListeners, beforeSanityHook, completeHook);
},
};
export default Self;
prism.pluginRegistry.add(Self);
/**
* @typedef {import('../../core.js').Prism} Prism
* @typedef {import('../line-numbers/line-numbers.js').LineNumbers} LineNumbers
*/
================================================
FILE: src/plugins/line-numbers/README.md
================================================
---
title: Line Numbers
description: Line number at the beginning of code lines.
owner: kuba-kubula
---
# How to use
Obviously, this is supposed to work only for code blocks (``) and not for inline code.
Add the `line-numbers` class to your desired `` or any of its ancestors, and the Line Numbers plugin will take care of the rest. To give all code blocks line numbers, add the `line-numbers` class to the `` of the page. This is part of a general activation mechanism where adding the `line-numbers` (or `no-line-numbers`) class to any element will enable (or disable) the Line Numbers plugin for all code blocks in that element.
Example:
```html
...
...
```
Optional: You can specify the `data-start` (Number) attribute on the `` element. It will shift the line counter.
Optional: To support multiline line numbers using soft wrap, apply the CSS `white-space: pre-line;` or `white-space: pre-wrap;` to your desired ``.
# Examples
## JavaScript
## CSS
Please note that this `` does not have the `line-numbers` class but its parent does.
## HTML
Please note the `data-start="-5"` in the code below.
## Unknown languages
```{ .language-none .line-numbers }
This raw text
is not highlighted
but it still has
line numbers
```
## Soft wrap support
Please note the `style="white-space: pre-wrap;"` in the code below.
================================================
FILE: src/plugins/line-numbers/line-numbers.css
================================================
pre[class*="language-"].line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}
pre[class*="language-"].line-numbers > code {
position: relative;
white-space: inherit;
}
.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: 0;
font-size: 100%;
left: -3.8em;
width: 3em; /* works for line-numbers below 1000 lines */
letter-spacing: -1px;
border-right: 1px solid #999;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.line-numbers-rows > span {
display: block;
counter-increment: linenumber;
}
.line-numbers-rows > span:before {
content: counter(linenumber);
color: #999;
display: block;
padding-right: 0.8em;
text-align: right;
}
================================================
FILE: src/plugins/line-numbers/line-numbers.js
================================================
import prism from '../../global.js';
import { getParentPre, isActive } from '../../shared/dom-util.js';
import { isNonNull, noop } from '../../shared/util.js';
import { combineCallbacks } from '../../util/combine-callbacks.js';
/**
* Plugin name which is used as a class name for which is activating the plugin
*/
const PLUGIN_NAME = 'line-numbers';
/**
* Regular expression used for determining line breaks
*/
const NEW_LINE_EXP = /\n(?!$)/g;
/**
* Queries for the `line-numbers-rows` element.
*
* @param {Element} element
* @returns {HTMLElement | null}
*/
function getLineNumbersRows (element) {
return element.querySelector('.line-numbers-rows');
}
/**
* Resizes the given elements.
*
* @param {Element[]} elements
*/
function resizeElements (elements) {
elements = elements.filter(e => {
const codeStyles = getComputedStyle(e);
const whiteSpace = codeStyles.whiteSpace;
return whiteSpace === 'pre-wrap' || whiteSpace === 'pre-line';
});
if (elements.length === 0) {
return;
}
const infos = /** @type {Info[]} */ (
elements
.map(element => {
const codeElement = element.querySelector('code');
const lineNumbersWrapper = getLineNumbersRows(element);
if (!codeElement || !lineNumbersWrapper) {
return undefined;
}
/** @type {HTMLElement | null} */
let lineNumberSizer = element.querySelector('.line-numbers-sizer');
// @ts-expect-error - codeElement.textContent is not null
const codeLines = codeElement.textContent.split(NEW_LINE_EXP);
if (!lineNumberSizer) {
lineNumberSizer = document.createElement('span');
lineNumberSizer.className = 'line-numbers-sizer';
codeElement.appendChild(lineNumberSizer);
}
lineNumberSizer.innerHTML = '0';
lineNumberSizer.style.display = 'block';
const oneLinerHeight = lineNumberSizer.getBoundingClientRect().height;
lineNumberSizer.innerHTML = '';
return {
element,
lines: codeLines,
lineHeights: [],
oneLinerHeight,
sizer: lineNumberSizer,
wrapper: lineNumbersWrapper,
};
})
.filter(isNonNull)
);
infos.forEach(info => {
const lineNumberSizer = info.sizer;
const lines = info.lines;
const lineHeights = info.lineHeights;
const oneLinerHeight = info.oneLinerHeight;
lineHeights[lines.length - 1] = undefined;
lines.forEach((line, index) => {
if (line && line.length > 1) {
const e = lineNumberSizer.appendChild(document.createElement('span'));
e.style.display = 'block';
e.textContent = line;
}
else {
lineHeights[index] = oneLinerHeight;
}
});
});
infos.forEach(info => {
const lineNumberSizer = info.sizer;
const lineHeights = info.lineHeights;
let childIndex = 0;
for (let i = 0; i < lineHeights.length; i++) {
if (lineHeights[i] === undefined) {
lineHeights[i] =
lineNumberSizer.children[childIndex++].getBoundingClientRect().height;
}
}
});
infos.forEach(info => {
const lineNumberSizer = info.sizer;
lineNumberSizer.style.display = 'none';
lineNumberSizer.innerHTML = '';
info.lineHeights.forEach((height, lineNumber) => {
if (height !== undefined) {
const child = /** @type {HTMLElement} */ (info.wrapper.children[lineNumber]);
child.style.height = `${height}px`;
}
});
});
}
export class LineNumbers {
/**
* Whether the plugin can assume that the units font sizes and margins are not depended on the size of
* the current viewport.
*
* Setting this to `true` will allow the plugin to do certain optimizations for better performance.
*
* Set this to `false` if you use any of the following CSS units: `vh`, `vw`, `vmin`, `vmax`.
*/
assumeViewportIndependence = true;
/**
* Get node for provided line number
*
* @param {Element} element pre element
* @param {number} number number
* @returns {HTMLElement | undefined}
*/
getLine (element, number) {
if (element.tagName !== 'PRE' || !element.classList.contains(PLUGIN_NAME)) {
return;
}
const lineNumberRows = getLineNumbersRows(element);
if (!lineNumberRows) {
return;
}
const lineNumberStart = parseInt(String(element.getAttribute('data-start')), 10) || 1;
const lineNumberEnd = lineNumberStart + (lineNumberRows.children.length - 1);
if (number < lineNumberStart) {
number = lineNumberStart;
}
if (number > lineNumberEnd) {
number = lineNumberEnd;
}
const lineIndex = number - lineNumberStart;
return /** @type {HTMLElement} */ (lineNumberRows.children[lineIndex]);
}
/**
* Returns the nodes of all line numbers.
*
* @param {Element} element pre element
* @returns {HTMLElement[] | undefined}
*/
getLines (element) {
if (element.tagName !== 'PRE' || !element.classList.contains(PLUGIN_NAME)) {
return;
}
const lineNumberRows = getLineNumbersRows(element);
if (!lineNumberRows) {
return;
}
return /** @type {HTMLElement[]} */ ([...lineNumberRows.children]);
}
/**
* Resizes the line numbers of the given element.
*
* This function will not add line numbers. It will only resize existing ones.
*
* @param {Element} element A `` element with line numbers.
* @returns {void}
*/
resize (element) {
resizeElements([element]);
}
}
/** @type {import('../../types.d.ts').PluginProto<'line-numbers'>} */
const Self = {
id: 'line-numbers',
plugin () {
return new LineNumbers();
},
effect (Prism) {
if (typeof document === 'undefined') {
return noop;
}
let lastWidth = NaN;
const listener = () => {
/** @type {LineNumbers} */
const lineNumbers = Prism.pluginRegistry.peek(Self)?.plugin;
if (lineNumbers.assumeViewportIndependence && lastWidth === window.innerWidth) {
return;
}
lastWidth = window.innerWidth;
resizeElements([...document.querySelectorAll('pre.' + PLUGIN_NAME)]);
};
window.addEventListener('resize', listener);
const removeListener = () => {
window.removeEventListener('resize', listener);
};
const completeHook = Prism.hooks.add('complete', env => {
if (!env.code) {
return;
}
const code = env.element;
const pre = getParentPre(code);
// works only for wrapped inside (not inline)
if (!pre) {
return;
}
// Abort if line numbers already exists
if (getLineNumbersRows(code)) {
return;
}
// only add line numbers if or one of its ancestors has the `line-numbers` class
if (!isActive(code, PLUGIN_NAME)) {
return;
}
// Remove the class 'line-numbers' from the
code.classList.remove(PLUGIN_NAME);
// Add the class 'line-numbers' to the
pre.classList.add(PLUGIN_NAME);
const match = env.code.match(NEW_LINE_EXP);
const linesNum = match ? match.length + 1 : 1;
const lineNumbersWrapper = document.createElement('span');
lineNumbersWrapper.setAttribute('aria-hidden', 'true');
lineNumbersWrapper.className = 'line-numbers-rows';
lineNumbersWrapper.innerHTML = ' '.repeat(linesNum);
if (pre.hasAttribute('data-start')) {
pre.style.counterReset = `linenumber ${parseInt(String(pre.getAttribute('data-start')), 10) - 1}`;
}
env.element.appendChild(lineNumbersWrapper);
resizeElements([pre]);
});
return combineCallbacks(removeListener, completeHook);
},
};
export default Self;
prism.pluginRegistry.add(Self);
/**
* @typedef {object} Info
* @property {Element} element
* @property {string[]} lines
* @property {(number | undefined)[]} lineHeights
* @property {number} oneLinerHeight
* @property {HTMLElement} sizer
* @property {HTMLElement} wrapper
*/
================================================
FILE: src/plugins/match-braces/README.md
================================================
---
title: Match braces
description: Highlights matching braces.
owner: RunDevelopment
resources: /plugins/autoloader.js { type="module" }
---
# How to use
To enable this plugin add the `match-braces` class to a code block:
```html
...
```
Just like `language-xxxx`, the `match-braces` class is inherited, so you can add the class to the `` to enable the plugin for the whole page.
The plugin will highlight brace pairs when the cursor hovers over one of the braces. The highlighting effect will disappear as soon as the cursor leaves the brace pair.
The hover effect can be disabled by adding the `no-brace-hover` to the code block. This class can also be inherited.
You can also click on a brace to select the brace pair. To deselect the pair, click anywhere within the code block or select another pair.
The selection effect can be disabled by adding the `no-brace-select` to the code block. This class can also be inherited.
## Rainbow braces 🌈
To enable rainbow braces, simply add the `rainbow-braces` class to a code block. This class can also get inherited.
# Examples
## JavaScript
```js
const func = (a, b) => {
return `${a}:${b}`;
}
```
## Lisp
```lisp
(defun factorial (n)
(if (= n 0) 1
(* n (factorial (- n 1)))))
```
## Lisp with rainbow braces 🌈 but without hover
```lisp { .rainbow-braces .no-brace-hover }
(defun factorial (n)
(if (= n 0) 1
(* n (factorial (- n 1)))))
```
================================================
FILE: src/plugins/match-braces/match-braces.css
================================================
.token.punctuation.brace-hover,
.token.punctuation.brace-selected {
outline: solid 1px;
}
.rainbow-braces .token.punctuation.brace-level-1,
.rainbow-braces .token.punctuation.brace-level-5,
.rainbow-braces .token.punctuation.brace-level-9 {
color: #e50;
opacity: 1;
}
.rainbow-braces .token.punctuation.brace-level-2,
.rainbow-braces .token.punctuation.brace-level-6,
.rainbow-braces .token.punctuation.brace-level-10 {
color: #0b3;
opacity: 1;
}
.rainbow-braces .token.punctuation.brace-level-3,
.rainbow-braces .token.punctuation.brace-level-7,
.rainbow-braces .token.punctuation.brace-level-11 {
color: #26f;
opacity: 1;
}
.rainbow-braces .token.punctuation.brace-level-4,
.rainbow-braces .token.punctuation.brace-level-8,
.rainbow-braces .token.punctuation.brace-level-12 {
color: #e0e;
opacity: 1;
}
================================================
FILE: src/plugins/match-braces/match-braces.js
================================================
import prism from '../../global.js';
import { getParentPre, isActive } from '../../shared/dom-util.js';
/** @type {import('../../types.d.ts').PluginProto<'match-braces'>} */
const Self = {
id: 'match-braces',
effect (Prism) {
/**
* @param {string} name
*/
function mapClassName (name) {
/** @type {import('../custom-class/custom-class.js').CustomClass} */
const customClass = Prism.pluginRegistry.peek('custom-class')?.plugin;
if (customClass) {
return customClass.apply(name);
}
else {
return name;
}
}
const PARTNER = {
'(': ')',
'[': ']',
'{': '}',
};
// The names for brace types.
// These names have two purposes: 1) they can be used for styling and 2) they are used to pair braces. Only braces
// of the same type are paired.
const NAMES = {
'(': 'brace-round',
'[': 'brace-square',
'{': 'brace-curly',
};
// A map for brace aliases.
// This is useful for when some braces have a prefix/suffix as part of the punctuation token.
const BRACE_ALIAS_MAP = {
'${': '{', // JS template punctuation (e.g. `foo ${bar + 1}`)
};
const LEVEL_WARP = 12;
let pairIdCounter = 0;
const BRACE_ID_PATTERN = /^(pair-\d+-)(close|open)$/;
/**
* Returns the brace partner given one brace of a brace pair.
*
* @param {Element} brace
*/
function getPartnerBrace (brace) {
const match = BRACE_ID_PATTERN.exec(brace.id);
if (!match) {
return null;
}
return document.querySelector(
'#' + match[1] + (match[2] === 'open' ? 'close' : 'open')
);
}
/**
* @this {Element}
*/
function hoverBrace () {
if (!isActive(this, 'brace-hover', true)) {
return;
}
const partner = getPartnerBrace(this);
if (!partner) {
return;
}
[this, partner].forEach(e => {
e.classList.add(mapClassName('brace-hover'));
});
}
/**
* @this {Element}
*/
function leaveBrace () {
const partner = getPartnerBrace(this);
if (!partner) {
return;
}
[this, partner].forEach(e => {
e.classList.remove(mapClassName('brace-hover'));
});
}
/**
* @this {Element}
*/
function clickBrace () {
if (!isActive(this, 'brace-select', true)) {
return;
}
const partner = getPartnerBrace(this);
if (!partner) {
return;
}
[this, partner].forEach(e => {
e.classList.add(mapClassName('brace-selected'));
});
}
/** @type {WeakSet} */
const withEventListener = new WeakSet();
return Prism.hooks.add('complete', env => {
const code = env.element;
const pre = getParentPre(code);
if (!pre) {
return;
}
// find the braces to match
const toMatch = [];
if (isActive(code, 'match-braces')) {
toMatch.push('(', '[', '{');
}
if (toMatch.length === 0) {
// nothing to match
return;
}
if (!withEventListener.has(pre)) {
// code blocks might be highlighted more than once
withEventListener.add(pre);
pre.addEventListener('mousedown', () => {
// the code element might have been replaced
const code = pre.querySelector('code');
const className = mapClassName('brace-selected');
code?.querySelectorAll('.' + className).forEach(e => {
e.classList.remove(className);
});
});
}
const punctuation = [
...code.querySelectorAll(
'span.' + mapClassName('token') + '.' + mapClassName('punctuation')
),
];
/** @type {{ index: number, open: boolean, element: Element }[]} */
const allBraces = [];
toMatch.forEach(open => {
const close = PARTNER[open];
const name = mapClassName(NAMES[open]);
const pairs = [];
/** @type {number[]} */
const openStack = [];
for (let i = 0; i < punctuation.length; i++) {
const element = punctuation[i];
if (element.childElementCount === 0) {
let text = element.textContent || '';
text = BRACE_ALIAS_MAP[text] || text;
if (text === open) {
allBraces.push({ index: i, open: true, element });
element.classList.add(name);
element.classList.add(mapClassName('brace-open'));
openStack.push(i);
}
else if (text === close) {
allBraces.push({ index: i, open: false, element });
element.classList.add(name);
element.classList.add(mapClassName('brace-close'));
const popped = openStack.pop();
if (popped !== undefined) {
pairs.push([i, popped]);
}
}
}
}
pairs.forEach(pair => {
const pairId = `pair-${pairIdCounter++}-`;
const opening = punctuation[pair[0]];
const closing = punctuation[pair[1]];
opening.id = pairId + 'open';
closing.id = pairId + 'close';
[opening, closing].forEach(e => {
e.addEventListener('mouseenter', hoverBrace);
e.addEventListener('mouseleave', leaveBrace);
e.addEventListener('click', clickBrace);
});
});
});
let level = 0;
allBraces.sort((a, b) => a.index - b.index);
allBraces.forEach(brace => {
if (brace.open) {
brace.element.classList.add(
mapClassName(`brace-level-${(level % LEVEL_WARP) + 1}`)
);
level++;
}
else {
level = Math.max(0, level - 1);
brace.element.classList.add(
mapClassName(`brace-level-${(level % LEVEL_WARP) + 1}`)
);
}
});
});
},
};
export default Self;
prism.pluginRegistry.add(Self);
================================================
FILE: src/plugins/normalize-whitespace/README.md
================================================
---
title: Normalize Whitespace
description: Supports multiple operations to normalize whitespace in code blocks.
owner: zeitgeist87
optional: unescaped-markup
noCSS: true
body_classes: language-markup
resources: /plugins/keep-markup.js { type="module" }
---
# How to use
Obviously, this is supposed to work only for code blocks (``) and not for inline code.
By default the plugin trims all leading and trailing whitespace of every code block. It also removes extra indents and trailing whitespace on every line.
The plugin can be disabled for a particular code block by adding the class `no-whitespace-normalization` to either the `` or `` tag.
The default settings can be overridden with the `setDefaults()`{ .language-javascript } method like so:
```js
Prism.plugins.NormalizeWhitespace.setDefaults({
"remove-trailing": true,
"remove-indent": true,
"left-trim": true,
"right-trim": true,
/*"break-lines": 80,
"indent": 2,
"remove-initial-line-feed": false,
"tabs-to-spaces": 4,
"spaces-to-tabs": 4*/
});
```
The following settings are available and can be set via the `data-[setting]` attribute on the `` element:
`remove-trailing`
: Removes trailing whitespace on all lines.
`remove-indent`
: If the whole code block is indented too much it removes the extra indent.
`left-trim`
: Removes all whitespace from the top of the code block.
`right-trim`
: Removes all whitespace from the bottom of the code block.
`break-lines`
: Simple way of breaking long lines at a certain length (default is 80 characters).
`indent`
: Adds a certain number of tabs to every line.
`remove-initial-line-feed`
: Less aggressive version of left-trim. It only removes a single line feed from the top of the code block.
`tabs-to-spaces`
: Converts all tabs to a certain number of spaces (default is 4 spaces).
`spaces-to-tabs`
: Converts a certain number of spaces to a tab (default is 4 spaces).
# Examples
The following example demonstrates the use of this plugin:
The result looks like this:
let example = {
foo: true,
bar: false
};
let
there_is_a_very_very_very_very_long_line_it_can_break_it_for_you
= true;
if
(there_is_a_very_very_very_very_long_line_it_can_break_it_for_you
=== true) {
};
It is also compatible with the [keep-markup](../keep-markup) plugin:
@media screen {
div {
text -decoration: under line ;
background: url ('foo.png');
}
}
This plugin can also be used on the server or on the command line with Node.js:
```js
let Prism = require("prismjs");
let Normalizer = require("prismjs/plugins/normalize-whitespace/normalize-whitespace");
// Create a new Normalizer object
let nw = new Normalizer({
"remove-trailing": true,
"remove-indent": true,
"left-trim": true,
"right-trim": true,
/*"break-lines": 80,
"indent": 2,
"remove-initial-line-feed": false,
"tabs-to-spaces": 4,
"spaces-to-tabs": 4*/
});
// ..or use the default object from Prism
nw = Prism.plugins.NormalizeWhitespace;
// The code snippet you want to highlight, as a string
let code = "\t\t\tlet data = 1; ";
// Removes leading and trailing whitespace
// and then indents by 1 tab
code = nw.normalize(code, {
// Extra settings
indent: 1
});
// Returns a highlighted HTML string
let html = Prism.highlight(code, Prism.languages.javascript);
```
================================================
FILE: src/plugins/normalize-whitespace/demo.md
================================================
---
layout: null
eleventyExcludeFromCollections: true
---
let example = {
foo: true,
bar: false
};
let there_is_a_very_very_very_very_long_line_it_can_break_it_for_you = true;
if (there_is_a_very_very_very_very_long_line_it_can_break_it_for_you === true) {
};
================================================
FILE: src/plugins/normalize-whitespace/normalize-whitespace.js
================================================
import prism from '../../global.js';
import { getParentPre, isActive } from '../../shared/dom-util.js';
/**
* @param {string} str
* @returns {number}
*/
function tabLength (str) {
let res = 0;
for (let i = 0; i < str.length; ++i) {
if (str.charCodeAt(i) === '\t'.charCodeAt(0)) {
res += 3;
}
}
return str.length + res;
}
/** @type {(keyof NormalizeWhitespaceDefaults)[]} */
const normalizationOrder = [
'remove-trailing',
'remove-indent',
'left-trim',
'right-trim',
'break-lines',
'indent',
'remove-initial-line-feed',
'tabs-to-spaces',
'spaces-to-tabs',
];
const settingsConfig = {
'remove-trailing': 'boolean',
'remove-indent': 'boolean',
'left-trim': 'boolean',
'right-trim': 'boolean',
'break-lines': 'number',
'indent': 'number',
'remove-initial-line-feed': 'boolean',
'tabs-to-spaces': 'number',
'spaces-to-tabs': 'number',
};
/**
* Reads normalizations settings from the given elements's `data-*` attributes.
*
* @param {Element} element
*/
function readSetting (element) {
const settings = {};
for (const key of normalizationOrder) {
const attr = element.getAttribute('data-' + key);
const type = settingsConfig[key];
if (attr !== null) {
try {
const value = JSON.parse(attr || 'true');
if (typeof value === type) {
settings[key] = value;
}
}
catch {
// ignore error
}
}
}
return settings;
}
const normalizationMethods = {
'left-trim': input => input.replace(/^\s+/, ''),
'right-trim': input => input.replace(/(^|\S)\s+$/, '$1'),
'tabs-to-spaces': (input, spaces) => input.replace(/\t/g, ' '.repeat(spaces)),
'spaces-to-tabs': (input, spaces) => input.replace(RegExp(` {${spaces}}`, 'g'), '\t'),
'remove-trailing': input => input.replace(/\s*?$/gm, ''),
'remove-initial-line-feed': input => input.replace(/^(?:\r?\n|\r)/, ''),
'remove-indent': input => {
const indents = input.match(/^[^\S\n\r]*(?=\S)/gm);
if (!indents || !indents[0].length) {
return input;
}
indents.sort((a, b) => a.length - b.length);
if (!indents[0].length) {
return input;
}
return input.replace(RegExp('^' + indents[0], 'gm'), '');
},
'indent': (input, tabs) => input.replace(/^[^\S\n\r]*(?=\S)/gm, '\t'.repeat(tabs) + '$&'),
'break-lines': (input, characters) => {
const lines = input.split('\n');
for (let i = 0; i < lines.length; ++i) {
if (tabLength(lines[i]) <= characters) {
continue;
}
const line = lines[i].split(/(\s+)/);
let len = 0;
for (let j = 0; j < line.length; ++j) {
const tl = tabLength(line[j]);
len += tl;
if (len > characters) {
line[j] = '\n' + line[j];
len = tl;
}
}
lines[i] = line.join('');
}
return lines.join('\n');
},
};
export class NormalizeWhitespace {
defaults;
constructor (defaults) {
this.defaults = { ...defaults };
}
setDefaults (defaults) {
Object.assign(this.defaults, defaults);
}
/**
* @param {string} input
* @param {object} [settings]
* @returns {string}
*/
normalize (input, settings) {
settings = { ...this.defaults, ...settings };
for (const name of normalizationOrder) {
const value = settings[name];
if (value !== undefined && value !== false) {
input = normalizationMethods[name](input, value);
}
}
return input;
}
}
/** @type {import('../../types.d.ts').PluginProto<'normalize-whitespace'>} */
const Self = {
id: 'normalize-whitespace',
optional: 'unescaped-markup',
plugin () {
return new NormalizeWhitespace({
'remove-trailing': true,
'remove-indent': true,
'left-trim': true,
'right-trim': true,
/*'break-lines': 80,
'indent': 2,
'remove-initial-line-feed': false,
'tabs-to-spaces': 4,
'spaces-to-tabs': 4*/
});
},
effect (Prism) {
/** @type {NormalizeWhitespace} */
const Normalizer = Prism.pluginRegistry.peek(Self)?.plugin;
return Prism.hooks.add('before-sanity-check', env => {
if (!env.code) {
return;
}
// Check classes
if (!isActive(env.element, 'whitespace-normalization', true)) {
return;
}
// Simple mode if there is no env.element
if (!env.element.parentNode) {
env.code = Normalizer.normalize(env.code);
return;
}
// Normal mode
const pre = getParentPre(env.element);
if (!pre) {
return;
}
const settings = readSetting(pre);
const children = pre.childNodes;
let before = '';
let after = '';
let codeFound = false;
// Move surrounding whitespace from the tag into the tag
for (let i = 0; i < children.length; ++i) {
const node = children[i];
if (node === env.element) {
codeFound = true;
}
else if (node.nodeName === '#text') {
if (codeFound) {
after += node.nodeValue;
}
else {
before += node.nodeValue;
}
pre.removeChild(node);
--i;
}
}
if (!env.element.children.length || !Prism.pluginRegistry.has('keep-markup')) {
env.code = before + env.code + after;
env.code = Normalizer.normalize(env.code, settings);
}
else {
// Preserve markup for keep-markup plugin
const html = before + env.element.innerHTML + after;
env.element.innerHTML = Normalizer.normalize(html, settings);
env.code = env.element.textContent || '';
}
});
},
};
export default Self;
prism.pluginRegistry.add(Self);
/**
* @typedef {object} NormalizeWhitespaceDefaults
* @property {number} break-lines
* @property {number} indent
* @property {boolean} left-trim
* @property {boolean} remove-indent
* @property {boolean} remove-initial-line-feed
* @property {boolean} remove-trailing
* @property {boolean} right-trim
* @property {number} spaces-to-tabs
* @property {number} tabs-to-spaces
*/
================================================
FILE: src/plugins/previewers/README.md
================================================
---
title: Previewers
description: Previewers for angles, colors, gradients, easing and time.
owner: Golmote
require: css-extras
resources:
- /languages/css-extras.js { type="module" }
- /languages/less.js { type="module" }
- /languages/sass.js { type="module" }
- /languages/scss.js { type="module" }
- /languages/stylus.js { type="module" }
---
# How to use
You don't need to do anything. With this plugin loaded, a previewer will appear on hovering some values in code blocks. The following previewers are supported:
- `angle` for angles
- `color` for colors
- `gradient` for gradients
- `easing` for easing functions
- `time` for durations
This plugin is compatible with CSS, Less, Markup attributes, Sass, Scss and Stylus.
# Examples
## CSS
```css
.example-gradient {
background: -webkit-linear-gradient(left, #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* Chrome10+, Safari5.1+ */
background: -moz-linear-gradient(left, #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* FF3.6+ */
background: -ms-linear-gradient(left, #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* IE10+ */
background: -o-linear-gradient(left, #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* Opera 11.10+ */
background: linear-gradient(to right, #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* W3C */
}
.example-angle {
transform: rotate(10deg);
}
.example-color {
color: rgba(255, 0, 0, 0.2);
background: purple;
border: 1px solid hsl(100, 70%, 40%);
}
.example-easing {
transition-timing-function: linear;
}
.example-time {
transition-duration: 3s;
}
```
## Markup attributes
```html
```
## Less
```less
@gradient: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%);
.example-gradient {
background: -webkit-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* Chrome10+, Safari5.1+ */
background: -moz-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* FF3.6+ */
background: -ms-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* IE10+ */
background: -o-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* Opera 11.10+ */
background: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* W3C */
}
@angle: 3rad;
.example-angle {
transform: rotate(.4turn)
}
@nice-blue: #5B83AD;
.example-color {
color: hsla(102, 53%, 42%, 0.4);
}
@easing: cubic-bezier(0.1, 0.3, 1, .4);
.example-easing {
transition-timing-function: ease;
}
@time: 1s;
.example-time {
transition-duration: 2s;
}
```
## Sass
```sass
$gradient: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%)
@mixin example-gradient
background: -moz-radial-gradient(center, ellipse cover, #f2f6f8 0%, #d8e1e7 50%, #b5c6d0 51%, #e0eff9 100%)
background: radial-gradient(ellipse at center, #f2f6f8 0%, #d8e1e7 50%, #b5c6d0 51%, #e0eff9 100%)
$angle: 380grad
@mixin example-angle
transform: rotate(-120deg)
.example-angle
transform: rotate(18rad)
$color: blue
@mixin example-color
color: rgba(147, 32, 34, 0.8)
.example-color
color: pink
$easing: ease-out
.example-easing
transition-timing-function: ease-in-out
$time: 3s
@mixin example-time
transition-duration: 800ms
.example-time
transition-duration: 0.8s
```
## Scss
```scss
$gradient: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%);
$attr: background;
.example-gradient {
#{$attr}-image: repeating-linear-gradient(10deg, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1) 10px, rgba(255, 0, 0, 0) 20px);
}
$angle: 1.8turn;
.example-angle {
transform: rotate(-3rad)
}
$color: blue;
.example-color {
#{$attr}-color: rgba(255, 255, 0, 0.75);
}
$easing: linear;
.example-easing {
transition-timing-function: cubic-bezier(0.9, 0.1, .2, .4);
}
$time: 1s;
.example-time {
transition-duration: 10s
}
```
## Stylus
```stylus
gradient = linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%)
.example-gradient
background-image: repeating-radial-gradient(circle, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1) 10px, rgba(255, 0, 0, 0) 20px)
angle = 357deg
.example-angle
transform: rotate(100grad)
color = olive
.example-color
color: #000
easing = ease-in
.example-easing
transition-timing-function: ease-out
time = 3s
.example-time
transition-duration: 0.5s
```
# Disabling a previewer
All previewers are enabled by default. To enable only a subset of them, a `data-previewers` attribute can be added on a code block or any ancestor. Its value should be a space-separated list of previewers representing the subset.
For example:
```html
div {
/* Only the previewer for color and time are enabled */
color: red;
transition-duration: 1s;
/* The previewer for angles is not enabled. */
transform: rotate(10deg);
}
```
will give the following result:
```css { data-previewers="color time" }
div {
/* Only the previewers for color and time are enabled */
color: red;
transition-duration: 1s;
/* The previewer for angles is not enabled. */
transform: rotate(10deg);
}
```
# API
This plugins provides a constructor that can be accessed through `Prism.plugins.Previewer`.
Once a previewer has been instantiated, an HTML element is appended to the document body. This element will appear when specific tokens are hovered.
## `new Prism.plugins.Previewer(type, updater, supportedLanguages)`
- `type`: the token type this previewer is associated to. The previewer will be shown when hovering tokens of this type.
- `updater`: the function that will be called each time an associated token is hovered. This function takes the text content of the token as its only parameter. The previewer HTML element can be accessed through the keyword `this`. This function must return `true` for the previewer to be shown.
- `supportedLanguages`: an optional array of supported languages. The previewer will be available only for those. Defaults to `'*'`, which means every languages.
- `initializer`: an optional function. This function will be called when the previewer is initialized, right after the HTML element has been appended to the document body.
================================================
FILE: src/plugins/previewers/previewers.css
================================================
.prism-previewer,
.prism-previewer:before,
.prism-previewer:after {
position: absolute;
pointer-events: none;
}
.prism-previewer,
.prism-previewer:after {
left: 50%;
}
.prism-previewer {
margin-top: -48px;
width: 32px;
height: 32px;
margin-left: -16px;
z-index: 10;
opacity: 0;
-webkit-transition: opacity 0.25s;
-o-transition: opacity 0.25s;
transition: opacity 0.25s;
}
.prism-previewer.flipped {
margin-top: 0;
margin-bottom: -48px;
}
.prism-previewer:before,
.prism-previewer:after {
content: "";
position: absolute;
pointer-events: none;
}
.prism-previewer:before {
top: -5px;
right: -5px;
left: -5px;
bottom: -5px;
border-radius: 10px;
border: 5px solid #fff;
box-shadow:
0 0 3px rgba(0, 0, 0, 0.5) inset,
0 0 10px rgba(0, 0, 0, 0.75);
}
.prism-previewer:after {
top: 100%;
width: 0;
height: 0;
margin: 5px 0 0 -7px;
border: 7px solid transparent;
border-color: rgba(255, 0, 0, 0);
border-top-color: #fff;
}
.prism-previewer.flipped:after {
top: auto;
bottom: 100%;
margin-top: 0;
margin-bottom: 5px;
border-top-color: rgba(255, 0, 0, 0);
border-bottom-color: #fff;
}
.prism-previewer.active {
opacity: 1;
}
.prism-previewer-angle:before {
border-radius: 50%;
background: #fff;
}
.prism-previewer-angle:after {
margin-top: 4px;
}
.prism-previewer-angle svg {
width: 32px;
height: 32px;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
transform: rotate(-90deg);
}
.prism-previewer-angle[data-negative] svg {
-webkit-transform: scaleX(-1) rotate(-90deg);
-moz-transform: scaleX(-1) rotate(-90deg);
-ms-transform: scaleX(-1) rotate(-90deg);
-o-transform: scaleX(-1) rotate(-90deg);
transform: scaleX(-1) rotate(-90deg);
}
.prism-previewer-angle circle {
fill: transparent;
stroke: hsl(200, 10%, 20%);
stroke-opacity: 0.9;
stroke-width: 32;
stroke-dasharray: 0, 500;
}
.prism-previewer-gradient {
background-image:
linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb),
linear-gradient(45deg, #bbb 25%, #eee 25%, #eee 75%, #bbb 75%, #bbb);
background-size: 10px 10px;
background-position:
0 0,
5px 5px;
width: 64px;
margin-left: -32px;
}
.prism-previewer-gradient:before {
content: none;
}
.prism-previewer-gradient div {
position: absolute;
top: -5px;
left: -5px;
right: -5px;
bottom: -5px;
border-radius: 10px;
border: 5px solid #fff;
box-shadow:
0 0 3px rgba(0, 0, 0, 0.5) inset,
0 0 10px rgba(0, 0, 0, 0.75);
}
.prism-previewer-color {
background-image:
linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb),
linear-gradient(45deg, #bbb 25%, #eee 25%, #eee 75%, #bbb 75%, #bbb);
background-size: 10px 10px;
background-position:
0 0,
5px 5px;
}
.prism-previewer-color:before {
background-color: inherit;
background-clip: padding-box;
}
.prism-previewer-easing {
margin-top: -76px;
margin-left: -30px;
width: 60px;
height: 60px;
background: #333;
}
.prism-previewer-easing.flipped {
margin-bottom: -116px;
}
.prism-previewer-easing svg {
width: 60px;
height: 60px;
}
.prism-previewer-easing circle {
fill: hsl(200, 10%, 20%);
stroke: white;
}
.prism-previewer-easing path {
fill: none;
stroke: white;
stroke-linecap: round;
stroke-width: 4;
}
.prism-previewer-easing line {
stroke: white;
stroke-opacity: 0.5;
stroke-width: 2;
}
@-webkit-keyframes prism-previewer-time {
0% {
stroke-dasharray: 0, 500;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 100, 500;
stroke-dashoffset: 0;
}
100% {
stroke-dasharray: 0, 500;
stroke-dashoffset: -100;
}
}
@-o-keyframes prism-previewer-time {
0% {
stroke-dasharray: 0, 500;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 100, 500;
stroke-dashoffset: 0;
}
100% {
stroke-dasharray: 0, 500;
stroke-dashoffset: -100;
}
}
@-moz-keyframes prism-previewer-time {
0% {
stroke-dasharray: 0, 500;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 100, 500;
stroke-dashoffset: 0;
}
100% {
stroke-dasharray: 0, 500;
stroke-dashoffset: -100;
}
}
@keyframes prism-previewer-time {
0% {
stroke-dasharray: 0, 500;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 100, 500;
stroke-dashoffset: 0;
}
100% {
stroke-dasharray: 0, 500;
stroke-dashoffset: -100;
}
}
.prism-previewer-time:before {
border-radius: 50%;
background: #fff;
}
.prism-previewer-time:after {
margin-top: 4px;
}
.prism-previewer-time svg {
width: 32px;
height: 32px;
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
transform: rotate(-90deg);
}
.prism-previewer-time circle {
fill: transparent;
stroke: hsl(200, 10%, 20%);
stroke-opacity: 0.9;
stroke-width: 32;
stroke-dasharray: 0, 500;
stroke-dashoffset: 0;
-webkit-animation: prism-previewer-time linear infinite 3s;
-moz-animation: prism-previewer-time linear infinite 3s;
-o-animation: prism-previewer-time linear infinite 3s;
animation: prism-previewer-time linear infinite 3s;
}
================================================
FILE: src/plugins/previewers/previewers.js
================================================
import prism from '../../global.js';
import cssExtras from '../../languages/css-extras.js';
import { forEach } from '../../util/iterables.js';
/**
* Returns the absolute X, Y offsets for an element.
*
* @param {Element} element
* @returns {{ top: number, right: number, bottom: number, left: number, width: number, height: number }}
*/
const getOffset = element => {
const elementBounds = element.getBoundingClientRect();
let left = elementBounds.left;
let top = elementBounds.top;
const documentBounds = document.documentElement.getBoundingClientRect();
left -= documentBounds.left;
top -= documentBounds.top;
return {
top,
right: innerWidth - left - elementBounds.width,
bottom: innerHeight - top - elementBounds.height,
left,
width: elementBounds.width,
height: elementBounds.height,
};
};
const TOKEN_CLASS = 'token';
const ACTIVE_CLASS = 'active';
const FLIPPED_CLASS = 'flipped';
/**
* @callback Updater
* @this {HTMLDivElement}
* @param {string} value
* @returns {boolean}
*/
/**
* @typedef {Previewer & { _elt: HTMLDivElement }} PreviewerE
*/
/**
* @callback Initializer
* @this {PreviewerE}
* @returns {void}
*/
class Previewer {
/** @type {string} */
type;
/** @type {string | string[]} */
supportedLanguages;
/** @type {Updater} */
updater;
/** @type {Initializer | undefined} */
initializer;
/**
* @type {HTMLDivElement | null}
*/
_elt = null;
/**
* @type {Element | null}
*/
_token = null;
/**
* Previewer constructor
*
* @param {string} type Unique previewer type
* @param {Updater} updater Function that will be called on mouseover.
* @param {string[] | string} [supportedLanguages='*'] Aliases of the languages this previewer must be enabled for. Defaults to "*", all languages.
* @param {Initializer} [initializer] Function that will be called on initialization.
*/
constructor (type, updater, supportedLanguages = '*', initializer) {
this.type = type;
this.supportedLanguages = supportedLanguages;
this.updater = updater;
this.initializer = initializer;
}
/**
* Creates the HTML element for the previewer.
*
* @returns {asserts this is PreviewerE}
*/
init () {
if (this._elt) {
return;
}
this._elt = document.createElement('div');
this._elt.className = 'prism-previewer prism-previewer-' + this.type;
document.body.appendChild(this._elt);
if (this.initializer) {
this.initializer.call(/** @type {PreviewerE} */ (this));
}
}
/**
* @param {Element} token
* @returns {boolean}
*/
isDisabled (token) {
const previewers = token.closest('[data-previewers]')?.getAttribute('data-previewers');
const parts = (previewers || '').split(/\s+/);
return !parts.includes(this.type);
}
/**
* Checks the class name of each hovered element.
*
* @param {Element} token
* @returns {void}
*/
tryShow (token) {
if (token.classList.contains(TOKEN_CLASS) && this.isDisabled(token)) {
return;
}
const target = token.closest(`.${TOKEN_CLASS}.${this.type}`);
if (target && target !== this._token) {
this._token = target;
this.show();
}
}
/**
* Called on mouseout
*/
mouseout = () => {
this._token?.removeEventListener('mouseout', this.mouseout, false);
this._token = null;
this.hide();
};
/**
* Shows the previewer positioned properly for the current token.
*/
show () {
this.init();
if (!this._token) {
return;
}
if (this.updater.call(this._elt, this._token.textContent || '')) {
this._token.addEventListener('mouseout', this.mouseout, false);
const offset = getOffset(this._token);
this._elt.classList.add(ACTIVE_CLASS);
if (offset.top - this._elt.offsetHeight > 0) {
this._elt.classList.remove(FLIPPED_CLASS);
this._elt.style.top = `${offset.top}px`;
this._elt.style.bottom = '';
}
else {
this._elt.classList.add(FLIPPED_CLASS);
this._elt.style.bottom = `${offset.bottom}px`;
this._elt.style.top = '';
}
this._elt.style.left = `${offset.left + Math.min(200, offset.width / 2)}px`;
}
else {
this.hide();
}
}
/**
* Hides the previewer.
*/
hide () {
this._elt?.classList.remove(ACTIVE_CLASS);
}
}
export class PreviewerCollection {
/**
* Map of all registered previewers by language.
*
* @type {Map}
*/
byLanguages = new Map();
/**
* Map of all registered previewers by type.
*
* @type {Map}
*/
byType = new Map();
/**
* @param {Previewer} previewer
*/
add (previewer) {
forEach(previewer.supportedLanguages, lang => {
let list = this.byLanguages.get(lang);
if (list === undefined) {
list = [];
this.byLanguages.set(lang, list);
}
if (!list.includes(previewer)) {
list.push(previewer);
}
});
this.byType.set(previewer.type, previewer);
}
/**
* Initializes the mouseover event on the code block.
*
* @param {Element} elt The code block (`env.element`)
* @param {string} lang The language (`env.language`)
*/
initEvents (elt, lang) {
/** @type {Previewer[]} */
const previewers = [];
previewers.push(...(this.byLanguages.get(lang) ?? []));
previewers.push(...(this.byLanguages.get('*') ?? []));
if (previewers.length === 0) {
return;
}
elt.addEventListener(
'mouseover',
e => {
const target = e.target;
if (target) {
previewers.forEach(previewer => {
previewer.tryShow(/** @type {Element} */ (target));
});
}
},
false
);
}
}
// TODO: Filthy hack to be able to load this script
const Prism = { languages: {} };
const previewers = {
// gradient must be defined before color and angle
'gradient': {
create () {
/**
* Stores already processed gradients so that we don't
* make the conversion every time the previewer is shown
*/
const cache = {};
/**
* Returns a W3C-valid linear gradient
*
* @param {string} prefix Vendor prefix if any ("-moz-", "-webkit-", etc.)
* @param {string} func Gradient function name ("linear-gradient")
* @param {string[]} values Array of the gradient function parameters (["0deg", "red 0%", "blue 100%"])
*/
function convertToW3CLinearGradient (prefix, func, values) {
// Default value for angle
let angle = '180deg';
const first = values[0];
if (
first &&
/^(?:-?(?:\d+(?:\.\d+)?|\.\d+)(?:deg|rad)|bottom|left|right|to\b|top)/.test(
first
)
) {
angle = first;
values.shift();
if (!angle.includes('to ')) {
// Angle uses old keywords
// W3C syntax uses "to" + opposite keywords
if (angle.includes('top')) {
if (angle.includes('left')) {
angle = 'to bottom right';
}
else if (angle.includes('right')) {
angle = 'to bottom left';
}
else {
angle = 'to bottom';
}
}
else if (angle.includes('bottom')) {
if (angle.includes('left')) {
angle = 'to top right';
}
else if (angle.includes('right')) {
angle = 'to top left';
}
else {
angle = 'to top';
}
}
else if (angle.includes('left')) {
angle = 'to right';
}
else if (angle.includes('right')) {
angle = 'to left';
}
else if (prefix) {
// Angle is shifted by 90deg in prefixed gradients
if (angle.includes('deg')) {
angle = `${90 - parseFloat(angle)}deg`;
}
else if (angle.includes('rad')) {
angle = `${Math.PI / 2 - parseFloat(angle)}rad`;
}
}
}
}
return func + '(' + angle + ',' + values.join(',') + ')';
}
/**
* Returns a W3C-valid radial gradient
*
* @param {string} prefix Vendor prefix if any ("-moz-", "-webkit-", etc.)
* @param {string} func Gradient function name ("linear-gradient")
* @param {string[]} values Array of the gradient function parameters (["0deg", "red 0%", "blue 100%"])
*/
function convertToW3CRadialGradient (prefix, func, values) {
if (!values[0].includes('at')) {
// Looks like old syntax
// Default values
let position = 'center';
let shape = 'ellipse';
let size = 'farthest-corner';
if (/\b(?:bottom|center|left|right|top)\b|^\d+/.test(values[0])) {
// Found a position
// Remove angle value, if any
position = /** @type {string} */ (values.shift()).replace(
/\s*-?\d+(?:deg|rad)\s*/,
''
);
}
if (/\b(?:circle|closest|contain|cover|ellipse|farthest)\b/.test(values[0])) {
// Found a shape and/or size
const shapeSizeParts = /** @type {string} */ (values.shift()).split(/\s+/);
if (
shapeSizeParts[0] &&
(shapeSizeParts[0] === 'circle' || shapeSizeParts[0] === 'ellipse')
) {
shape = /** @type {string} */ (shapeSizeParts.shift());
}
if (shapeSizeParts[0]) {
size = /** @type {string} */ (shapeSizeParts.shift());
}
// Old keywords are converted to their synonyms
if (size === 'cover') {
size = 'farthest-corner';
}
else if (size === 'contain') {
size = 'clothest-side';
}
}
return (
func +
'(' +
shape +
' ' +
size +
' at ' +
position +
',' +
values.join(',') +
')'
);
}
return func + '(' + values.join(',') + ')';
}
/**
* Converts a gradient to a W3C-valid one
* Does not support old webkit syntax (-webkit-gradient(linear...) and -webkit-gradient(radial...))
*
* @param {string} gradient The CSS gradient
*/
function convertToW3CGradient (gradient) {
if (cache[gradient]) {
return cache[gradient];
}
const values = gradient
.replace(
/^(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\(|\)$/g,
''
)
.split(/\s*,\s*/);
const parts = gradient.match(
/^(\b|\B-[a-z]{1,10}-)((?:repeating-)?(?:linear|radial)-gradient)/
);
if (!parts) {
return (cache[gradient] = '');
}
// "", "-moz-", etc.
const prefix = parts[1];
// "linear-gradient", "radial-gradient", etc.
const func = parts[2];
if (func.includes('linear')) {
return (cache[gradient] = convertToW3CLinearGradient(prefix, func, values));
}
else if (func.includes('radial')) {
return (cache[gradient] = convertToW3CRadialGradient(prefix, func, values));
}
return (cache[gradient] = func + '(' + values.join(',') + ')');
}
return new Previewer(
'gradient',
function (value) {
const first = /** @type {HTMLElement | null} */ (this.firstChild);
if (!first) {
return false;
}
first.style.backgroundImage = '';
first.style.backgroundImage = convertToW3CGradient(value);
return !!first.style.backgroundImage;
},
'*',
function () {
this._elt.innerHTML = '
';
}
);
},
tokens: {
'gradient': {
pattern:
/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:hsl|rgb)a?\(.+?\)|[^\)])+\)/gi,
inside: {
'function': /[\w-]+(?=\()/,
'punctuation': /[(),]/,
},
},
},
languages: {
'css': true,
'less': true,
'sass': [
{
lang: 'sass',
before: 'punctuation',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['variable-line'],
},
{
lang: 'sass',
before: 'punctuation',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['property-line'],
},
],
'scss': true,
'stylus': [
{
lang: 'stylus',
before: 'func',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['property-declaration'].inside,
},
{
lang: 'stylus',
before: 'func',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['variable-declaration'].inside,
},
],
},
},
'angle': {
create () {
return new Previewer(
'angle',
function (value) {
const num = parseFloat(value);
const unit = value.match(/[a-z]+$/i);
let max = 1;
if (!num || !unit) {
return false;
}
switch (unit[0]) {
case 'deg':
max = 360;
break;
case 'grad':
max = 400;
break;
case 'rad':
max = 2 * Math.PI;
break;
case 'turn':
max = 1;
}
const percentage = ((100 * num) / max) % 100;
this[`${num < 0 ? 'set' : 'remove'}Attribute`]('data-negative', '');
const circle = this.querySelector('circle');
if (circle) {
circle.style.strokeDasharray = `${Math.abs(percentage)},500`;
}
return true;
},
'*',
function () {
this._elt.innerHTML =
'' +
' ' +
' ';
}
);
},
tokens: {
'angle': /(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)(?:deg|g?rad|turn)\b/i,
},
languages: {
'css': true,
'less': true,
'markup': {
lang: 'markup',
before: 'punctuation',
inside: 'inside',
root: Prism.languages.markup && Prism.languages.markup['tag'].inside['attr-value'],
},
'sass': [
{
lang: 'sass',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['property-line'],
},
{
lang: 'sass',
before: 'operator',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['variable-line'],
},
],
'scss': true,
'stylus': [
{
lang: 'stylus',
before: 'func',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['property-declaration'].inside,
},
{
lang: 'stylus',
before: 'func',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['variable-declaration'].inside,
},
],
},
},
'color': {
create () {
return new Previewer('color', function (value) {
this.style.backgroundColor = '';
this.style.backgroundColor = value;
return !!this.style.backgroundColor;
});
},
tokens: {
'color': [Prism.languages.css?.['hexcode']].concat(Prism.languages.css?.['color']),
},
languages: {
// CSS extras is required, so css and scss are not necessary
'css': false,
'less': true,
'markup': {
lang: 'markup',
before: 'punctuation',
inside: 'inside',
root: Prism.languages.markup && Prism.languages.markup['tag'].inside['attr-value'],
},
'sass': [
{
lang: 'sass',
before: 'punctuation',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['variable-line'],
},
{
lang: 'sass',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['property-line'],
},
],
'scss': false,
'stylus': [
{
lang: 'stylus',
before: 'hexcode',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['property-declaration'].inside,
},
{
lang: 'stylus',
before: 'hexcode',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['variable-declaration'].inside,
},
],
},
},
'easing': {
create () {
const identifierMap = {
'linear': '0,0,1,1',
'ease': '.25,.1,.25,1',
'ease-in': '.42,0,1,1',
'ease-out': '0,0,.58,1',
'ease-in-out': '.42,0,.58,1',
};
return new Previewer(
'easing',
function (value) {
value = identifierMap[value] || value;
const p = value.match(/-?(?:\d+(?:\.\d+)?|\.\d+)/g);
if (p && p.length === 4) {
const values = p
.map(Number)
.map((p, i) => (i % 2 ? 1 - p : p) * 100)
.map(String);
this.querySelector('path')?.setAttribute(
'd',
'M0,100 C' +
values[0] +
',' +
values[1] +
', ' +
values[2] +
',' +
values[3] +
', 100,0'
);
const lines = this.querySelectorAll('line');
lines[0].setAttribute('x2', values[0]);
lines[0].setAttribute('y2', values[1]);
lines[1].setAttribute('x2', values[2]);
lines[1].setAttribute('y2', values[3]);
return true;
}
return false;
},
'*',
function () {
this._elt.innerHTML =
'' +
'' +
'' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ' +
' ';
}
);
},
tokens: {
'easing': {
pattern:
/\bcubic-bezier\((?:-?(?:\d+(?:\.\d+)?|\.\d+),\s*){3}-?(?:\d+(?:\.\d+)?|\.\d+)\)\B|\b(?:ease(?:-in)?(?:-out)?|linear)(?=\s|[;}]|$)/i,
inside: {
'function': /[\w-]+(?=\()/,
'punctuation': /[(),]/,
},
},
},
languages: {
'css': true,
'less': true,
'sass': [
{
lang: 'sass',
inside: 'inside',
before: 'punctuation',
root: Prism.languages.sass && Prism.languages.sass['variable-line'],
},
{
lang: 'sass',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['property-line'],
},
],
'scss': true,
'stylus': [
{
lang: 'stylus',
before: 'hexcode',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['property-declaration'].inside,
},
{
lang: 'stylus',
before: 'hexcode',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['variable-declaration'].inside,
},
],
},
},
'time': {
create () {
return new Previewer(
'time',
function (value) {
const num = parseFloat(value);
const unit = value.match(/[a-z]+$/i);
if (!num || !unit) {
return false;
}
const u = unit[0];
const circle = this.querySelector('circle');
if (circle) {
circle.style.animationDuration = `${2 * num}${u}`;
}
return true;
},
'*',
function () {
this._elt.innerHTML =
'' +
' ' +
' ';
}
);
},
tokens: {
'time': /(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)m?s\b/i,
},
languages: {
'css': true,
'less': true,
'markup': {
lang: 'markup',
before: 'punctuation',
inside: 'inside',
root: Prism.languages.markup && Prism.languages.markup['tag'].inside['attr-value'],
},
'sass': [
{
lang: 'sass',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['property-line'],
},
{
lang: 'sass',
before: 'operator',
inside: 'inside',
root: Prism.languages.sass && Prism.languages.sass['variable-line'],
},
],
'scss': true,
'stylus': [
{
lang: 'stylus',
before: 'hexcode',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['property-declaration'].inside,
},
{
lang: 'stylus',
before: 'hexcode',
inside: 'rest',
root:
Prism.languages.stylus &&
Prism.languages.stylus['variable-declaration'].inside,
},
],
},
},
};
/** @type {import('../../types.d.ts').PluginProto<'previewers'>} */
const Self = {
id: 'previewers',
require: cssExtras,
plugin () {
const collection = new PreviewerCollection();
if (typeof document !== 'undefined') {
for (const previewer of Object.values(previewers)) {
collection.add(previewer.create());
}
}
return collection;
},
effect (Prism) {
/*
Prism.hooks.add('before-highlight', (env) => {
for (const previewer of Object.values(previewers)) {
const languages = previewer.languages;
if (languages[env.language] && !languages[env.language].initialized) {
let lang = languages[env.language];
if (!Array.isArray(lang)) {
lang = [lang];
}
lang.forEach((lang) => {
let before; let inside; let root; let skip;
if (lang === true) {
before = 'important';
inside = env.language;
lang = env.language;
} else {
before = lang.before || 'important';
inside = lang.inside || lang.lang;
root = lang.root || Prism.languages;
skip = lang.skip;
lang = env.language;
}
if (!skip && Prism.languages[lang]) {
Prism.languages.insertBefore(inside, before, previewer.tokens, root);
env.grammar = Prism.languages[lang];
languages[env.language] = { initialized: true };
}
});
}
}
});
*/
return Prism.hooks.add('after-highlight', env => {
/** @type {PreviewerCollection} */
const previewers = Prism.pluginRegistry.peek(Self)?.plugin;
previewers.initEvents(env.element, env.language);
});
},
};
export default Self;
prism.pluginRegistry.add(Self);
================================================
FILE: src/plugins/show-invisibles/README.md
================================================
---
title: Show Invisibles
description: Show hidden characters such as tabs and line breaks.
owner: LeaVerou
optional:
- autolinker
- data-uri-highlight
---
================================================
FILE: src/plugins/show-invisibles/show-invisibles.css
================================================
.token.tab:not(:empty),
.token.cr,
.token.lf,
.token.space {
position: relative;
}
.token.tab:not(:empty):before,
.token.cr:before,
.token.lf:before,
.token.space:before {
color: #808080;
opacity: 0.6;
position: absolute;
}
.token.tab:not(:empty):before {
content: "\21E5";
}
.token.cr:before {
content: "\240D";
}
.token.crlf:before {
content: "\240D\240A";
}
.token.lf:before {
content: "\240A";
}
.token.space:before {
content: "\00B7";
}
================================================
FILE: src/plugins/show-invisibles/show-invisibles.js
================================================
import prism from '../../global.js';
import { tokenizeStrings } from '../../shared/tokenize-strings.js';
/** @type {import('../../types.d.ts').PluginProto<'show-invisibles'>} */
const Self = {
id: 'show-invisibles',
optional: ['autolinker', 'data-uri-highlight', 'diff-highlight'],
effect (Prism) {
const invisibles = {
'tab': /\t/,
'crlf': /\r\n/,
'lf': /\n/,
'cr': /\r/,
'space': / /,
};
return Prism.hooks.add('after-tokenize', env => {
tokenizeStrings(env.tokens, code => Prism.tokenize(code, invisibles));
});
},
};
export default Self;
prism.pluginRegistry.add(Self);
================================================
FILE: src/plugins/show-language/README.md
================================================
---
title: Show Language
description: Display the highlighted language in code blocks (inline code does not show the label).
owner: nauzilus
require: toolbar
noCSS: true
resources:
- /plugins/toolbar.css
- /plugins/toolbar.js { type="module" }
---
# Examples
## JavaScript
## CSS
## HTML (Markup)
## SVG
The `data-language`{ .language-markup } attribute can be used to display a specific label whether it has been defined as a language or not.
## Plain text
```none
Just some text (aka. not code).
```
================================================
FILE: src/plugins/show-language/show-language.js
================================================
import prism from '../../global.js';
import { getParentPre } from '../../shared/dom-util.js';
import { getTitle } from '../../shared/meta/title-data.js';
import toolbar from '../toolbar/toolbar.js';
/** @type {import('../../types.d.ts').PluginProto<'show-language'>} */
const Self = {
id: 'show-language',
require: toolbar,
effect (Prism) {
/** @type {import('../toolbar/toolbar.js').Toolbar} */
const toolbar = Prism.pluginRegistry.peek('toolbar')?.plugin;
return toolbar.registerButton('show-language', env => {
const pre = getParentPre(env.element);
if (!pre) {
return;
}
const title = pre.getAttribute('data-language') || getTitle(env.language);
if (!title) {
return;
}
const element = document.createElement('span');
element.textContent = title;
return element;
});
},
};
export default Self;
prism.pluginRegistry.add(Self);
================================================
FILE: src/plugins/toolbar/README.md
================================================
---
title: Toolbar
description: Attach a toolbar for plugins to easily register buttons on the top of a code block.
owner: mAAdhaTTah
body_classes: language-markup
resources: ./demo.js { defer }
---
# How to use
The Toolbar plugin allows for several methods to register your button, using the `Prism.plugins.toolbar.registerButton` function.
The simplest method is through the HTML API. Add a `data-label` attribute to the `pre` element, and the Toolbar plugin will read the value of that attribute and append a label to the code snippet.
```html { data-label="Hello World!" }
```
If you want to provide arbitrary HTML to the label, create a `template` element with the HTML you want in the label, and provide the `template` element's `id` to `data-label`. The Toolbar plugin will use the template's content for the button. You can also use to declare your event handlers inline:
```html { data-label="my-label-button" }
```
```html
My button
```
## Registering buttons
For more flexibility, the Toolbar exposes a JavaScript function that can be used to register new buttons or labels to the Toolbar, `Prism.plugins.toolbar.registerButton`.
The function accepts a key for the button and an object with a `text` property string and an optional `onClick` function or a `url` string. The `onClick` function will be called when the button is clicked, while the `url` property will be set to the anchor tag's `href`.
```js
Prism.plugins.toolbar.registerButton('hello-world', {
text: 'Hello World!', // required
onClick: function (env) {
// optional
alert(`This code snippet is written in ${env.language}.`);
},
});
```
See how the above code registers the `Hello World!` button? You can use this in your plugins to register your own buttons with the toolbar.
If you need more control, you can provide a function to `registerButton` that returns either a `span`, `a`, or `button` element.
```js
Prism.plugins.toolbar.registerButton('select-code', env => {
let button = document.createElement('button');
button.innerHTML = 'Select Code';
button.addEventListener('click', () => {
// Source: http://stackoverflow.com/a/11128179/2757940
if (document.body.createTextRange) {
// ms
let range = document.body.createTextRange();
range.moveToElementText(env.element);
range.select();
} else if (window.getSelection) {
// moz, opera, webkit
let selection = window.getSelection();
let range = document.createRange();
range.selectNodeContents(env.element);
selection.removeAllRanges();
selection.addRange(range);
}
});
return button;
});
```
The above function creates the Select Code button you see, and when you click it, the code gets highlighted.
## Ordering buttons
By default, the buttons will be added to the code snippet in the order they were registered. If more control over the order is needed, the `data-toolbar-order` attribute can be used. Given a comma-separated list of button names, it will ensure that these buttons will be displayed in the given order.
Buttons not listed will not be displayed. This means that buttons can be disabled using this technique.
Example: The "Hello World!" button will appear before the "Select Code" button and the custom label button will not be displayed.
```html { data-toolbar-order="hello-world,select-code" data-label="Hello World!" }
```
The `data-toolbar-order` attribute is inherited, so you can define the button order for the whole document by adding the attribute to the `body` of the page.
```html
```
My button
================================================
FILE: src/plugins/toolbar/demo.js
================================================
Prism.plugins.toolbar.registerButton('hello-world', {
text: 'Hello World!', // required
onClick: function (env) {
// optional
alert(`This code snippet is written in ${env.language}.`);
},
});
Prism.plugins.toolbar.registerButton('select-code', env => {
let button = document.createElement('button');
button.innerHTML = 'Select Code';
button.addEventListener('click', () => {
// Source: http://stackoverflow.com/a/11128179/2757940
if (document.body.createTextRange) {
// ms
let range = document.body.createTextRange();
range.moveToElementText(env.element);
range.select();
}
else if (window.getSelection) {
// moz, opera, webkit
let selection = window.getSelection();
let range = document.createRange();
range.selectNodeContents(env.element);
selection.removeAllRanges();
selection.addRange(range);
}
});
return button;
});
================================================
FILE: src/plugins/toolbar/toolbar.css
================================================
div.code-toolbar {
position: relative;
}
div.code-toolbar > .toolbar {
position: absolute;
z-index: 10;
top: 0.3em;
right: 0.2em;
transition: opacity 0.3s ease-in-out;
opacity: 0;
}
div.code-toolbar:hover > .toolbar {
opacity: 1;
}
/* Separate line b/c rules are thrown out if selector is invalid.
IE11 and old Edge versions don't support :focus-within. */
div.code-toolbar:focus-within > .toolbar {
opacity: 1;
}
div.code-toolbar > .toolbar > .toolbar-item {
display: inline-block;
}
div.code-toolbar > .toolbar > .toolbar-item > a {
cursor: pointer;
}
div.code-toolbar > .toolbar > .toolbar-item > button {
background: none;
border: 0;
color: inherit;
font: inherit;
line-height: normal;
overflow: visible;
padding: 0;
-webkit-user-select: none; /* for button */
-moz-user-select: none;
-ms-user-select: none;
}
div.code-toolbar > .toolbar > .toolbar-item > a,
div.code-toolbar > .toolbar > .toolbar-item > button,
div.code-toolbar > .toolbar > .toolbar-item > span {
color: #bbb;
font-size: 0.8em;
padding: 0 0.5em;
background: #f5f2f0;
background: rgba(224, 224, 224, 0.2);
box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.2);
border-radius: 0.5em;
}
div.code-toolbar > .toolbar > .toolbar-item > a:hover,
div.code-toolbar > .toolbar > .toolbar-item > a:focus,
div.code-toolbar > .toolbar > .toolbar-item > button:hover,
div.code-toolbar > .toolbar > .toolbar-item > button:focus,
div.code-toolbar > .toolbar > .toolbar-item > span:hover,
div.code-toolbar > .toolbar > .toolbar-item > span:focus {
color: inherit;
text-decoration: none;
}
================================================
FILE: src/plugins/toolbar/toolbar.js
================================================
import prism from '../../global.js';
import { getParentPre } from '../../shared/dom-util.js';
import { noop } from '../../shared/util.js';
/**
* Returns the callback order of the given element.
*
* @param {Element} element
*/
function getOrder (element) {
/** @type {Element | null} */
let e = element;
for (; e; e = e.parentElement) {
let order = e.getAttribute('data-toolbar-order');
if (order != null) {
order = order.trim();
if (order.length) {
return order.split(/\s*,\s*/);
}
else {
return [];
}
}
}
}
export class Toolbar {
/**
* @type {ButtonFactory[]}
*/
callbacks = [];
/**
* @type {Map}
*/
map = new Map();
/**
* Register a button callback with the toolbar.
*
* The returned function will remove the added callback again when called.
*
* @param {string} key
* @param {ButtonOptions | ButtonFactory} opts
* @returns {function():void}
*/
registerButton (key, opts) {
/** @type {ButtonFactory} */
let callback;
if (typeof opts === 'function') {
callback = opts;
}
else {
callback = function (env) {
const { text, url, onClick, className } = opts;
let element;
if (typeof onClick === 'function') {
element = document.createElement('button');
element.type = 'button';
element.addEventListener('click', function () {
onClick.call(this, env);
});
}
else if (typeof url === 'string') {
element = document.createElement('a');
element.href = url;
}
else {
element = document.createElement('span');
}
if (className) {
element.classList.add(className);
}
element.textContent = text;
return element;
};
}
if (this.map.has(key)) {
console.warn('There is a button with the key "' + key + '" registered already.');
return noop;
}
this.map.set(key, callback);
this.callbacks.push(callback);
return () => {
this.map.delete(key);
const index = this.callbacks.indexOf(callback);
if (index !== -1) {
this.callbacks.splice(index, 1);
}
};
}
/**
* @type {HookCallback}
*/
hook = env => {
// Check if inline or actual code block (credit to line-numbers plugin)
const pre = getParentPre(env.element);
if (!pre) {
return;
}
const container = pre.parentElement;
if (!container) {
return;
}
// Autoloader rehighlights, so only do this once.
if (container.classList.contains('code-toolbar')) {
return;
}
// Create wrapper for to prevent scrolling toolbar with content
const wrapper = document.createElement('div');
wrapper.classList.add('code-toolbar');
container.insertBefore(wrapper, pre);
wrapper.appendChild(pre);
// Setup the toolbar
const toolbar = document.createElement('div');
toolbar.classList.add('toolbar');
// order callbacks
let elementCallbacks = this.callbacks;
const order = getOrder(env.element);
if (order) {
elementCallbacks = /** @type {ButtonFactory[]} */ (
order.map(key => this.map.get(key) || noop)
);
}
elementCallbacks.forEach(callback => {
const element = callback(env);
if (!element) {
return;
}
const item = document.createElement('div');
item.classList.add('toolbar-item');
item.appendChild(element);
toolbar.appendChild(item);
});
// Add our toolbar to the currently created wrapper of tag
wrapper.appendChild(toolbar);
};
}
/** @type {ButtonFactory} */
const label = env => {
const pre = getParentPre(env.element);
if (!pre) {
return;
}
if (!pre.hasAttribute('data-label')) {
return;
}
let element;
let template;
const text = pre.getAttribute('data-label');
try {
// Any normal text will blow up this selector.
if (text) {
template = document.querySelector('template#' + text);
}
}
catch {
/* noop */
}
if (template) {
element = /** @type {HTMLTemplateElement} */ (template).content;
}
else {
const url = pre.getAttribute('data-url');
if (url) {
element = document.createElement('a');
element.href = url;
}
else {
element = document.createElement('span');
}
element.textContent = text;
}
return element;
};
/** @type {import('../../types.d.ts').PluginProto<'toolbar'>} */
const Self = {
id: 'toolbar',
plugin () {
const toolbar = new Toolbar();
toolbar.registerButton('label', label);
return toolbar;
},
effect (Prism) {
/** @type {Toolbar} */
const toolbar = Prism.pluginRegistry.peek(Self)?.plugin;
return Prism.hooks.add('complete', toolbar.hook);
},
};
export default Self;
prism.pluginRegistry.add(Self);
/**
* @typedef {import('../../types.d.ts').HookEnv} HookEnv
* @typedef {import('../../types.d.ts').HookCallback} HookCallback
*/
/**
* @typedef {object} ButtonOptions
* @property {string} text The text displayed.
* @property {string} [url] The URL of the link which will be created.
* @property {(env: HookEnv) => void} [onClick] The event listener for the `click` event of the created button.
* @property {string} [className] The class attribute to include with the element.
*/
/**
* @callback ButtonFactory
* @param {HookEnv} env
* @returns {Node | undefined}
*/
================================================
FILE: src/plugins/treeview-icons/README.md
================================================
---
title: Treeview
description: A language with special styles to highlight file system tree structures.
owner: Golmote
---
# How to use
You may use `tree -F` to get a compatible text structure.
```treeview
root_folder/
|-- a first folder/
| |-- holidays.mov
| |-- javascript-file.js
| `-- some_picture.jpg
|-- documents/
| |-- spreadsheet.xls
| |-- manual.pdf
| |-- document.docx
| `-- presentation.ppt
| `-- test
|-- empty_folder/
|-- going deeper/
| |-- going deeper/
| | `-- going deeper/
| | `-- going deeper/
| | `-- .secret_file
| |-- style.css
| `-- index.html
|-- music and movies/
| |-- great-song.mp3
| |-- S01E02.new.episode.avi
| |-- S01E02.new.episode.nfo
| `-- track 1.cda
|-- .gitignore
|-- .htaccess
|-- .npmignore
|-- archive 1.zip
|-- archive 2.tar.gz
|-- logo.svg
`-- README.md
```
You can also use the following box-drawing characters to represent the tree:
```treeview
root_folder/
├── a first folder/
| ├── holidays.mov
| ├── javascript-file.js
| └── some_picture.jpg
├── documents/
| ├── spreadsheet.xls
| ├── manual.pdf
| ├── document.docx
| └── presentation.ppt
└── etc.
```
================================================
FILE: src/plugins/treeview-icons/treeview-icons.css
================================================
.token.treeview-part .entry-line {
position: relative;
text-indent: -99em;
display: inline-block;
vertical-align: top;
width: 1.2em;
}
.token.treeview-part .entry-line:before,
.token.treeview-part .line-h:after {
content: "";
position: absolute;
top: 0;
left: 50%;
width: 50%;
height: 100%;
}
.token.treeview-part .line-h:before,
.token.treeview-part .line-v:before {
border-left: 1px solid #ccc;
}
.token.treeview-part .line-v-last:before {
height: 50%;
border-left: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
.token.treeview-part .line-h:after {
height: 50%;
border-bottom: 1px solid #ccc;
}
.token.treeview-part .entry-name {
position: relative;
display: inline-block;
vertical-align: top;
}
.token.treeview-part .entry-name.dotfile {
opacity: 0.5;
}
/* @GENERATED-FONT */
@font-face {
font-family: "PrismTreeview";
/**
* This font is generated from the .svg files in the `icons` folder. See the `treeviewIconFont` function in
* `scripts/build.js` for more information.
*
* Use the following escape sequences to refer to a specific icon:
*
* - \ea01 file
* - \ea02 folder
* - \ea03 image
* - \ea04 audio
* - \ea05 video
* - \ea06 text
* - \ea07 code
* - \ea08 archive
* - \ea09 pdf
* - \ea0a excel
* - \ea0b powerpoint
* - \ea0c word
*/
src: url("data:application/font-woff;base64,d09GRgABAAAAAAmEAAsAAAAAEzwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAMUAAAE2JkkqGE9TLzIAAAHQAAAAQQAAAGBLtUI0Y21hcAAAAhQAAAEfAAADPGXJZIpnbHlmAAADNAAAA+MAAAlACm1VqmhlYWQAAAcYAAAAKgAAADZfxj5jaGhlYQAAB0QAAAAYAAAAJAFbANRobXR4AAAHXAAAABAAAACACGQAAGxvY2EAAAdsAAAAJQAAAEI7NDjibWF4cAAAB5QAAAAfAAAAIAEzAHZuYW1lAAAHtAAAATcAAAJSfUrk+HBvc3QAAAjsAAAAlQAAANURv2OieJxNjksSwVAQRU9IEOTnG4nPFowMjZSRoTI3UqpSRgaWYAVWYDFWYD1uOlR5Vf3S5/W9N40DtFmyprbZ7vaExfF6IcOlOuX8v3eK8+lI60eaufZtqd74pKzYcuDGnQdPXtRoMLA7IaJHTN98oSi2ro4nxZDRl9vijFwUmW+k9KZcOVO5Ur27UoyVFSrTMfLUl9kVN1SxMiZGTVVi0zJtSkd/SJjbJjN1IQspfe3RIzBH1xx9saP3QIpY+6VS5XLMPw6UD6QAAAB4nGNgYXBmnMDAysDAUMhQCyQloXQoAweDHgMDEwMrMwNWEJDmmsJwgCHxFQ/DZiBXgOEwAyOQZkRRxAUAq90IcAAAAHicvdLbboJAEAbgf0XxBKiI4AEh6WXTlzL2ZNKDMbb1AZo+UK/6TPsS9h9mkt72pl3yOZlBmM0yADoAArqiNuC+4CDrk1XX1AMMmnobH8wT9NBCiA122OOAk4/OZ9Y32OKB+dG7Jv9Zjs8kWOKC1yXzGVZIMUaMHCXvjJChxgRrTLFAgTkq/tuxS8CeHfbqsmefuxgi4utC/P3iHtNxnJcJMMrqSbO1Yl4t/6H1r1YkP+7dshpy/mpGW7Oia5PSjRnTrYnpzuR0b0raGZ4Cv60a0aPJ6MnIHp7NhPZmTQczpaNZ0Isp6NXM6c1UdDI8eu+UzKVvKUgMlMyxbyuZZd9RMuM+VJDYVZDYU5DYV5A4UDL7fqggMVKIvgF69jrmAHiclVXNbttGEN6Z/dOSXEoK/2LLkg0xIN3EdWxRJGMktR0HENo0BdoaLer2EqBAip5zywP0llMvTU699QX6fums7DSNEhoqJc7uzg535/tmdpZxxt68Ya/Z3yximyxnrJ3AGGJ1B6bFZzBv7sMszXRSFXehyOrcKfPkdy6U+E0oJS6Ex8MCYBtv3Rbyq5fciOdO/6eQgquC08Qfz5T45BWjB51gf9EvY3u0Uz0vrrZxraJtU9quaZP3tx9DNUtfK7FwC+8IKcULoQJrXhhrzY5nHxl7sJxTTjwl8Xjhpp46wS1jcgXjbVath7NN8rrNWj0t5s0sjVUn7ufPIltUPd8f+H43B5/uRJEtrTMa+MSEWvHrHvuC/bimZ8RKrPPpXcjfWrVNNmubebkPIWRprNUEyqWimKp4qYjTTgCHiAAwtCTRDmGPo7UoBaDnIYgI0RhQAqVE0Y3vG8CGFhggxIBDWPDBLvW5wmAnQMX7aDYNCokqVLT2h3Gp2MM10buk+K+NG+Z6Wpd1e1B1gjyVvZ4spdbyB4KLoxF2Y7nQZHlpDnjEAUZmxD4Ss4o9Yudrev02nS/t6ux9FNXquBPHBuICCMEC8fFV+06D14D63oVXOUFx0e4DEpsIyn2mAD+Cr2Vfsp/WxNfMtiGN+y77cq0oN4u2SvvgetN53ZYP4ASaWUbH6QSOocomkOhY5Z04c/JQAty4ASDJ1wzgF8QUOEiIIhIcdgHBggMAIcI10aQkJrONm8AFLe+QbwMIDjc3YDn1hMM5OGJc4+Js/uWBM8181l/WjZZO6LeucuUJwR7DZZusw07u7LKUahuFfn4CdZVQWdOzZu7OZ3pqNy39zzu4sLZ66EOf2AxsD0VIqen1ei/tu6fsAh8Erz7POVJx6iHfDQJ+SAbCnb/eSqy/Zt9RrH9mv65bg7JZNctSfRhPi1JplU/zsjh2hShp2qbdh+V3iU5ineqmDaFVWTsvqVs6+6zIqd53Rv+JkEqFHDGwKhv2DSAHV4ZAKk1a7l4aHEijdIkuEcI+70kuH3Bfy2tOwX3kErkQHBXlvvYoI8D4YWD6RggQgR4cYijMhTBU+84kR+0bXyFnYoWvk3VvkarO2yx3TdmSSCpdLptMd6KfbGmK9ERHkXY9PaZeN6TM8+LY87a2PC+KPG80/qC2Nuz0f3hbV7P2GOb7cAeSKmndeHmDdLo73jGhlqpHVN0ym0EguVL8Wn+HwO0gEN69rRHyIXeHbpXfdW8DIrI6gcNtqK7YTXK6F5eyqjtd9vRwYAHsYKAnxgMIgz6AZ64pIt5ZjaI687w9LY6OhN7z2D+hNgTCAHicY2BkYGAAYv3Xf7Li+W2+MnAzbGbAAP//Myxn2AJkcDAwgfgA+ZUIQwAAeJxjYGRgYNjMwAAnlzMwMqACBQA0BQIweJxjYACCzSRiKgIAUCEIZXicY2AAAjOGIoZ9jHaMM5g4mHqY/jFPY37D4saygDgIABq6EnkAAAB4nGNgZGBgUGDIYuBkAAEmIOYCQgaG/2A+AwAW0wGqAHicfZFNbsIwEIVf+KsKaoXUqouu3E03lRJgVw4AW4QQ+wB2CEri1DEg9j1HT9BzcI6eouu+pN6kEvVI42/evJmFDaCPMzyUx8NNlcvTwBWrX26S7h23yE+O2+jBd9yh/uq4ixdMHPdwhzdu8FrXVB7x7riBW3w4blL/dNwinx238YAvxx3q3467WHp9xz08e2pm4iJdGCkPsTzOZbRPQlPTasVSmiLWmRj6g5o+lZk0oZUbsTqJ4hCNrFVCGZ2Kic6sTBItcqN3cm39rbX5OAiU0/21TjGDQYwCKRYkyTiwljhizhxhjwQhO5d9lztLZsNODI0MAkO+++Af/5Q5q2ZCWN4bzqxwYi7oiTCiaqFYK3o0Nwj+WLm7dCcMTSWvejsqa+o+ttVUjjEChvrj9+niph8pXG9DAHicbcHJDoIwFEDRXm3FeZ5H/DRCX7UJWtIg8Pku3HqO6qgf1H8pHbpoDD0S+gwYMmLMhCkz5ixYsmLNhi079hw4cuLMhSs3Uu5KO19Iz4XCSjT+lT3EZB/rg6m9laAraSudBytJFvOnr6VbWmekzaUYlqGRWAb/rnQTosXhKRAClsiLjAcfaipacp6UNLyV+gLQNSS+AAAA")
format("woff");
}
.token.treeview-part .entry-name:before {
content: "\ea01";
font-family: "PrismTreeview";
font-size: inherit;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
width: 2.5ex;
display: inline-block;
}
.token.treeview-part .entry-name.dir:before {
content: "\ea02";
}
.token.treeview-part .entry-name.ext-bmp:before,
.token.treeview-part .entry-name.ext-eps:before,
.token.treeview-part .entry-name.ext-gif:before,
.token.treeview-part .entry-name.ext-jpe:before,
.token.treeview-part .entry-name.ext-jpg:before,
.token.treeview-part .entry-name.ext-jpeg:before,
.token.treeview-part .entry-name.ext-png:before,
.token.treeview-part .entry-name.ext-svg:before,
.token.treeview-part .entry-name.ext-tiff:before {
content: "\ea03";
}
.token.treeview-part .entry-name.ext-cfg:before,
.token.treeview-part .entry-name.ext-conf:before,
.token.treeview-part .entry-name.ext-config:before,
.token.treeview-part .entry-name.ext-csv:before,
.token.treeview-part .entry-name.ext-ini:before,
.token.treeview-part .entry-name.ext-log:before,
.token.treeview-part .entry-name.ext-md:before,
.token.treeview-part .entry-name.ext-nfo:before,
.token.treeview-part .entry-name.ext-txt:before {
content: "\ea06";
}
.token.treeview-part .entry-name.ext-asp:before,
.token.treeview-part .entry-name.ext-aspx:before,
.token.treeview-part .entry-name.ext-c:before,
.token.treeview-part .entry-name.ext-cc:before,
.token.treeview-part .entry-name.ext-cpp:before,
.token.treeview-part .entry-name.ext-cs:before,
.token.treeview-part .entry-name.ext-css:before,
.token.treeview-part .entry-name.ext-h:before,
.token.treeview-part .entry-name.ext-hh:before,
.token.treeview-part .entry-name.ext-htm:before,
.token.treeview-part .entry-name.ext-html:before,
.token.treeview-part .entry-name.ext-jav:before,
.token.treeview-part .entry-name.ext-java:before,
.token.treeview-part .entry-name.ext-js:before,
.token.treeview-part .entry-name.ext-php:before,
.token.treeview-part .entry-name.ext-rb:before,
.token.treeview-part .entry-name.ext-xml:before {
content: "\ea07";
}
.token.treeview-part .entry-name.ext-7z:before,
.token.treeview-part .entry-name.ext-bz:before,
.token.treeview-part .entry-name.ext-bz2:before,
.token.treeview-part .entry-name.ext-gz:before,
.token.treeview-part .entry-name.ext-rar:before,
.token.treeview-part .entry-name.ext-tar:before,
.token.treeview-part .entry-name.ext-tgz:before,
.token.treeview-part .entry-name.ext-zip:before {
content: "\ea08";
}
.token.treeview-part .entry-name.ext-aac:before,
.token.treeview-part .entry-name.ext-au:before,
.token.treeview-part .entry-name.ext-cda:before,
.token.treeview-part .entry-name.ext-flac:before,
.token.treeview-part .entry-name.ext-mp3:before,
.token.treeview-part .entry-name.ext-oga:before,
.token.treeview-part .entry-name.ext-ogg:before,
.token.treeview-part .entry-name.ext-wav:before,
.token.treeview-part .entry-name.ext-wma:before {
content: "\ea04";
}
.token.treeview-part .entry-name.ext-avi:before,
.token.treeview-part .entry-name.ext-flv:before,
.token.treeview-part .entry-name.ext-mkv:before,
.token.treeview-part .entry-name.ext-mov:before,
.token.treeview-part .entry-name.ext-mp4:before,
.token.treeview-part .entry-name.ext-mpeg:before,
.token.treeview-part .entry-name.ext-mpg:before,
.token.treeview-part .entry-name.ext-ogv:before,
.token.treeview-part .entry-name.ext-webm:before {
content: "\ea05";
}
.token.treeview-part .entry-name.ext-pdf:before {
content: "\ea09";
}
.token.treeview-part .entry-name.ext-xls:before,
.token.treeview-part .entry-name.ext-xlsx:before {
content: "\ea0a";
}
.token.treeview-part .entry-name.ext-doc:before,
.token.treeview-part .entry-name.ext-docm:before,
.token.treeview-part .entry-name.ext-docx:before {
content: "\ea0c";
}
.token.treeview-part .entry-name.ext-pps:before,
.token.treeview-part .entry-name.ext-ppt:before,
.token.treeview-part .entry-name.ext-pptx:before {
content: "\ea0b";
}
================================================
FILE: src/plugins/treeview-icons/treeview-icons.js
================================================
import prism from '../../global.js';
import treeview from '../../languages/treeview.js';
/** @type {import('../../types.d.ts').PluginProto<'treeview-icons'>} */
const Self = {
id: 'treeview-icons',
require: treeview,
};
export default Self;
prism.pluginRegistry.add(Self);
================================================
FILE: src/plugins/unescaped-markup/README.md
================================================
---
title: Unescaped Markup
description: Write markup without having to escape anything.
owner: LeaVerou
---
# How to use
This plugin provides several methods of achieving the same thing:
- Instead of using `` elements, use `
```
- Use an HTML-comment to escape your code:
```html
```
This will only work if the `code` element contains exactly one comment and nothing else (not even spaces). E.g. ` ` and `text` will not work.
# Examples
View source to see that the following didn’t need escaping (except for </script>, that does):
The next example uses the HTML-comment method:
# FAQ
Why not use the HTML `` tag?
Because it is a PITA to get its `textContent` and needs to be pointlessly cloned. Feel free to implement it yourself and send a pull request though, if you are so inclined.
Can I use this inline?
Not out of the box, because I figured it’s more of a hassle to type `
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["script"]],
["punctuation", ">"]
]],
["script", [
["language-javascript", [
["django", [
["delimiter", "{%"],
["tag", "if"],
["variable", "foo"],
["delimiter", "%}"]
]],
["keyword", "var"],
" foo ",
["operator", "="],
["django", [
["delimiter", "{{"],
["variable", "bar"],
["delimiter", "}}"]
]],
["punctuation", ";"],
["django", [
["delimiter", "{%"],
["tag", "endif"],
["delimiter", "%}"]
]]
]]
]],
["tag", [
["punctuation", ""],
["tag", ["script"]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for Django/Jinja2 code inside
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["script"]],
["punctuation", ">"]
]],
["script", [
["language-javascript", [
["keyword", "let"],
" str ",
["operator", "="],
["template-string", [
["template-punctuation", "`"],
["string", "\r\n\t\t\r\n\t"],
["template-punctuation", "`"]
]],
["punctuation", ";"]
]]
]],
["tag", [
["punctuation", ""],
["tag", ["script"]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for Javascript usage inside Markup, using
';
]]>
"foo"
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["script"]],
["attr-name", ["type"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"text/javascript",
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["script", [
["language-javascript", [
["function", "foo"],
["punctuation", "("],
["punctuation", ")"]
]]
]],
["tag", [
["punctuation", ""],
["tag", ["script"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["script"]],
["punctuation", ">"]
]],
["script", [
["language-javascript", [
["string", "\"foo bar\""]
]]
]],
["tag", [
["punctuation", ""],
["tag", ["script"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["script"]],
["attr-name", ["type"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"application/javascript",
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["script", [
["language-javascript", [
["keyword", "var"],
" a ",
["operator", "="],
["number", "0"],
["punctuation", ";"]
]],
["included-cdata", [
["cdata", "'"],
["punctuation", ";"]
]],
["cdata", "]]>"]
]],
["language-javascript", [
["string", "\"foo\""]
]]
]],
["tag", [
["punctuation", ""],
["tag", ["script"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["foo"]],
["special-attr", [
["attr-name", "onclick"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["value", [
["keyword", "this"],
["punctuation", "."],
"textContent",
["operator", "="],
["string", "'Clicked!'"]
]],
["punctuation", "\""]
]]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["foo"]],
["attr-name", ["mouseover"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"this.textContent='Over!'",
["punctuation", "\""]
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for Javascript usage inside Markup, using
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["script"]],
["attr-name", ["runat"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"server",
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["asp-script", [
["preprocessor", [
"#",
["directive", "pragma"]
]]
]],
["tag", [
["punctuation", ""],
["tag", ["script"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["script"]],
["punctuation", ">"]
]],
["script", [
["language-javascript", [
["regex", [
["regex-delimiter", "/"],
["regex-source", "foo"],
["regex-delimiter", "/"]
]]
]]
]],
["tag", [
["punctuation", ""],
["tag", ["script"]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for scripts containing C# code.
Also checks that those don't break normal JS scripts.
Note: Markup is loaded before Javascript so that scripts are added into grammar.
================================================
FILE: tests/languages/markup+php/issue1582.test
================================================
';
echo PHP_EOL;
----------------------------------------------------
[
["php", [
["delimiter", " '"],
["punctuation", ";"],
["keyword", "echo"],
["constant", "PHP_EOL"],
["punctuation", ";"]
]]
]
----------------------------------------------------
Checks for PHP closing tags '?>' inside of strings.
See #1582 for details.
================================================
FILE: tests/languages/markup+php/php_in_markup_feature.test
================================================
echo $foo; ?>
= $foo; ?>
___PHP1______PHP2___
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["php", [
["delimiter", ""]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["php", [
["delimiter", ""],
["keyword", "echo"],
["variable", "$foo"],
["punctuation", ";"],
["delimiter", "?>"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["php", [
["delimiter", ""]
]],
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["php", [
["delimiter", ""],
["keyword", "echo"],
["variable", "$foo"],
["punctuation", ";"],
["delimiter", "?>"]
]],
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["php", [
["delimiter", "="],
["variable", "$foo"],
["punctuation", ";"],
["delimiter", "?>"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
"\r\n___PHP1___",
["php", [
["delimiter", ""]
]],
"___PHP2___ ",
["php", [
["delimiter", ""]
]]
]
----------------------------------------------------
Checks for PHP inside Markup.
================================================
FILE: tests/languages/markup+php/php_with_closing_tag_in_markup_feature.test
================================================
' + "?>"; /* ?> */
echo PHP_EOL;
// */
// ?>
----------------------------------------------------
[
["php", [
["delimiter", "'"],
["operator", "+"],
["string", ["\"?>\""]],
["punctuation", ";"],
["comment", "/* ?> */"],
["keyword", "echo"],
["constant", "PHP_EOL"],
["punctuation", ";"],
["comment", "// */"],
["comment", "// "],
["delimiter", "?>"]
]],
["php", [
["delimiter", ""]
]]
]
----------------------------------------------------
Checks for PHP closing tags '?>' inside of strings and comments.
================================================
FILE: tests/languages/markup+pug/markup_feature.test
================================================
----------------------------------------------------
[
["markup", [
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]]
]],
["markup", [
["tag", [
["punctuation", "<"],
["tag", ["span"]],
["punctuation", ">"]
]]
]]
]
----------------------------------------------------
Checks for Markup inside Jade.
================================================
FILE: tests/languages/markup+tt2/tt2_in_markup_feature.test
================================================
[% foo.bar.baz %]
[%- foo.bar.baz %]
[% foo.bar.baz -%]
[%- foo.bar.baz -%]
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["tt2", [
["delimiter", "[%"],
["variable", "foo.bar.baz"],
["delimiter", "%]"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["tt2", [
["delimiter", "[%-"],
["variable", "foo.bar.baz"],
["delimiter", "%]"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["tt2", [
["delimiter", "[%"],
["variable", "foo.bar.baz"],
["delimiter", "-%]"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["tt2", [
["delimiter", "[%-"],
["variable", "foo.bar.baz"],
["delimiter", "-%]"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for Template Toolkit 2 inside Markup.
================================================
FILE: tests/languages/mata/class-name_feature.test
================================================
struct mystruct {
real scalar n1, n2
real matrix X
}
class coord {
real scalar x, y
real scalar length(), angle()
}
real scalar coord::length()
{
return(sqrt(x^2 + y^2))
}
real scalar coord::angle()
{
return(atan2(y, x)*360/(2*pi()))
}
class rotated_coord extends coord {
real scalar theta
real scalar angle()
void new()
}
real scalar rotated_coord::angle()
{
return(super.angle() - theta)
}
void rotated_coord::new()
{
theta = 0
}
class V {
public:
real matrix M
static real scalar count
class coord scalar c
real matrix inverse()
class coord scalar c()
private:
real scalar type
protected:
real scalar type()
}
class cow extends animal {}
----------------------------------------------------
[
["keyword", "struct"], ["class-name", "mystruct"], ["punctuation", "{"],
["type", ["real scalar"]], " n1", ["punctuation", ","], " n2\r\n\t",
["type", ["real matrix"]], " X\r\n",
["punctuation", "}"],
["keyword", "class"],
["class-name", "coord"],
["punctuation", "{"],
["type", ["real scalar"]],
" x",
["punctuation", ","],
" y\r\n\t",
["type", ["real scalar"]],
["function", "length"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ","],
["function", "angle"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["type", ["real scalar"]],
" coord",
["operator", "::"],
["function", "length"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
["punctuation", "("],
["function", "sqrt"],
["punctuation", "("],
"x",
["operator", "^"],
["number", "2"],
["operator", "+"],
" y",
["operator", "^"],
["number", "2"],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", "}"],
["type", ["real scalar"]],
" coord",
["operator", "::"],
["function", "angle"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
["punctuation", "("],
["function", "atan2"],
["punctuation", "("],
"y",
["punctuation", ","],
" x",
["punctuation", ")"],
["operator", "*"],
["number", "360"],
["operator", "/"],
["punctuation", "("],
["number", "2"],
["operator", "*"],
["function", "pi"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "class"],
["class-name", "rotated_coord"],
["keyword", "extends"],
["class-name", "coord"],
["punctuation", "{"],
["type", ["real scalar"]],
" theta\r\n\t",
["type", ["real scalar"]],
["function", "angle"],
["punctuation", "("],
["punctuation", ")"],
["type", [
["keyword", "void"]
]],
["function", "new"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["type", ["real scalar"]],
" rotated_coord",
["operator", "::"],
["function", "angle"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
["punctuation", "("],
"super",
["punctuation", "."],
["function", "angle"],
["punctuation", "("],
["punctuation", ")"],
["operator", "-"],
" theta",
["punctuation", ")"],
["punctuation", "}"],
["type", [
["keyword", "void"]
]],
" rotated_coord",
["operator", "::"],
["function", "new"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
"\r\n\ttheta ",
["operator", "="],
["number", "0"],
["punctuation", "}"],
["keyword", "class"],
["class-name", "V"],
["punctuation", "{"],
["keyword", "public"],
["operator", ":"],
["type", ["real matrix"]],
" M\r\n\t",
["keyword", "static"],
["type", ["real scalar"]],
" count\r\n\t",
["type", [
["keyword", "class"],
" coord scalar"
]],
" c\r\n\t",
["type", ["real matrix"]],
["function", "inverse"],
["punctuation", "("],
["punctuation", ")"],
["type", [
["keyword", "class"],
" coord scalar"
]],
["function", "c"],
["punctuation", "("],
["punctuation", ")"],
["keyword", "private"],
["operator", ":"],
["type", ["real scalar"]],
" type\r\n",
["keyword", "protected"],
["operator", ":"],
["type", ["real scalar"]],
["function", "type"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "class"],
["class-name", "cow"],
["keyword", "extends"],
["class-name", "animal"],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/mata/comment_feature.test
================================================
/* enclosed comment */
// rest-of-line comment
/* What follows uses an approximation formula: */
/*
We use the approximation based on sin(x) approximately
equaling x for small x; x measure in radians
*/
/*
for (i=1; i<=rows(x); i++) { /* normalization */
x[i] = x[i] :/ value[i]
}
*/
----------------------------------------------------
[
["comment", "/* enclosed comment */"],
["comment", "// rest-of-line comment"],
["comment", "/* What follows uses an approximation formula: */"],
["comment", "/*\r\nWe use the approximation based on sin(x) approximately\r\nequaling x for small x; x measure in radians\r\n*/"],
["comment", "/*\r\nfor (i=1; i<=rows(x); i++) { /* normalization */\r\n\tx[i] = x[i] :/ value[i]\r\n}\r\n*/"]
]
================================================
FILE: tests/languages/mata/constant_feature.test
================================================
NULL
----------------------------------------------------
[
["constant", "NULL"]
]
================================================
FILE: tests/languages/mata/keyword_feature.test
================================================
break;
class;
continue;
do;
else;
end;
extends;
external;
final;
for;
function;
goto;
if;
pragma;
private;
protected;
public;
return;
static;
struct;
unset;
unused;
version;
virtual;
while;
----------------------------------------------------
[
["keyword", "break"], ["punctuation", ";"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "continue"], ["punctuation", ";"],
["keyword", "do"], ["punctuation", ";"],
["keyword", "else"], ["punctuation", ";"],
["keyword", "end"], ["punctuation", ";"],
["keyword", "extends"], ["punctuation", ";"],
["keyword", "external"], ["punctuation", ";"],
["keyword", "final"], ["punctuation", ";"],
["keyword", "for"], ["punctuation", ";"],
["keyword", "function"], ["punctuation", ";"],
["keyword", "goto"], ["punctuation", ";"],
["keyword", "if"], ["punctuation", ";"],
["keyword", "pragma"], ["punctuation", ";"],
["keyword", "private"], ["punctuation", ";"],
["keyword", "protected"], ["punctuation", ";"],
["keyword", "public"], ["punctuation", ";"],
["keyword", "return"], ["punctuation", ";"],
["keyword", "static"], ["punctuation", ";"],
["keyword", "struct"], ["punctuation", ";"],
["keyword", "unset"], ["punctuation", ";"],
["keyword", "unused"], ["punctuation", ";"],
["keyword", "version"], ["punctuation", ";"],
["keyword", "virtual"], ["punctuation", ";"],
["keyword", "while"], ["punctuation", ";"]
]
================================================
FILE: tests/languages/mata/missing_feature.test
================================================
.
.a
.b
----------------------------------------------------
[
["missing", "."],
["missing", ".a"],
["missing", ".b"]
]
================================================
FILE: tests/languages/mata/number_feature.test
================================================
2
3.14159
-7.2
5i
1.213e+32
1.213E+32
1.921fb54442d18X+001
1.921fb54442d18x+001
1.921fb54442d18X+001i
----------------------------------------------------
[
["number", "2"],
["number", "3.14159"],
["operator", "-"], ["number", "7.2"],
["number", "5i"],
["number", "1.213e+32"],
["number", "1.213E+32"],
["number", "1.921fb54442d18X+001"],
["number", "1.921fb54442d18x+001"],
["number", "1.921fb54442d18X+001i"]
]
================================================
FILE: tests/languages/mata/operator_feature.test
================================================
+ - * / ^
:+ :- :* :/ :^
++ --
\ :: ..
:| | :& &
! && ||
== != >= > < <=
:== :!= :>= :> :< :<=
? :
=
#
a’ a` a'
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "^"],
["operator", ":+"],
["operator", ":-"],
["operator", ":*"],
["operator", ":/"],
["operator", ":^"],
["operator", "++"],
["operator", "--"],
["operator", "\\"], ["operator", "::"], ["operator", ".."],
["operator", ":|"], ["operator", "|"], ["operator", ":&"], ["operator", "&"],
["operator", "!"], ["operator", "&&"], ["operator", "||"],
["operator", "=="],
["operator", "!="],
["operator", ">="],
["operator", ">"],
["operator", "<"],
["operator", "<="],
["operator", ":=="],
["operator", ":!="],
["operator", ":>="],
["operator", ":>"],
["operator", ":<"],
["operator", ":<="],
["operator", "?"], ["operator", ":"],
["operator", "="],
["operator", "#"],
"\r\n\r\na",
["operator", "’"],
" a",
["operator", "`"],
" a",
["operator", "'"]
]
================================================
FILE: tests/languages/mata/punctuation_feature.test
================================================
( ) [ ] { }
, ;
t.n1
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", ";"],
"\r\n\r\nt", ["punctuation", "."], "n1"
]
================================================
FILE: tests/languages/mata/string_feature.test
================================================
""
‘""’
"foo"
‘"also a string"’
‘"The "factor" of a matrix"’
// technically not correct, but commonly used on the web
`"Hamlet said "To be, or not to be.""'
----------------------------------------------------
[
["string", "\"\""],
["string", "‘\"\"’"],
["string", "\"foo\""],
["string", "‘\"also a string\"’"],
["string", "‘\"The \"factor\" of a matrix\"’"],
["comment", "// technically not correct, but commonly used on the web"],
["string", "`\"Hamlet said \"To be, or not to be.\"\"'"]
]
================================================
FILE: tests/languages/mata/type_feature.test
================================================
void
transmorphic matrix
real matrix
complex matrix
string matrix
pointer matrix
transmorphic rowvector
real rowvector
complex rowvector
string rowvector
pointer rowvector
transmorphic colvector
real colvector
complex colvector
string colvector
pointer colvector
transmorphic vector
real vector
complex vector
string vector
pointer vector
transmorphic scalar
real scalar
complex scalar
string scalar
pointer scalar
pointer(real matrix) scalar example(real scalar n)
real scalar neat(pointer(real scalar function) p)
struct mystruct scalar y
class rotated_coord scalar b
----------------------------------------------------
[
["type", [
["keyword", "void"]
]],
["type", ["transmorphic matrix"]],
["type", ["real matrix"]],
["type", ["complex matrix"]],
["type", ["string matrix"]],
["type", ["pointer matrix"]],
["type", ["transmorphic rowvector"]],
["type", ["real rowvector"]],
["type", ["complex rowvector"]],
["type", ["string rowvector"]],
["type", ["pointer rowvector"]],
["type", ["transmorphic colvector"]],
["type", ["real colvector"]],
["type", ["complex colvector"]],
["type", ["string colvector"]],
["type", ["pointer colvector"]],
["type", ["transmorphic vector"]],
["type", ["real vector"]],
["type", ["complex vector"]],
["type", ["string vector"]],
["type", ["pointer vector"]],
["type", ["transmorphic scalar"]],
["type", ["real scalar"]],
["type", ["complex scalar"]],
["type", ["string scalar"]],
["type", ["pointer scalar"]],
["type", [
"pointer",
["punctuation", "("],
"real matrix",
["punctuation", ")"],
" scalar"
]],
["function", "example"],
["punctuation", "("],
["type", ["real scalar"]],
" n",
["punctuation", ")"],
["type", ["real scalar"]],
["function", "neat"],
["punctuation", "("],
["type", [
"pointer",
["punctuation", "("],
"real scalar ",
["keyword", "function"],
["punctuation", ")"]
]],
" p",
["punctuation", ")"],
["type", [
["keyword", "struct"],
" mystruct scalar"
]],
" y\r\n",
["type", [
["keyword", "class"],
" rotated_coord scalar"
]],
" b"
]
================================================
FILE: tests/languages/matlab/comment_feature.test
================================================
% foobar
%{}%
%{ foo
bar }%
% 'test'
%{ 'test' }%
----------------------------------------------------
[
["comment", "% foobar"],
["comment", "%{}%"],
["comment", "%{ foo\r\nbar }%"],
["comment", "% 'test'"],
["comment", "%{ 'test' }%"]
]
----------------------------------------------------
Checks for single-line and multi-line comments.
================================================
FILE: tests/languages/matlab/function_feature.test
================================================
foo()
foo_42()
----------------------------------------------------
[
["function", "foo"], ["punctuation", "("], ["punctuation", ")"],
["function", "foo_42"], ["punctuation", "("], ["punctuation", ")"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/matlab/keyword_feature.test
================================================
break case catch continue
else elseif end for
function if inf NaN
otherwise parfor pause
pi return switch
try while
----------------------------------------------------
[
["keyword", "break"], ["keyword", "case"], ["keyword", "catch"], ["keyword", "continue"],
["keyword", "else"], ["keyword", "elseif"], ["keyword", "end"], ["keyword", "for"],
["keyword", "function"], ["keyword", "if"], ["keyword", "inf"], ["keyword", "NaN"],
["keyword", "otherwise"], ["keyword", "parfor"], ["keyword", "pause"],
["keyword", "pi"], ["keyword", "return"], ["keyword", "switch"],
["keyword", "try"], ["keyword", "while"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/matlab/number_feature.test
================================================
42
3.14159
2.1e2
3.2E+4
0.1e-5
3i
2j
i
j
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "2.1e2"],
["number", "3.2E+4"],
["number", "0.1e-5"],
["number", "3i"],
["number", "2j"],
["number", "i"],
["number", "j"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/matlab/operator_feature.test
================================================
.' .^
.* ./ .\
@ ^ :
+ - ~
* / \
< <= > >=
== ~=
& &&
| ||
A'
----------------------------------------------------
[
["operator", ".'"], ["operator", ".^"],
["operator", ".*"], ["operator", "./"], ["operator", ".\\"],
["operator", "@"], ["operator", "^"], ["operator", ":"],
["operator", "+"], ["operator", "-"], ["operator", "~"],
["operator", "*"], ["operator", "/"], ["operator", "\\"],
["operator", "<"], ["operator", "<="], ["operator", ">"], ["operator", ">="],
["operator", "=="], ["operator", "~="],
["operator", "&"], ["operator", "&&"],
["operator", "|"], ["operator", "||"],
"\r\nA", ["operator", "'"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/matlab/string_feature.test
================================================
''
'foo''bar'
'%s'
----------------------------------------------------
[
["string", "''"],
["string", "'foo''bar'"],
["string", "'%s'"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/maxscript/boolean_feature.test
================================================
true;
false;
----------------------------------------------------
[
["boolean", "true"],
["punctuation", ";"],
["boolean", "false"],
["punctuation", ";"]
]
================================================
FILE: tests/languages/maxscript/color_feature.test
================================================
black
blue
brown
gray
green
orange
red
white
yellow
----------------------------------------------------
[
["color", "black"],
["color", "blue"],
["color", "brown"],
["color", "gray"],
["color", "green"],
["color", "orange"],
["color", "red"],
["color", "white"],
["color", "yellow"]
]
================================================
FILE: tests/languages/maxscript/comment_feature.test
================================================
/* this is a long comment
blah blah
print "debug 1" -- code commented out
more comments
*/
for i in 1 to 10 do(/* messageBox "in loop"; */frabulate i )
-- comment
----------------------------------------------------
[
["comment", "/* this is a long comment\r\nblah blah\r\nprint \"debug 1\" -- code commented out\r\nmore comments\r\n*/"],
["keyword", "for"],
" i ",
["keyword", "in"],
["number", "1"],
["keyword", "to"],
["number", "10"],
["keyword", "do"],
["punctuation", "("],
["comment", "/* messageBox \"in loop\"; */"],
"frabulate i ",
["punctuation", ")"],
["comment", "-- comment"]
]
================================================
FILE: tests/languages/maxscript/constant_feature.test
================================================
dontcollect
ok
silentValue
undefined
unsupplied
----------------------------------------------------
[
["constant", "dontcollect"],
["constant", "ok"],
["constant", "silentValue"],
["constant", "undefined"],
["constant", "unsupplied"]
]
================================================
FILE: tests/languages/maxscript/function_feature.test
================================================
function my_add a b = a + b
fn factorial n = if n <= 0 then 1 else n * factorial (n - 1)
mapped function rand_color x =
x.wireColor = random (color 0 0 0) (color 255 255 255)
fn starfield count extent:[200,200,200] pos:[0,0,0] =
(
-- something
)
fn saddle x y = sin x * sin y
print "build math mesh"
in_name = getOpenFileName()
val.x=random -100 100
append vert_array (readValue in_file)
while not eof f do
on pressme pressed do print "Pressed!"
----------------------------------------------------
[
["keyword", "function"],
["function-definition", "my_add"],
" a b ",
["operator", "="],
" a ",
["operator", "+"],
" b\r\n\r\n",
["keyword", "fn"],
["function-definition", "factorial"],
" n ",
["operator", "="],
["keyword", "if"],
" n ",
["operator", "<="],
["number", "0"],
["keyword", "then"],
["number", "1"],
["keyword", "else"],
" n ",
["operator", "*"],
["function-call", "factorial"],
["punctuation", "("],
"n ",
["operator", "-"],
["number", "1"],
["punctuation", ")"],
["keyword", "mapped"],
["keyword", "function"],
["function-definition", "rand_color"],
" x ",
["operator", "="],
"\r\n x",
["punctuation", "."],
"wireColor ",
["operator", "="],
["function-call", "random"],
["punctuation", "("],
["function-call", "color"],
["number", "0"],
["number", "0"],
["number", "0"],
["punctuation", ")"],
["punctuation", "("],
["function-call", "color"],
["number", "255"],
["number", "255"],
["number", "255"],
["punctuation", ")"],
["keyword", "fn"],
["function-definition", "starfield"],
" count ",
["argument", "extent"],
["punctuation", ":"],
["punctuation", "["],
["number", "200"],
["punctuation", ","],
["number", "200"],
["punctuation", ","],
["number", "200"],
["punctuation", "]"],
["argument", "pos"],
["punctuation", ":"],
["punctuation", "["],
["number", "0"],
["punctuation", ","],
["number", "0"],
["punctuation", ","],
["number", "0"],
["punctuation", "]"],
["operator", "="],
["punctuation", "("],
["comment", "-- something"],
["punctuation", ")"],
["keyword", "fn"],
["function-definition", "saddle"],
" x y ",
["operator", "="],
["function-call", "sin"],
" x ",
["operator", "*"],
["function-call", "sin"],
" y\r\n\r\n",
["function-call", "print"],
["string", "\"build math mesh\""],
"\r\nin_name ",
["operator", "="],
["function-call", "getOpenFileName"],
["punctuation", "("],
["punctuation", ")"],
"\r\nval",
["punctuation", "."],
"x",
["operator", "="],
["function-call", "random"],
["operator", "-"],
["number", "100"],
["number", "100"],
["function-call", "append"],
" vert_array ",
["punctuation", "("],
["function-call", "readValue"],
" in_file",
["punctuation", ")"],
["keyword", "while"],
["keyword", "not"],
["function-call", "eof"],
" f ",
["keyword", "do"],
["keyword", "on"],
" pressme pressed ",
["keyword", "do"],
["function-call", "print"],
["string", "\"Pressed!\""]
]
================================================
FILE: tests/languages/maxscript/keyword_feature.test
================================================
about;
and;
animate;
as;
at;
attributes;
by;
case;
catch;
collect;
continue;
coordsys;
do;
else;
exit;
fn;
for;
from;
function;
global;
if;
in;
local;
macroscript;
mapped;
max;
not;
of;
off;
on;
or;
parameters;
persistent;
plugin;
rcmenu;
return;
rollout;
set;
struct;
then;
throw;
to;
tool;
try;
undo;
utility;
when;
where;
while;
with;
----------------------------------------------------
[
["keyword", "about"], ["punctuation", ";"],
["keyword", "and"], ["punctuation", ";"],
["keyword", "animate"], ["punctuation", ";"],
["keyword", "as"], ["punctuation", ";"],
["keyword", "at"], ["punctuation", ";"],
["keyword", "attributes"], ["punctuation", ";"],
["keyword", "by"], ["punctuation", ";"],
["keyword", "case"], ["punctuation", ";"],
["keyword", "catch"], ["punctuation", ";"],
["keyword", "collect"], ["punctuation", ";"],
["keyword", "continue"], ["punctuation", ";"],
["keyword", "coordsys"], ["punctuation", ";"],
["keyword", "do"], ["punctuation", ";"],
["keyword", "else"], ["punctuation", ";"],
["keyword", "exit"], ["punctuation", ";"],
["keyword", "fn"], ["punctuation", ";"],
["keyword", "for"], ["punctuation", ";"],
["keyword", "from"], ["punctuation", ";"],
["keyword", "function"], ["punctuation", ";"],
["keyword", "global"], ["punctuation", ";"],
["keyword", "if"], ["punctuation", ";"],
["keyword", "in"], ["punctuation", ";"],
["keyword", "local"], ["punctuation", ";"],
["keyword", "macroscript"], ["punctuation", ";"],
["keyword", "mapped"], ["punctuation", ";"],
["keyword", "max"], ["punctuation", ";"],
["keyword", "not"], ["punctuation", ";"],
["keyword", "of"], ["punctuation", ";"],
["keyword", "off"], ["punctuation", ";"],
["keyword", "on"], ["punctuation", ";"],
["keyword", "or"], ["punctuation", ";"],
["keyword", "parameters"], ["punctuation", ";"],
["keyword", "persistent"], ["punctuation", ";"],
["keyword", "plugin"], ["punctuation", ";"],
["keyword", "rcmenu"], ["punctuation", ";"],
["keyword", "return"], ["punctuation", ";"],
["keyword", "rollout"], ["punctuation", ";"],
["keyword", "set"], ["punctuation", ";"],
["keyword", "struct"], ["punctuation", ";"],
["keyword", "then"], ["punctuation", ";"],
["keyword", "throw"], ["punctuation", ";"],
["keyword", "to"], ["punctuation", ";"],
["keyword", "tool"], ["punctuation", ";"],
["keyword", "try"], ["punctuation", ";"],
["keyword", "undo"], ["punctuation", ";"],
["keyword", "utility"], ["punctuation", ";"],
["keyword", "when"], ["punctuation", ";"],
["keyword", "where"], ["punctuation", ";"],
["keyword", "while"], ["punctuation", ";"],
["keyword", "with"], ["punctuation", ";"]
]
================================================
FILE: tests/languages/maxscript/number_feature.test
================================================
123
123.45
-0.00345
1.0e-6
0x0E
.1
e
pi
----------------------------------------------------
[
["number", "123"],
["number", "123.45"],
["operator", "-"], ["number", "0.00345"],
["number", "1.0e-6"],
["number", "0x0E"],
["number", ".1"],
["number", "e"],
["number", "pi"]
]
================================================
FILE: tests/languages/maxscript/operator_feature.test
================================================
+ - * /
+= -= *= /=
=
== != < <= > >=
^ & #
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "="],
["operator", "=="],
["operator", "!="],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "^"], ["operator", "&"], ["operator", "#"]
]
================================================
FILE: tests/languages/maxscript/path_feature.test
================================================
$box01 -- object named 'box01'
$torso/left_up_arm/left_low_arm -- hierarchy path name
$*box* -- all objects with 'box' in
-- the name
$torso/* -- all the direct children of
-- $torso
$helpers/d* -- all helper objects whose name starts with 'd'
$dummy/head/neck
$dummy/*
$neck*
$box0?
$dummy/*/*
$dummy/.../box*
$dummy...*
$*box*.position += [10, 10, 0]
$.pos = [0,0,0]
hide $
rotate $ 35 z_axis
$'a silly name!!'
$'what the \*'
bodyPart=$'Bip01 L UpperArm'
bodyPart=$Bip01_L_UpperArm
----------------------------------------------------
[
["path", "$box01"],
["comment", "-- object named 'box01'"],
["path", "$torso/left_up_arm/left_low_arm"],
["comment", "-- hierarchy path name"],
["path", "$*box*"],
["comment", "-- all objects with 'box' in"],
["comment", "-- the name"],
["path", "$torso/*"],
["comment", "-- all the direct children of"],
["comment", "-- $torso"],
["path", "$helpers/d*"],
["comment", "-- all helper objects whose name starts with 'd'"],
["path", "$dummy/head/neck"],
["path", "$dummy/*"],
["path", "$neck*"],
["path", "$box0?"],
["path", "$dummy/*/*"],
["path", "$dummy/.../box*"],
["path", "$dummy...*"],
["path", "$*box*.position"],
["operator", "+="],
["punctuation", "["],
["number", "10"],
["punctuation", ","],
["number", "10"],
["punctuation", ","],
["number", "0"],
["punctuation", "]"],
["path", "$.pos"],
["operator", "="],
["punctuation", "["],
["number", "0"],
["punctuation", ","],
["number", "0"],
["punctuation", ","],
["number", "0"],
["punctuation", "]"],
["function-call", "hide"],
["path", "$"],
["function-call", "rotate"],
["path", "$"],
["number", "35"],
" z_axis\r\n\r\n",
["path", "$'a silly name!!'"],
["path", "$'what the \\*'"],
"\r\nbodyPart", ["operator", "="], ["path", "$'Bip01 L UpperArm'"],
"\r\nbodyPart", ["operator", "="], ["path", "$Bip01_L_UpperArm"]
]
================================================
FILE: tests/languages/maxscript/punctuation_feature.test
================================================
( ) [ ] { }
. : , ;
#(
\
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "."],
["punctuation", ":"],
["punctuation", ","],
["punctuation", ";"],
["punctuation", "#"],
["punctuation", "("],
["punctuation", "\\"]
]
================================================
FILE: tests/languages/maxscript/string_feature.test
================================================
""
"foo should be quoted like this: \"foo\" and a new line: \n"
"Twas brillig and the slithy tobes
did gyre and gimbol in the wabe
or something like that..."
"g:\\3dsmax25\\scenes"
@"g:\temp\newfolder\render"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo should be quoted like this: \\\"foo\\\" and a new line: \\n\""],
["string", "\"Twas brillig and the slithy tobes\r\ndid gyre and gimbol in the wabe\r\nor something like that...\""],
["string", "\"g:\\\\3dsmax25\\\\scenes\""],
["string", "@\"g:\\temp\\newfolder\\render\""]
]
================================================
FILE: tests/languages/maxscript/time_feature.test
================================================
2.5s
1m15s
2m30s5f2t
125f
18.25f
1f20t
2:10.0
0:0.29
----------------------------------------------------
[
["time", "2.5s"],
["time", "1m15s"],
["time", "2m30s5f2t"],
["time", "125f"],
["time", "18.25f"],
["time", "1f20t"],
["time", "2:10.0"],
["time", "0:0.29"]
]
================================================
FILE: tests/languages/mel/code_feature.test
================================================
`ls -selection`
$shaders = `listConnections -source true -type shadingEngine
$listOfShapes[$whichShape]`;
----------------------------------------------------
[
["code", [
["delimiter", "`"],
["statement", [
["function", "ls"],
["flag", "-selection"]
]],
["delimiter", "`"]
]],
["variable", "$shaders"],
["operator", "="],
["code", [
["delimiter", "`"],
["statement", [
["function", "listConnections"],
["flag", "-source"],
" true ",
["flag", "-type"],
" shadingEngine\r\n",
["variable", "$listOfShapes"],
["punctuation", "["],
["variable", "$whichShape"],
["punctuation", "]"]
]],
["delimiter", "`"]
]],
["punctuation", ";"]
]
----------------------------------------------------
Checks for code.
================================================
FILE: tests/languages/mel/comment_feature.test
================================================
//
// Foobar
/*
comment
*/
----------------------------------------------------
[
["comment", "//"],
["comment", "// Foobar"],
["comment", "/*\r\ncomment\r\n*/"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/mel/flag_feature.test
================================================
-d
-foo
-foo42
----------------------------------------------------
[
["flag", "-d"],
["flag", "-foo"],
["flag", "-foo42"]
]
----------------------------------------------------
Checks for flags.
================================================
FILE: tests/languages/mel/function_feature.test
================================================
foobar()
foo_bar_42()
foo.bar()
proc animatedDuplication ()
global proc VL_doit( )
print("Semicolons separate"); print(" different statements.");
float $frame = `currentTime -q`;
string $timeFormat = `currentUnit -query -time`;
currentUnit -time sec;
float $time = `currentTime -q`;
currentUnit -time $timeFormat;
persp.translateX = 23.2;
PolySelectConvert 3;
setParent ..;
duplicate;
----------------------------------------------------
[
["function", "foobar"],
["punctuation", "("],
["punctuation", ")"],
["function", "foo_bar_42"],
["punctuation", "("],
["punctuation", ")"],
"\r\nfoo",
["punctuation", "."],
["function", "bar"],
["punctuation", "("],
["punctuation", ")"],
["keyword", "proc"],
["function", "animatedDuplication"],
["punctuation", "("],
["punctuation", ")"],
["keyword", "global"],
["keyword", "proc"],
["function", "VL_doit"],
["punctuation", "("],
["punctuation", ")"],
["function", "print"],
["punctuation", "("],
["string", "\"Semicolons separate\""],
["punctuation", ")"],
["punctuation", ";"],
["function", "print"],
["punctuation", "("],
["string", "\" different statements.\""],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "float"],
["variable", "$frame"],
["operator", "="],
["code", [
["delimiter", "`"],
["statement", [
["function", "currentTime"],
["flag", "-q"]
]],
["delimiter", "`"]
]],
["punctuation", ";"],
["keyword", "string"],
["variable", "$timeFormat"],
["operator", "="],
["code", [
["delimiter", "`"],
["statement", [
["function", "currentUnit"],
["flag", "-query"],
["flag", "-time"]
]],
["delimiter", "`"]
]],
["punctuation", ";"],
["function", "currentUnit"],
["flag", "-time"],
" sec",
["punctuation", ";"],
["keyword", "float"],
["variable", "$time"],
["operator", "="],
["code", [
["delimiter", "`"],
["statement", [
["function", "currentTime"],
["flag", "-q"]
]],
["delimiter", "`"]
]],
["punctuation", ";"],
["function", "currentUnit"],
["flag", "-time"],
["variable", "$timeFormat"],
["punctuation", ";"],
"\r\n\r\npersp",
["punctuation", "."],
"translateX ",
["operator", "="],
["number", "23.2"],
["punctuation", ";"],
["function", "PolySelectConvert"],
["number", "3"],
["punctuation", ";"],
["function", "setParent"],
["punctuation", "."],
["punctuation", "."],
["punctuation", ";"],
["function", "duplicate"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/mel/keyword_feature.test
================================================
break
case
continue
default
do
else
float
for
global
if
in
int
matrix
proc
return
string
switch
vector
while
----------------------------------------------------
[
["keyword", "break"],
["keyword", "case"],
["keyword", "continue"],
["keyword", "default"],
["keyword", "do"],
["keyword", "else"],
["keyword", "float"],
["keyword", "for"],
["keyword", "global"],
["keyword", "if"],
["keyword", "in"],
["keyword", "int"],
["keyword", "matrix"],
["keyword", "proc"],
["keyword", "return"],
["keyword", "string"],
["keyword", "switch"],
["keyword", "vector"],
["keyword", "while"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/mel/number_feature.test
================================================
0xBadFace
42
3.14159
----------------------------------------------------
[
["number", "0xBadFace"],
["number", "42"],
["number", "3.14159"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/mel/operator_feature.test
================================================
+ ++ +=
- -- -=
* *=
/ /=
! !=
= ==
&&
||
< <=
> >=
%
^
----------------------------------------------------
[
["operator", "+"], ["operator", "++"], ["operator", "+="],
["operator", "-"], ["operator", "--"], ["operator", "-="],
["operator", "*"], ["operator", "*="],
["operator", "/"], ["operator", "/="],
["operator", "!"], ["operator", "!="],
["operator", "="], ["operator", "=="],
["operator", "&&"],
["operator", "||"],
["operator", "<"], ["operator", "<="],
["operator", ">"], ["operator", ">="],
["operator", "%"],
["operator", "^"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/mel/punctuation_feature.test
================================================
( ) { } [ ]
. ; .
? :
<< >>
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "."],
["punctuation", ";"],
["punctuation", "."],
["punctuation", "?"],
["punctuation", ":"],
["tensor-punctuation", "<<"],
["tensor-punctuation", ">>"]
]
================================================
FILE: tests/languages/mel/string_feature.test
================================================
""
"fo\"obar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/mel/variable_feature.test
================================================
$x
$foo42
$Foo_Bar_42
----------------------------------------------------
[
["variable", "$x"],
["variable", "$foo42"],
["variable", "$Foo_Bar_42"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/mermaid/arrow_feature.test
================================================
%% flow chart
--- ---- -----
--> ---> ---->
<-- <--- <----
=== ==== =====
==> ===> ====>
<== <=== <====
-.- -..- -...-
-.-> -..-> -...->
<-.- <-..- <-...-
--x ---x ----x
--x -.-x -..-x
x-- x--- x----
x-- x-.- x-..-
--o ---o ----o
--o -.-o -..-o
o-- o--- o----
o-- o-.- o-..-
<--> <----> <-..-> <====>
x--x x----x x-..-x x====x
o--o o----o o-..-o o====o
%% sequence diagram
-> --> ->> -->>
<- <-- <<- <<--
-x --x -) --)
x- x-- (- (--
%% class diagram
<|-- *-- o-- <-- <.. <|..
--|> --* --o --> ..> ..|>
-- ..
%% ER diagram
|o--o| |o..o|
||--|| ||..||
}o--o{ }o..o{
}|--|{ }|..|{
|o--o| |o..o|
||--o{ ||..o{
}o--|{ }o..|{
}|--|| }|..||
----------------------------------------------------
[
["comment", "%% flow chart"],
["arrow", "---"], ["arrow", "----"], ["arrow", "-----"],
["arrow", "-->"], ["arrow", "--->"], ["arrow", "---->"],
["arrow", "<--"], ["arrow", "<---"], ["arrow", "<----"],
["arrow", "==="], ["arrow", "===="], ["arrow", "====="],
["arrow", "==>"], ["arrow", "===>"], ["arrow", "====>"],
["arrow", "<=="], ["arrow", "<==="], ["arrow", "<===="],
["arrow", "-.-"], ["arrow", "-..-"], ["arrow", "-...-"],
["arrow", "-.->"], ["arrow", "-..->"], ["arrow", "-...->"],
["arrow", "<-.-"], ["arrow", "<-..-"], ["arrow", "<-...-"],
["arrow", "--x"], ["arrow", "---x"], ["arrow", "----x"],
["arrow", "--x"], ["arrow", "-.-x"], ["arrow", "-..-x"],
["arrow", "x--"], ["arrow", "x---"], ["arrow", "x----"],
["arrow", "x--"], ["arrow", "x-.-"], ["arrow", "x-..-"],
["arrow", "--o"], ["arrow", "---o"], ["arrow", "----o"],
["arrow", "--o"], ["arrow", "-.-o"], ["arrow", "-..-o"],
["arrow", "o--"], ["arrow", "o---"], ["arrow", "o----"],
["arrow", "o--"], ["arrow", "o-.-"], ["arrow", "o-..-"],
["arrow", "<-->"],
["arrow", "<---->"],
["arrow", "<-..->"],
["arrow", "<====>"],
["arrow", "x--x"],
["arrow", "x----x"],
["arrow", "x-..-x"],
["arrow", "x====x"],
["arrow", "o--o"],
["arrow", "o----o"],
["arrow", "o-..-o"],
["arrow", "o====o"],
["comment", "%% sequence diagram"],
["arrow", "->"], ["arrow", "-->"], ["arrow", "->>"], ["arrow", "-->>"],
["arrow", "<-"], ["arrow", "<--"], ["arrow", "<<-"], ["arrow", "<<--"],
["arrow", "-x"], ["arrow", "--x"], ["arrow", "-)"], ["arrow", "--)"],
["arrow", "x-"], ["arrow", "x--"], ["arrow", "(-"], ["arrow", "(--"],
["comment", "%% class diagram"],
["arrow", "<|--"],
["arrow", "*--"],
["arrow", "o--"],
["arrow", "<--"],
["arrow", "<.."],
["arrow", "<|.."],
["arrow", "--|>"],
["arrow", "--*"],
["arrow", "--o"],
["arrow", "-->"],
["arrow", "..>"],
["arrow", "..|>"],
["arrow", "--"],
["arrow", ".."],
["comment", "%% ER diagram"],
["arrow", "|o--o|"], ["arrow", "|o..o|"],
["arrow", "||--||"], ["arrow", "||..||"],
["arrow", "}o--o{"], ["arrow", "}o..o{"],
["arrow", "}|--|{"], ["arrow", "}|..|{"],
["arrow", "|o--o|"], ["arrow", "|o..o|"],
["arrow", "||--o{"], ["arrow", "||..o{"],
["arrow", "}o--|{"], ["arrow", "}o..|{"],
["arrow", "}|--||"], ["arrow", "}|..||"]
]
================================================
FILE: tests/languages/mermaid/comment_feature.test
================================================
%% comment
----------------------------------------------------
[
["comment", "%% comment"]
]
================================================
FILE: tests/languages/mermaid/full_classdiagram.test
================================================
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
classDiagram
class BankAccount
BankAccount : +String owner
BankAccount : +Bigdecimal balance
BankAccount : +deposit(amount)
BankAccount : +withdrawl(amount)
classDiagram
class Animal
Vehicle <|-- Car
class BankAccount
BankAccount : +String owner
BankAccount : +BigDecimal balance
BankAccount : +deposit(amount)
BankAccount : +withdrawal(amount)
class BankAccount{
+String owner
+BigDecimal balance
+deposit(amount)
+withdrawl(amount)
}
class BankAccount{
+String owner
+BigDecimal balance
+deposit(amount) bool
+withdrawl(amount) int
}
classDiagram
class Square~Shape~{
int id
List~int~ position
setPoints(List~int~ points)
getPoints() List~int~
}
Square : -List~string~ messages
Square : +setMessages(List~string~ messages)
Square : +getMessages() List~string~
classDiagram
classA <|-- classB
classC *-- classD
classE o-- classF
classG <-- classH
classI -- classJ
classK <.. classL
classM <|.. classN
classO .. classP
classDiagram
classA --|> classB : Inheritance
classC --* classD : Composition
classE --o classF : Aggregation
classG --> classH : Association
classI -- classJ : Link(Solid)
classK ..> classL : Dependency
classM ..|> classN : Realization
classO .. classP : Link(Dashed)
classDiagram
classA <|-- classB : implements
classC *-- classD : composition
classE o-- classF : association
classDiagram
Customer "1" --> "*" Ticket
Student "1" --> "1..*" Course
Galaxy --> "many" Star : Contains
classDiagram
class Shape
<> Shape
classDiagram
class Shape{
<>
noOfVertices
draw()
}
class Color{
<>
RED
BLUE
GREEN
WHITE
BLACK
}
classDiagram
%% This whole line is a comment classDiagram class Shape <>
class Shape{
<>
noOfVertices
draw()
}
classDiagram
direction RL
class Student {
-idCard : IdCard
}
class IdCard{
-id : int
-name : string
}
class Bike{
-id : int
-name : string
}
Student "1" --o "1" IdCard : carries
Student "1" --o "1" Bike : rides
action className "reference" "tooltip"
click className call callback() "tooltip"
click className href "url" "tooltip"
classDiagram
class Shape
link Shape "http://www.github.com" "This is a tooltip for a link"
class Shape2
click Shape2 href "http://www.github.com" "This is a tooltip for a link"
classDiagram
class Shape
callback Shape "callbackFunction" "This is a tooltip for a callback"
class Shape2
click Shape2 call callbackFunction() "This is a tooltip for a callback"
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
callback Duck callback "Tooltip"
link Zebra "http://www.github.com" "This is a link"
classDiagram
class Animal:::cssClass
classDiagram
class Animal:::cssClass {
-int sizeInFeet
-canEat()
}
----------------------------------------------------
[
["keyword", "classDiagram"],
"\r\n Animal ",
["arrow", "<|--"],
" Duck\r\n Animal ",
["arrow", "<|--"],
" Fish\r\n Animal ",
["arrow", "<|--"],
" Zebra\r\n Animal ",
["operator", ":"],
" +int age\r\n Animal ",
["operator", ":"],
" +String gender\r\n Animal",
["operator", ":"],
" +isMammal",
["punctuation", "("],
["punctuation", ")"],
"\r\n Animal",
["operator", ":"],
" +mate",
["punctuation", "("],
["punctuation", ")"],
["keyword", "class"],
" Duck",
["punctuation", "{"],
"\r\n +String beakColor\r\n +swim",
["punctuation", "("],
["punctuation", ")"],
"\r\n +quack",
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "class"],
" Fish",
["punctuation", "{"],
"\r\n -int sizeInFeet\r\n -canEat",
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "class"],
" Zebra",
["punctuation", "{"],
"\r\n +bool is_wild\r\n +run",
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "classDiagram"],
["keyword", "class"],
" BankAccount\r\n BankAccount ",
["operator", ":"],
" +String owner\r\n BankAccount ",
["operator", ":"],
" +Bigdecimal balance\r\n BankAccount ",
["operator", ":"],
" +deposit",
["text", "(amount)"],
"\r\n BankAccount ",
["operator", ":"],
" +withdrawl",
["text", "(amount)"],
["keyword", "classDiagram"],
["keyword", "class"],
" Animal\r\n Vehicle ",
["arrow", "<|--"],
" Car\r\n\r\n",
["keyword", "class"],
" BankAccount\r\n BankAccount ",
["operator", ":"],
" +String owner\r\n BankAccount ",
["operator", ":"],
" +BigDecimal balance\r\n BankAccount ",
["operator", ":"],
" +deposit",
["text", "(amount)"],
"\r\n BankAccount ",
["operator", ":"],
" +withdrawal",
["text", "(amount)"],
["keyword", "class"],
" BankAccount",
["punctuation", "{"],
"\r\n +String owner\r\n +BigDecimal balance\r\n +deposit",
["text", "(amount)"],
"\r\n +withdrawl",
["text", "(amount)"],
["punctuation", "}"],
["keyword", "class"],
" BankAccount",
["punctuation", "{"],
"\r\n +String owner\r\n +BigDecimal balance\r\n +deposit",
["text", "(amount)"],
" bool\r\n +withdrawl",
["text", "(amount)"],
" int\r\n",
["punctuation", "}"],
["keyword", "classDiagram"],
["keyword", "class"],
" Square~Shape~",
["punctuation", "{"],
"\r\n int id\r\n List~int~ position\r\n setPoints",
["text", "(List~int~ points)"],
"\r\n getPoints",
["punctuation", "("],
["punctuation", ")"],
" List~int~\r\n",
["punctuation", "}"],
"\r\n\r\nSquare ",
["operator", ":"],
" -List~string~ messages\r\nSquare ",
["operator", ":"],
" +setMessages",
["text", "(List~string~ messages)"],
"\r\nSquare ",
["operator", ":"],
" +getMessages",
["punctuation", "("],
["punctuation", ")"],
" List~string~\r\n\r\n",
["keyword", "classDiagram"],
"\r\nclassA ",
["arrow", "<|--"],
" classB\r\nclassC ",
["arrow", "*--"],
" classD\r\nclassE ",
["arrow", "o--"],
" classF\r\nclassG ",
["arrow", "<--"],
" classH\r\nclassI ",
["arrow", "--"],
" classJ\r\nclassK ",
["arrow", "<.."],
" classL\r\nclassM ",
["arrow", "<|.."],
" classN\r\nclassO ",
["arrow", ".."],
" classP\r\n\r\n",
["keyword", "classDiagram"],
"\r\nclassA ",
["arrow", "--|>"],
" classB ",
["operator", ":"],
" Inheritance\r\nclassC ",
["arrow", "--*"],
" classD ",
["operator", ":"],
" Composition\r\nclassE ",
["arrow", "--o"],
" classF ",
["operator", ":"],
" Aggregation\r\nclassG ",
["arrow", "-->"],
" classH ",
["operator", ":"],
" Association\r\nclassI ",
["arrow", "--"],
" classJ ",
["operator", ":"],
" Link",
["text", "(Solid)"],
"\r\nclassK ",
["arrow", "..>"],
" classL ",
["operator", ":"],
" Dependency\r\nclassM ",
["arrow", "..|>"],
" classN ",
["operator", ":"],
" Realization\r\nclassO ",
["arrow", ".."],
" classP ",
["operator", ":"],
" Link",
["text", "(Dashed)"],
["keyword", "classDiagram"],
"\r\nclassA ",
["arrow", "<|--"],
" classB ",
["operator", ":"],
" implements\r\nclassC ",
["arrow", "*--"],
" classD ",
["operator", ":"],
" composition\r\nclassE ",
["arrow", "o--"],
" classF ",
["operator", ":"],
" association\r\n\r\n",
["keyword", "classDiagram"],
"\r\n Customer ",
["string", "\"1\""],
["arrow", "-->"],
["string", "\"*\""],
" Ticket\r\n Student ",
["string", "\"1\""],
["arrow", "-->"],
["string", "\"1..*\""],
" Course\r\n Galaxy ",
["arrow", "-->"],
["string", "\"many\""],
" Star ",
["operator", ":"],
" Contains\r\n\r\n",
["keyword", "classDiagram"],
["keyword", "class"], " Shape\r\n",
["annotation", "<>"], " Shape\r\n\r\n",
["keyword", "classDiagram"],
["keyword", "class"],
" Shape",
["punctuation", "{"],
["annotation", "<>"],
"\r\n noOfVertices\r\n draw",
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "class"],
" Color",
["punctuation", "{"],
["annotation", "<>"],
"\r\n RED\r\n BLUE\r\n GREEN\r\n WHITE\r\n BLACK\r\n",
["punctuation", "}"],
["keyword", "classDiagram"],
["comment", "%% This whole line is a comment classDiagram class Shape <>"],
["keyword", "class"],
" Shape",
["punctuation", "{"],
["annotation", "<>"],
"\r\n noOfVertices\r\n draw",
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "classDiagram"],
["keyword", "direction"],
" RL\r\n ",
["keyword", "class"],
" Student ",
["punctuation", "{"],
"\r\n -idCard ",
["operator", ":"],
" IdCard\r\n ",
["punctuation", "}"],
["keyword", "class"],
" IdCard",
["punctuation", "{"],
"\r\n -id ",
["operator", ":"],
" int\r\n -name ",
["operator", ":"],
" string\r\n ",
["punctuation", "}"],
["keyword", "class"],
" Bike",
["punctuation", "{"],
"\r\n -id ",
["operator", ":"],
" int\r\n -name ",
["operator", ":"],
" string\r\n ",
["punctuation", "}"],
"\r\n Student ",
["string", "\"1\""],
["arrow", "--o"],
["string", "\"1\""],
" IdCard ",
["operator", ":"],
" carries\r\n Student ",
["string", "\"1\""],
["arrow", "--o"],
["string", "\"1\""],
" Bike ",
["operator", ":"],
" rides\r\n\r\n",
["keyword", "action"],
" className ",
["string", "\"reference\""],
["string", "\"tooltip\""],
["keyword", "click"],
" className call callback",
["punctuation", "("],
["punctuation", ")"],
["string", "\"tooltip\""],
["keyword", "click"],
" className href ",
["string", "\"url\""],
["string", "\"tooltip\""],
["keyword", "classDiagram"],
["keyword", "class"],
" Shape\r\n",
["keyword", "link"],
" Shape ",
["string", "\"http://www.github.com\""],
["string", "\"This is a tooltip for a link\""],
["keyword", "class"],
" Shape2\r\n",
["keyword", "click"],
" Shape2 href ",
["string", "\"http://www.github.com\""],
["string", "\"This is a tooltip for a link\""],
["keyword", "classDiagram"],
["keyword", "class"],
" Shape\r\n",
["keyword", "callback"],
" Shape ",
["string", "\"callbackFunction\""],
["string", "\"This is a tooltip for a callback\""],
["keyword", "class"],
" Shape2\r\n",
["keyword", "click"],
" Shape2 call callbackFunction",
["punctuation", "("],
["punctuation", ")"],
["string", "\"This is a tooltip for a callback\""],
["keyword", "classDiagram"],
"\r\nAnimal ",
["arrow", "<|--"],
" Duck\r\nAnimal ",
["arrow", "<|--"],
" Fish\r\nAnimal ",
["arrow", "<|--"],
" Zebra\r\nAnimal ",
["operator", ":"],
" +int age\r\nAnimal ",
["operator", ":"],
" +String gender\r\nAnimal",
["operator", ":"],
" +isMammal",
["punctuation", "("],
["punctuation", ")"],
"\r\nAnimal",
["operator", ":"],
" +mate",
["punctuation", "("],
["punctuation", ")"],
["keyword", "class"],
" Duck",
["punctuation", "{"],
"\r\n +String beakColor\r\n +swim",
["punctuation", "("],
["punctuation", ")"],
"\r\n +quack",
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "class"],
" Fish",
["punctuation", "{"],
"\r\n -int sizeInFeet\r\n -canEat",
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "class"],
" Zebra",
["punctuation", "{"],
"\r\n +bool is_wild\r\n +run",
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["keyword", "callback"],
" Duck callback ",
["string", "\"Tooltip\""],
["keyword", "link"],
" Zebra ",
["string", "\"http://www.github.com\""],
["string", "\"This is a link\""],
["keyword", "classDiagram"],
["keyword", "class"], " Animal", ["operator", ":::"], "cssClass\r\n\r\n",
["keyword", "classDiagram"],
["keyword", "class"],
" Animal",
["operator", ":::"],
"cssClass ",
["punctuation", "{"],
"\r\n -int sizeInFeet\r\n -canEat",
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/mermaid/full_erdiagram.test
================================================
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
erDiagram
CUSTOMER ||--o{ ORDER : places
CUSTOMER {
string name
string custNumber
string sector
}
ORDER ||--|{ LINE-ITEM : contains
ORDER {
int orderNumber
string deliveryAddress
}
LINE-ITEM {
string productCode
int quantity
float pricePerUnit
}
PROPERTY ||--|{ ROOM : contains
CAR ||--o{ NAMED-DRIVER : allows
PERSON ||--o{ NAMED-DRIVER : is
erDiagram
CAR ||--o{ NAMED-DRIVER : allows
CAR {
string registrationNumber
string make
string model
}
PERSON ||--o{ NAMED-DRIVER : is
PERSON {
string firstName
string lastName
int age
}
erDiagram
CAR ||--o{ NAMED-DRIVER : allows
CAR {
string registrationNumber
string make
string model
}
PERSON ||--o{ NAMED-DRIVER : is
PERSON {
string firstName
string lastName
int age
}
----------------------------------------------------
[
["keyword", "erDiagram"],
"\r\n CUSTOMER ",
["arrow", "||--o{"],
" ORDER ",
["operator", ":"],
" places\r\n ORDER ",
["arrow", "||--|{"],
" LINE-ITEM ",
["operator", ":"],
" contains\r\n CUSTOMER ",
["arrow", "}|..|{"],
" DELIVERY-ADDRESS ",
["operator", ":"],
" uses\r\n\r\n",
["keyword", "erDiagram"],
"\r\n CUSTOMER ",
["arrow", "||--o{"],
" ORDER ",
["operator", ":"],
" places\r\n CUSTOMER ",
["punctuation", "{"],
"\r\n string name\r\n string custNumber\r\n string sector\r\n ",
["punctuation", "}"],
"\r\n ORDER ",
["arrow", "||--|{"],
" LINE-ITEM ",
["operator", ":"],
" contains\r\n ORDER ",
["punctuation", "{"],
"\r\n int orderNumber\r\n string deliveryAddress\r\n ",
["punctuation", "}"],
"\r\n LINE-ITEM ",
["punctuation", "{"],
"\r\n string productCode\r\n int quantity\r\n float pricePerUnit\r\n ",
["punctuation", "}"],
"\r\n\r\nPROPERTY ",
["arrow", "||--|{"],
" ROOM ",
["operator", ":"],
" contains\r\n\r\nCAR ",
["arrow", "||--o{"],
" NAMED-DRIVER ",
["operator", ":"],
" allows\r\n PERSON ",
["arrow", "||--o{"],
" NAMED-DRIVER ",
["operator", ":"],
" is\r\n\r\n",
["keyword", "erDiagram"],
"\r\n CAR ",
["arrow", "||--o{"],
" NAMED-DRIVER ",
["operator", ":"],
" allows\r\n CAR ",
["punctuation", "{"],
"\r\n string registrationNumber\r\n string make\r\n string model\r\n ",
["punctuation", "}"],
"\r\n PERSON ",
["arrow", "||--o{"],
" NAMED-DRIVER ",
["operator", ":"],
" is\r\n PERSON ",
["punctuation", "{"],
"\r\n string firstName\r\n string lastName\r\n int age\r\n ",
["punctuation", "}"],
["keyword", "erDiagram"],
"\r\n CAR ",
["arrow", "||--o{"],
" NAMED-DRIVER ",
["operator", ":"],
" allows\r\n CAR ",
["punctuation", "{"],
"\r\n string registrationNumber\r\n string make\r\n string model\r\n ",
["punctuation", "}"],
"\r\n PERSON ",
["arrow", "||--o{"],
" NAMED-DRIVER ",
["operator", ":"],
" is\r\n PERSON ",
["punctuation", "{"],
"\r\n string firstName\r\n string lastName\r\n int age\r\n ",
["punctuation", "}"]
]
================================================
FILE: tests/languages/mermaid/full_flowchart.test
================================================
flowchart LR
id
flowchart LR
id1[This is the text in the box]
flowchart TD
Start --> Stop
flowchart LR
Start --> Stop
flowchart LR
id1(This is the text in the box)
flowchart LR
id1([This is the text in the box])
flowchart LR
id1[[This is the text in the box]]
flowchart LR
id1[(Database)]
flowchart LR
id1((This is the text in the circle))
flowchart LR
id1>This is the text in the box]
flowchart LR
id1{This is the text in the box}
flowchart LR
id1{{This is the text in the box}}
flowchart TD
id1[/This is the text in the box/]
flowchart TD
id1[\This is the text in the box\]
flowchart TD
A[/Christmas\]
flowchart TD
B[\Go shopping/]
flowchart LR
A-->B
flowchart LR
A --- B
flowchart LR
A-- This is the text! ---B
flowchart LR
A---|This is the text|B
flowchart LR
A-->|text|B
flowchart LR
A-- text -->B
flowchart LR;
A-.->B;
flowchart LR
A-. text .-> B
flowchart LR
A ==> B
flowchart LR
A == text ==> B
flowchart LR
A -- text --> B -- text2 --> C
flowchart LR
a --> b & c--> d
flowchart TB
A & B--> C & D
flowchart TB
A --> C
A --> D
B --> C
B --> D
flowchart LR
A --o B
B --x C
flowchart LR
A o--o B
B <--> C
C x--x D
flowchart TD
A[Start] --> B{Is it?};
B -->|Yes| C[OK];
C --> D[Rethink];
D --> B;
B ---->|No| E[End];
flowchart TD
A[Start] --> B{Is it?};
B -- Yes --> C[OK];
C --> D[Rethink];
D --> B;
B -- No ----> E[End];
flowchart LR
id1["This is the (text) in the box"]
flowchart LR
A["A double quote:#quot;"] -->B["A dec char:#9829;"]
subgraph title
graph definition
end
flowchart TB
c1-->a2
subgraph one
a1-->a2
end
subgraph two
b1-->b2
end
subgraph three
c1-->c2
end
flowchart TB
c1-->a2
subgraph ide1 [one]
a1-->a2
end
flowchart TB
c1-->a2
subgraph one
a1-->a2
end
subgraph two
b1-->b2
end
subgraph three
c1-->c2
end
one --> two
three --> two
two --> c2
flowchart LR
subgraph TOP
direction TB
subgraph B1
direction RL
i1 -->f1
end
subgraph B2
direction BT
i2 -->f2
end
end
A --> TOP --> B
B1 --> B2
click nodeId callback
click nodeId call callback()
flowchart LR;
A-->B;
B-->C;
C-->D;
click A callback "Tooltip for a callback"
click B "http://www.github.com" "This is a tooltip for a link"
click A call callback() "Tooltip for a callback"
click B href "http://www.github.com" "This is a tooltip for a link"
flowchart LR;
A-->B;
B-->C;
C-->D;
D-->E;
click A "http://www.github.com" _blank
click B "http://www.github.com" "Open this in a new tab" _blank
click C href "http://www.github.com" _blank
click D href "http://www.github.com" "Open this in a new tab" _blank
flowchart LR
%% this is a comment A -- text --> B{node}
A -- text --> B -- text2 --> C
linkStyle 3 stroke:#ff3,stroke-width:4px,color:red;
flowchart LR
id1(Start)-->id2(Stop)
style id1 fill:#f9f,stroke:#333,stroke-width:4px
style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5
classDef className fill:#f9f,stroke:#333,stroke-width:4px;
class nodeId1 className;
class nodeId1,nodeId2 className;
flowchart LR
A:::someclass --> B
classDef someclass fill:#f96;
flowchart LR;
A-->B[AAABBB ];
B-->D;
class A cssClass;
classDef default fill:#f9f,stroke:#333,stroke-width:4px;
flowchart TD
B["fa:fa-twitter for peace"]
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner);
B-->E(A fa:fa-camera-retro perhaps?);
flowchart LR
A[Hard edge] -->|Link text| B(Round edge)
B --> C{Decision}
C -->|One| D[Result one]
C -->|Two| E[Result two]
flowchart LR;
A-->B;
B-->C;
C-->D;
click A callback "Tooltip"
click B "http://www.github.com" "This is a link"
click C call callback() "Tooltip"
click D href "http://www.github.com" "This is a link"
----------------------------------------------------
[
["keyword", "flowchart"], " LR\r\n id\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n id1",
["text", "[This is the text in the box]"],
["keyword", "flowchart"],
" TD\r\n Start ",
["arrow", "-->"],
" Stop\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n Start ",
["arrow", "-->"],
" Stop\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n id1",
["text", "(This is the text in the box)"],
["keyword", "flowchart"],
" LR\r\n id1",
["text", "([This is the text in the box])"],
["keyword", "flowchart"],
" LR\r\n id1",
["text", "[[This is the text in the box]]"],
["keyword", "flowchart"], " LR\r\n id1", ["text", "[(Database)]"],
["keyword", "flowchart"],
" LR\r\n id1",
["text", "((This is the text in the circle))"],
["keyword", "flowchart"],
" LR\r\n id1",
["text", ">This is the text in the box]"],
["keyword", "flowchart"],
" LR\r\n id1",
["text", "{This is the text in the box}"],
["keyword", "flowchart"],
" LR\r\n id1",
["text", "{{This is the text in the box}}"],
["keyword", "flowchart"],
" TD\r\n id1",
["text", "[/This is the text in the box/]"],
["keyword", "flowchart"],
" TD\r\n id1",
["text", "[\\This is the text in the box\\]"],
["keyword", "flowchart"], " TD\r\n A", ["text", "[/Christmas\\]"],
["keyword", "flowchart"], " TD\r\n B", ["text", "[\\Go shopping/]"],
["keyword", "flowchart"], " LR\r\n A", ["arrow", "-->"], "B\r\n\r\n",
["keyword", "flowchart"], " LR\r\n A ", ["arrow", "---"], " B\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n A",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "This is the text!"],
["arrow", "---"]
]],
"B\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n A",
["arrow", "---"],
["label", "|This is the text|"],
"B\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n A",
["arrow", "-->"],
["label", "|text|"],
"B\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n A",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "text"],
["arrow", "-->"]
]],
"B\r\n\r\n",
["keyword", "flowchart"], " LR", ["punctuation", ";"],
"\r\n A", ["arrow", "-.->"], "B", ["punctuation", ";"],
["keyword", "flowchart"],
" LR\r\n A",
["inter-arrow-label", [
["arrow-head", "-."],
["label", "text"],
["arrow", ".->"]
]],
" B\r\n\r\n",
["keyword", "flowchart"], " LR\r\n A ", ["arrow", "==>"], " B\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n A ",
["inter-arrow-label", [
["arrow-head", "=="],
["label", "text"],
["arrow", "==>"]
]],
" B\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n A ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "text"],
["arrow", "-->"]
]],
" B ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "text2"],
["arrow", "-->"]
]],
" C\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n a ",
["arrow", "-->"],
" b ",
["operator", "&"],
" c",
["arrow", "-->"],
" d\r\n\r\n",
["keyword", "flowchart"],
" TB\r\n A ",
["operator", "&"],
" B",
["arrow", "-->"],
" C ",
["operator", "&"],
" D\r\n\r\n",
["keyword", "flowchart"],
" TB\r\n A ",
["arrow", "-->"],
" C\r\n A ",
["arrow", "-->"],
" D\r\n B ",
["arrow", "-->"],
" C\r\n B ",
["arrow", "-->"],
" D\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n A ",
["arrow", "--o"],
" B\r\n B ",
["arrow", "--x"],
" C\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n A ",
["arrow", "o--o"],
" B\r\n B ",
["arrow", "<-->"],
" C\r\n C ",
["arrow", "x--x"],
" D\r\n\r\n",
["keyword", "flowchart"],
" TD\r\n A",
["text", "[Start]"],
["arrow", "-->"],
" B",
["text", "{Is it?}"],
["punctuation", ";"],
"\r\n B ",
["arrow", "-->"],
["label", "|Yes|"],
" C",
["text", "[OK]"],
["punctuation", ";"],
"\r\n C ",
["arrow", "-->"],
" D",
["text", "[Rethink]"],
["punctuation", ";"],
"\r\n D ",
["arrow", "-->"],
" B",
["punctuation", ";"],
"\r\n B ",
["arrow", "---->"],
["label", "|No|"],
" E",
["text", "[End]"],
["punctuation", ";"],
["keyword", "flowchart"],
" TD\r\n A",
["text", "[Start]"],
["arrow", "-->"],
" B",
["text", "{Is it?}"],
["punctuation", ";"],
"\r\n B ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "Yes"],
["arrow", "-->"]
]],
" C",
["text", "[OK]"],
["punctuation", ";"],
"\r\n C ",
["arrow", "-->"],
" D",
["text", "[Rethink]"],
["punctuation", ";"],
"\r\n D ",
["arrow", "-->"],
" B",
["punctuation", ";"],
"\r\n B ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "No"],
["arrow", "---->"]
]],
" E",
["text", "[End]"],
["punctuation", ";"],
["keyword", "flowchart"],
" LR\r\n id1",
["text", "[\"This is the (text) in the box\"]"],
["keyword", "flowchart"],
" LR\r\n A",
["text", "[\"A double quote:#quot;\"]"],
["arrow", "-->"],
"B",
["text", "[\"A dec char:#9829;\"]"],
["keyword", "subgraph"], " title\r\n ",
["keyword", "graph"], " definition\r\n",
["keyword", "end"],
["keyword", "flowchart"], " TB\r\n c1", ["arrow", "-->"], "a2\r\n ",
["keyword", "subgraph"], " one\r\n a1", ["arrow", "-->"], "a2\r\n ",
["keyword", "end"],
["keyword", "subgraph"], " two\r\n b1", ["arrow", "-->"], "b2\r\n ",
["keyword", "end"],
["keyword", "subgraph"], " three\r\n c1", ["arrow", "-->"], "c2\r\n ",
["keyword", "end"],
["keyword", "flowchart"], " TB\r\n c1", ["arrow", "-->"], "a2\r\n ",
["keyword", "subgraph"], " ide1 ", ["text", "[one]"],
"\r\n a1", ["arrow", "-->"], "a2\r\n ",
["keyword", "end"],
["keyword", "flowchart"],
" TB\r\n c1",
["arrow", "-->"],
"a2\r\n ",
["keyword", "subgraph"],
" one\r\n a1",
["arrow", "-->"],
"a2\r\n ",
["keyword", "end"],
["keyword", "subgraph"],
" two\r\n b1",
["arrow", "-->"],
"b2\r\n ",
["keyword", "end"],
["keyword", "subgraph"],
" three\r\n c1",
["arrow", "-->"],
"c2\r\n ",
["keyword", "end"],
"\r\n one ",
["arrow", "-->"],
" two\r\n three ",
["arrow", "-->"],
" two\r\n two ",
["arrow", "-->"],
" c2\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n ",
["keyword", "subgraph"],
" TOP\r\n ",
["keyword", "direction"],
" TB\r\n ",
["keyword", "subgraph"],
" B1\r\n ",
["keyword", "direction"],
" RL\r\n i1 ",
["arrow", "-->"],
"f1\r\n ",
["keyword", "end"],
["keyword", "subgraph"],
" B2\r\n ",
["keyword", "direction"],
" BT\r\n i2 ",
["arrow", "-->"],
"f2\r\n ",
["keyword", "end"],
["keyword", "end"],
"\r\n A ",
["arrow", "-->"],
" TOP ",
["arrow", "-->"],
" B\r\n B1 ",
["arrow", "-->"],
" B2\r\n\r\n",
["keyword", "click"],
" nodeId callback\r\n",
["keyword", "click"],
" nodeId call callback",
["punctuation", "("],
["punctuation", ")"],
["keyword", "flowchart"],
" LR",
["punctuation", ";"],
"\r\n A",
["arrow", "-->"],
"B",
["punctuation", ";"],
"\r\n B",
["arrow", "-->"],
"C",
["punctuation", ";"],
"\r\n C",
["arrow", "-->"],
"D",
["punctuation", ";"],
["keyword", "click"],
" A callback ",
["string", "\"Tooltip for a callback\""],
["keyword", "click"],
" B ",
["string", "\"http://www.github.com\""],
["string", "\"This is a tooltip for a link\""],
["keyword", "click"],
" A call callback",
["punctuation", "("],
["punctuation", ")"],
["string", "\"Tooltip for a callback\""],
["keyword", "click"],
" B href ",
["string", "\"http://www.github.com\""],
["string", "\"This is a tooltip for a link\""],
["keyword", "flowchart"],
" LR",
["punctuation", ";"],
"\r\n A",
["arrow", "-->"],
"B",
["punctuation", ";"],
"\r\n B",
["arrow", "-->"],
"C",
["punctuation", ";"],
"\r\n C",
["arrow", "-->"],
"D",
["punctuation", ";"],
"\r\n D",
["arrow", "-->"],
"E",
["punctuation", ";"],
["keyword", "click"],
" A ",
["string", "\"http://www.github.com\""],
" _blank\r\n ",
["keyword", "click"],
" B ",
["string", "\"http://www.github.com\""],
["string", "\"Open this in a new tab\""],
" _blank\r\n ",
["keyword", "click"],
" C href ",
["string", "\"http://www.github.com\""],
" _blank\r\n ",
["keyword", "click"],
" D href ",
["string", "\"http://www.github.com\""],
["string", "\"Open this in a new tab\""],
" _blank\r\n\r\n",
["keyword", "flowchart"],
" LR\r\n",
["comment", "%% this is a comment A -- text --> B{node}"],
"\r\n A ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "text"],
["arrow", "-->"]
]],
" B ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "text2"],
["arrow", "-->"]
]],
" C\r\n\r\n",
["keyword", "linkStyle"],
" 3 ",
["style", [
["property", "stroke"],
["operator", ":"],
"#ff3",
["punctuation", ","],
["property", "stroke-width"],
["operator", ":"],
"4px",
["punctuation", ","],
["property", "color"],
["operator", ":"],
"red"
]],
["punctuation", ";"],
["keyword", "flowchart"],
" LR\r\n id1",
["text", "(Start)"],
["arrow", "-->"],
"id2",
["text", "(Stop)"],
["keyword", "style"],
" id1 ",
["style", [
["property", "fill"],
["operator", ":"],
"#f9f",
["punctuation", ","],
["property", "stroke"],
["operator", ":"],
"#333",
["punctuation", ","],
["property", "stroke-width"],
["operator", ":"],
"4px"
]],
["keyword", "style"],
" id2 ",
["style", [
["property", "fill"],
["operator", ":"],
"#bbf",
["punctuation", ","],
["property", "stroke"],
["operator", ":"],
"#f66",
["punctuation", ","],
["property", "stroke-width"],
["operator", ":"],
"2px",
["punctuation", ","],
["property", "color"],
["operator", ":"],
"#fff",
["punctuation", ","],
["property", "stroke-dasharray"],
["operator", ":"],
" 5 5"
]],
["keyword", "classDef"],
" className ",
["style", [
["property", "fill"],
["operator", ":"],
"#f9f",
["punctuation", ","],
["property", "stroke"],
["operator", ":"],
"#333",
["punctuation", ","],
["property", "stroke-width"],
["operator", ":"],
"4px"
]],
["punctuation", ";"],
["keyword", "class"], " nodeId1 className", ["punctuation", ";"],
["keyword", "class"], " nodeId1,nodeId2 className", ["punctuation", ";"],
["keyword", "flowchart"],
" LR\r\n A",
["operator", ":::"],
"someclass ",
["arrow", "-->"],
" B\r\n ",
["keyword", "classDef"],
" someclass ",
["style", [
["property", "fill"],
["operator", ":"],
"#f96"
]],
["punctuation", ";"],
["keyword", "flowchart"],
" LR",
["punctuation", ";"],
"\r\n A",
["arrow", "-->"],
"B",
["text", "[AAABBB ]"],
["punctuation", ";"],
"\r\n B",
["arrow", "-->"],
"D",
["punctuation", ";"],
["keyword", "class"],
" A cssClass",
["punctuation", ";"],
["keyword", "classDef"],
" default ",
["style", [
["property", "fill"],
["operator", ":"],
"#f9f",
["punctuation", ","],
["property", "stroke"],
["operator", ":"],
"#333",
["punctuation", ","],
["property", "stroke-width"],
["operator", ":"],
"4px"
]],
["punctuation", ";"],
["keyword", "flowchart"],
" TD\r\n B",
["text", "[\"fa:fa-twitter for peace\"]"],
"\r\n B",
["arrow", "-->"],
"C",
["text", "[fa:fa-ban forbidden]"],
"\r\n B",
["arrow", "-->"],
"D",
["text", "(fa:fa-spinner)"],
["punctuation", ";"],
"\r\n B",
["arrow", "-->"],
"E",
["text", "(A fa:fa-camera-retro perhaps?)"],
["punctuation", ";"],
["keyword", "flowchart"],
" LR\r\n A",
["text", "[Hard edge]"],
["arrow", "-->"],
["label", "|Link text|"],
" B",
["text", "(Round edge)"],
"\r\n B ",
["arrow", "-->"],
" C",
["text", "{Decision}"],
"\r\n C ",
["arrow", "-->"],
["label", "|One|"],
" D",
["text", "[Result one]"],
"\r\n C ",
["arrow", "-->"],
["label", "|Two|"],
" E",
["text", "[Result two]"],
["keyword", "flowchart"],
" LR",
["punctuation", ";"],
"\r\n A",
["arrow", "-->"],
"B",
["punctuation", ";"],
"\r\n B",
["arrow", "-->"],
"C",
["punctuation", ";"],
"\r\n C",
["arrow", "-->"],
"D",
["punctuation", ";"],
["keyword", "click"],
" A callback ",
["string", "\"Tooltip\""],
["keyword", "click"],
" B ",
["string", "\"http://www.github.com\""],
["string", "\"This is a link\""],
["keyword", "click"],
" C call callback",
["punctuation", "("],
["punctuation", ")"],
["string", "\"Tooltip\""],
["keyword", "click"],
" D href ",
["string", "\"http://www.github.com\""],
["string", "\"This is a link\""]
]
================================================
FILE: tests/languages/mermaid/full_sequencediagram.test
================================================
sequenceDiagram
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
Alice-)John: See you later!
sequenceDiagram
participant John
participant Alice
Alice->>John: Hello John, how are you?
John-->>Alice: Great!
sequenceDiagram
participant A as Alice
participant J as John
A->>J: Hello John, how are you?
J->>A: Great!
[Actor][Arrow][Actor]:Message text
sequenceDiagram
Alice->>John: Hello John, how are you?
activate John
John-->>Alice: Great!
deactivate John
sequenceDiagram
Alice->>+John: Hello John, how are you?
John-->>-Alice: Great!
sequenceDiagram
Alice->>+John: Hello John, how are you?
Alice->>+John: John, can you hear me?
John-->>-Alice: Hi Alice, I can hear you!
John-->>-Alice: I feel great!
sequenceDiagram
participant John
Note right of John: Text in note
sequenceDiagram
Alice->John: Hello John, how are you?
Note over Alice,John: A typical interaction
loop Loop text
... statements ...
end
sequenceDiagram
Alice->John: Hello John, how are you?
loop Every minute
John-->Alice: Great!
end
alt Describing text
... statements ...
else
... statements ...
end
opt Describing text
... statements ...
end
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
par [Action 1]
... statements ...
and [Action 2]
... statements ...
and [Action N]
... statements ...
end
rect rgb(0, 255, 0)
... content ...
end
rect rgba(0, 0, 255, .1)
... content ...
end
sequenceDiagram
Alice->>John: Hello John, how are you?
%% this is a comment
John-->>Alice: Great!
sequenceDiagram
A->>B: I #9829; you!
B->>A: I #9829; you #infin; times more!
sequenceDiagram
autonumber
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
----------------------------------------------------
[
["keyword", "sequenceDiagram"],
"\r\n Alice",
["arrow", "->>"],
"John",
["operator", ":"],
" Hello John, how are you?\r\n John",
["arrow", "-->>"],
"Alice",
["operator", ":"],
" Great!\r\n Alice",
["arrow", "-)"],
"John",
["operator", ":"],
" See you later!\r\n\r\n",
["keyword", "sequenceDiagram"],
["keyword", "participant"],
" John\r\n ",
["keyword", "participant"],
" Alice\r\n Alice",
["arrow", "->>"],
"John",
["operator", ":"],
" Hello John, how are you?\r\n John",
["arrow", "-->>"],
"Alice",
["operator", ":"],
" Great!\r\n\r\n",
["keyword", "sequenceDiagram"],
["keyword", "participant"],
" A as Alice\r\n ",
["keyword", "participant"],
" J as John\r\n A",
["arrow", "->>"],
"J",
["operator", ":"],
" Hello John, how are you?\r\n J",
["arrow", "->>"],
"A",
["operator", ":"],
" Great!\r\n\r\n",
["text", "[Actor]"],
["text", "[Arrow]"],
["text", "[Actor]"],
["operator", ":"],
"Message text\r\n\r\n",
["keyword", "sequenceDiagram"],
"\r\n Alice",
["arrow", "->>"],
"John",
["operator", ":"],
" Hello John, how are you?\r\n ",
["keyword", "activate"],
" John\r\n John",
["arrow", "-->>"],
"Alice",
["operator", ":"],
" Great!\r\n ",
["keyword", "deactivate"],
" John\r\n\r\n",
["keyword", "sequenceDiagram"],
"\r\n Alice",
["arrow", "->>"],
"+John",
["operator", ":"],
" Hello John, how are you?\r\n John",
["arrow", "-->>"],
"-Alice",
["operator", ":"],
" Great!\r\n\r\n",
["keyword", "sequenceDiagram"],
"\r\n Alice",
["arrow", "->>"],
"+John",
["operator", ":"],
" Hello John, how are you?\r\n Alice",
["arrow", "->>"],
"+John",
["operator", ":"],
" John, can you hear me?\r\n John",
["arrow", "-->>"],
"-Alice",
["operator", ":"],
" Hi Alice, I can hear you!\r\n John",
["arrow", "-->>"],
"-Alice",
["operator", ":"],
" I feel great!\r\n\r\n",
["keyword", "sequenceDiagram"],
["keyword", "participant"],
" John\r\n ",
["keyword", "Note right of"],
" John",
["operator", ":"],
" Text in note\r\n\r\n",
["keyword", "sequenceDiagram"],
"\r\n Alice",
["arrow", "->"],
"John",
["operator", ":"],
" Hello John, how are you?\r\n ",
["keyword", "Note over"],
" Alice,John",
["operator", ":"],
" A typical interaction\r\n\r\n",
["keyword", "loop"], " Loop text\r\n... statements ...\r\n",
["keyword", "end"],
["keyword", "sequenceDiagram"],
"\r\n Alice",
["arrow", "->"],
"John",
["operator", ":"],
" Hello John, how are you?\r\n ",
["keyword", "loop"],
" Every minute\r\n John",
["arrow", "-->"],
"Alice",
["operator", ":"],
" Great!\r\n ",
["keyword", "end"],
["keyword", "alt"], " Describing text\r\n... statements ...\r\n",
["keyword", "else"],
"\r\n... statements ...\r\n",
["keyword", "end"],
["keyword", "opt"], " Describing text\r\n... statements ...\r\n",
["keyword", "end"],
["keyword", "sequenceDiagram"],
"\r\n Alice",
["arrow", "->>"],
"Bob",
["operator", ":"],
" Hello Bob, how are you?\r\n ",
["keyword", "alt"],
" is sick\r\n Bob",
["arrow", "->>"],
"Alice",
["operator", ":"],
" Not so good ",
["operator", ":"],
["punctuation", "("],
["keyword", "else"],
" is well\r\n Bob",
["arrow", "->>"],
"Alice",
["operator", ":"],
" Feeling fresh like a daisy\r\n ",
["keyword", "end"],
["keyword", "opt"],
" Extra response\r\n Bob",
["arrow", "->>"],
"Alice",
["operator", ":"],
" Thanks for asking\r\n ",
["keyword", "end"],
["keyword", "par"], ["text", "[Action 1]"],
"\r\n... statements ...\r\n",
["keyword", "and"], ["text", "[Action 2]"],
"\r\n... statements ...\r\n",
["keyword", "and"], ["text", "[Action N]"],
"\r\n... statements ...\r\n",
["keyword", "end"],
["keyword", "rect"], " rgb", ["text", "(0, 255, 0)"],
"\r\n... content ...\r\n",
["keyword", "end"],
["keyword", "rect"], " rgba", ["text", "(0, 0, 255, .1)"],
"\r\n... content ...\r\n",
["keyword", "end"],
["keyword", "sequenceDiagram"],
"\r\n Alice",
["arrow", "->>"],
"John",
["operator", ":"],
" Hello John, how are you?\r\n ",
["comment", "%% this is a comment"],
"\r\n John",
["arrow", "-->>"],
"Alice",
["operator", ":"],
" Great!\r\n\r\n",
["keyword", "sequenceDiagram"],
"\r\n A",
["arrow", "->>"],
"B",
["operator", ":"],
" I ",
["entity", "#9829;"],
" you!\r\n B",
["arrow", "->>"],
"A",
["operator", ":"],
" I ",
["entity", "#9829;"],
" you ",
["entity", "#infin;"],
" times more!\r\n\r\n",
["keyword", "sequenceDiagram"],
["keyword", "autonumber"],
"\r\n Alice",
["arrow", "->>"],
"John",
["operator", ":"],
" Hello John, how are you?\r\n ",
["keyword", "loop"],
" Healthcheck\r\n John",
["arrow", "->>"],
"John",
["operator", ":"],
" Fight against hypochondria\r\n ",
["keyword", "end"],
["keyword", "Note right of"],
" John",
["operator", ":"],
" Rational thoughts!\r\n John",
["arrow", "-->>"],
"Alice",
["operator", ":"],
" Great!\r\n John",
["arrow", "->>"],
"Bob",
["operator", ":"],
" How about you?\r\n Bob",
["arrow", "-->>"],
"John",
["operator", ":"],
" Jolly good!"
]
================================================
FILE: tests/languages/mermaid/full_statediagram.test
================================================
stateDiagram-v2
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
stateDiagram-v2
s1 --> s2
stateDiagram-v2
s1 --> s2: A transition
stateDiagram-v2
[*] --> s1
s1 --> [*]
stateDiagram-v2
[*] --> First
state First {
[*] --> second
second --> [*]
}
stateDiagram-v2
[*] --> First
state First {
[*] --> Second
state Second {
[*] --> second
second --> Third
state Third {
[*] --> third
third --> [*]
}
}
}
stateDiagram-v2
[*] --> First
First --> Second
First --> Third
state First {
[*] --> fir
fir --> [*]
}
state Second {
[*] --> sec
sec --> [*]
}
state Third {
[*] --> thi
thi --> [*]
}
stateDiagram-v2
state if_state <>
[*] --> IsPositive
IsPositive --> if_state
if_state --> False: if n < 0
if_state --> True : if n >= 0
stateDiagram-v2
state fork_state <>
[*] --> fork_state
fork_state --> State2
fork_state --> State3
state join_state <>
State2 --> join_state
State3 --> join_state
join_state --> State4
State4 --> [*]
stateDiagram-v2
State1: The state with a note
note right of State1
Important information! You can write
notes.
end note
State1 --> State2
note left of State2 : This is the note to the left.
stateDiagram-v2
[*] --> Active
state Active {
[*] --> NumLockOff
NumLockOff --> NumLockOn : EvNumLockPressed
NumLockOn --> NumLockOff : EvNumLockPressed
--
[*] --> CapsLockOff
CapsLockOff --> CapsLockOn : EvCapsLockPressed
CapsLockOn --> CapsLockOff : EvCapsLockPressed
--
[*] --> ScrollLockOff
ScrollLockOff --> ScrollLockOn : EvScrollLockPressed
ScrollLockOn --> ScrollLockOff : EvScrollLockPressed
}
stateDiagram
direction LR
[*] --> A
A --> B
B --> C
state B {
direction LR
a --> b
}
B --> D
stateDiagram-v2
[*] --> Still
Still --> [*]
%% this is a comment
Still --> Moving
Moving --> Still %% another comment
Moving --> Crash
Crash --> [*]
----------------------------------------------------
[
["keyword", "stateDiagram-v2"],
["text", "[*]"],
["arrow", "-->"],
" Still\r\n Still ",
["arrow", "-->"],
["text", "[*]"],
"\r\n\r\n Still ",
["arrow", "-->"],
" Moving\r\n Moving ",
["arrow", "-->"],
" Still\r\n Moving ",
["arrow", "-->"],
" Crash\r\n Crash ",
["arrow", "-->"],
["text", "[*]"],
["keyword", "stateDiagram-v2"],
"\r\n s1 ", ["arrow", "-->"], " s2\r\n\r\n",
["keyword", "stateDiagram-v2"],
"\r\n s1 ",
["arrow", "-->"],
" s2",
["operator", ":"],
" A transition\r\n\r\n",
["keyword", "stateDiagram-v2"],
["text", "[*]"],
["arrow", "-->"],
" s1\r\n s1 ",
["arrow", "-->"],
["text", "[*]"],
["keyword", "stateDiagram-v2"],
["text", "[*]"],
["arrow", "-->"],
" First\r\n ",
["keyword", "state"],
" First ",
["punctuation", "{"],
["text", "[*]"],
["arrow", "-->"],
" second\r\n second ",
["arrow", "-->"],
["text", "[*]"],
["punctuation", "}"],
["keyword", "stateDiagram-v2"],
["text", "[*]"], ["arrow", "-->"], " First\r\n\r\n ",
["keyword", "state"], " First ", ["punctuation", "{"],
["text", "[*]"], ["arrow", "-->"], " Second\r\n\r\n ",
["keyword", "state"],
" Second ",
["punctuation", "{"],
["text", "[*]"],
["arrow", "-->"],
" second\r\n second ",
["arrow", "-->"],
" Third\r\n\r\n ",
["keyword", "state"],
" Third ",
["punctuation", "{"],
["text", "[*]"],
["arrow", "-->"],
" third\r\n third ",
["arrow", "-->"],
["text", "[*]"],
["punctuation", "}"],
["punctuation", "}"],
["punctuation", "}"],
["keyword", "stateDiagram-v2"],
["text", "[*]"],
["arrow", "-->"],
" First\r\n First ",
["arrow", "-->"],
" Second\r\n First ",
["arrow", "-->"],
" Third\r\n\r\n ",
["keyword", "state"],
" First ",
["punctuation", "{"],
["text", "[*]"],
["arrow", "-->"],
" fir\r\n fir ",
["arrow", "-->"],
["text", "[*]"],
["punctuation", "}"],
["keyword", "state"],
" Second ",
["punctuation", "{"],
["text", "[*]"],
["arrow", "-->"],
" sec\r\n sec ",
["arrow", "-->"],
["text", "[*]"],
["punctuation", "}"],
["keyword", "state"],
" Third ",
["punctuation", "{"],
["text", "[*]"],
["arrow", "-->"],
" thi\r\n thi ",
["arrow", "-->"],
["text", "[*]"],
["punctuation", "}"],
["keyword", "stateDiagram-v2"],
["keyword", "state"],
" if_state ",
["annotation", "<>"],
["text", "[*]"],
["arrow", "-->"],
" IsPositive\r\n IsPositive ",
["arrow", "-->"],
" if_state\r\n if_state ",
["arrow", "-->"],
" False",
["operator", ":"],
" if n < 0\r\n if_state ",
["arrow", "-->"],
" True ",
["operator", ":"],
" if n >= 0\r\n\r\n",
["keyword", "stateDiagram-v2"],
["keyword", "state"],
" fork_state ",
["annotation", "<>"],
["text", "[*]"],
["arrow", "-->"],
" fork_state\r\n fork_state ",
["arrow", "-->"],
" State2\r\n fork_state ",
["arrow", "-->"],
" State3\r\n\r\n ",
["keyword", "state"],
" join_state ",
["annotation", "<>"],
"\r\n State2 ",
["arrow", "-->"],
" join_state\r\n State3 ",
["arrow", "-->"],
" join_state\r\n join_state ",
["arrow", "-->"],
" State4\r\n State4 ",
["arrow", "-->"],
["text", "[*]"],
["keyword", "stateDiagram-v2"],
"\r\n State1",
["operator", ":"],
" The state with a note\r\n ",
["keyword", "note right of"],
" State1\r\n Important information! You can write\r\n notes.\r\n ",
["keyword", "end note"],
"\r\n State1 ",
["arrow", "-->"],
" State2\r\n ",
["keyword", "note left of"],
" State2 ",
["operator", ":"],
" This is the note to the left.\r\n\r\n",
["keyword", "stateDiagram-v2"],
["text", "[*]"], ["arrow", "-->"], " Active\r\n\r\n ",
["keyword", "state"],
" Active ",
["punctuation", "{"],
["text", "[*]"],
["arrow", "-->"],
" NumLockOff\r\n NumLockOff ",
["arrow", "-->"],
" NumLockOn ",
["operator", ":"],
" EvNumLockPressed\r\n NumLockOn ",
["arrow", "-->"],
" NumLockOff ",
["operator", ":"],
" EvNumLockPressed\r\n ",
["arrow", "--"],
["text", "[*]"],
["arrow", "-->"],
" CapsLockOff\r\n CapsLockOff ",
["arrow", "-->"],
" CapsLockOn ",
["operator", ":"],
" EvCapsLockPressed\r\n CapsLockOn ",
["arrow", "-->"],
" CapsLockOff ",
["operator", ":"],
" EvCapsLockPressed\r\n ",
["arrow", "--"],
["text", "[*]"],
["arrow", "-->"],
" ScrollLockOff\r\n ScrollLockOff ",
["arrow", "-->"],
" ScrollLockOn ",
["operator", ":"],
" EvScrollLockPressed\r\n ScrollLockOn ",
["arrow", "-->"],
" ScrollLockOff ",
["operator", ":"],
" EvScrollLockPressed\r\n ",
["punctuation", "}"],
["keyword", "stateDiagram"],
["keyword", "direction"],
" LR\r\n ",
["text", "[*]"],
["arrow", "-->"],
" A\r\n A ",
["arrow", "-->"],
" B\r\n B ",
["arrow", "-->"],
" C\r\n ",
["keyword", "state"],
" B ",
["punctuation", "{"],
["keyword", "direction"],
" LR\r\n a ",
["arrow", "-->"],
" b\r\n ",
["punctuation", "}"],
"\r\n B ",
["arrow", "-->"],
" D\r\n\r\n",
["keyword", "stateDiagram-v2"],
["text", "[*]"],
["arrow", "-->"],
" Still\r\n Still ",
["arrow", "-->"],
["text", "[*]"],
["comment", "%% this is a comment"],
"\r\n Still ",
["arrow", "-->"],
" Moving\r\n Moving ",
["arrow", "-->"],
" Still ",
["comment", "%% another comment"],
"\r\n Moving ",
["arrow", "-->"],
" Crash\r\n Crash ",
["arrow", "-->"],
["text", "[*]"]
]
================================================
FILE: tests/languages/mermaid/inter-arrow-label_feature.test
================================================
A -.s .- C
A -. s .- C
A -. "asdasd" .- C
A -- "asdasd" --> C
A -- "asdasd" --> C
A -- "asdasd" .- C
A -- "asdasd" === C
A -- "asdasd" ==> C
----------------------------------------------------
[
"A ",
["inter-arrow-label", [
["arrow-head", "-."],
["label", "s"],
["arrow", ".-"]
]],
" C\r\nA ",
["inter-arrow-label", [
["arrow-head", "-."],
["label", "s"],
["arrow", ".-"]
]],
" C\r\nA ",
["inter-arrow-label", [
["arrow-head", "-."],
["label", "\"asdasd\""],
["arrow", ".-"]
]],
" C\r\nA ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "\"asdasd\""],
["arrow", "-->"]
]],
" C\r\nA ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "\"asdasd\""],
["arrow", "-->"]
]],
" C\r\nA ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "\"asdasd\""],
["arrow", ".-"]
]],
" C\r\nA ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "\"asdasd\""],
["arrow", "==="]
]],
" C\r\nA ",
["inter-arrow-label", [
["arrow-head", "--"],
["label", "\"asdasd\""],
["arrow", "==>"]
]],
" C"
]
================================================
FILE: tests/languages/mermaid/operator_feature.test
================================================
A & B
: :::
----------------------------------------------------
[
"A ", ["operator", "&"], " B\r\n\r\n",
["operator", ":"], ["operator", ":::"]
]
================================================
FILE: tests/languages/metafont/boolean_feature.test
================================================
true false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/metafont/command_feature.test
================================================
addto
batchmode
charlist cull
display
errhelp errmessage errorstopmode everyjob extensible
fontdimen
headerbyte
inner interim
let ligtable
message
newinternal nonstopmode numspecial
openwindow outer
randomseed
save scrollmode show showdependencies showstats showtoken showvariable shipout special
----------------------------------------------------
[
["command", "addto"],
["command", "batchmode"],
["command", "charlist"],
["command", "cull"],
["command", "display"],
["command", "errhelp"],
["command", "errmessage"],
["command", "errorstopmode"],
["command", "everyjob"],
["command", "extensible"],
["command", "fontdimen"],
["command", "headerbyte"],
["command", "inner"],
["command", "interim"],
["command", "let"],
["command", "ligtable"],
["command", "message"],
["command", "newinternal"],
["command", "nonstopmode"],
["command", "numspecial"],
["command", "openwindow"],
["command", "outer"],
["command", "randomseed"],
["command", "save"],
["command", "scrollmode"],
["command", "show"],
["command", "showdependencies"],
["command", "showstats"],
["command", "showtoken"],
["command", "showvariable"],
["command", "shipout"],
["command", "special"]
]
----------------------------------------------------
Checks for commands.
================================================
FILE: tests/languages/metafont/constant_feature.test
================================================
% Length constants
bp cc cm dd in mm pc pt
% Pair constants
down left origin right up
% Numeric constants
eps epsilon infinity _ % _ is -1, as per Knuth: "internal constant to make macros unreadable but shorter"
% Path constants
fullcircle halfcircle quartercircle unitsquare
% Pen constant
nullpen penrazor penspeck pensquare penstroke
% Picture constants
blankpicture nullpicture unitpixel
% String constant
ditto
% Transform constant
identity
% Other constants
proof relax smoke \ \\ ???
----------------------------------------------------
[
["comment", "% Length constants"],
["constant", "bp"],
["constant", "cc"],
["constant", "cm"],
["constant", "dd"],
["constant", "in"],
["constant", "mm"],
["constant", "pc"],
["constant", "pt"],
["comment", "% Pair constants"],
["constant", "down"],
["constant", "left"],
["constant", "origin"],
["constant", "right"],
["constant", "up"],
["comment", "% Numeric constants"],
["constant", "eps"],
["constant", "epsilon"],
["constant", "infinity"],
["constant", "_"],
["comment", "% _ is -1, as per Knuth: \"internal constant to make macros unreadable but shorter\""],
["comment", "% Path constants"],
["constant", "fullcircle"],
["constant", "halfcircle"],
["constant", "quartercircle"],
["constant", "unitsquare"],
["comment", "% Pen constant"],
["constant", "nullpen"],
["constant", "penrazor"],
["constant", "penspeck"],
["constant", "pensquare"],
["constant", "penstroke"],
["comment", "% Picture constants"],
["constant", "blankpicture"],
["constant", "nullpicture"],
["constant", "unitpixel"],
["comment", "% String constant"],
["constant", "ditto"],
["comment", "% Transform constant"],
["constant", "identity"],
["comment", "% Other constants"],
["constant", "proof"],
["constant", "relax"],
["constant", "smoke"],
["constant", "\\"],
["constant", "\\\\"],
["constant", "???"]
]
----------------------------------------------------
Checks for constants best not to be redefined.
================================================
FILE: tests/languages/metafont/internal_quantity_feature.test
================================================
autorounding
boundarychar
charcode chardp chardx chardy charext charht charic charwd
day designsize
fillin fontmaking
granularity
hppp
month
pausing proofing
showstopping smoothing
time tracingcapsules tracingchoices tracingcommands tracingedges tracingequations tracingmacros tracingonline tracingoutput tracingpens tracingrestores tracingspecs tracingstats tracingtitles turningcheck
vppp
warningcheck
xoffset
year yoffset
% From PlainMETAFONT
blacker currentwindow displaying join_radius o_correction pen_bot pen_lft pen_rt pen_top pixels_per_inch tolerance
----------------------------------------------------
[
["quantity", "autorounding"],
["quantity", "boundarychar"],
["quantity", "charcode"],
["quantity", "chardp"],
["quantity", "chardx"],
["quantity", "chardy"],
["quantity", "charext"],
["quantity", "charht"],
["quantity", "charic"],
["quantity", "charwd"],
["quantity", "day"],
["quantity", "designsize"],
["quantity", "fillin"],
["quantity", "fontmaking"],
["quantity", "granularity"],
["quantity", "hppp"],
["quantity", "month"],
["quantity", "pausing"],
["quantity", "proofing"],
["quantity", "showstopping"],
["quantity", "smoothing"],
["quantity", "time"],
["quantity", "tracingcapsules"],
["quantity", "tracingchoices"],
["quantity", "tracingcommands"],
["quantity", "tracingedges"],
["quantity", "tracingequations"],
["quantity", "tracingmacros"],
["quantity", "tracingonline"],
["quantity", "tracingoutput"],
["quantity", "tracingpens"],
["quantity", "tracingrestores"],
["quantity", "tracingspecs"],
["quantity", "tracingstats"],
["quantity", "tracingtitles"],
["quantity", "turningcheck"],
["quantity", "vppp"],
["quantity", "warningcheck"],
["quantity", "xoffset"],
["quantity", "year"],
["quantity", "yoffset"],
["comment", "% From PlainMETAFONT"],
["quantity", "blacker"],
["quantity", "currentwindow"],
["quantity", "displaying"],
["quantity", "join_radius"],
["quantity", "o_correction"],
["quantity", "pen_bot"],
["quantity", "pen_lft"],
["quantity", "pen_rt"],
["quantity", "pen_top"],
["quantity", "pixels_per_inch"],
["quantity", "tolerance"]
]
----------------------------------------------------
Checks for internal quantities.
================================================
FILE: tests/languages/metafont/keywords_feature.test
================================================
also at atleast
begingroup
charexists contour controls curl cycle
def delimiters doublepath dropping dump
else elseif end enddef endfor endgroup endinput exitif exitunless expandafter
fi for forever forsuffixes from
if input inwindow
keeping kern
of
primarydef
quote
readstring
scaled scantokens secondarydef shifted skipto slanted step
tension tertiarydef to transformed
until
vardef
withpen withweight
xscaled
yscaled
zscaled
----------------------------------------------------
[
["keyword", "also"],
["keyword", "at"],
["keyword", "atleast"],
["keyword", "begingroup"],
["keyword", "charexists"],
["keyword", "contour"],
["keyword", "controls"],
["keyword", "curl"],
["keyword", "cycle"],
["keyword", "def"],
["keyword", "delimiters"],
["keyword", "doublepath"],
["keyword", "dropping"],
["keyword", "dump"],
["keyword", "else"],
["keyword", "elseif"],
["keyword", "end"],
["keyword", "enddef"],
["keyword", "endfor"],
["keyword", "endgroup"],
["keyword", "endinput"],
["keyword", "exitif"],
["keyword", "exitunless"],
["keyword", "expandafter"],
["keyword", "fi"],
["keyword", "for"],
["keyword", "forever"],
["keyword", "forsuffixes"],
["keyword", "from"],
["keyword", "if"],
["keyword", "input"],
["keyword", "inwindow"],
["keyword", "keeping"],
["keyword", "kern"],
["keyword", "of"],
["keyword", "primarydef"],
["keyword", "quote"],
["keyword", "readstring"],
["keyword", "scaled"],
["keyword", "scantokens"],
["keyword", "secondarydef"],
["keyword", "shifted"],
["keyword", "skipto"],
["keyword", "slanted"],
["keyword", "step"],
["keyword", "tension"],
["keyword", "tertiarydef"],
["keyword", "to"],
["keyword", "transformed"],
["keyword", "until"],
["keyword", "vardef"],
["keyword", "withpen"],
["keyword", "withweight"],
["keyword", "xscaled"],
["keyword", "yscaled"],
["keyword", "zscaled"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/metafont/macro_feature.test
================================================
beginchar cullit decr define_pixels div draw downto endchar fill flex incr max min mod mode_setup penlabels penpos shipit showit upto
----------------------------------------------------
[
["macro", "beginchar"],
["macro", "cullit"],
["macro", "decr"],
["macro", "define_pixels"],
["macro", "div"],
["macro", "draw"],
["macro", "downto"],
["macro", "endchar"],
["macro", "fill"],
["macro", "flex"],
["macro", "incr"],
["macro", "max"],
["macro", "min"],
["macro", "mod"],
["macro", "mode_setup"],
["macro", "penlabels"],
["macro", "penpos"],
["macro", "shipit"],
["macro", "showit"],
["macro", "upto"]
]
----------------------------------------------------
Checks for a few important macros.
================================================
FILE: tests/languages/metafont/number_feature.test
================================================
42
3.14
.34
----------------------------------------------------
[
["number", "42"],
["number", "3.14"],
["number", ".34"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/metafont/operator_feature.test
================================================
: :=
% Boolean operators
and or not <>
% Numeric operators
< <= >= > = <>
* ** / + - ++ +-+
% Path operators
& .. ... -- ---
% String operators
& < <= >= > = <>
% Ligature operators
=: :: |=: |=:> =:| =:|> |=:| |=:|> |=:|>> ||:
----------------------------------------------------
[
["operator", ":"],
["operator", ":="],
["comment", "% Boolean operators"],
["operator", "and"],
["operator", "or"],
["operator", "not"],
["operator", "<>"],
["comment", "% Numeric operators"],
["operator", "<"],
["operator", "<="],
["operator", ">="],
["operator", ">"],
["operator", "="],
["operator", "<>"],
["operator", "*"],
["operator", "**"],
["operator", "/"],
["operator", "+"],
["operator", "-"],
["operator", "++"],
["operator", "+-+"],
["comment", "% Path operators"],
["operator", "&"],
["operator", ".."],
["operator", "..."],
["operator", "--"],
["operator", "---"],
["comment", "% String operators"],
["operator", "&"],
["operator", "<"],
["operator", "<="],
["operator", ">="],
["operator", ">"],
["operator", "="],
["operator", "<>"],
["comment", "% Ligature operators"],
["operator", "=:"],
["operator", "::"],
["operator", "|=:"],
["operator", "|=:>"],
["operator", "=:|"],
["operator", "=:|>"],
["operator", "|=:|"],
["operator", "|=:|>"],
["operator", "|=:|>>"],
["operator", "||:"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/metafont/ponctuation_feature.test
================================================
{ }
% Loners
,;()
[]
----------------------------------------------------
[
["punctuation", "{"], ["punctuation", "}"],
["comment", "% Loners"],
["punctuation", ","],
["punctuation", ";"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"]
]
----------------------------------------------------
Checks for punctuation and delimiters.
================================================
FILE: tests/languages/metafont/primitive_feature.test
================================================
ASCII
angle
char cosd
decimal directiontime
floor
hex
intersectiontimes
jobname
known
length
makepath makepen mexp mlog
normaldeviate
oct odd
pencircle penoffset point postcontrol precontrol
reverse rotated
sind sqrt str subpath substring
totalweight turningnumber
uniformdeviate unknown
xpart xxpart xypart
ypart yxpart yypart
----------------------------------------------------
[
["builtin", "ASCII"],
["builtin", "angle"],
["builtin", "char"],
["builtin", "cosd"],
["builtin", "decimal"],
["builtin", "directiontime"],
["builtin", "floor"],
["builtin", "hex"],
["builtin", "intersectiontimes"],
["builtin", "jobname"],
["builtin", "known"],
["builtin", "length"],
["builtin", "makepath"],
["builtin", "makepen"],
["builtin", "mexp"],
["builtin", "mlog"],
["builtin", "normaldeviate"],
["builtin", "oct"],
["builtin", "odd"],
["builtin", "pencircle"],
["builtin", "penoffset"],
["builtin", "point"],
["builtin", "postcontrol"],
["builtin", "precontrol"],
["builtin", "reverse"],
["builtin", "rotated"],
["builtin", "sind"],
["builtin", "sqrt"],
["builtin", "str"],
["builtin", "subpath"],
["builtin", "substring"],
["builtin", "totalweight"],
["builtin", "turningnumber"],
["builtin", "uniformdeviate"],
["builtin", "unknown"],
["builtin", "xpart"],
["builtin", "xxpart"],
["builtin", "xypart"],
["builtin", "ypart"],
["builtin", "yxpart"],
["builtin", "yypart"]
]
----------------------------------------------------
Checks for primitive METAFONT operations.
================================================
FILE: tests/languages/metafont/string_and_comment_feature.test
================================================
%
% comment
""
"string"
"text%noncomment"
%"not string"
----------------------------------------------------
[
["comment", "%"],
["comment", "% comment"],
["string", "\"\""],
["string", "\"string\""],
["string", "\"text%noncomment\""],
["comment", "%\"not string\""]
]
----------------------------------------------------
Checks for strings and comments without mangling.
================================================
FILE: tests/languages/metafont/type_feature.test
================================================
% Variable type
boolean
numeric
pair
path
pen
picture
string
transform
% Argument type
expr
primary
secondary
suffix
tertiary
text
----------------------------------------------------
[
["comment", "% Variable type"],
["type", "boolean"],
["type", "numeric"],
["type", "pair"],
["type", "path"],
["type", "pen"],
["type", "picture"],
["type", "string"],
["type", "transform"],
["comment", "% Argument type"],
["type", "expr"],
["type", "primary"],
["type", "secondary"],
["type", "suffix"],
["type", "tertiary"],
["type", "text"]
]
----------------------------------------------------
Checks for typing keywords.
================================================
FILE: tests/languages/metafont/variable_feature.test
================================================
% Special variables
#@ @ @#
whatever
% Chardimen variables
d h w
% Position variables
x y z
% Output variables
aspect_ratio localfont mag mode screen_cols screen_rows
% Other variables
currentpen currentpicture currenttransform
extra_beginchar extra_endchar extra_setup
----------------------------------------------------
[
["comment", "% Special variables"],
["variable", "#@"], ["variable", "@"], ["variable", "@#"],
["variable", "whatever"],
["comment", "% Chardimen variables"],
["variable", "d"], ["variable", "h"], ["variable", "w"],
["comment", "% Position variables"],
["variable", "x"], ["variable", "y"], ["variable", "z"],
["comment", "% Output variables"],
["variable", "aspect_ratio"],
["variable", "localfont"],
["variable", "mag"],
["variable", "mode"],
["variable", "screen_cols"],
["variable", "screen_rows"],
["comment", "% Other variables"],
["variable", "currentpen"],
["variable", "currentpicture"],
["variable", "currenttransform"],
["variable", "extra_beginchar"],
["variable", "extra_endchar"],
["variable", "extra_setup"]
]
----------------------------------------------------
Checks for important variables.
================================================
FILE: tests/languages/mizar/comment_feature.test
================================================
:: Foobar
----------------------------------------------------
[
["comment", ":: Foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/mizar/keyword_feature.test
================================================
@proof
according
aggregate
all
and
antonym
are
as
associativity
assume
asymmetry
attr
be
begin
being
by
canceled
case
cases
cluster
clusters
coherence
commutativity
compatibility
connectedness
consider
consistency
constructors
contradiction
correctness
def
deffunc
define
definition
definitions
defpred
do
does
equals
end
environ
ex
exactly
existence
for
from
func
given
hence
hereby
holds
idempotence
identity
if
iff
implies
involutiveness
irreflexivity
is
it
let
means
mode
non
not
notation
notations
now
of
or
otherwise
over
per
pred
prefix
projectivity
proof
provided
qua
reconsider
redefine
reduce
reducibility
reflexivity
registration
registrations
requirements
reserve
sch
scheme
schemes
section
selector
set
sethood
st
struct
such
suppose
symmetry
synonym
take
that
the
then
theorem
theorems
thesis
thus
to
transitivity
uniqueness
vocabulary
vocabularies
when
where
with
wrt
----------------------------------------------------
[
["keyword", "@proof"],
["keyword", "according"],
["keyword", "aggregate"],
["keyword", "all"],
["keyword", "and"],
["keyword", "antonym"],
["keyword", "are"],
["keyword", "as"],
["keyword", "associativity"],
["keyword", "assume"],
["keyword", "asymmetry"],
["keyword", "attr"],
["keyword", "be"],
["keyword", "begin"],
["keyword", "being"],
["keyword", "by"],
["keyword", "canceled"],
["keyword", "case"],
["keyword", "cases"],
["keyword", "cluster"],
["keyword", "clusters"],
["keyword", "coherence"],
["keyword", "commutativity"],
["keyword", "compatibility"],
["keyword", "connectedness"],
["keyword", "consider"],
["keyword", "consistency"],
["keyword", "constructors"],
["keyword", "contradiction"],
["keyword", "correctness"],
["keyword", "def"],
["keyword", "deffunc"],
["keyword", "define"],
["keyword", "definition"],
["keyword", "definitions"],
["keyword", "defpred"],
["keyword", "do"],
["keyword", "does"],
["keyword", "equals"],
["keyword", "end"],
["keyword", "environ"],
["keyword", "ex"],
["keyword", "exactly"],
["keyword", "existence"],
["keyword", "for"],
["keyword", "from"],
["keyword", "func"],
["keyword", "given"],
["keyword", "hence"],
["keyword", "hereby"],
["keyword", "holds"],
["keyword", "idempotence"],
["keyword", "identity"],
["keyword", "if"],
["keyword", "iff"],
["keyword", "implies"],
["keyword", "involutiveness"],
["keyword", "irreflexivity"],
["keyword", "is"],
["keyword", "it"],
["keyword", "let"],
["keyword", "means"],
["keyword", "mode"],
["keyword", "non"],
["keyword", "not"],
["keyword", "notation"],
["keyword", "notations"],
["keyword", "now"],
["keyword", "of"],
["keyword", "or"],
["keyword", "otherwise"],
["keyword", "over"],
["keyword", "per"],
["keyword", "pred"],
["keyword", "prefix"],
["keyword", "projectivity"],
["keyword", "proof"],
["keyword", "provided"],
["keyword", "qua"],
["keyword", "reconsider"],
["keyword", "redefine"],
["keyword", "reduce"],
["keyword", "reducibility"],
["keyword", "reflexivity"],
["keyword", "registration"],
["keyword", "registrations"],
["keyword", "requirements"],
["keyword", "reserve"],
["keyword", "sch"],
["keyword", "scheme"],
["keyword", "schemes"],
["keyword", "section"],
["keyword", "selector"],
["keyword", "set"],
["keyword", "sethood"],
["keyword", "st"],
["keyword", "struct"],
["keyword", "such"],
["keyword", "suppose"],
["keyword", "symmetry"],
["keyword", "synonym"],
["keyword", "take"],
["keyword", "that"],
["keyword", "the"],
["keyword", "then"],
["keyword", "theorem"],
["keyword", "theorems"],
["keyword", "thesis"],
["keyword", "thus"],
["keyword", "to"],
["keyword", "transitivity"],
["keyword", "uniqueness"],
["keyword", "vocabulary"],
["keyword", "vocabularies"],
["keyword", "when"],
["keyword", "where"],
["keyword", "with"],
["keyword", "wrt"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/mizar/number_feature.test
================================================
0
-2
42
----------------------------------------------------
[
["number", "0"],
["number", "-2"],
["number", "42"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/mizar/operator_feature.test
================================================
...
->
&
= .=
----------------------------------------------------
[
["operator", "..."],
["operator", "->"],
["operator", "&"],
["operator", "="], ["operator", ".="]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/mizar/parameter_feature.test
================================================
$1 $2 $3
$4 $5 $6
$6 $7 $9
$10
----------------------------------------------------
[
["parameter", "$1"], ["parameter", "$2"], ["parameter", "$3"],
["parameter", "$4"], ["parameter", "$5"], ["parameter", "$6"],
["parameter", "$6"], ["parameter", "$7"], ["parameter", "$9"],
["parameter", "$10"]
]
----------------------------------------------------
Checks for parameters.
================================================
FILE: tests/languages/mizar/variable_feature.test
================================================
P:
CQC_THE1:
PRE_FF:
NAT_1:
----------------------------------------------------
[
["variable", "P"], ["punctuation", ":"],
["variable", "CQC_THE1"], ["punctuation", ":"],
["variable", "PRE_FF"], ["punctuation", ":"],
["variable", "NAT_1"], ["punctuation", ":"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/mongodb/document_feature.test
================================================
{
'_id': ObjectId('5ec72ffe00316be87cab3927'),
'code': Code('function () { return 22; }'),
'binary': BinData(1, '232sa3d323sd232a32sda3s2d3a2s1d23s21d3sa'),
'dbref': DBRef('namespace', ObjectId('5ec72f4200316be87cab3926'), 'db'),
'timestamp': Timestamp(0, 0),
'long': NumberLong(9223372036854775807),
'decimal': NumberDecimal('1000.55'),
'integer': 100,
'maxkey': MaxKey(),
'minkey': MinKey(),
'isodate': ISODate('2012-01-01T00:00:00.000Z'),
'regexp': RegExp('prism(js)?', 'i'),
'string': 'Hello World',
'numberArray': [1, 2, 3],
'stringArray': ['1','2','3'],
'randomKey': null,
'object': { 'a': 1, 'b': 2 },
'max_key2': MaxKey(),
'number': 1234,
'invalid-key': 123,
noQuotesKey: 'value',
}
----------------------------------------------------
[
["punctuation", "{"],
["string-property", "'_id'"],
["operator", ":"],
["builtin", "ObjectId"],
["punctuation", "("],
["string", ["'5ec72ffe00316be87cab3927'"]],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'code'"],
["operator", ":"],
["builtin", "Code"],
["punctuation", "("],
["string", ["'function () { return 22; }'"]],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'binary'"],
["operator", ":"],
["builtin", "BinData"],
["punctuation", "("],
["number", "1"],
["punctuation", ","],
["string", ["'232sa3d323sd232a32sda3s2d3a2s1d23s21d3sa'"]],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'dbref'"],
["operator", ":"],
["builtin", "DBRef"],
["punctuation", "("],
["string", ["'namespace'"]],
["punctuation", ","],
["builtin", "ObjectId"],
["punctuation", "("],
["string", ["'5ec72f4200316be87cab3926'"]],
["punctuation", ")"],
["punctuation", ","],
["string", ["'db'"]],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'timestamp'"],
["operator", ":"],
["builtin", "Timestamp"],
["punctuation", "("],
["number", "0"],
["punctuation", ","],
["number", "0"],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'long'"],
["operator", ":"],
["builtin", "NumberLong"],
["punctuation", "("],
["number", "9223372036854775807"],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'decimal'"],
["operator", ":"],
["builtin", "NumberDecimal"],
["punctuation", "("],
["string", ["'1000.55'"]],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'integer'"],
["operator", ":"],
["number", "100"],
["punctuation", ","],
["string-property", "'maxkey'"],
["operator", ":"],
["builtin", "MaxKey"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'minkey'"],
["operator", ":"],
["builtin", "MinKey"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'isodate'"],
["operator", ":"],
["builtin", "ISODate"],
["punctuation", "("],
["string", ["'2012-01-01T00:00:00.000Z'"]],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'regexp'"],
["operator", ":"],
["builtin", "RegExp"],
["punctuation", "("],
["string", ["'prism(js)?'"]],
["punctuation", ","],
["string", ["'i'"]],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'string'"],
["operator", ":"],
["string", ["'Hello World'"]],
["punctuation", ","],
["string-property", "'numberArray'"],
["operator", ":"],
["punctuation", "["],
["number", "1"],
["punctuation", ","],
["number", "2"],
["punctuation", ","],
["number", "3"],
["punctuation", "]"],
["punctuation", ","],
["string-property", "'stringArray'"],
["operator", ":"],
["punctuation", "["],
["string", ["'1'"]],
["punctuation", ","],
["string", ["'2'"]],
["punctuation", ","],
["string", ["'3'"]],
["punctuation", "]"],
["punctuation", ","],
["string-property", "'randomKey'"],
["operator", ":"],
["keyword", "null"],
["punctuation", ","],
["string-property", "'object'"],
["operator", ":"],
["punctuation", "{"],
["string-property", "'a'"],
["operator", ":"],
["number", "1"],
["punctuation", ","],
["string-property", "'b'"],
["operator", ":"],
["number", "2"],
["punctuation", "}"],
["punctuation", ","],
["string-property", "'max_key2'"],
["operator", ":"],
["builtin", "MaxKey"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ","],
["string-property", "'number'"],
["operator", ":"],
["number", "1234"],
["punctuation", ","],
["string-property", "'invalid-key'"],
["operator", ":"],
["number", "123"],
["punctuation", ","],
["property", ["noQuotesKey"]],
["operator", ":"],
["string", ["'value'"]],
["punctuation", ","],
["punctuation", "}"]
]
----------------------------------------------------
Common document.
================================================
FILE: tests/languages/mongodb/functions_feature.test
================================================
ObjectId()
ObjectId ()
Code()
BinData()
DBRef()
Timestamp()
NumberLong()
NumberDecimal()
MaxKey()
MinKey()
RegExp()
ISODate()
UUID()
----------------------------------------------------
[
["builtin", "ObjectId"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "ObjectId"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "Code"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "BinData"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "DBRef"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "Timestamp"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "NumberLong"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "NumberDecimal"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "MaxKey"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "MinKey"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "RegExp"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "ISODate"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "UUID"],
["punctuation", "("],
["punctuation", ")"]
]
----------------------------------------------------
Checks for built-in functions.
================================================
FILE: tests/languages/mongodb/operations_feature.test
================================================
{
$eq: {},
$gt: {},
$gte: {},
$in: {},
$lt: {},
$lte: {},
$ne: {},
$nin: {},
$and: {},
$not: {},
$nor: {},
$or: {},
$exists: {},
$type: {},
$expr: {},
$jsonSchema: {},
$mod: {},
$regex: {},
$text: {},
$where: {},
$geoIntersects: {},
$geoWithin: {},
$near: {},
$nearSphere: {},
$all: {},
$elemMatch: {},
$size: {},
$bitsAllClear: {},
$bitsAllSet: {},
$bitsAnyClear: {},
$bitsAnySet: {},
$comment: {},
$elemMatch: {},
$meta: {},
$slice: {},
$currentDate: {},
$inc: {},
$min: {},
$max: {},
$mul: {},
$rename: {},
$set: {},
$setOnInsert: {},
$unset: {},
$addToSet: {},
$pop: {},
$pull: {},
$push: {},
$pullAll: {},
$each: {},
$position: {},
$slice: {},
$sort: {},
$bit: {},
$addFields: {},
$bucket: {},
$bucketAuto: {},
$collStats: {},
$count: {},
$currentOp: {},
$facet: {},
$geoNear: {},
$graphLookup: {},
$group: {},
$indexStats: {},
$limit: {},
$listLocalSessions: {},
$listSessions: {},
$lookup: {},
$match: {},
$merge: {},
$out: {},
$planCacheStats: {},
$project: {},
$redact: {},
$replaceRoot: {},
$replaceWith: {},
$sample: {},
$set: {},
$skip: {},
$sort: {},
$sortByCount: {},
$unionWith: {},
$unset: {},
$unwind: {},
$abs: {},
$accumulator: {},
$acos: {},
$acosh: {},
$add: {},
$addToSet: {},
$allElementsTrue: {},
$and: {},
$anyElementTrue: {},
$arrayElemAt: {},
$arrayToObject: {},
$asin: {},
$asinh: {},
$atan: {},
$atan2: {},
$atanh: {},
$avg: {},
$binarySize: {},
$bsonSize: {},
$ceil: {},
$cmp: {},
$concat: {},
$concatArrays: {},
$cond: {},
$convert: {},
$cos: {},
$dateFromParts: {},
$dateToParts: {},
$dateFromString: {},
$dateToString: {},
$dayOfMonth: {},
$dayOfWeek: {},
$dayOfYear: {},
$degreesToRadians: {},
$divide: {},
$eq: {},
$exp: {},
$filter: {},
$first: {},
$floor: {},
$function: {},
$gt: {},
$gte: {},
$hour: {},
$ifNull: {},
$in: {},
$indexOfArray: {},
$indexOfBytes: {},
$indexOfCP: {},
$isArray: {},
$isNumber: {},
$isoDayOfWeek: {},
$isoWeek: {},
$isoWeekYear: {},
$last: {},
$last: {},
$let: {},
$literal: {},
$ln: {},
$log: {},
$log10: {},
$lt: {},
$lte: {},
$ltrim: {},
$map: {},
$max: {},
$mergeObjects: {},
$meta: {},
$min: {},
$millisecond: {},
$minute: {},
$mod: {},
$month: {},
$multiply: {},
$ne: {},
$not: {},
$objectToArray: {},
$or: {},
$pow: {},
$push: {},
$radiansToDegrees: {},
$range: {},
$reduce: {},
$regexFind: {},
$regexFindAll: {},
$regexMatch: {},
$replaceOne: {},
$replaceAll: {},
$reverseArray: {},
$round: {},
$rtrim: {},
$second: {},
$setDifference: {},
$setEquals: {},
$setIntersection: {},
$setIsSubset: {},
$setUnion: {},
$size: {},
$sin: {},
$slice: {},
$split: {},
$sqrt: {},
$stdDevPop: {},
$stdDevSamp: {},
$strcasecmp: {},
$strLenBytes: {},
$strLenCP: {},
$substr: {},
$substrBytes: {},
$substrCP: {},
$subtract: {},
$sum: {},
$switch: {},
$tan: {},
$toBool: {},
$toDate: {},
$toDecimal: {},
$toDouble: {},
$toInt: {},
$toLong: {},
$toObjectId: {},
$toString: {},
$toLower: {},
$toUpper: {},
$trim: {},
$trunc: {},
$type: {},
$week: {},
$year: {},
$zip: {},
$comment: {},
$explain: {},
$hint: {},
$max: {},
$maxTimeMS: {},
$min: {},
$orderby: {},
$query: {},
$returnKey: {},
$showDiskLoc: {},
$natural: {},
}
----------------------------------------------------
[
["punctuation", "{"],
["property", [
["keyword", "$eq"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$gt"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$gte"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$in"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$lt"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$lte"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$ne"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$nin"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$and"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$not"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$nor"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$or"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$exists"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$type"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$expr"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$jsonSchema"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$mod"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$regex"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$text"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$where"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$geoIntersects"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$geoWithin"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$near"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$nearSphere"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$all"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$elemMatch"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$size"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$bitsAllClear"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$bitsAllSet"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$bitsAnyClear"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$bitsAnySet"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$comment"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$elemMatch"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$meta"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$slice"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$currentDate"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$inc"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$min"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$max"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$mul"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$rename"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$set"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$setOnInsert"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$unset"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$addToSet"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$pop"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$pull"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$push"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$pullAll"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$each"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$position"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$slice"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$sort"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$bit"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$addFields"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$bucket"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$bucketAuto"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$collStats"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$count"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$currentOp"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$facet"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$geoNear"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$graphLookup"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$group"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$indexStats"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$limit"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$listLocalSessions"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$listSessions"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$lookup"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$match"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$merge"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$out"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$planCacheStats"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$project"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$redact"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$replaceRoot"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$replaceWith"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$sample"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$set"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$skip"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$sort"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$sortByCount"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$unionWith"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$unset"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$unwind"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$abs"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$accumulator"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$acos"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$acosh"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$add"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$addToSet"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$allElementsTrue"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$and"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$anyElementTrue"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$arrayElemAt"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$arrayToObject"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$asin"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$asinh"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$atan"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$atan2"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$atanh"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$avg"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$binarySize"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$bsonSize"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$ceil"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$cmp"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$concat"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$concatArrays"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$cond"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$convert"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$cos"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$dateFromParts"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$dateToParts"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$dateFromString"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$dateToString"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$dayOfMonth"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$dayOfWeek"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$dayOfYear"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$degreesToRadians"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$divide"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$eq"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$exp"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$filter"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$first"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$floor"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$function"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$gt"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$gte"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$hour"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$ifNull"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$in"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$indexOfArray"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$indexOfBytes"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$indexOfCP"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$isArray"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$isNumber"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$isoDayOfWeek"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$isoWeek"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$isoWeekYear"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$last"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$last"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$let"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$literal"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$ln"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$log"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$log10"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$lt"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$lte"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$ltrim"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$map"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$max"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$mergeObjects"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$meta"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$min"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$millisecond"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$minute"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$mod"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$month"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$multiply"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$ne"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$not"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$objectToArray"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$or"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$pow"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$push"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$radiansToDegrees"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$range"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$reduce"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$regexFind"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$regexFindAll"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$regexMatch"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$replaceOne"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$replaceAll"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$reverseArray"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$round"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$rtrim"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$second"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$setDifference"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$setEquals"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$setIntersection"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$setIsSubset"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$setUnion"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$size"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$sin"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$slice"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$split"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$sqrt"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$stdDevPop"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$stdDevSamp"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$strcasecmp"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$strLenBytes"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$strLenCP"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$substr"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$substrBytes"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$substrCP"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$subtract"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$sum"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$switch"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$tan"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toBool"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toDate"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toDecimal"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toDouble"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toInt"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toLong"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toObjectId"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toString"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toLower"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$toUpper"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$trim"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$trunc"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$type"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$week"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$year"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$zip"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$comment"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$explain"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$hint"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$max"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$maxTimeMS"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$min"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$orderby"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$query"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$returnKey"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$showDiskLoc"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$natural"]
]],
["operator", ":"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", "}"]
]
----------------------------------------------------
Checks for operations.
================================================
FILE: tests/languages/mongodb/query_feature.test
================================================
db.users.find({
_id: { $nin: ObjectId('5ec72ffe00316be87cab3927') },
age: { $gte: 18, $lte: 99 },
field: { $exists: true }
})
----------------------------------------------------
[
"db",
["punctuation", "."],
"users",
["punctuation", "."],
["function", "find"],
["punctuation", "("],
["punctuation", "{"],
["property", [
"_id"
]],
["operator", ":"],
["punctuation", "{"],
["property", [
["keyword", "$nin"]
]],
["operator", ":"],
["builtin", "ObjectId"],
["punctuation", "("],
["string", [
"'5ec72ffe00316be87cab3927'"
]],
["punctuation", ")"],
["punctuation", "}"],
["punctuation", ","],
["property", [
"age"
]],
["operator", ":"],
["punctuation", "{"],
["property", [
["keyword", "$gte"]
]],
["operator", ":"],
["number", "18"],
["punctuation", ","],
["property", [
["keyword", "$lte"]
]],
["operator", ":"],
["number", "99"],
["punctuation", "}"],
["punctuation", ","],
["property", [
"field"
]],
["operator", ":"],
["punctuation", "{"],
["property", [
["keyword", "$exists"]
]],
["operator", ":"],
["boolean", "true"],
["punctuation", "}"],
["punctuation", "}"],
["punctuation", ")"]
]
----------------------------------------------------
Common query.
================================================
FILE: tests/languages/mongodb/string_url_and_ip_feature.test
================================================
{
field1: 'Here is url: http://prismjs.com/'
field2: 'Here is ip: 192.168.0.1'
}
----------------------------------------------------
[
["punctuation", "{"],
["property", [
"field1"
]],
["operator", ":"],
["string", [
"'Here is url: ",
["url", "http://prismjs.com/"],
"'"
]],
["property", [
"field2"
]],
["operator", ":"],
["string", [
"'Here is ip: ",
["entity", "192.168.0.1"],
"'"
]],
["punctuation", "}"]
]
----------------------------------------------------
Checks for URL and IP highlighting inside string.
================================================
FILE: tests/languages/mongodb/update_feature.test
================================================
db.users.updateOne(
{
_id: ObjectId('5ec72ffe00316be87cab3927')
},
{
$set: { age: 30 },
$inc: { updateCount: 1 },
$push: { updateDates: new Date() }
}
)
----------------------------------------------------
[
"db",
["punctuation", "."],
"users",
["punctuation", "."],
["function", "updateOne"],
["punctuation", "("],
["punctuation", "{"],
["property", [
"_id"
]],
["operator", ":"],
["builtin", "ObjectId"],
["punctuation", "("],
["string", [
"'5ec72ffe00316be87cab3927'"
]],
["punctuation", ")"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", "{"],
["property", [
["keyword", "$set"]
]],
["operator", ":"],
["punctuation", "{"],
["property", [
"age"
]],
["operator", ":"],
["number", "30"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$inc"]
]],
["operator", ":"],
["punctuation", "{"],
["property", [
"updateCount"
]],
["operator", ":"],
["number", "1"],
["punctuation", "}"],
["punctuation", ","],
["property", [
["keyword", "$push"]
]],
["operator", ":"],
["punctuation", "{"],
["property", [
"updateDates"
]],
["operator", ":"],
["keyword", "new"],
["class-name", [
"Date"
]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["punctuation", "}"],
["punctuation", ")"]
]
----------------------------------------------------
Common update.
================================================
FILE: tests/languages/monkey/comment_feature.test
================================================
' Foobar
#Rem Foo
Bar 'Baz
#End
' This "is" a comment
#Rem
This "is" a comment
#End
----------------------------------------------------
[
["comment", "' Foobar"],
["comment", "#Rem Foo\r\nBar 'Baz\r\n#End"],
["comment", "' This \"is\" a comment"],
["comment", "#Rem\r\nThis \"is\" a comment\r\n#End"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/monkey/function_feature.test
================================================
foobar()
Foo_Bar_42()
----------------------------------------------------
[
["function", "foobar"], ["punctuation", "("], ["punctuation", ")"],
["function", "Foo_Bar_42"], ["punctuation", "("], ["punctuation", ")"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/monkey/keyword_feature.test
================================================
Void
Strict
Public
Private
Property
Bool
Int
Float
String
Array
Object
Continue
Exit
Import
Extern
New
Self
Super
Try
Catch
Eachin
True
False
Extends
Abstract
Final
Select
Case
Default
Const
Local
Global
Field
Method
Function
Class
End
If
Then
Else
ElseIf
EndIf
While
Wend
Repeat
Until
Forever
For
To
Step
Next
Return
Module
Interface
Implements
Inline
Throw
Null
----------------------------------------------------
[
["keyword", "Void"],
["keyword", "Strict"],
["keyword", "Public"],
["keyword", "Private"],
["keyword", "Property"],
["keyword", "Bool"],
["keyword", "Int"],
["keyword", "Float"],
["keyword", "String"],
["keyword", "Array"],
["keyword", "Object"],
["keyword", "Continue"],
["keyword", "Exit"],
["keyword", "Import"],
["keyword", "Extern"],
["keyword", "New"],
["keyword", "Self"],
["keyword", "Super"],
["keyword", "Try"],
["keyword", "Catch"],
["keyword", "Eachin"],
["keyword", "True"],
["keyword", "False"],
["keyword", "Extends"],
["keyword", "Abstract"],
["keyword", "Final"],
["keyword", "Select"],
["keyword", "Case"],
["keyword", "Default"],
["keyword", "Const"],
["keyword", "Local"],
["keyword", "Global"],
["keyword", "Field"],
["keyword", "Method"],
["keyword", "Function"],
["keyword", "Class"],
["keyword", "End"],
["keyword", "If"],
["keyword", "Then"],
["keyword", "Else"],
["keyword", "ElseIf"],
["keyword", "EndIf"],
["keyword", "While"],
["keyword", "Wend"],
["keyword", "Repeat"],
["keyword", "Until"],
["keyword", "Forever"],
["keyword", "For"],
["keyword", "To"],
["keyword", "Step"],
["keyword", "Next"],
["keyword", "Return"],
["keyword", "Module"],
["keyword", "Interface"],
["keyword", "Implements"],
["keyword", "Inline"],
["keyword", "Throw"],
["keyword", "Null"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/monkey/number_feature.test
================================================
0
42
3.14159
.5
$BadFace
----------------------------------------------------
[
["number", "0"],
["number", "42"],
["number", "3.14159"],
["number", ".5"],
["number", "$BadFace"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/monkey/operator_feature.test
================================================
..
< <> <=
> >=
=
:=
+ +=
- -=
* *=
/ /=
& &=
~ ~=
| |=
Mod Mod=
Shl Shl=
Shr Shr=
And Not Or
----------------------------------------------------
[
["operator", ".."],
["operator", "<"], ["operator", "<>"], ["operator", "<="],
["operator", ">"], ["operator", ">="],
["operator", "="],
["operator", ":="],
["operator", "+"], ["operator", "+="],
["operator", "-"], ["operator", "-="],
["operator", "*"], ["operator", "*="],
["operator", "/"], ["operator", "/="],
["operator", "&"], ["operator", "&="],
["operator", "~"], ["operator", "~="],
["operator", "|"], ["operator", "|="],
["operator", "Mod"], ["operator", "Mod="],
["operator", "Shl"], ["operator", "Shl="],
["operator", "Shr"], ["operator", "Shr="],
["operator", "And"], ["operator", "Not"], ["operator", "Or"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/monkey/preprocessor_feature.test
================================================
#If HOST
#ElseIf
#Else
----------------------------------------------------
[
["preprocessor", "#If HOST"],
["preprocessor", "#ElseIf"],
["preprocessor", "#Else"]
]
----------------------------------------------------
Checks for preprocessor directives.
================================================
FILE: tests/languages/monkey/string_feature.test
================================================
""
"Foo ~qBar~q"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"Foo ~qBar~q\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/monkey/type-char_feature.test
================================================
foo?
bar%
baz#
foobar$
----------------------------------------------------
[
"foo", ["type-char", "?"],
"\r\nbar", ["type-char", "%"],
"\r\nbaz", ["type-char", "#"],
"\r\nfoobar", ["type-char", "$"]
]
----------------------------------------------------
Checks for type chars.
================================================
FILE: tests/languages/moonscript/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/moonscript/class-name_feature.test
================================================
class Foo extends Bar
new: (@foo)=>
with MyClass 'baz'
.foo = "bazz"
-- any name starting with a capital letter is considered a class
func Foo Bar
----------------------------------------------------
[
["keyword", "class"],
["class-name", "Foo"],
["keyword", "extends"],
["class-name", "Bar"],
["property", "new"],
["operator", ":"],
["punctuation", "("],
["variable", "@foo"],
["punctuation", ")"],
["operator", "=>"],
["keyword", "with"],
["class-name", "MyClass"],
["string", "'baz'"],
["punctuation", "."],
"foo ",
["operator", "="],
["string", [
"\"bazz\""
]],
["comment", "-- any name starting with a capital letter is considered a class"],
"\r\nfunc ",
["class-name", "Foo"],
["class-name", "Bar"]
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/moonscript/comment_feature.test
================================================
-- I'm a comment
----------------------------------------------------
[
["comment", "-- I'm a comment"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/moonscript/function_feature.test
================================================
_G
_VERSION
assert
collectgarbage
coroutine.create
coroutine.resume
coroutine.running
coroutine.status
coroutine.wrap
coroutine.yield
debug.debug
debug.getfenv
debug.gethook
debug.getinfo
debug.getlocal
debug.getmetatable
debug.getregistry
debug.getupvalue
debug.setfenv
debug.sethook
debug.setlocal
debug.setmetatable
debug.setupvalue
debug.traceback
dofile
error
getfenv
getmetatable
io.close
io.flush
io.input
io.lines
io.open
io.output
io.popen
io.read
io.stderr
io.stdin
io.stdout
io.tmpfile
io.type
io.write
ipairs
load
loadfile
loadstring
math.abs
math.acos
math.asin
math.atan
math.atan2
math.ceil
math.cos
math.cosh
math.deg
math.exp
math.floor
math.fmod
math.frexp
math.ldexp
math.log
math.log10
math.max
math.min
math.modf
math.pi
math.pow
math.rad
math.random
math.randomseed
math.sin
math.sinh
math.sqrt
math.tan
math.tanh
module
next
os.clock
os.date
os.difftime
os.execute
os.exit
os.getenv
os.remove
os.rename
os.setlocale
os.time
os.tmpname
package.cpath
package.loaded
package.loadlib
package.path
package.preload
package.seeall
pairs
pcall
print
rawequal
rawget
rawset
require
select
setfenv
setmetatable
string.byte
string.char
string.dump
string.find
string.format
string.gmatch
string.gsub
string.len
string.lower
string.match
string.rep
string.reverse
string.sub
string.upper
table.concat
table.insert
table.maxn
table.remove
table.sort
tonumber
tostring
type
unpack
xpcall
----------------------------------------------------
[
["function", [
"_G"
]],
["function", [
"_VERSION"
]],
["function", [
"assert"
]],
["function", [
"collectgarbage"
]],
["function", [
"coroutine",
["punctuation", "."],
"create"
]],
["function", [
"coroutine",
["punctuation", "."],
"resume"
]],
["function", [
"coroutine",
["punctuation", "."],
"running"
]],
["function", [
"coroutine",
["punctuation", "."],
"status"
]],
["function", [
"coroutine",
["punctuation", "."],
"wrap"
]],
["function", [
"coroutine",
["punctuation", "."],
"yield"
]],
["function", [
"debug",
["punctuation", "."],
"debug"
]],
["function", [
"debug",
["punctuation", "."],
"getfenv"
]],
["function", [
"debug",
["punctuation", "."],
"gethook"
]],
["function", [
"debug",
["punctuation", "."],
"getinfo"
]],
["function", [
"debug",
["punctuation", "."],
"getlocal"
]],
["function", [
"debug",
["punctuation", "."],
"getmetatable"
]],
["function", [
"debug",
["punctuation", "."],
"getregistry"
]],
["function", [
"debug",
["punctuation", "."],
"getupvalue"
]],
["function", [
"debug",
["punctuation", "."],
"setfenv"
]],
["function", [
"debug",
["punctuation", "."],
"sethook"
]],
["function", [
"debug",
["punctuation", "."],
"setlocal"
]],
["function", [
"debug",
["punctuation", "."],
"setmetatable"
]],
["function", [
"debug",
["punctuation", "."],
"setupvalue"
]],
["function", [
"debug",
["punctuation", "."],
"traceback"
]],
["function", [
"dofile"
]],
["function", [
"error"
]],
["function", [
"getfenv"
]],
["function", [
"getmetatable"
]],
["function", [
"io",
["punctuation", "."],
"close"
]],
["function", [
"io",
["punctuation", "."],
"flush"
]],
["function", [
"io",
["punctuation", "."],
"input"
]],
["function", [
"io",
["punctuation", "."],
"lines"
]],
["function", [
"io",
["punctuation", "."],
"open"
]],
["function", [
"io",
["punctuation", "."],
"output"
]],
["function", [
"io",
["punctuation", "."],
"popen"
]],
["function", [
"io",
["punctuation", "."],
"read"
]],
["function", [
"io",
["punctuation", "."],
"stderr"
]],
["function", [
"io",
["punctuation", "."],
"stdin"
]],
["function", [
"io",
["punctuation", "."],
"stdout"
]],
["function", [
"io",
["punctuation", "."],
"tmpfile"
]],
["function", [
"io",
["punctuation", "."],
"type"
]],
["function", [
"io",
["punctuation", "."],
"write"
]],
["function", [
"ipairs"
]],
["function", [
"load"
]],
["function", [
"loadfile"
]],
["function", [
"loadstring"
]],
["function", [
"math",
["punctuation", "."],
"abs"
]],
["function", [
"math",
["punctuation", "."],
"acos"
]],
["function", [
"math",
["punctuation", "."],
"asin"
]],
["function", [
"math",
["punctuation", "."],
"atan"
]],
["function", [
"math",
["punctuation", "."],
"atan2"
]],
["function", [
"math",
["punctuation", "."],
"ceil"
]],
["function", [
"math",
["punctuation", "."],
"cos"
]],
["function", [
"math",
["punctuation", "."],
"cosh"
]],
["function", [
"math",
["punctuation", "."],
"deg"
]],
["function", [
"math",
["punctuation", "."],
"exp"
]],
["function", [
"math",
["punctuation", "."],
"floor"
]],
["function", [
"math",
["punctuation", "."],
"fmod"
]],
["function", [
"math",
["punctuation", "."],
"frexp"
]],
["function", [
"math",
["punctuation", "."],
"ldexp"
]],
["function", [
"math",
["punctuation", "."],
"log"
]],
["function", [
"math",
["punctuation", "."],
"log10"
]],
["function", [
"math",
["punctuation", "."],
"max"
]],
["function", [
"math",
["punctuation", "."],
"min"
]],
["function", [
"math",
["punctuation", "."],
"modf"
]],
["function", [
"math",
["punctuation", "."],
"pi"
]],
["function", [
"math",
["punctuation", "."],
"pow"
]],
["function", [
"math",
["punctuation", "."],
"rad"
]],
["function", [
"math",
["punctuation", "."],
"random"
]],
["function", [
"math",
["punctuation", "."],
"randomseed"
]],
["function", [
"math",
["punctuation", "."],
"sin"
]],
["function", [
"math",
["punctuation", "."],
"sinh"
]],
["function", [
"math",
["punctuation", "."],
"sqrt"
]],
["function", [
"math",
["punctuation", "."],
"tan"
]],
["function", [
"math",
["punctuation", "."],
"tanh"
]],
["function", [
"module"
]],
["function", [
"next"
]],
["function", [
"os",
["punctuation", "."],
"clock"
]],
["function", [
"os",
["punctuation", "."],
"date"
]],
["function", [
"os",
["punctuation", "."],
"difftime"
]],
["function", [
"os",
["punctuation", "."],
"execute"
]],
["function", [
"os",
["punctuation", "."],
"exit"
]],
["function", [
"os",
["punctuation", "."],
"getenv"
]],
["function", [
"os",
["punctuation", "."],
"remove"
]],
["function", [
"os",
["punctuation", "."],
"rename"
]],
["function", [
"os",
["punctuation", "."],
"setlocale"
]],
["function", [
"os",
["punctuation", "."],
"time"
]],
["function", [
"os",
["punctuation", "."],
"tmpname"
]],
["function", [
"package",
["punctuation", "."],
"cpath"
]],
["function", [
"package",
["punctuation", "."],
"loaded"
]],
["function", [
"package",
["punctuation", "."],
"loadlib"
]],
["function", [
"package",
["punctuation", "."],
"path"
]],
["function", [
"package",
["punctuation", "."],
"preload"
]],
["function", [
"package",
["punctuation", "."],
"seeall"
]],
["function", [
"pairs"
]],
["function", [
"pcall"
]],
["function", [
"print"
]],
["function", [
"rawequal"
]],
["function", [
"rawget"
]],
["function", [
"rawset"
]],
["function", [
"require"
]],
["function", [
"select"
]],
["function", [
"setfenv"
]],
["function", [
"setmetatable"
]],
["function", [
"string",
["punctuation", "."],
"byte"
]],
["function", [
"string",
["punctuation", "."],
"char"
]],
["function", [
"string",
["punctuation", "."],
"dump"
]],
["function", [
"string",
["punctuation", "."],
"find"
]],
["function", [
"string",
["punctuation", "."],
"format"
]],
["function", [
"string",
["punctuation", "."],
"gmatch"
]],
["function", [
"string",
["punctuation", "."],
"gsub"
]],
["function", [
"string",
["punctuation", "."],
"len"
]],
["function", [
"string",
["punctuation", "."],
"lower"
]],
["function", [
"string",
["punctuation", "."],
"match"
]],
["function", [
"string",
["punctuation", "."],
"rep"
]],
["function", [
"string",
["punctuation", "."],
"reverse"
]],
["function", [
"string",
["punctuation", "."],
"sub"
]],
["function", [
"string",
["punctuation", "."],
"upper"
]],
["function", [
"table",
["punctuation", "."],
"concat"
]],
["function", [
"table",
["punctuation", "."],
"insert"
]],
["function", [
"table",
["punctuation", "."],
"maxn"
]],
["function", [
"table",
["punctuation", "."],
"remove"
]],
["function", [
"table",
["punctuation", "."],
"sort"
]],
["function", [
"tonumber"
]],
["function", [
"tostring"
]],
["function", [
"type"
]],
["function", [
"unpack"
]],
["function", [
"xpcall"
]]
]
================================================
FILE: tests/languages/moonscript/keyword_feature.test
================================================
class
continue
do
else
elseif
export
extends
for
from
if
import
in
local
nil
return
self
super
switch
then
unless
using
when
while
with
----------------------------------------------------
[
["keyword", "class"],
["keyword", "continue"],
["keyword", "do"],
["keyword", "else"],
["keyword", "elseif"],
["keyword", "export"],
["keyword", "extends"],
["keyword", "for"],
["keyword", "from"],
["keyword", "if"],
["keyword", "import"],
["keyword", "in"],
["keyword", "local"],
["keyword", "nil"],
["keyword", "return"],
["keyword", "self"],
["keyword", "super"],
["keyword", "switch"],
["keyword", "then"],
["keyword", "unless"],
["keyword", "using"],
["keyword", "when"],
["keyword", "while"],
["keyword", "with"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/moonscript/number_feature.test
================================================
121
121.2323
121.2323e-1
121.2323e13434
2323E34
0x12323
0xfF2323
0xabcdef
0xABCDEF
.2323
.2323e-1
.2323e13434
1LL
1ULL
9332LL
9332
0x2aLL
0x2aULL
----------------------------------------------------
[
["number", "121"],
["number", "121.2323"],
["number", "121.2323e-1"],
["number", "121.2323e13434"],
["number", "2323E34"],
["number", "0x12323"],
["number", "0xfF2323"],
["number", "0xabcdef"],
["number", "0xABCDEF"],
["number", ".2323"],
["number", ".2323e-1"],
["number", ".2323e13434"],
["number", "1LL"],
["number", "1ULL"],
["number", "9332LL"],
["number", "9332"],
["number", "0x2aLL"],
["number", "0x2aULL"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/moonscript/operator_feature.test
================================================
+ - * / % ..
+= -= *= /= %= ..=
> >= < <= == != ~=
= : ... ^ # !
-> =>
and or not
and= or=
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", ".."],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "%="],
["operator", "..="],
["operator", ">"],
["operator", ">="],
["operator", "<"],
["operator", "<="],
["operator", "=="],
["operator", "!="],
["operator", "~="],
["operator", "="],
["operator", ":"],
["operator", "..."],
["operator", "^"],
["operator", "#"],
["operator", "!"],
["operator", "->"],
["operator", "=>"],
["operator", "and"],
["operator", "or"],
["operator", "not"],
["operator", "and="],
["operator", "or="]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/moonscript/property_feature.test
================================================
collection =
height: 32434
hats: {"tophat", "bball", "bowler"}
my_function dance: "Tango", partner: "none"
y = type: "dog", legs: 4, tails: 1
hair = "golden"
height = 200
person = { :hair, :height, shoe_size: 40 }
print_table :hair, :height
----------------------------------------------------
[
"collection ",
["operator", "="],
["property", "height"],
["operator", ":"],
["number", "32434"],
["property", "hats"],
["operator", ":"],
["punctuation", "{"],
["string", [
"\"tophat\""
]],
["punctuation", ","],
["string", [
"\"bball\""
]],
["punctuation", ","],
["string", [
"\"bowler\""
]],
["punctuation", "}"],
"\r\n\r\nmy_function ",
["property", "dance"],
["operator", ":"],
["string", [
"\"Tango\""
]],
["punctuation", ","],
["property", "partner"],
["operator", ":"],
["string", [
"\"none\""
]],
"\r\ny ",
["operator", "="],
["property", "type"],
["operator", ":"],
["string", [
"\"dog\""
]],
["punctuation", ","],
["property", "legs"],
["operator", ":"],
["number", "4"],
["punctuation", ","],
["property", "tails"],
["operator", ":"],
["number", "1"],
"\r\n\r\nhair ",
["operator", "="],
["string", [
"\"golden\""
]],
"\r\nheight ",
["operator", "="],
["number", "200"],
"\r\nperson ",
["operator", "="],
["punctuation", "{"],
["operator", ":"],
["property", "hair"],
["punctuation", ","],
["operator", ":"],
["property", "height"],
["punctuation", ","],
["property", "shoe_size"],
["operator", ":"],
["number", "40"],
["punctuation", "}"],
"\r\nprint_table ",
["operator", ":"],
["property", "hair"],
["punctuation", ","],
["operator", ":"],
["property", "height"]
]
----------------------------------------------------
Checks for properties.
================================================
FILE: tests/languages/moonscript/punctuation_feature.test
================================================
. , \
() [] {}
----------------------------------------------------
[
["punctuation", "."],
["punctuation", ","],
["punctuation", "\\"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for punctuation.
================================================
FILE: tests/languages/moonscript/string_feature.test
================================================
""
"MoonScript
has multiline strings"
"Hello, I am #{@name}!"
''
'foo
bar'
' #{no interpolation here} '
[==[
moon
]==]
[[(.-\)[^\]+$]]
----------------------------------------------------
[
["string", [
"\"\""
]],
["string", [
"\"MoonScript\r\nhas multiline strings\""
]],
["string", [
"\"Hello, I am ",
["interpolation", [
["interpolation-punctuation", "#{"],
["moonscript", [
["variable", "@name"]
]],
["interpolation-punctuation", "}"]
]],
"!\""
]],
["string", "''"],
["string", "'foo\r\nbar'"],
["string", "' #{no interpolation here} '"],
["string", "[==[\r\n\r\nmoon\r\n\r\n]==]"],
["string", "[[(.-\\)[^\\]+$]]"]
]
----------------------------------------------------
Checks for strings and string interpolation.
================================================
FILE: tests/languages/moonscript/variable_feature.test
================================================
@ @@
@var @@var
----------------------------------------------------
[
["variable", "@"],
["variable", "@@"],
["variable", "@var"],
["variable", "@@var"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/n1ql/boolean_feature.test
================================================
TRUE
FALSE
----------------------------------------------------
[
["boolean", "TRUE"],
["boolean", "FALSE"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/n1ql/comment_feature.test
================================================
/**/
/* foo
bar */
-- comment
----------------------------------------------------
[
["comment", "/**/"],
["comment", "/* foo\r\nbar */"],
["comment", "-- comment"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/n1ql/function_feature.test
================================================
ABS(
ACOS(
ARRAY_AGG(
ARRAY_APPEND(
ARRAY_AVG(
ARRAY_CONCAT(
ARRAY_CONTAINS(
ARRAY_COUNT(
ARRAY_DISTINCT(
ARRAY_FLATTEN(
ARRAY_IFNULL(
ARRAY_INSERT(
ARRAY_INTERSECT(
ARRAY_LENGTH(
ARRAY_MAX(
ARRAY_MIN(
ARRAY_POSITION(
ARRAY_PREPEND(
ARRAY_PUT(
ARRAY_RANGE(
ARRAY_REMOVE(
ARRAY_REPEAT(
ARRAY_REPLACE(
ARRAY_REVERSE(
ARRAY_SORT(
ARRAY_STAR(
ARRAY_SUM(
ARRAY_SYMDIFF(
ARRAY_SYMDIFFN(
ARRAY_UNION(
ASIN(
ATAN(
ATAN2(
AVG(
BASE64(
BASE64_DECODE(
BASE64_ENCODE(
BITAND(
BITCLEAR(
BITNOT(
BITOR(
BITSET(
BITSHIFT(
BITTEST(
BITXOR(
CEIL(
CLOCK_LOCAL(
CLOCK_MILLIS(
CLOCK_STR(
CLOCK_TZ(
CLOCK_UTC(
CONTAINS(
CONTAINS_TOKEN(
CONTAINS_TOKEN_LIKE(
CONTAINS_TOKEN_REGEXP(
COS(
COUNT(
CURL(
DATE_ADD_MILLIS(
DATE_ADD_STR(
DATE_DIFF_MILLIS(
DATE_DIFF_STR(
DATE_FORMAT_STR(
DATE_PART_MILLIS(
DATE_PART_STR(
DATE_RANGE_MILLIS(
DATE_RANGE_STR(
DATE_TRUNC_MILLIS(
DATE_TRUNC_STR(
DECODE_JSON(
DEGREES(
DURATION_TO_STR(
E(
ENCODED_SIZE(
ENCODE_JSON(
EXP(
FLOOR(
GREATEST(
HAS_TOKEN(
IFINF(
IFMISSING(
IFMISSINGORNULL(
IFNAN(
IFNANORINF(
IFNULL(
INITCAP(
ISARRAY(
ISATOM(
ISBOOLEAN(
ISNUMBER(
ISOBJECT(
ISSTRING(
IsBitSET(
LEAST(
LENGTH(
LN(
LOG(
LOWER(
LTRIM(
MAX(
META(
MILLIS(
MILLIS_TO_LOCAL(
MILLIS_TO_STR(
MILLIS_TO_TZ(
MILLIS_TO_UTC(
MILLIS_TO_ZONE_NAME(
MIN(
MISSINGIF(
NANIF(
NEGINFIF(
NOW_LOCAL(
NOW_MILLIS(
NOW_STR(
NOW_TZ(
NOW_UTC(
NULLIF(
OBJECT_ADD(
OBJECT_CONCAT(
OBJECT_INNER_PAIRS(
OBJECT_INNER_VALUES(
OBJECT_LENGTH(
OBJECT_NAMES(
OBJECT_PAIRS(
OBJECT_PUT(
OBJECT_REMOVE(
OBJECT_RENAME(
OBJECT_REPLACE(
OBJECT_UNWRAP(
OBJECT_VALUES(
PAIRS(
PI(
POLY_LENGTH(
POSINFIF(
POSITION(
POWER(
RADIANS(
RANDOM(
REGEXP_CONTAINS(
REGEXP_LIKE(
REGEXP_POSITION(
REGEXP_REPLACE(
REPEAT(
REPLACE(
REVERSE(
ROUND(
RTRIM(
SIGN(
SIN(
SPLIT(
SQRT(
STR_TO_DURATION(
STR_TO_MILLIS(
STR_TO_TZ(
STR_TO_UTC(
STR_TO_ZONE_NAME(
SUBSTR(
SUFFIXES(
SUM(
TAN(
TITLE(
TOARRAY(
TOATOM(
TOBOOLEAN(
TOKENS(
TOKENS(
TONUMBER(
TOOBJECT(
TOSTRING(
TRIM(
TRUNC(
TYPE(
UPPER(
WEEKDAY_MILLIS(
WEEKDAY_STR(
----------------------------------------------------
[
["function", "ABS"], ["punctuation", "("],
["function", "ACOS"], ["punctuation", "("],
["function", "ARRAY_AGG"], ["punctuation", "("],
["function", "ARRAY_APPEND"], ["punctuation", "("],
["function", "ARRAY_AVG"], ["punctuation", "("],
["function", "ARRAY_CONCAT"], ["punctuation", "("],
["function", "ARRAY_CONTAINS"], ["punctuation", "("],
["function", "ARRAY_COUNT"], ["punctuation", "("],
["function", "ARRAY_DISTINCT"], ["punctuation", "("],
["function", "ARRAY_FLATTEN"], ["punctuation", "("],
["function", "ARRAY_IFNULL"], ["punctuation", "("],
["function", "ARRAY_INSERT"], ["punctuation", "("],
["function", "ARRAY_INTERSECT"], ["punctuation", "("],
["function", "ARRAY_LENGTH"], ["punctuation", "("],
["function", "ARRAY_MAX"], ["punctuation", "("],
["function", "ARRAY_MIN"], ["punctuation", "("],
["function", "ARRAY_POSITION"], ["punctuation", "("],
["function", "ARRAY_PREPEND"], ["punctuation", "("],
["function", "ARRAY_PUT"], ["punctuation", "("],
["function", "ARRAY_RANGE"], ["punctuation", "("],
["function", "ARRAY_REMOVE"], ["punctuation", "("],
["function", "ARRAY_REPEAT"], ["punctuation", "("],
["function", "ARRAY_REPLACE"], ["punctuation", "("],
["function", "ARRAY_REVERSE"], ["punctuation", "("],
["function", "ARRAY_SORT"], ["punctuation", "("],
["function", "ARRAY_STAR"], ["punctuation", "("],
["function", "ARRAY_SUM"], ["punctuation", "("],
["function", "ARRAY_SYMDIFF"], ["punctuation", "("],
["function", "ARRAY_SYMDIFFN"], ["punctuation", "("],
["function", "ARRAY_UNION"], ["punctuation", "("],
["function", "ASIN"], ["punctuation", "("],
["function", "ATAN"], ["punctuation", "("],
["function", "ATAN2"], ["punctuation", "("],
["function", "AVG"], ["punctuation", "("],
["function", "BASE64"], ["punctuation", "("],
["function", "BASE64_DECODE"], ["punctuation", "("],
["function", "BASE64_ENCODE"], ["punctuation", "("],
["function", "BITAND"], ["punctuation", "("],
["function", "BITCLEAR"], ["punctuation", "("],
["function", "BITNOT"], ["punctuation", "("],
["function", "BITOR"], ["punctuation", "("],
["function", "BITSET"], ["punctuation", "("],
["function", "BITSHIFT"], ["punctuation", "("],
["function", "BITTEST"], ["punctuation", "("],
["function", "BITXOR"], ["punctuation", "("],
["function", "CEIL"], ["punctuation", "("],
["function", "CLOCK_LOCAL"], ["punctuation", "("],
["function", "CLOCK_MILLIS"], ["punctuation", "("],
["function", "CLOCK_STR"], ["punctuation", "("],
["function", "CLOCK_TZ"], ["punctuation", "("],
["function", "CLOCK_UTC"], ["punctuation", "("],
["function", "CONTAINS"], ["punctuation", "("],
["function", "CONTAINS_TOKEN"], ["punctuation", "("],
["function", "CONTAINS_TOKEN_LIKE"], ["punctuation", "("],
["function", "CONTAINS_TOKEN_REGEXP"], ["punctuation", "("],
["function", "COS"], ["punctuation", "("],
["function", "COUNT"], ["punctuation", "("],
["function", "CURL"], ["punctuation", "("],
["function", "DATE_ADD_MILLIS"], ["punctuation", "("],
["function", "DATE_ADD_STR"], ["punctuation", "("],
["function", "DATE_DIFF_MILLIS"], ["punctuation", "("],
["function", "DATE_DIFF_STR"], ["punctuation", "("],
["function", "DATE_FORMAT_STR"], ["punctuation", "("],
["function", "DATE_PART_MILLIS"], ["punctuation", "("],
["function", "DATE_PART_STR"], ["punctuation", "("],
["function", "DATE_RANGE_MILLIS"], ["punctuation", "("],
["function", "DATE_RANGE_STR"], ["punctuation", "("],
["function", "DATE_TRUNC_MILLIS"], ["punctuation", "("],
["function", "DATE_TRUNC_STR"], ["punctuation", "("],
["function", "DECODE_JSON"], ["punctuation", "("],
["function", "DEGREES"], ["punctuation", "("],
["function", "DURATION_TO_STR"], ["punctuation", "("],
["function", "E"], ["punctuation", "("],
["function", "ENCODED_SIZE"], ["punctuation", "("],
["function", "ENCODE_JSON"], ["punctuation", "("],
["function", "EXP"], ["punctuation", "("],
["function", "FLOOR"], ["punctuation", "("],
["function", "GREATEST"], ["punctuation", "("],
["function", "HAS_TOKEN"], ["punctuation", "("],
["function", "IFINF"], ["punctuation", "("],
["function", "IFMISSING"], ["punctuation", "("],
["function", "IFMISSINGORNULL"], ["punctuation", "("],
["function", "IFNAN"], ["punctuation", "("],
["function", "IFNANORINF"], ["punctuation", "("],
["function", "IFNULL"], ["punctuation", "("],
["function", "INITCAP"], ["punctuation", "("],
["function", "ISARRAY"], ["punctuation", "("],
["function", "ISATOM"], ["punctuation", "("],
["function", "ISBOOLEAN"], ["punctuation", "("],
["function", "ISNUMBER"], ["punctuation", "("],
["function", "ISOBJECT"], ["punctuation", "("],
["function", "ISSTRING"], ["punctuation", "("],
["function", "IsBitSET"], ["punctuation", "("],
["function", "LEAST"], ["punctuation", "("],
["function", "LENGTH"], ["punctuation", "("],
["function", "LN"], ["punctuation", "("],
["function", "LOG"], ["punctuation", "("],
["function", "LOWER"], ["punctuation", "("],
["function", "LTRIM"], ["punctuation", "("],
["function", "MAX"], ["punctuation", "("],
["function", "META"], ["punctuation", "("],
["function", "MILLIS"], ["punctuation", "("],
["function", "MILLIS_TO_LOCAL"], ["punctuation", "("],
["function", "MILLIS_TO_STR"], ["punctuation", "("],
["function", "MILLIS_TO_TZ"], ["punctuation", "("],
["function", "MILLIS_TO_UTC"], ["punctuation", "("],
["function", "MILLIS_TO_ZONE_NAME"], ["punctuation", "("],
["function", "MIN"], ["punctuation", "("],
["function", "MISSINGIF"], ["punctuation", "("],
["function", "NANIF"], ["punctuation", "("],
["function", "NEGINFIF"], ["punctuation", "("],
["function", "NOW_LOCAL"], ["punctuation", "("],
["function", "NOW_MILLIS"], ["punctuation", "("],
["function", "NOW_STR"], ["punctuation", "("],
["function", "NOW_TZ"], ["punctuation", "("],
["function", "NOW_UTC"], ["punctuation", "("],
["function", "NULLIF"], ["punctuation", "("],
["function", "OBJECT_ADD"], ["punctuation", "("],
["function", "OBJECT_CONCAT"], ["punctuation", "("],
["function", "OBJECT_INNER_PAIRS"], ["punctuation", "("],
["function", "OBJECT_INNER_VALUES"], ["punctuation", "("],
["function", "OBJECT_LENGTH"], ["punctuation", "("],
["function", "OBJECT_NAMES"], ["punctuation", "("],
["function", "OBJECT_PAIRS"], ["punctuation", "("],
["function", "OBJECT_PUT"], ["punctuation", "("],
["function", "OBJECT_REMOVE"], ["punctuation", "("],
["function", "OBJECT_RENAME"], ["punctuation", "("],
["function", "OBJECT_REPLACE"], ["punctuation", "("],
["function", "OBJECT_UNWRAP"], ["punctuation", "("],
["function", "OBJECT_VALUES"], ["punctuation", "("],
["function", "PAIRS"], ["punctuation", "("],
["function", "PI"], ["punctuation", "("],
["function", "POLY_LENGTH"], ["punctuation", "("],
["function", "POSINFIF"], ["punctuation", "("],
["function", "POSITION"], ["punctuation", "("],
["function", "POWER"], ["punctuation", "("],
["function", "RADIANS"], ["punctuation", "("],
["function", "RANDOM"], ["punctuation", "("],
["function", "REGEXP_CONTAINS"], ["punctuation", "("],
["function", "REGEXP_LIKE"], ["punctuation", "("],
["function", "REGEXP_POSITION"], ["punctuation", "("],
["function", "REGEXP_REPLACE"], ["punctuation", "("],
["function", "REPEAT"], ["punctuation", "("],
["function", "REPLACE"], ["punctuation", "("],
["function", "REVERSE"], ["punctuation", "("],
["function", "ROUND"], ["punctuation", "("],
["function", "RTRIM"], ["punctuation", "("],
["function", "SIGN"], ["punctuation", "("],
["function", "SIN"], ["punctuation", "("],
["function", "SPLIT"], ["punctuation", "("],
["function", "SQRT"], ["punctuation", "("],
["function", "STR_TO_DURATION"], ["punctuation", "("],
["function", "STR_TO_MILLIS"], ["punctuation", "("],
["function", "STR_TO_TZ"], ["punctuation", "("],
["function", "STR_TO_UTC"], ["punctuation", "("],
["function", "STR_TO_ZONE_NAME"], ["punctuation", "("],
["function", "SUBSTR"], ["punctuation", "("],
["function", "SUFFIXES"], ["punctuation", "("],
["function", "SUM"], ["punctuation", "("],
["function", "TAN"], ["punctuation", "("],
["function", "TITLE"], ["punctuation", "("],
["function", "TOARRAY"], ["punctuation", "("],
["function", "TOATOM"], ["punctuation", "("],
["function", "TOBOOLEAN"], ["punctuation", "("],
["function", "TOKENS"], ["punctuation", "("],
["function", "TOKENS"], ["punctuation", "("],
["function", "TONUMBER"], ["punctuation", "("],
["function", "TOOBJECT"], ["punctuation", "("],
["function", "TOSTRING"], ["punctuation", "("],
["function", "TRIM"], ["punctuation", "("],
["function", "TRUNC"], ["punctuation", "("],
["function", "TYPE"], ["punctuation", "("],
["function", "UPPER"], ["punctuation", "("],
["function", "WEEKDAY_MILLIS"], ["punctuation", "("],
["function", "WEEKDAY_STR"], ["punctuation", "("]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/n1ql/identifier_feature.test
================================================
``
`foo`
`foo bar`
`foo
bar`
----------------------------------------------------
[
["identifier", "``"],
["identifier", "`foo`"],
["identifier", "`foo bar`"],
["identifier", "`foo\r\nbar`"]
]
----------------------------------------------------
Checks for escaped identifiers.
================================================
FILE: tests/languages/n1ql/keyword_feature.test
================================================
ADVISE
ALL
ALTER
ANALYZE
AS
ASC
AT
BEGIN
BINARY
BOOLEAN
BREAK
BUCKET
BUILD
BY
CALL
CAST
CLUSTER
COLLATE
COLLECTION
COMMIT
COMMITTED
CONNECT
CONTINUE
CORRELATE
CORRELATED
COVER
CREATE
CURRENT
DATABASE
DATASET
DATASTORE
DECLARE
DECREMENT
DELETE
DERIVED
DESC
DESCRIBE
DISTINCT
DO
DROP
EACH
ELEMENT
EXCEPT
EXCLUDE
EXECUTE
EXPLAIN
FETCH
FILTER
FLATTEN
FLUSH
FOLLOWING
FOR
FORCE
FROM
FTS
FUNCTION
GOLANG
GRANT
GROUP
GROUPS
GSI
HASH
HAVING
IF
IGNORE
ILIKE
INCLUDE
INCREMENT
INDEX
INFER
INLINE
INNER
INSERT
INTERSECT
INTO
IS
ISOLATION
JAVASCRIPT
JOIN
KEY
KEYS
KEYSPACE
KNOWN
LANGUAGE
LAST
LEFT
LET
LETTING
LEVEL
LIMIT
LSM
MAP
MAPPING
MATCHED
MATERIALIZED
MERGE
MINUS
MISSING
NAMESPACE
NEST
NL
NO
NTH_VALUE
NULL
NULLS
NUMBER
OBJECT
OFFSET
ON
OPTION
OPTIONS
ORDER
OTHERS
OUTER
OVER
PARSE
PARTITION
PASSWORD
PATH
POOL
PRECEDING
PREPARE
PRIMARY
PRIVATE
PRIVILEGE
PROBE
PROCEDURE
PUBLIC
RANGE
RAW
REALM
REDUCE
RENAME
RESPECT
RETURN
RETURNING
REVOKE
RIGHT
ROLE
ROLLBACK
ROW
ROWS
SATISFIES
SAVEPOINT
SCHEMA
SCOPE
SELECT
SELF
SEMI
SET
SHOW
SOME
START
STATISTICS
STRING
SYSTEM
TIES
TO
TRAN
TRANSACTION
TRIGGER
TRUNCATE
UNBOUNDED
UNDER
UNION
UNIQUE
UNKNOWN
UNNEST
UNSET
UPDATE
UPSERT
USE
USER
USING
VALIDATE
VALUE
VALUES
VIA
VIEW
WHERE
WHILE
WINDOW
WITH
WORK
XOR
----------------------------------------------------
[
["keyword", "ADVISE"],
["keyword", "ALL"],
["keyword", "ALTER"],
["keyword", "ANALYZE"],
["keyword", "AS"],
["keyword", "ASC"],
["keyword", "AT"],
["keyword", "BEGIN"],
["keyword", "BINARY"],
["keyword", "BOOLEAN"],
["keyword", "BREAK"],
["keyword", "BUCKET"],
["keyword", "BUILD"],
["keyword", "BY"],
["keyword", "CALL"],
["keyword", "CAST"],
["keyword", "CLUSTER"],
["keyword", "COLLATE"],
["keyword", "COLLECTION"],
["keyword", "COMMIT"],
["keyword", "COMMITTED"],
["keyword", "CONNECT"],
["keyword", "CONTINUE"],
["keyword", "CORRELATE"],
["keyword", "CORRELATED"],
["keyword", "COVER"],
["keyword", "CREATE"],
["keyword", "CURRENT"],
["keyword", "DATABASE"],
["keyword", "DATASET"],
["keyword", "DATASTORE"],
["keyword", "DECLARE"],
["keyword", "DECREMENT"],
["keyword", "DELETE"],
["keyword", "DERIVED"],
["keyword", "DESC"],
["keyword", "DESCRIBE"],
["keyword", "DISTINCT"],
["keyword", "DO"],
["keyword", "DROP"],
["keyword", "EACH"],
["keyword", "ELEMENT"],
["keyword", "EXCEPT"],
["keyword", "EXCLUDE"],
["keyword", "EXECUTE"],
["keyword", "EXPLAIN"],
["keyword", "FETCH"],
["keyword", "FILTER"],
["keyword", "FLATTEN"],
["keyword", "FLUSH"],
["keyword", "FOLLOWING"],
["keyword", "FOR"],
["keyword", "FORCE"],
["keyword", "FROM"],
["keyword", "FTS"],
["keyword", "FUNCTION"],
["keyword", "GOLANG"],
["keyword", "GRANT"],
["keyword", "GROUP"],
["keyword", "GROUPS"],
["keyword", "GSI"],
["keyword", "HASH"],
["keyword", "HAVING"],
["keyword", "IF"],
["keyword", "IGNORE"],
["keyword", "ILIKE"],
["keyword", "INCLUDE"],
["keyword", "INCREMENT"],
["keyword", "INDEX"],
["keyword", "INFER"],
["keyword", "INLINE"],
["keyword", "INNER"],
["keyword", "INSERT"],
["keyword", "INTERSECT"],
["keyword", "INTO"],
["keyword", "IS"],
["keyword", "ISOLATION"],
["keyword", "JAVASCRIPT"],
["keyword", "JOIN"],
["keyword", "KEY"],
["keyword", "KEYS"],
["keyword", "KEYSPACE"],
["keyword", "KNOWN"],
["keyword", "LANGUAGE"],
["keyword", "LAST"],
["keyword", "LEFT"],
["keyword", "LET"],
["keyword", "LETTING"],
["keyword", "LEVEL"],
["keyword", "LIMIT"],
["keyword", "LSM"],
["keyword", "MAP"],
["keyword", "MAPPING"],
["keyword", "MATCHED"],
["keyword", "MATERIALIZED"],
["keyword", "MERGE"],
["keyword", "MINUS"],
["keyword", "MISSING"],
["keyword", "NAMESPACE"],
["keyword", "NEST"],
["keyword", "NL"],
["keyword", "NO"],
["keyword", "NTH_VALUE"],
["keyword", "NULL"],
["keyword", "NULLS"],
["keyword", "NUMBER"],
["keyword", "OBJECT"],
["keyword", "OFFSET"],
["keyword", "ON"],
["keyword", "OPTION"],
["keyword", "OPTIONS"],
["keyword", "ORDER"],
["keyword", "OTHERS"],
["keyword", "OUTER"],
["keyword", "OVER"],
["keyword", "PARSE"],
["keyword", "PARTITION"],
["keyword", "PASSWORD"],
["keyword", "PATH"],
["keyword", "POOL"],
["keyword", "PRECEDING"],
["keyword", "PREPARE"],
["keyword", "PRIMARY"],
["keyword", "PRIVATE"],
["keyword", "PRIVILEGE"],
["keyword", "PROBE"],
["keyword", "PROCEDURE"],
["keyword", "PUBLIC"],
["keyword", "RANGE"],
["keyword", "RAW"],
["keyword", "REALM"],
["keyword", "REDUCE"],
["keyword", "RENAME"],
["keyword", "RESPECT"],
["keyword", "RETURN"],
["keyword", "RETURNING"],
["keyword", "REVOKE"],
["keyword", "RIGHT"],
["keyword", "ROLE"],
["keyword", "ROLLBACK"],
["keyword", "ROW"],
["keyword", "ROWS"],
["keyword", "SATISFIES"],
["keyword", "SAVEPOINT"],
["keyword", "SCHEMA"],
["keyword", "SCOPE"],
["keyword", "SELECT"],
["keyword", "SELF"],
["keyword", "SEMI"],
["keyword", "SET"],
["keyword", "SHOW"],
["keyword", "SOME"],
["keyword", "START"],
["keyword", "STATISTICS"],
["keyword", "STRING"],
["keyword", "SYSTEM"],
["keyword", "TIES"],
["keyword", "TO"],
["keyword", "TRAN"],
["keyword", "TRANSACTION"],
["keyword", "TRIGGER"],
["keyword", "TRUNCATE"],
["keyword", "UNBOUNDED"],
["keyword", "UNDER"],
["keyword", "UNION"],
["keyword", "UNIQUE"],
["keyword", "UNKNOWN"],
["keyword", "UNNEST"],
["keyword", "UNSET"],
["keyword", "UPDATE"],
["keyword", "UPSERT"],
["keyword", "USE"],
["keyword", "USER"],
["keyword", "USING"],
["keyword", "VALIDATE"],
["keyword", "VALUE"],
["keyword", "VALUES"],
["keyword", "VIA"],
["keyword", "VIEW"],
["keyword", "WHERE"],
["keyword", "WHILE"],
["keyword", "WINDOW"],
["keyword", "WITH"],
["keyword", "WORK"],
["keyword", "XOR"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/n1ql/number_feature.test
================================================
42
0.154
3.1E+7
.02e2
2.
----------------------------------------------------
[
["number", "42"],
["number", "0.154"],
["number", "3.1E+7"],
["number", ".02e2"],
["number", "2."]
]
----------------------------------------------------
Checks for integers, decimal and e-notation numbers.
================================================
FILE: tests/languages/n1ql/operator_feature.test
================================================
+ - * /
= % ||
!=
< <= <>
> >=
AND
ANY
ARRAY
BETWEEN
CASE
ELSE
END
EVERY
EXISTS
FIRST
IN
LIKE
NOT
OR
THEN
VALUED
WHEN
WITHIN
----------------------------------------------------
[
["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"],
["operator", "="], ["operator", "%"], ["operator", "||"],
["operator", "!="],
["operator", "<"], ["operator", "<="], ["operator", "<>"],
["operator", ">"], ["operator", ">="],
["operator", "AND"],
["operator", "ANY"],
["operator", "ARRAY"],
["operator", "BETWEEN"],
["operator", "CASE"],
["operator", "ELSE"],
["operator", "END"],
["operator", "EVERY"],
["operator", "EXISTS"],
["operator", "FIRST"],
["operator", "IN"],
["operator", "LIKE"],
["operator", "NOT"],
["operator", "OR"],
["operator", "THEN"],
["operator", "VALUED"],
["operator", "WHEN"],
["operator", "WITHIN"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/n1ql/parameter_feature.test
================================================
$1
$named_parameter
----------------------------------------------------
[
["parameter", "$1"],
["parameter", "$named_parameter"]
]
----------------------------------------------------
Checks for parameters.
================================================
FILE: tests/languages/n1ql/string_feature.test
================================================
""
"fo\"obar"
"foo
bar"
''
'fo\'obar'
'foo
bar'
'foo''s bar'
"foo's ""bar"""
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "\"foo\r\nbar\""],
["string", "''"],
["string", "'fo\\'obar'"],
["string", "'foo\r\nbar'"],
["string", "'foo''s bar'"],
["string", "\"foo's \"\"bar\"\"\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/n4js/annotation_feature.test
================================================
@Inject
@Internal
@Undefined
@StringBased
@Final
@GenerateInjector
@WithParentInjector
@Spec
@Override
@Promisifiable
@Promisify
@This
@N4JS
@IgnoreImplementation
@Global
@ProvidedByRuntime
@TestAPI
@Polyfill
@StaticPolyfill
@StaticPolyfillAware
@StaticPolyfillModule
@Transient
----------------------------------------------------
[
["annotation", "@Inject"],
["annotation", "@Internal"],
["annotation", "@Undefined"],
["annotation", "@StringBased"],
["annotation", "@Final"],
["annotation", "@GenerateInjector"],
["annotation", "@WithParentInjector"],
["annotation", "@Spec"],
["annotation", "@Override"],
["annotation", "@Promisifiable"],
["annotation", "@Promisify"],
["annotation", "@This"],
["annotation", "@N4JS"],
["annotation", "@IgnoreImplementation"],
["annotation", "@Global"],
["annotation", "@ProvidedByRuntime"],
["annotation", "@TestAPI"],
["annotation", "@Polyfill"],
["annotation", "@StaticPolyfill"],
["annotation", "@StaticPolyfillAware"],
["annotation", "@StaticPolyfillModule"],
["annotation", "@Transient"]
]
----------------------------------------------------
Test for annotations.
================================================
FILE: tests/languages/n4js/keyword_feature.test
================================================
any
Array
boolean
break
case
catch
class;
const
constructor
continue
debugger
declare
default
delete
do
else
enum
export
extends;
false
finally
for
from
function
get
if
implements;
import
in
instanceof;
interface;
let
module
new;
null
number
package
private
protected
public
return
set
static
string
super
switch
this
throw
true
try
typeof
var
void
while
with
yield
----------------------------------------------------
[
["keyword", "any"],
["keyword", "Array"],
["keyword", "boolean"],
["keyword", "break"],
["keyword", "case"],
["keyword", "catch"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "const"],
["keyword", "constructor"],
["keyword", "continue"],
["keyword", "debugger"],
["keyword", "declare"],
["keyword", "default"],
["keyword", "delete"],
["keyword", "do"],
["keyword", "else"],
["keyword", "enum"],
["keyword", "export"],
["keyword", "extends"], ["punctuation", ";"],
["keyword", "false"],
["keyword", "finally"],
["keyword", "for"],
["keyword", "from"],
["keyword", "function"],
["keyword", "get"],
["keyword", "if"],
["keyword", "implements"], ["punctuation", ";"],
["keyword", "import"],
["keyword", "in"],
["keyword", "instanceof"], ["punctuation", ";"],
["keyword", "interface"], ["punctuation", ";"],
["keyword", "let"],
["keyword", "module"],
["keyword", "new"], ["punctuation", ";"],
["keyword", "null"],
["keyword", "number"],
["keyword", "package"],
["keyword", "private"],
["keyword", "protected"],
["keyword", "public"],
["keyword", "return"],
["keyword", "set"],
["keyword", "static"],
["keyword", "string"],
["keyword", "super"],
["keyword", "switch"],
["keyword", "this"],
["keyword", "throw"],
["keyword", "true"],
["keyword", "try"],
["keyword", "typeof"],
["keyword", "var"],
["keyword", "void"],
["keyword", "while"],
["keyword", "with"],
["keyword", "yield"]
]
----------------------------------------------------
Tests N4JS keywords.
================================================
FILE: tests/languages/nand2tetris-hdl/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/nand2tetris-hdl/comment_feature.test
================================================
// foobar
/**/
/* foo
bar */
/*
* foobar
*/
----------------------------------------------------
[
["comment", "// foobar"],
["comment", "/**/"],
["comment", "/* foo\r\nbar */"],
["comment", "/*\r\n * foobar\r\n */"]
]
----------------------------------------------------
Checks for single-line and multi-line comments.
================================================
FILE: tests/languages/nand2tetris-hdl/function_feature.test
================================================
And()
not()
mux16()
----------------------------------------------------
[
["function", "And"],
["punctuation", "("],
["punctuation", ")"],
["function", "not"],
["punctuation", "("],
["punctuation", ")"],
["function", "mux16"],
["punctuation", "("],
["punctuation", ")"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/nand2tetris-hdl/keyword_feature.test
================================================
CHIP
IN
OUT
PARTS
BUILTIN
CLOCKED
----------------------------------------------------
[
["keyword", "CHIP"],
["keyword", "IN"],
["keyword", "OUT"],
["keyword", "PARTS"],
["keyword", "BUILTIN"],
["keyword", "CLOCKED"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/nand2tetris-hdl/number_feature.test
================================================
0
16
32
----------------------------------------------------
[
["number", "0"],
["number", "16"],
["number", "32"]
]
----------------------------------------------------
Checks for integer numbers.
================================================
FILE: tests/languages/nand2tetris-hdl/operator_feature.test
================================================
=
..
----------------------------------------------------
[
["operator", "="],
["operator", ".."]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/nand2tetris-hdl/punctuation_feature.test
================================================
( )
{ }
[ ]
,
;
:
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ","],
["punctuation", ";"],
["punctuation", ":"]
]
----------------------------------------------------
Checks for punctuation.
================================================
FILE: tests/languages/naniscript/command_feature.test
================================================
@
@ cmdWithWhiteSpaceBefore
@cmdWithTrailingSemicolon:
@paramlessCmd
@cmdWithNoParamsAndWhitespaceBefore
@cmdWithNoParamsAndTabBefore
@cmdWithNoParamsAndTabAndSpacesBefore
@cmdWithNoParamsWrappedInWhitespaces
@cmdWithNoParamWithTrailingSpace
@cmdWithNoParamWithMultipleTrailingSpaces
@cmdWithNoParamWithTrailingTab
@cmdWithNoParamWithTrailingTabAndSpaces
@cmdWithPositiveIntParam 1
@cmdWithNegativeIntParam -1
@cmdWithPositiveFloatParamAndNoFraction 1.
@cmdWithPositiveFloatParamAndFraction 1.10
@cmdWithPositiveHegativeFloatParamAndNoFraction -1.
@cmdWithPositiveHegativeFloatParamAndFraction -1.10
@cmdWithBoolParamAndPositive true
@cmdWithBoolParamAndNegative false
@cmdWithStringParam hello$co\:mma"d"
@cmdWithQuotedStringNamelessParameter "hello grizzly"
@cmdWithQuotedStringNamelessParameterWithEscapedQuotesInTheValue "hello \"grizzly\""
@set choice="moe"
@command hello.grizzly
@command one,two,three
@command 1,2,3
@command true,false,true
@command hi:grizzly
@command hi:1
@command hi:true
@command 1 in:forest danger:true
@char 1 pos:0.25,-0.75 look:right
----------------------------------------------------
[
"@\r\n@ cmdWithWhiteSpaceBefore\r\n@cmdWithTrailingSemicolon:\r\n",
["command", [
["command-name", "@paramlessCmd"]
]],
["command", [
["command-name", "@cmdWithNoParamsAndWhitespaceBefore"]
]],
["command", [
["command-name", "@cmdWithNoParamsAndTabBefore"]
]],
["command", [
["command-name", "@cmdWithNoParamsAndTabAndSpacesBefore"]
]],
["command", [
["command-name", "@cmdWithNoParamsWrappedInWhitespaces"]
]],
["command", [
["command-name", "@cmdWithNoParamWithTrailingSpace"]
]],
["command", [
["command-name", "@cmdWithNoParamWithMultipleTrailingSpaces"]
]],
["command", [
["command-name", "@cmdWithNoParamWithTrailingTab"]
]],
["command", [
["command-name", "@cmdWithNoParamWithTrailingTabAndSpaces"]
]],
["command", [
["command-name", "@cmdWithPositiveIntParam"],
["command-params", [
["command-param-value", "1"]
]]
]],
["command", [
["command-name", "@cmdWithNegativeIntParam"],
["command-params", [
["command-param-value", "-1"]
]]
]],
["command", [
["command-name", "@cmdWithPositiveFloatParamAndNoFraction"],
["command-params", [
["command-param-value", "1."]
]]
]],
["command", [
["command-name", "@cmdWithPositiveFloatParamAndFraction"],
["command-params", [
["command-param-value", "1.10"]
]]
]],
["command", [
["command-name", "@cmdWithPositiveHegativeFloatParamAndNoFraction"],
["command-params", [
["command-param-value", "-1."]
]]
]],
["command", [
["command-name", "@cmdWithPositiveHegativeFloatParamAndFraction"],
["command-params", [
["command-param-value", "-1.10"]
]]
]],
["command", [
["command-name", "@cmdWithBoolParamAndPositive"],
["command-params", [
["command-param-value", "true"]
]]
]],
["command", [
["command-name", "@cmdWithBoolParamAndNegative"],
["command-params", [
["command-param-value", "false"]
]]
]],
["command", [
["command-name", "@cmdWithStringParam"],
["command-params", [
["command-param-value", "hello$co\\:mma\"d\""]
]]
]],
["command", [
["command-name", "@cmdWithQuotedStringNamelessParameter"],
["command-params", [
["quoted-string", "\"hello grizzly\""]
]]
]],
["command", [
["command-name", "@cmdWithQuotedStringNamelessParameterWithEscapedQuotesInTheValue"],
["command-params", [
["quoted-string", "\"hello \\\"grizzly\\\"\""]
]]
]],
["command", [
["command-name", "@set"],
["command-params", [
["command-param-value", "choice=\"moe\""]
]]
]],
["command", [
["command-name", "@command"],
["command-params", [
["command-param-value", "hello.grizzly"]
]]
]],
["command", [
["command-name", "@command"],
["command-params", [
["command-param-value", "one,two,three"]
]]
]],
["command", [
["command-name", "@command"],
["command-params", [
["command-param-value", "1,2,3"]
]]
]],
["command", [
["command-name", "@command"],
["command-params", [
["command-param-value", "true,false,true"]
]]
]],
["command", [
["command-name", "@command"],
["command-params", [
["command-param-id", "hi:"],
["command-param-value", "grizzly"]
]]
]],
["command", [
["command-name", "@command"],
["command-params", [
["command-param-id", "hi:"],
["command-param-value", "1"]
]]
]],
["command", [
["command-name", "@command"],
["command-params", [
["command-param-id", "hi:"],
["command-param-value", "true"]
]]
]],
["command", [
["command-name", "@command"],
["command-params", [
["command-param-value", "1"],
["command-param-id", "in:"],
["command-param-value", "forest"],
["command-param-id", "danger:"],
["command-param-value", "true"]
]]
]],
["command", [
["command-name", "@char"],
["command-params", [
["command-param-value", "1"],
["command-param-id", "pos:"],
["command-param-value", "0.25,-0.75"],
["command-param-id", "look:"],
["command-param-value", "right"]
]]
]]
]
----------------------------------------------------
Command tests.
================================================
FILE: tests/languages/naniscript/comment_feature.test
================================================
;
; comment
\:; invalid comment
----------------------------------------------------
[
["comment", ";"],
["comment", "; comment"],
["generic-text", [
"\\:; invalid comment"
]]
]
----------------------------------------------------
Comment tests.
================================================
FILE: tests/languages/naniscript/define_feature.test
================================================
>
>DefineKey define _ + 3h f[29 j] value *
----------------------------------------------------
[
">\r\n",
["define", [
">",
["key", "DefineKey"],
["value", "define _ + 3h f[29 j] value *"]
]]
]
----------------------------------------------------
Define tests.
================================================
FILE: tests/languages/naniscript/expression_feature.test
================================================
{}
{ Abs(a, d) + 12 - 1 / -230.0 + "Lol ipsum" }
Expressions inside a generic text line: Loreim ipsu,{ Abs(a, d) + 12 - 1 / -230.0 + "Lol ipsum" } doler sit amen {¯\_(ツ)_/¯}.
@ExpressionInsteadOfNamelessParameterValue {x > 0}
@ExpressionBlendedWithNamelessParameterValue sdf{x > 0}df
@ExpressionsInsideNamedParameterValueWrappedInQuotes text:"{a} < {b}"
@ExpressionsBlendedWithNamedParameterValue param:32r2f,df{x > 0},d.{Abs(0) + 12.24 > 0}ff
@ExpressionsInsteadOfNamelessParameterAndQuotedParameter {remark} if:remark=="Saying \\"Stop { "the" } car\\" was a mistake."
----------------------------------------------------
[
["generic-text", [
["expression", "{}"]
]],
["generic-text", [
["expression", "{ Abs(a, d) + 12 - 1 / -230.0 + \"Lol ipsum\" }"]
]],
["generic-text", [
"Expressions inside a generic text line: Loreim ipsu,",
["expression", "{ Abs(a, d) + 12 - 1 / -230.0 + \"Lol ipsum\" }"],
" doler sit amen ",
["expression", "{¯\\_(ツ)_/¯}"],
"."
]],
["command", [
["command-name", "@ExpressionInsteadOfNamelessParameterValue"],
["expression", "{x > 0}"]
]],
["command", [
["command-name", "@ExpressionBlendedWithNamelessParameterValue"],
["command-params", [
["command-param-value", "sdf"]
]],
["expression", "{x > 0}"],
["command-params", [
["command-param-value", "df"]
]]
]],
["command", [
["command-name", "@ExpressionsInsideNamedParameterValueWrappedInQuotes"],
["command-params", [
["command-param-id", "text:"],
["command-param-value", "\""]
]],
["expression", "{a}"],
["command-params", [
["command-param-value", "<"]
]],
["expression", "{b}"],
["command-params", [
["command-param-value", "\""]
]]
]],
["command", [
["command-name", "@ExpressionsBlendedWithNamedParameterValue"],
["command-params", [
["command-param-id", "param:"],
["command-param-value", "32r2f,df"]
]],
["expression", "{x > 0}"],
["command-params", [
["command-param-value", ",d."]
]],
["expression", "{Abs(0) + 12.24 > 0}"],
["command-params", [
["command-param-value", "ff"]
]]
]],
["command", [
["command-name", "@ExpressionsInsteadOfNamelessParameterAndQuotedParameter"],
["expression", "{remark}"],
["command-params", [
["command-param-id", "if:"],
["command-param-value", "remark=="],
["quoted-string", "\"Saying \\\\\""],
["command-param-value", "Stop"]
]],
["expression", "{ \"the\" }"],
["command-params", [
["command-param-value", "car\\\\\""],
["command-param-value", "was"],
["command-param-value", "a"],
["command-param-value", "mistake.\""]
]]
]]
]
----------------------------------------------------
Expressions tests.
================================================
FILE: tests/languages/naniscript/label_feature.test
================================================
#
# Section1
#Section2
# Section4
# SectionWithMultipleTabsBefore
## Section3
# Section with multiple words
# Section with
# Section with tab
----------------------------------------------------
[
"#\r\n",
["label", "# Section1"],
["label", "#Section2"],
["label", "# Section4"],
["label", "#\t\t\tSectionWithMultipleTabsBefore"],
"\r\n## Section3\r\n# Section with multiple words\r\n\t# Section with\r\n\t# Section with tab"
]
----------------------------------------------------
Label tests.
================================================
FILE: tests/languages/naniscript/mixed_content_feature.test
================================================
Generic text with inlined commands[i] example[command 1 danger:true] more text here [act danger:false true:false]
@action1ForTwoLinesWithCommands
@action2ForTwoLinesWithCommands
@commandAndGenericTextOnNewLine
Massa ut elementum.
@commandWithParameterAndGenericTextOnNewLine WideParam
Integer
Escaped braces inside generic text\{abu\}nt @ >ip#s;um< @ \[sdff j9dj\]
UnclosedExpression{ab{cndum dui dolor tincidu{nt [s[fa]sdf [
"Integer: a = {a} malesuada a + b = {a + b}", Random(a, b) = {Random(a, b)}, Random("foo", "bar", "foobar") = {Random("foo", "bar", "foobar")},}
#
>
@
----------------------------------------------------
[
["generic-text", [
"Generic text with inlined commands",
["inline-command", [
["start-stop-char", "["],
["command-param-name", "i"],
["start-stop-char", "]"]
]],
" example",
["inline-command", [
["start-stop-char", "["],
["command-param-name", "command"],
["command-params", [
["command-param-value", "1"],
["command-param-id", "danger:"],
["command-param-value", "true"]
]],
["start-stop-char", "]"]
]],
" more text here ",
["inline-command", [
["start-stop-char", "["],
["command-param-name", "act"],
["command-params", [
["command-param-id", "danger:"],
["command-param-value", "false"],
["command-param-id", "true:"],
["command-param-value", "false"]
]],
["start-stop-char", "]"]
]]
]],
["command", [
["command-name", "@action1ForTwoLinesWithCommands"]
]],
["command", [
["command-name", "@action2ForTwoLinesWithCommands"]
]],
["command", [
["command-name", "@commandAndGenericTextOnNewLine"]
]],
["generic-text", ["Massa ut elementum."]],
["command", [
["command-name", "@commandWithParameterAndGenericTextOnNewLine"],
["command-params", [
["command-param-value", "WideParam"]
]]
]],
["generic-text", ["Integer"]],
["generic-text", [
"Escaped braces inside generic text",
["escaped-char", "\\{"],
"abu",
["escaped-char", "\\}"],
"nt @ >ip#s;um< @ ",
["escaped-char", "\\["],
"sdff j9dj",
["escaped-char", "\\]"]
]],
["bad-line", "UnclosedExpression{ab{cndum dui dolor tincidu{nt [s[fa]sdf ["],
["bad-line", "\"Integer: a = {a} malesuada a + b = {a + b}\", Random(a, b) = {Random(a, b)}, Random(\"foo\", \"bar\", \"foobar\") = {Random(\"foo\", \"bar\", \"foobar\")},}"],
"\r\n#\r\n>\r\n@"
]
----------------------------------------------------
Mixed tests of Generic Text, Commands, Inline Commands.
================================================
FILE: tests/languages/nasm/comment_feature.test
================================================
;
; foo
----------------------------------------------------
[
["comment", ";"],
["comment", "; foo"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/nasm/keyword_feature.test
================================================
BITS 16 BITS 32 BITS 64
[BITS 16] [BITS 32] [BITS 64]
section Foo.bar
section foobar:
extern _printf
global _main
CPU 8086
FLOAT DAZ
DEFAULT REL
----------------------------------------------------
[
["keyword", "BITS 16"], ["keyword", "BITS 32"], ["keyword", "BITS 64"],
["keyword", "[BITS 16]"], ["keyword", "[BITS 32]"], ["keyword", "[BITS 64]"],
["keyword", "section Foo.bar"],
["keyword", "section foobar:"],
["keyword", "extern _printf"],
["keyword", "global _main"],
["keyword", "CPU 8086"],
["keyword", "FLOAT DAZ"],
["keyword", "DEFAULT REL"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/nasm/label_feature.test
================================================
foo42:
.foo:
..@foo:
----------------------------------------------------
[
["label", "foo42:"],
["label", ".foo:"],
["label", "..@foo:"]
]
----------------------------------------------------
Checks for labels.
================================================
FILE: tests/languages/nasm/number_feature.test
================================================
0xBadFace
0x4f.ab
0x4p2
0x2.ap-8
0x1p+1
0hBadFace
0h4f.ab
0h4p2
0h2.ap-8
0h1p+1
42fh
4ab2x
$4
$2a4f
0o75
0q75
75o
75q
0b0101
0y0101
0101b
0101y
0d42
0t42
42
3.14159
4.2e4
2e-1
3.1e+2
42d
3.14159d
4.2e4d
2e-1d
3.1e+2d
42t
3.14159t
4.2e4t
2e-1t
3.1e+2t
----------------------------------------------------
[
["number", "0xBadFace"],
["number", "0x4f.ab"],
["number", "0x4p2"],
["number", "0x2.ap-8"],
["number", "0x1p+1"],
["number", "0hBadFace"],
["number", "0h4f.ab"],
["number", "0h4p2"],
["number", "0h2.ap-8"],
["number", "0h1p+1"],
["number", "42fh"],
["number", "4ab2x"],
["number", "$4"],
["number", "$2a4f"],
["number", "0o75"],
["number", "0q75"],
["number", "75o"],
["number", "75q"],
["number", "0b0101"],
["number", "0y0101"],
["number", "0101b"],
["number", "0101y"],
["number", "0d42"],
["number", "0t42"],
["number", "42"],
["number", "3.14159"],
["number", "4.2e4"],
["number", "2e-1"],
["number", "3.1e+2"],
["number", "42d"],
["number", "3.14159d"],
["number", "4.2e4d"],
["number", "2e-1d"],
["number", "3.1e+2d"],
["number", "42t"],
["number", "3.14159t"],
["number", "4.2e4t"],
["number", "2e-1t"],
["number", "3.1e+2t"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/nasm/operator_feature.test
================================================
[ ]
* + - /
% < > =
& | $ !
----------------------------------------------------
[
["operator", "["], ["operator", "]"],
["operator", "*"], ["operator", "+"], ["operator", "-"], ["operator", "/"],
["operator", "%"], ["operator", "<"], ["operator", ">"], ["operator", "="],
["operator", "&"], ["operator", "|"], ["operator", "$"], ["operator", "!"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/nasm/register_feature.test
================================================
st0 st1
xmm1 xmm2
ymm1 ymm2
zmm1 zmm2
cr1 dr1 tr1
r1 r42
r1b r1w r1d
ax bx cx dx
eax ebx ecx edx
rax rbx rcx rdx
ah bh ch dh
al bl cl dl
bp sp si di
ebp esp esi edi
rbp rsp rsi rdi
cs ds es
fs gs ss
----------------------------------------------------
[
["register", "st0"], ["register", "st1"],
["register", "xmm1"], ["register", "xmm2"],
["register", "ymm1"], ["register", "ymm2"],
["register", "zmm1"], ["register", "zmm2"],
["register", "cr1"], ["register", "dr1"], ["register", "tr1"],
["register", "r1"], ["register", "r42"],
["register", "r1b"], ["register", "r1w"], ["register", "r1d"],
["register", "ax"], ["register", "bx"], ["register", "cx"], ["register", "dx"],
["register", "eax"], ["register", "ebx"], ["register", "ecx"], ["register", "edx"],
["register", "rax"], ["register", "rbx"], ["register", "rcx"], ["register", "rdx"],
["register", "ah"], ["register", "bh"], ["register", "ch"], ["register", "dh"],
["register", "al"], ["register", "bl"], ["register", "cl"], ["register", "dl"],
["register", "bp"], ["register", "sp"], ["register", "si"], ["register", "di"],
["register", "ebp"], ["register", "esp"], ["register", "esi"], ["register", "edi"],
["register", "rbp"], ["register", "rsp"], ["register", "rsi"], ["register", "rdi"],
["register", "cs"], ["register", "ds"], ["register", "es"],
["register", "fs"], ["register", "gs"], ["register", "ss"]
]
----------------------------------------------------
Checks for registers.
================================================
FILE: tests/languages/nasm/string_feature.test
================================================
""
"fo\"o"
''
'fo\'o'
``
`fo\`o`
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"o\""],
["string", "''"],
["string", "'fo\\'o'"],
["string", "``"],
["string", "`fo\\`o`"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/neon/boolean_feature.test
================================================
foo: true
bar: false
alt: [yes, no, YES, NO, TRUE, FALSE]
----------------------------------------------------
[
["key", "foo"], ["punctuation", ":"],
["boolean", "true"],
["key", "bar"], ["punctuation", ":"],
["boolean", "false"],
["key", "alt"], ["punctuation", ":"], ["punctuation", "["],
["boolean", "yes"], ["punctuation", ","], ["boolean", "no"], ["punctuation", ","], ["boolean", "YES"], ["punctuation", ","], ["boolean", "NO"], ["punctuation", ","], ["boolean", "TRUE"], ["punctuation", ","], ["boolean", "FALSE"],
["punctuation", "]"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/neon/comment_feature.test
================================================
#
# foobar
----------------------------------------------------
[
["comment", "#"],
["comment", "# foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/neon/composite.test
================================================
phones: {home: 555-6528,work: 555-7334 }
children: # this is a comment
- -50.5
entity: Column(type=int, nulls=yes)
----------------------------------------------------
[
["key", "phones"], ["punctuation", ":"], ["punctuation", "{"],
["key", "home"], ["punctuation", ":"],
["literal", "555-6528"], ["punctuation", ","],
["key", "work"], ["punctuation", ":"],
["literal", "555-7334"], ["punctuation", "}"],
["key", "children"], ["punctuation", ":"],
["comment", "# this is a comment"],
["punctuation", "-"], ["number", "-50.5"],
["key", "entity"], ["punctuation", ":"],
["literal", "Column"], ["punctuation", "("], ["key", "type"], ["punctuation", "="], ["literal", "int"], ["punctuation", ","], ["key", "nulls"], ["punctuation", "="], ["boolean", "yes"], ["punctuation", ")"]
]
----------------------------------------------------
Overall test
================================================
FILE: tests/languages/neon/datetime_feature.test
================================================
canonical: 2001-12-15T02:59:43.1Z
iso8601: 2001-12-14t21:59:43.10-05:00
spaced: 2001-12-14 21:59:43.10 -5
date: 2002-12-14
short: 2002-1-1
alt: 2016-06-03 19:00:00 +0200
----------------------------------------------------
[
["key", "canonical"], ["punctuation", ":"],
["datetime", "2001-12-15T02:59:43.1Z"],
["key", "iso8601"], ["punctuation", ":"],
["datetime", "2001-12-14t21:59:43.10-05:00"],
["key", "spaced"], ["punctuation", ":"],
["datetime", "2001-12-14 21:59:43.10 -5"],
["key", "date"], ["punctuation", ":"],
["datetime", "2002-12-14"],
["key", "short"], ["punctuation", ":"],
["datetime", "2002-1-1"],
["key", "alt"], ["punctuation", ":"], ["datetime", "2016-06-03 19:00:00 +0200"]
]
----------------------------------------------------
Checks for dates and datetimes.
================================================
FILE: tests/languages/neon/json_feature.test
================================================
[
[true,false, null],
{
"A": "/*",
"B": "B",
"foo": 1,
"b\"ar":{"bar":1},
"baz":"\""
},
[0, 123, 3.14159, 5.0e8, 0.2E+2, 47e-5],
[
"" , "foo\"bar\"baz", "\u2642\\ "
]
]
----------------------------------------------------
[
["punctuation", "["],
["punctuation", "["], ["boolean", "true"], ["punctuation", ","], ["boolean", "false"], ["punctuation", ","], ["null", "null"], ["punctuation", "]"], ["punctuation", ","],
["punctuation", "{"],
["string", "\"A\""], ["punctuation", ":"], ["string", "\"/*\""], ["punctuation", ","],
["string", "\"B\""], ["punctuation", ":"], ["string", "\"B\""], ["punctuation", ","],
["string", "\"foo\""], ["punctuation", ":"], ["number", "1"], ["punctuation", ","],
["string", "\"b\\\"ar\""], ["punctuation", ":"],["punctuation", "{"], ["string", "\"bar\""], ["punctuation", ":"], ["number", "1"], ["punctuation", "}"], ["punctuation", ","],
["string", "\"baz\""], ["punctuation", ":"], ["string", "\"\\\"\""],
["punctuation", "}"], ["punctuation", ","],
["punctuation", "["],
["number", "0"], ["punctuation", ","], ["number", "123"], ["punctuation", ","], ["number", "3.14159"], ["punctuation", ","], ["number", "5.0e8"], ["punctuation", ","], ["number", "0.2E+2"], ["punctuation", ","], ["number", "47e-5"],
["punctuation", "]"], ["punctuation", ","],
["punctuation", "["],
["string", "\"\""], ["punctuation", ","], ["string", "\"foo\\\"bar\\\"baz\""], ["punctuation", ","], ["string", "\"\\u2642\\\\ \""], ["punctuation", "]"],
["punctuation", "]"]
]
----------------------------------------------------
Checks for JSON superset.
================================================
FILE: tests/languages/neon/key_feature.test
================================================
foo: 4
FooBar : 5
alt=6
alt2 = 7
----------------------------------------------------
[
["key", "foo"], ["punctuation", ":"], ["number", "4"],
["key", "FooBar"], ["punctuation", ":"], ["number", "5"],
["key", "alt"], ["punctuation", "="], ["number", "6"],
["key", "alt2"], ["punctuation", "="], ["number", "7"]
]
----------------------------------------------------
Checks for keys.
================================================
FILE: tests/languages/neon/literal_feature.test
================================================
foo: hello:abc
bar: @test\x\b
----------------------------------------------------
[
["key", "foo"], ["punctuation", ":"],
["literal","hello:abc"],
["key", "bar"], ["punctuation", ":"],
["literal","@test\\x\\b"]
]
----------------------------------------------------
Checks for literals.
================================================
FILE: tests/languages/neon/null_feature.test
================================================
foo: null
----------------------------------------------------
[
["key", "foo"], ["punctuation", ":"],
["null", "null"]
]
----------------------------------------------------
Checks for null.
================================================
FILE: tests/languages/neon/number_feature.test
================================================
foo: 0xBadFace
bar: 0o754
baz: 42
foo: 3.14159
bar: 4e8
baz: 3.1E-7
foo: 0.4e+2
bar: -0xFF
baz: +0o123
----------------------------------------------------
[
["key", "foo"], ["punctuation", ":"],
["number", "0xBadFace"],
["key", "bar"], ["punctuation", ":"],
["number", "0o754"],
["key", "baz"], ["punctuation", ":"],
["number", "42"],
["key", "foo"], ["punctuation", ":"],
["number", "3.14159"],
["key", "bar"], ["punctuation", ":"],
["number", "4e8"],
["key", "baz"], ["punctuation", ":"],
["number", "3.1E-7"],
["key", "foo"], ["punctuation", ":"],
["number", "0.4e+2"],
["key", "bar"], ["punctuation", ":"],
["number", "-0xFF"],
["key", "baz"], ["punctuation", ":"],
["number", "+0o123"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/neon/string_feature.test
================================================
foo: ""
bar: "fo\"obar"
foo: ''
foo: "foo" # bar
bar: 'bar' # foo
multi: '''
one line
second line
third line
'''
multi: """
one line
second line
third line
"""
----------------------------------------------------
[
["key", "foo"], ["punctuation", ":"],
["string", "\"\""],
["key", "bar"], ["punctuation", ":"],
["string", "\"fo\\\"obar\""],
["key", "foo"], ["punctuation", ":"],
["string", "''"],
["key", "foo"], ["punctuation", ":"],
["string", "\"foo\""], ["comment", "# bar"],
["key", "bar"], ["punctuation", ":"],
["string", "'bar'"], ["comment", "# foo"],
["key", "multi"], ["punctuation", ":"],
["string", "'''\r\n\tone line\r\n\tsecond line\r\n\tthird line\r\n'''"],
["key", "multi"], ["punctuation", ":"],
["string", "\"\"\"\r\n\tone line\r\n\tsecond line\r\n\tthird line\r\n\"\"\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/nevod/comment_feature.test
================================================
/* Comment */
/* Multi-line
comment */
/**/
//
// Single-line comment
----------------------------------------------------
[
["comment", "/* Comment */"],
["comment", "/* Multi-line\r\ncomment */"],
["comment", "/**/"],
["comment", "//"],
["comment", "// Single-line comment"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/nevod/full_feature.test
================================================
@namespace Basic
{
@search @pattern Url(Domain, Path, Query, Anchor) =
Method + Domain:Url.Domain + ?Port + ?Path:Url.Path +
?Query:Url.Query + ?Anchor:Url.Anchor
@where {
Method = {'http', 'https' , 'ftp', 'mailto', 'file', 'data',
'irc'} + '://';
Domain = Word + [1+ '.' + Word + [0+ {Word, '_', '-'}]];
Port = ':' + Num;
Path = ?'/' + [0+ {Word, '/', '_', '+', '-', '%', '.'}];
Query = '?' + ?(Param + [0+ '&' + Param])
@where
{
Param = Identifier + '=' + Identifier
@where
{
Identifier = {Alpha, AlphaNum, '_'} + [0+ {Word, '_'}];
};
};
Anchor(Value) = '#' + Value:{Word};
};
}
----------------------------------------------------
[
["keyword", "@namespace"],
["namespace", "Basic"],
["operator", "{"],
["keyword", "@search"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "Url"],
["fields", [
["punctuation", "("],
["field-name", "Domain"],
["punctuation", ","],
["field-name", "Path"],
["punctuation", ","],
["field-name", "Query"],
["punctuation", ","],
["field-name", "Anchor"],
["punctuation", ")"]
]]
]],
["operator", "="],
["name", "Method"],
["operator", "+"],
["field-capture", [
["field-name", "Domain"],
["colon", ":"]
]],
["name", "Url.Domain"],
["operator", "+"],
["operator", "?"],
["name", "Port"],
["operator", "+"],
["operator", "?"],
["field-capture", [
["field-name", "Path"],
["colon", ":"]
]],
["name", "Url.Path"],
["operator", "+"],
["operator", "?"],
["field-capture", [
["field-name", "Query"],
["colon", ":"]
]],
["name", "Url.Query"],
["operator", "+"],
["operator", "?"],
["field-capture", [
["field-name", "Anchor"],
["colon", ":"]
]],
["name", "Url.Anchor"],
["keyword", "@where"],
["operator", "{"],
["pattern", [
["pattern-name", "Method"]
]],
["operator", "="],
["operator", "{"],
["string", ["'http'"]],
["punctuation", ","],
["string", ["'https'"]],
["punctuation", ","],
["string", ["'ftp'"]],
["punctuation", ","],
["string", ["'mailto'"]],
["punctuation", ","],
["string", ["'file'"]],
["punctuation", ","],
["string", ["'data'"]],
["punctuation", ","],
["string", ["'irc'"]],
["operator", "}"],
["operator", "+"],
["string", ["'://'"]],
["punctuation", ";"],
["pattern", [
["pattern-name", "Domain"]
]],
["operator", "="],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["operator", "+"],
["operator", "["],
["quantifier", "1+"],
["string", ["'.'"]],
["operator", "+"],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["operator", "+"],
["operator", "["],
["quantifier", "0+"],
["operator", "{"],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["punctuation", ","],
["string", ["'_'"]],
["punctuation", ","],
["string", ["'-'"]],
["operator", "}"],
["operator", "]"],
["operator", "]"],
["punctuation", ";"],
["pattern", [
["pattern-name", "Port"]
]],
["operator", "="],
["string", ["':'"]],
["operator", "+"],
["standard-pattern", [
["standard-pattern-name", "Num"]
]],
["punctuation", ";"],
["pattern", [
["pattern-name", "Path"]
]],
["operator", "="],
["operator", "?"],
["string", ["'/'"]],
["operator", "+"],
["operator", "["],
["quantifier", "0+"],
["operator", "{"],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["punctuation", ","],
["string", ["'/'"]],
["punctuation", ","],
["string", ["'_'"]],
["punctuation", ","],
["string", ["'+'"]],
["punctuation", ","],
["string", ["'-'"]],
["punctuation", ","],
["string", ["'%'"]],
["punctuation", ","],
["string", ["'.'"]],
["operator", "}"],
["operator", "]"],
["punctuation", ";"],
["pattern", [
["pattern-name", "Query"]
]],
["operator", "="],
["string", ["'?'"]],
["operator", "+"],
["operator", "?"],
["punctuation", "("],
["name", "Param"],
["operator", "+"],
["operator", "["],
["quantifier", "0+"],
["string", ["'&'"]],
["operator", "+"],
["name", "Param"],
["operator", "]"],
["punctuation", ")"],
["keyword", "@where"],
["operator", "{"],
["pattern", [
["pattern-name", "Param"]
]],
["operator", "="],
["name", "Identifier"],
["operator", "+"],
["string", ["'='"]],
["operator", "+"],
["name", "Identifier"],
["keyword", "@where"],
["operator", "{"],
["pattern", [
["pattern-name", "Identifier"]
]],
["operator", "="],
["operator", "{"],
["standard-pattern", [
["standard-pattern-name", "Alpha"]
]],
["punctuation", ","],
["standard-pattern", [
["standard-pattern-name", "AlphaNum"]
]],
["punctuation", ","],
["string", ["'_'"]],
["operator", "}"],
["operator", "+"],
["operator", "["],
["quantifier", "0+"],
["operator", "{"],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["punctuation", ","],
["string", ["'_'"]],
["operator", "}"],
["operator", "]"],
["punctuation", ";"],
["operator", "}"],
["punctuation", ";"],
["operator", "}"],
["punctuation", ";"],
["pattern", [
["pattern-name", "Anchor"],
["fields", [
["punctuation", "("],
["field-name", "Value"],
["punctuation", ")"]
]]
]],
["operator", "="],
["string", ["'#'"]],
["operator", "+"],
["field-capture", [
["field-name", "Value"],
["colon", ":"]
]],
["operator", "{"],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["operator", "}"],
["punctuation", ";"],
["operator", "}"],
["punctuation", ";"],
["operator", "}"]
]
================================================
FILE: tests/languages/nevod/keyword_feature.test
================================================
@require @namespace @pattern @search
@inside @outside @having
@where
----------------------------------------------------
[
["keyword", "@require"], ["keyword", "@namespace"], ["keyword", "@pattern"], ["keyword", "@search"],
["keyword", "@inside"], ["keyword", "@outside"], ["keyword", "@having"],
["keyword", "@where"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/nevod/operator_feature.test
================================================
( , ) ;
+ _
.. ...
[ 0-5 ]
&
~
?
{}
----------------------------------------------------
[
["punctuation", "("], ["punctuation", ","], ["punctuation", ")"], ["punctuation", ";"],
["operator", "+"], ["operator", "_"],
["operator", ".."], ["operator", "..."],
["operator", "["], ["quantifier", "0-5"], ["operator", "]"],
["operator", "&"],
["operator", "~"],
["operator", "?"],
["operator", "{"], ["operator", "}"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/nevod/package_feature.test
================================================
@namespace Basic
{
@search @pattern GUID = Word(8) + [3 '-' + Word(4)] + '-' + Word(12);
}
@require "GUID.np";
@namespace Basic
{
@search @pattern GUID-in-Braces = '{' + GUID + '}';
}
----------------------------------------------------
[
["keyword", "@namespace"],
["namespace", "Basic"],
["operator", "{"],
["keyword", "@search"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "GUID"]
]],
["operator", "="],
["standard-pattern", [
["standard-pattern-name", "Word"],
["punctuation", "("],
["quantifier", "8"],
["punctuation", ")"]
]],
["operator", "+"],
["operator", "["],
["quantifier", "3"],
["string", ["'-'"]],
["operator", "+"],
["standard-pattern", [
["standard-pattern-name", "Word"],
["punctuation", "("],
["quantifier", "4"],
["punctuation", ")"]
]],
["operator", "]"],
["operator", "+"],
["string", ["'-'"]],
["operator", "+"],
["standard-pattern", [
["standard-pattern-name", "Word"],
["punctuation", "("],
["quantifier", "12"],
["punctuation", ")"]
]],
["punctuation", ";"],
["operator", "}"],
["keyword", "@require"], ["string", ["\"GUID.np\""]], ["punctuation", ";"],
["keyword", "@namespace"],
["namespace", "Basic"],
["operator", "{"],
["keyword", "@search"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "GUID-in-Braces"]
]],
["operator", "="],
["string", ["'{'"]],
["operator", "+"],
["name", "GUID"],
["operator", "+"],
["string", ["'}'"]],
["punctuation", ";"],
["operator", "}"]
]
================================================
FILE: tests/languages/nevod/pattern_feature.test
================================================
P = "text";
P = Alpha;
P2 = P1; P1 = Word;
P = A + B;
P = {A, B};
P = [1+ A];
#P = "text";
@pattern P = Alpha;
@search @pattern P = Alpha;
@pattern P = W @where { @pattern W = Word; };
@pattern #P = W + S @where { @pattern #W = Word; @pattern S = Space; };
#P(X, Y) = X: A ... Y: B;
#P(X) = A .. X .. B;
#P1(X, Y) = P2(X: Q, Y: S);
#P(X) = X: Word ... X;
#P(X, Y) = {X: Punct + X, Y: Symbol + Y};
----------------------------------------------------
[
["pattern", [
["pattern-name", "P"]
]],
["operator", "="],
["string", ["\"text\""]],
["punctuation", ";"],
["pattern", [
["pattern-name", "P"]
]],
["operator", "="],
["standard-pattern", [
["standard-pattern-name", "Alpha"]
]],
["punctuation", ";"],
["pattern", [
["pattern-name", "P2"]
]],
["operator", "="],
["name", "P1"],
["punctuation", ";"],
["pattern", [
["pattern-name", "P1"]
]],
["operator", "="],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["punctuation", ";"],
["pattern", [
["pattern-name", "P"]
]],
["operator", "="],
["name", "A"],
["operator", "+"],
["name", "B"],
["punctuation", ";"],
["pattern", [
["pattern-name", "P"]
]],
["operator", "="],
["operator", "{"],
["name", "A"],
["punctuation", ","],
["name", "B"],
["operator", "}"],
["punctuation", ";"],
["pattern", [
["pattern-name", "P"]
]],
["operator", "="],
["operator", "["],
["quantifier", "1+"],
["name", "A"],
["operator", "]"],
["punctuation", ";"],
["pattern", [
["pattern-name", "#P"]
]],
["operator", "="],
["string", ["\"text\""]],
["punctuation", ";"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "P"]
]],
["operator", "="],
["standard-pattern", [
["standard-pattern-name", "Alpha"]
]],
["punctuation", ";"],
["keyword", "@search"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "P"]
]],
["operator", "="],
["standard-pattern", [
["standard-pattern-name", "Alpha"]
]],
["punctuation", ";"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "P"]
]],
["operator", "="],
["name", "W"],
["keyword", "@where"],
["operator", "{"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "W"]
]],
["operator", "="],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["punctuation", ";"],
["operator", "}"],
["punctuation", ";"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "#P"]
]],
["operator", "="],
["name", "W"],
["operator", "+"],
["name", "S"],
["keyword", "@where"],
["operator", "{"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "#W"]
]],
["operator", "="],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["punctuation", ";"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "S"]
]],
["operator", "="],
["standard-pattern", [
["standard-pattern-name", "Space"]
]],
["punctuation", ";"],
["operator", "}"],
["punctuation", ";"],
["pattern", [
["pattern-name", "#P"],
["fields", [
["punctuation", "("],
["field-name", "X"],
["punctuation", ","],
["field-name", "Y"],
["punctuation", ")"]
]]
]],
["operator", "="],
["field-capture", [
["field-name", "X"],
["colon", ":"]
]],
["name", "A"],
["operator", "..."],
["field-capture", [
["field-name", "Y"],
["colon", ":"]
]],
["name", "B"],
["punctuation", ";"],
["pattern", [
["pattern-name", "#P"],
["fields", [
["punctuation", "("],
["field-name", "X"],
["punctuation", ")"]
]]
]],
["operator", "="],
["name", "A"],
["operator", ".."],
["name", "X"],
["operator", ".."],
["name", "B"],
["punctuation", ";"],
["pattern", [
["pattern-name", "#P1"],
["fields", [
["punctuation", "("],
["field-name", "X"],
["punctuation", ","],
["field-name", "Y"],
["punctuation", ")"]
]]
]],
["operator", "="],
["name", "P2"],
["punctuation", "("],
["field-capture", [
["field-name", "X"],
["colon", ":"],
["field-name", "Q"],
", ",
["field-name", "Y"],
["colon", ":"],
["field-name", "S"]
]],
["punctuation", ")"],
["punctuation", ";"],
["pattern", [
["pattern-name", "#P"],
["fields", [
["punctuation", "("],
["field-name", "X"],
["punctuation", ")"]
]]
]],
["operator", "="],
["field-capture", [
["field-name", "X"],
["colon", ":"]
]],
["standard-pattern", [
["standard-pattern-name", "Word"]
]],
["operator", "..."],
["name", "X"],
["punctuation", ";"],
["pattern", [
["pattern-name", "#P"],
["fields", [
["punctuation", "("],
["field-name", "X"],
["punctuation", ","],
["field-name", "Y"],
["punctuation", ")"]
]]
]],
["operator", "="],
["operator", "{"],
["field-capture", [
["field-name", "X"],
["colon", ":"]
]],
["standard-pattern", [
["standard-pattern-name", "Punct"]
]],
["operator", "+"],
["name", "X"],
["punctuation", ","],
["field-capture", [
["field-name", "Y"],
["colon", ":"]
]],
["standard-pattern", [
["standard-pattern-name", "Symbol"]
]],
["operator", "+"],
["name", "Y"],
["operator", "}"],
["punctuation", ";"]
]
================================================
FILE: tests/languages/nevod/search_feature.test
================================================
@namespace Basic
{
@search @pattern GUID-in-Braces = '{' + GUID + '}';
}
@search Basic.GUID;
@search Basic.GUID-in-Braces;
@namespace Basic
{
@pattern GUID-in-Braces = '{' + GUID + '}';
}
@require "GUID.np";
@search Basic.*;
@namespace Basic
{
@pattern GUID-in-Braces = '{' + GUID + '}';
}
----------------------------------------------------
[
["keyword", "@namespace"],
["namespace", "Basic"],
["operator", "{"],
["keyword", "@search"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "GUID-in-Braces"]
]],
["operator", "="],
["string", ["'{'"]],
["operator", "+"],
["name", "GUID"],
["operator", "+"],
["string", ["'}'"]],
["punctuation", ";"],
["operator", "}"],
["keyword", "@search"],
["search", "Basic.GUID"],
["punctuation", ";"],
["keyword", "@search"],
["search", "Basic.GUID-in-Braces"],
["punctuation", ";"],
["keyword", "@namespace"],
["namespace", "Basic"],
["operator", "{"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "GUID-in-Braces"]
]],
["operator", "="],
["string", ["'{'"]],
["operator", "+"],
["name", "GUID"],
["operator", "+"],
["string", ["'}'"]],
["punctuation", ";"],
["operator", "}"],
["keyword", "@require"], ["string", ["\"GUID.np\""]], ["punctuation", ";"],
["keyword", "@search"], ["search", "Basic.*"], ["punctuation", ";"],
["keyword", "@namespace"],
["namespace", "Basic"],
["operator", "{"],
["keyword", "@pattern"],
["pattern", [
["pattern-name", "GUID-in-Braces"]
]],
["operator", "="],
["string", ["'{'"]],
["operator", "+"],
["name", "GUID"],
["operator", "+"],
["string", ["'}'"]],
["punctuation", ";"],
["operator", "}"]
]
================================================
FILE: tests/languages/nevod/string_feature.test
================================================
"text in double quotes"
""
'text in single quotes'
'case-sensitive text'!
'text ''Nevod'' in quotes'
"text ""Nevod"" in double quotes"
'text prefix'*
'case-sensitive text prefix'!*
''
----------------------------------------------------
[
["string", ["\"text in double quotes\""]],
["string", ["\"\""]],
["string", ["'text in single quotes'"]],
["string", ["'case-sensitive text'", ["string-attrs", "!"]]],
["string", ["'text ''Nevod'' in quotes'"]],
["string", ["\"text \"\"Nevod\"\" in double quotes\""]],
["string", ["'text prefix'", ["string-attrs", "*"]]],
["string", ["'case-sensitive text prefix'", ["string-attrs", "!*"]]],
["string", ["''"]]
]
----------------------------------------------------
Checks for various text strings.
================================================
FILE: tests/languages/nginx/boolean_feature.test
================================================
ssi on;
sendfile off;
tcp_nopush on;
----------------------------------------------------
[
["directive", [
["keyword", "ssi"],
["boolean", "on"]
]],
["punctuation", ";"],
["directive", [
["keyword", "sendfile"],
["boolean", "off"]
]],
["punctuation", ";"],
["directive", [
["keyword", "tcp_nopush"],
["boolean", "on"]
]],
["punctuation", ";"]
]
================================================
FILE: tests/languages/nginx/comment_feature.test
================================================
#
# Foobar
http {# This must be recognized as a comment
}
events # A comment
{
worker_connections 512;
}
# A comment
http# This is not a comment. There is no space
{
server {# A comment
listen 80;# A comment
location = "/example1" # This is a comment. There is a space
{# This is a comment after "{". No spaces required
return 200 "Hello, world!";# This is a comment after ";". No spaces required
}# This is a comment after "}". No spaces required
location = /example2 # This is a comment. There is a space
{}
location = "/example3"# This is not a comment. There is no space
{}
location = /example4# This is not a comment. There is no space
{}
}# A comment
}
location = "/example"# This is NOT a comment. There is no space
{}
location = /example# This is NOT a comment. There is no space
{}
----------------------------------------------------
[
["comment", "#"],
["comment", "# Foobar"],
["directive", [
["keyword", "http"]
]],
["punctuation", "{"],
["comment", "# This must be recognized as a comment"],
["punctuation", "}"],
["directive", [
["keyword", "events"],
["comment", "# A comment"]
]],
["punctuation", "{"],
["directive", [
["keyword", "worker_connections"],
["number", "512"]
]],
["punctuation", ";"],
["punctuation", "}"],
["comment", "# A comment"],
["directive", [
["keyword", "http#"],
" This is not a comment. There is no space"
]],
["punctuation", "{"],
["directive", [
["keyword", "server"]
]],
["punctuation", "{"],
["comment", "# A comment"],
["directive", [
["keyword", "listen"],
["number", "80"]
]],
["punctuation", ";"],
["comment", "# A comment"],
["directive", [
["keyword", "location"],
" = ",
["string", ["\"/example1\""]],
["comment", "# This is a comment. There is a space"]
]],
["punctuation", "{"],
["comment", "# This is a comment after \"{\". No spaces required"],
["directive", [
["keyword", "return"],
["number", "200"],
["string", ["\"Hello, world!\""]]
]],
["punctuation", ";"],
["comment", "# This is a comment after \";\". No spaces required"],
["punctuation", "}"],
["comment", "# This is a comment after \"}\". No spaces required"],
["directive", [
["keyword", "location"],
" = /example2 ",
["comment", "# This is a comment. There is a space"]
]],
["punctuation", "{"], ["punctuation", "}"],
["directive", [
["keyword", "location"],
" = ",
["string", ["\"/example3\""]],
"# This is not a comment. There is no space"
]],
["punctuation", "{"], ["punctuation", "}"],
["directive", [
["keyword", "location"],
" = /example4# This is not a comment. There is no space"
]],
["punctuation", "{"], ["punctuation", "}"],
["punctuation", "}"], ["comment", "# A comment"],
["punctuation", "}"],
["directive", [
["keyword", "location"],
" = ",
["string", ["\"/example\""]],
"# This is NOT a comment. There is no space"
]],
["punctuation", "{"], ["punctuation", "}"],
["directive", [
["keyword", "location"],
" = /example# This is NOT a comment. There is no space"
]],
["punctuation", "{"], ["punctuation", "}"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/nginx/directive_feature.test
================================================
name parameter1;
name "parameter1";
name parameter1 parameter2;
name parameter1 "parameter2";
name "parameter1" parameter2;
name para\;meter1;
name "para;meter1";
name "para\;meter1";
internal;
internal ;
# A multiline parameter
name "para
meter1";
name {
name parameter1 'parameter2' \; par#ameter3;
name parameter1 \" 'he"llo' par#ameter2;
name parameter1; name parameter1;
name parameter1 \{ 'hello';
name {
internal;
name parameter1 parameter2;
}
}
name "#foo"; name; #bar
name " #foo"; #bar
name ';oh no' parameter;
----------------------------------------------------
[
["directive", [
["keyword", "name"],
" parameter1"
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
["string", ["\"parameter1\""]]
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
" parameter1 parameter2"
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
" parameter1 ",
["string", ["\"parameter2\""]]
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
["string", ["\"parameter1\""]],
" parameter2"
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
" para\\;meter1"
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
["string", ["\"para;meter1\""]]
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
["string", ["\"para\\;meter1\""]]
]],
["punctuation", ";"],
["directive", [
["keyword", "internal"]
]],
["punctuation", ";"],
["directive", [
["keyword", "internal"]
]],
["punctuation", ";"],
["comment", "# A multiline parameter"],
["directive", [
["keyword", "name"],
["string", ["\"para\r\n\r\nmeter1\""]]
]],
["punctuation", ";"],
["directive", [
["keyword", "name"]
]],
["punctuation", "{"],
["directive", [
["keyword", "name"],
" parameter1 ",
["string", ["'parameter2'"]],
" \\; par#ameter3"
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
" parameter1 \\\" ",
["string", ["'he\"llo'"]],
" par#ameter2"
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
" parameter1"
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
" parameter1"
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
" parameter1 \\{ ",
["string", ["'hello'"]]
]],
["punctuation", ";"],
["directive", [
["keyword", "name"]
]],
["punctuation", "{"],
["directive", [
["keyword", "internal"]
]],
["punctuation", ";"],
["directive", [
["keyword", "name"],
" parameter1 parameter2"
]],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", "}"],
["directive", [
["keyword", "name"],
["string", ["\"#foo\""]]
]],
["punctuation", ";"],
["directive", [
["keyword", "name"]
]],
["punctuation", ";"],
["comment", "#bar"],
["directive", [
["keyword", "name"],
["string", ["\" #foo\""]]
]],
["punctuation", ";"],
["comment", "#bar"],
["directive", [
["keyword", "name"],
["string", ["';oh no'"]],
" parameter"
]],
["punctuation", ";"]
]
================================================
FILE: tests/languages/nginx/number_feature.test
================================================
worker_connections 4096;
expires 30d;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
keepalive_timeout 75 20;
return 404;
----------------------------------------------------
[
["directive", [
["keyword", "worker_connections"],
["number", "4096"]
]],
["punctuation", ";"],
["directive", [
["keyword", "expires"],
["number", "30d"]
]],
["punctuation", ";"],
["directive", [
["keyword", "client_max_body_size"],
["number", "10m"]
]],
["punctuation", ";"],
["directive", [
["keyword", "client_body_buffer_size"],
["number", "128k"]
]],
["punctuation", ";"],
["directive", [
["keyword", "proxy_connect_timeout"],
["number", "90"]
]],
["punctuation", ";"],
["directive", [
["keyword", "proxy_send_timeout"],
["number", "90"]
]],
["punctuation", ";"],
["directive", [
["keyword", "proxy_read_timeout"],
["number", "90"]
]],
["punctuation", ";"],
["directive", [
["keyword", "proxy_buffers"],
["number", "32"],
["number", "4k"]
]],
["punctuation", ";"],
["directive", [
["keyword", "keepalive_timeout"],
["number", "75"],
["number", "20"]
]],
["punctuation", ";"],
["directive", [
["keyword", "return"],
["number", "404"]
]],
["punctuation", ";"]
]
================================================
FILE: tests/languages/nginx/string_feature.test
================================================
foo "";
foo '';
foo "foo
bar";
foo 'foo
bar';
foo " \" \' \\ \r \n \t";
foo ' \" \' \\ \r \n \t';
foo "$foo";
foo "${foo}bar";
foo "$arg_;";
# not escaped
foo "\$foo";
----------------------------------------------------
[
["directive", [
["keyword", "foo"],
["string", ["\"\""]]
]],
["punctuation", ";"],
["directive", [
["keyword", "foo"],
["string", ["''"]]
]],
["punctuation", ";"],
["directive", [
["keyword", "foo"],
["string", ["\"foo\r\nbar\""]]
]],
["punctuation", ";"],
["directive", [
["keyword", "foo"],
["string", ["'foo\r\nbar'"]]
]],
["punctuation", ";"],
["directive", [
["keyword", "foo"],
["string", [
"\" ",
["escape", "\\\""],
["escape", "\\'"],
["escape", "\\\\"],
["escape", "\\r"],
["escape", "\\n"],
["escape", "\\t"],
"\""
]]
]],
["punctuation", ";"],
["directive", [
["keyword", "foo"],
["string", [
"' ",
["escape", "\\\""],
["escape", "\\'"],
["escape", "\\\\"],
["escape", "\\r"],
["escape", "\\n"],
["escape", "\\t"],
"'"
]]
]],
["punctuation", ";"],
["directive", [
["keyword", "foo"],
["string", [
"\"",
["variable", "$foo"],
"\""
]]
]],
["punctuation", ";"],
["directive", [
["keyword", "foo"],
["string", [
"\"",
["variable", "${foo}"],
"bar\""
]]
]],
["punctuation", ";"],
["directive", [
["keyword", "foo"],
["string", [
"\"",
["variable", "$arg_;"],
"\""
]]
]],
["punctuation", ";"],
["comment", "# not escaped"],
["directive", [
["keyword", "foo"],
["string", [
"\"\\",
["variable", "$foo"],
"\""
]]
]],
["punctuation", ";"]
]
================================================
FILE: tests/languages/nginx/variable_feature.test
================================================
foo $host;
foo $geoip_city_country_code3
set $0 foo;
set $_ foo;
set $arg_? foo;
# real example
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
location / {
ssi on;
set $inc $request_uri;
if (!-f $request_filename) {
rewrite ^ /index.html last;
}
if (!-f $document_root$inc.html) {
return 404;
}
}
----------------------------------------------------
[
["directive", [
["keyword", "foo"],
["variable", "$host"]
]],
["punctuation", ";"],
["directive", [
["keyword", "foo"], ["variable", "$geoip_city_country_code3"],
"\r\nset ", ["variable", "$0"], " foo"
]],
["punctuation", ";"],
["directive", [
["keyword", "set"],
["variable", "$_"],
" foo"
]],
["punctuation", ";"],
["directive", [
["keyword", "set"],
["variable", "$arg_?"],
" foo"
]],
["punctuation", ";"],
["comment", "# real example"],
["directive", [
["keyword", "log_format"],
" main ",
["string", [
"'",
["variable", "$remote_addr"],
" - ",
["variable", "$remote_user"],
" [",
["variable", "$time_local]"],
" '"
]],
["string", [
"'\"",
["variable", "$request"],
"\" ",
["variable", "$status"],
["variable", "$bytes_sent"],
" '"
]],
["string", [
"'\"",
["variable", "$http_referer"],
"\" \"",
["variable", "$http_user_agent"],
"\" '"
]],
["string", [
"'\"",
["variable", "$gzip_ratio"],
"\"'"
]]
]],
["punctuation", ";"],
["directive", [
["keyword", "location"],
" /"
]],
["punctuation", "{"],
["directive", [
["keyword", "ssi"],
["boolean", "on"]
]],
["punctuation", ";"],
["directive", [
["keyword", "set"],
["variable", "$inc"],
["variable", "$request_uri"]
]],
["punctuation", ";"],
["directive", [
["keyword", "if"],
" (!-f ",
["variable", "$request_filename"],
")"
]],
["punctuation", "{"],
["directive", [
["keyword", "rewrite"],
" ^ /index.html last"
]],
["punctuation", ";"],
["punctuation", "}"],
["directive", [
["keyword", "if"],
" (!-f ",
["variable", "$document_root"],
["variable", "$inc"],
".html)"
]],
["punctuation", "{"],
["directive", [
["keyword", "return"],
["number", "404"]
]],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/nim/char_feature.test
================================================
'\''
'\xFC'
----------------------------------------------------
[
["char", "'\\''"],
["char", "'\\xFC'"]
]
================================================
FILE: tests/languages/nim/comment_feature.test
================================================
#
# Foobar
----------------------------------------------------
[
["comment", "#"],
["comment", "# Foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/nim/function_feature.test
================================================
fo\x9ao(
class*(
takeV[T](
`$`(
----------------------------------------------------
[
["function", ["fo\\x9ao"]],
["punctuation", "("],
["function", [
"class",
["operator", "*"]
]],
["punctuation", "("],
["function", ["takeV[T]"]],
["punctuation", "("],
["function", ["`$`"]],
["punctuation", "("]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/nim/identifier_feature.test
================================================
var `var` = 42
----------------------------------------------------
[
["keyword", "var"],
["identifier", [
["punctuation", "`"],
"var",
["punctuation", "`"]
]],
["operator", "="],
["number", "42"]
]
================================================
FILE: tests/languages/nim/keyword_feature.test
================================================
addr
as
asm
atomic
bind
block
break
case
cast
concept
const
continue
converter
defer
discard
distinct
do
elif
else
end
enum
except
export
finally
for
from
func
generic
if
import
include
interface
iterator
let
macro
method
mixin
nil
object
out
proc
ptr
raise
ref
return
static
template
try
tuple
type
using
var
when
while
with
without
yield
----------------------------------------------------
[
["keyword", "addr"],
["keyword", "as"],
["keyword", "asm"],
["keyword", "atomic"],
["keyword", "bind"],
["keyword", "block"],
["keyword", "break"],
["keyword", "case"],
["keyword", "cast"],
["keyword", "concept"],
["keyword", "const"],
["keyword", "continue"],
["keyword", "converter"],
["keyword", "defer"],
["keyword", "discard"],
["keyword", "distinct"],
["keyword", "do"],
["keyword", "elif"],
["keyword", "else"],
["keyword", "end"],
["keyword", "enum"],
["keyword", "except"],
["keyword", "export"],
["keyword", "finally"],
["keyword", "for"],
["keyword", "from"],
["keyword", "func"],
["keyword", "generic"],
["keyword", "if"],
["keyword", "import"],
["keyword", "include"],
["keyword", "interface"],
["keyword", "iterator"],
["keyword", "let"],
["keyword", "macro"],
["keyword", "method"],
["keyword", "mixin"],
["keyword", "nil"],
["keyword", "object"],
["keyword", "out"],
["keyword", "proc"],
["keyword", "ptr"],
["keyword", "raise"],
["keyword", "ref"],
["keyword", "return"],
["keyword", "static"],
["keyword", "template"],
["keyword", "try"],
["keyword", "tuple"],
["keyword", "type"],
["keyword", "using"],
["keyword", "var"],
["keyword", "when"],
["keyword", "while"],
["keyword", "with"],
["keyword", "without"],
["keyword", "yield"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/nim/number_feature.test
================================================
0xBad_Face
0o754_173
0B1111_0000
42_000
3.14_15_9
3E7
0.5e-84_741
9.8e+54
9000'u
2'i16
2i16
0xfe'f32
----------------------------------------------------
[
["number", "0xBad_Face"],
["number", "0o754_173"],
["number", "0B1111_0000"],
["number", "42_000"],
["number", "3.14_15_9"],
["number", "3E7"],
["number", "0.5e-84_741"],
["number", "9.8e+54"],
["number", "9000'u"],
["number", "2'i16"],
["number", "2i16"],
["number", "0xfe'f32"]
]
----------------------------------------------------
================================================
FILE: tests/languages/nim/operator_feature.test
================================================
= + -
* /
< >
@ $ ~
& % |
! ? ^
: \
.. .
+*<>
and div of or
in is isnot mod
not notin
shl shr xor
----------------------------------------------------
[
["operator", "="], ["operator", "+"], ["operator", "-"],
["operator", "*"], ["operator", "/"],
["operator", "<"], ["operator", ">"],
["operator", "@"], ["operator", "$"], ["operator", "~"],
["operator", "&"], ["operator", "%"], ["operator", "|"],
["operator", "!"], ["operator", "?"], ["operator", "^"],
["operator", ":"], ["operator", "\\"],
["operator", ".."], ["operator", "."],
["operator", "+*<>"],
["operator", "and"], ["operator", "div"], ["operator", "of"], ["operator", "or"],
["operator", "in"], ["operator", "is"], ["operator", "isnot"], ["operator", "mod"],
["operator", "not"], ["operator", "notin"],
["operator", "shl"], ["operator", "shr"], ["operator", "xor"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/nim/string_feature.test
================================================
""
"Fo\"obar"
""""""
"""Fo"o
bar"""
R"Raw ""string"
r"Raw
""string"
fo\x8Fo"Foobar"
bar"""Foo
bar"""
----------------------------------------------------
[
["string", "\"\""],
["string", "\"Fo\\\"obar\""],
["string", "\"\"\"\"\"\""],
["string", "\"\"\"Fo\"o\r\nbar\"\"\""],
["string", "R\"Raw \"\"string\""],
["string", "r\"Raw\r\n\"\"string\""],
["string", "fo\\x8Fo\"Foobar\""],
["string", "bar\"\"\"Foo\r\nbar\"\"\""]
]
----------------------------------------------------
Checks for strings and character literals.
================================================
FILE: tests/languages/nix/antiquotation_feature.test
================================================
${42}
----------------------------------------------------
[
["antiquotation", "$"],
["punctuation", "{"],
["number", "42"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for antiquotations outside of strings.
================================================
FILE: tests/languages/nix/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/nix/comment_feature.test
================================================
#
# foobar
/**/
/* foo
bar */
----------------------------------------------------
[
["comment", "#"],
["comment", "# foobar"],
["comment", "/**/"],
["comment", "/* foo\r\nbar */"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/nix/function_feature.test
================================================
abort
add
all
any
attrNames
attrValues
baseNameOf
compareVersions
concatLists
currentSystem
deepSeq
derivation
dirOf
div
elem
elemAt
fetchurl
fetchTarball
filter
filterSource
fromJSON
genList
getAttr
getEnv
hasAttr
hashString
head
import
intersectAttrs
isAttrs
isBool
isFunction
isInt
isList
isNull
isString
length
lessThan
listToAttrs
map
mul
parseDrvName
pathExists
readDir
readFile
removeAttrs
replaceStrings
seq
sort
stringLength
sub
substring
tail
throw
toFile
toJSON
toPath
toString
toXML
trace
typeOf
foldl'
----------------------------------------------------
[
["function", "abort"],
["function", "add"],
["function", "all"],
["function", "any"],
["function", "attrNames"],
["function", "attrValues"],
["function", "baseNameOf"],
["function", "compareVersions"],
["function", "concatLists"],
["function", "currentSystem"],
["function", "deepSeq"],
["function", "derivation"],
["function", "dirOf"],
["function", "div"],
["function", "elem"],
["function", "elemAt"],
["function", "fetchurl"],
["function", "fetchTarball"],
["function", "filter"],
["function", "filterSource"],
["function", "fromJSON"],
["function", "genList"],
["function", "getAttr"],
["function", "getEnv"],
["function", "hasAttr"],
["function", "hashString"],
["function", "head"],
["function", "import"],
["function", "intersectAttrs"],
["function", "isAttrs"],
["function", "isBool"],
["function", "isFunction"],
["function", "isInt"],
["function", "isList"],
["function", "isNull"],
["function", "isString"],
["function", "length"],
["function", "lessThan"],
["function", "listToAttrs"],
["function", "map"],
["function", "mul"],
["function", "parseDrvName"],
["function", "pathExists"],
["function", "readDir"],
["function", "readFile"],
["function", "removeAttrs"],
["function", "replaceStrings"],
["function", "seq"],
["function", "sort"],
["function", "stringLength"],
["function", "sub"],
["function", "substring"],
["function", "tail"],
["function", "throw"],
["function", "toFile"],
["function", "toJSON"],
["function", "toPath"],
["function", "toString"],
["function", "toXML"],
["function", "trace"],
["function", "typeOf"],
["function", "foldl'"]
]
----------------------------------------------------
Checks for built-in functions.
================================================
FILE: tests/languages/nix/keyword_feature.test
================================================
assert builtins else if
in inherit let null
or then with
----------------------------------------------------
[
["keyword", "assert"], ["keyword", "builtins"], ["keyword", "else"], ["keyword", "if"],
["keyword", "in"], ["keyword", "inherit"], ["keyword", "let"], ["keyword", "null"],
["keyword", "or"], ["keyword", "then"], ["keyword", "with"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/nix/number_feature.test
================================================
0
42
120457
----------------------------------------------------
[
["number", "0"],
["number", "42"],
["number", "120457"]
]
----------------------------------------------------
Checks for integers.
================================================
FILE: tests/languages/nix/operator_feature.test
================================================
= ==
! !=
< <=
> >=
+ ++
- ->
|| && //
? @
----------------------------------------------------
[
["operator", "="], ["operator", "=="],
["operator", "!"], ["operator", "!="],
["operator", "<"], ["operator", "<="],
["operator", ">"], ["operator", ">="],
["operator", "+"], ["operator", "++"],
["operator", "-"], ["operator", "->"],
["operator", "||"], ["operator", "&&"], ["operator", "//"],
["operator", "?"], ["operator", "@"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/nix/string_feature.test
================================================
""
"foo\"b\\ar"
"f''o'o'\"bar"
"foo
bar"
"foo ${ 42 } baz"
"foo \${ 42 } baz"
''''
''
foo
bar
''
''
f'oo'''ba'r
foo ${ 42 } baz
foo ''${ 42 } baz
''
----------------------------------------------------
[
["string", ["\"\""]],
["string", ["\"foo\\\"b\\\\ar\""]],
["string", ["\"f''o'o'\\\"bar\""]],
["string", ["\"foo\r\nbar\""]],
["string", [
"\"foo ",
["interpolation", [
["antiquotation", "$"],
["punctuation", "{"],
["number", "42"],
["punctuation", "}"]
]],
" baz\""
]],
["string", ["\"foo \\${ 42 } baz\""]],
["string", ["''''"]],
["string", ["''\r\nfoo\r\nbar\r\n''"]],
["string", [
"''\r\nf'oo'''ba'r\r\nfoo ",
["interpolation", [
["antiquotation", "$"],
["punctuation", "{"],
["number", "42"],
["punctuation", "}"]
]],
" baz\r\nfoo ''${ 42 } baz\r\n''"
]]
]
----------------------------------------------------
Checks for strings and string interpolation.
Also checks that escaped interpolations are not interpreted.
================================================
FILE: tests/languages/nix/url_feature.test
================================================
http://example.org/foo.tar.bz2
ftp://ftp.nluug.nl/pub/gnu/hello/hello-2.1.1.tar.gz
/bin/sh
./builder.sh
~/foo.bar
----------------------------------------------------
[
["url", "http://example.org/foo.tar.bz2"],
["url", "ftp://ftp.nluug.nl/pub/gnu/hello/hello-2.1.1.tar.gz"],
["url", "/bin/sh"],
["url", "./builder.sh"],
["url", "~/foo.bar"]
]
----------------------------------------------------
Checks for URLs and paths.
================================================
FILE: tests/languages/nsis/comment_feature.test
================================================
/* foo */
/* foo
bar */
# foo
; bar
----------------------------------------------------
[
["comment", "/* foo */"],
["comment", "/* foo\r\nbar */"],
["comment", "# foo"],
["comment", "; bar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/nsis/constant_feature.test
================================================
$(myLicenseData)
$(^Name)
$(!Name)
${LANG_ENGLISH}
${AtLeastWin8.1}
${nsArray_Copy}
${xml::CreateNode}
${^EXAMPLE}
${!defineifexist}
----------------------------------------------------
[
["constant", "$(myLicenseData)"],
["constant", "$(^Name)"],
["constant", "$(!Name)"],
["constant", "${LANG_ENGLISH}"],
["constant", "${AtLeastWin8.1}"],
["constant", "${nsArray_Copy}"],
["constant", "${xml::CreateNode}"],
["constant", "${^EXAMPLE}"],
["constant", "${!defineifexist}"]
]
----------------------------------------------------
Checks for constants.
================================================
FILE: tests/languages/nsis/important_feature.test
================================================
!addincludedir
!addplugindir
!appendfile
!cd
!define
!delfile
!echo
!else
!endif
!error
!execute
!finalize
!getdllversion
!gettlbversion
!ifdef
!ifmacrodef
!ifmacrondef
!ifndef
!if
!include
!insertmacro
!macroend
!macro
!makensis
!packhdr
!pragma
!searchparse
!searchreplace
!system
!tempfile
!undef
!verbose
!warning
----------------------------------------------------
[
["important", "!addincludedir"],
["important", "!addplugindir"],
["important", "!appendfile"],
["important", "!cd"],
["important", "!define"],
["important", "!delfile"],
["important", "!echo"],
["important", "!else"],
["important", "!endif"],
["important", "!error"],
["important", "!execute"],
["important", "!finalize"],
["important", "!getdllversion"],
["important", "!gettlbversion"],
["important", "!ifdef"],
["important", "!ifmacrodef"],
["important", "!ifmacrondef"],
["important", "!ifndef"],
["important", "!if"],
["important", "!include"],
["important", "!insertmacro"],
["important", "!macroend"],
["important", "!macro"],
["important", "!makensis"],
["important", "!packhdr"],
["important", "!pragma"],
["important", "!searchparse"],
["important", "!searchreplace"],
["important", "!system"],
["important", "!tempfile"],
["important", "!undef"],
["important", "!verbose"],
["important", "!warning"]
]
----------------------------------------------------
Checks for compiler instructions.
================================================
FILE: tests/languages/nsis/keyword_feature.test
================================================
Abort
AddBrandingImage
AddSize
AdvSplash
AllowRootDirInstall
AllowSkipFiles
AutoCloseWindow
Banner
BGFont
BGGradient
BGImage
BrandingText
BringToFront
Call
CallInstDLL
Caption
ChangeUI
CheckBitmap
ClearErrors
CompletedText
ComponentText
CopyFiles
CRCCheck
CreateDirectory
CreateFont
CreateShortCut
Delete
DeleteINISec
DeleteINIStr
DeleteRegKey
DeleteRegValue
DetailPrint
DetailsButtonText
Dialer
DirText
DirVar
DirVerify
EnableWindow
EnumRegKey
EnumRegValue
Exch
Exec
ExecShell
ExecWait
ExecShellWait
ExpandEnvStrings
File
FileBufSize
FileClose
FileErrorText
FileOpen
FileRead
FileReadByte
FileReadUTF16LE
FileReadWord
FileSeek
FileWrite
FileWriteByte
FileWriteUTF16LE
FileWriteWord
FindClose
FindFirst
FindNext
FindWindow
FlushINI
GetCurInstType
GetCurrentAddress
GetDlgItem
GetDLLVersion
GetDLLVersionLocal
GetErrorLevel
GetFileTime
GetFileTimeLocal
GetFullPathName
GetFunction
GetFunctionAddress
GetFunctionEnd
GetInstDirError
GetKnownFolderPath
GetLabelAddress
GetTempFileName
GetWinVer
Goto
HideWindow
Icon
IfAbort
IfErrors
IfFileExists
IfRebootFlag
IfRtlLanguage
IfShellVarContextAll
IfSilent
InitPluginsDir
InstallButtonText
InstallColors
InstallDir
InstallDirRegKey
InstProgressFlags
InstType
InstTypeGetText
InstTypeSetText
Int64Cmp
Int64CmpU
Int64Fmt
IntCmp
IntCmpU
IntFmt
IntOp
IntPtrCmp
IntPtrCmpU
IntPtrOp
IsWindow
LangDLL
LangString
LicenseBkColor
LicenseData
LicenseForceSelection
LicenseLangString
LicenseText
LoadLanguageFile
LockWindow
LogSet
LogText
ManifestDPIAware
ManifestSupportedOS
Math
MessageBox
MiscButtonText
Name
Nop
nsDialogs
nsExec
NSISdl
OutFile
Page
PageCallbacks
PEDllCharacteristics
PESubsysVer
Pop
Push
Quit
ReadEnvStr
ReadINIStr
ReadRegDWORD
ReadRegStr
Reboot
RegDLL
Rename
RequestExecutionLevel
ReserveFile
Return
RMDir
SearchPath
Section
SectionEnd
SectionGetFlags
SectionGetInstTypes
SectionGetSize
SectionGetText
SectionGroup
SectionIn
SectionSetFlags
SectionSetInstTypes
SectionSetSize
SectionSetText
SendMessage
SetAutoClose
SetBrandingImage
SetCompress
SetCompressor
SetCompressorDictSize
SetCtlColors
SetCurInstType
SetDatablockOptimize
SetDateSave
SetDetailsPrint
SetDetailsView
SetErrorLevel
SetErrors
SetFileAttributes
SetFont
SetOutPath
SetOverwrite
SetPluginUnload
SetRebootFlag
SetRegView
SetShellVarContext
SetSilent
ShowInstDetails
ShowUninstDetails
ShowWindow
SilentInstall
SilentUnInstall
Sleep
SpaceTexts
Splash
StartMenu
StrCmp
StrCmpS
StrCpy
StrLen
SubCaption
System
Target
Unicode
UninstallButtonText
UninstallCaption
UninstallIcon
UninstallSubCaption
UninstallText
UninstPage
UnRegDLL
UserInfo
Var
VIAddVersionKey
VIFileVersion
VIProductVersion
VPatch
WindowIcon
WriteINIStr
WriteRegBin
WriteRegDWORD
WriteRegExpandStr
WriteRegMultiStr
WriteRegNone
WriteRegStr
WriteUninstaller
XPStyle
----------------------------------------------------
[
["keyword", "Abort"],
["keyword", "AddBrandingImage"],
["keyword", "AddSize"],
["keyword", "AdvSplash"],
["keyword", "AllowRootDirInstall"],
["keyword", "AllowSkipFiles"],
["keyword", "AutoCloseWindow"],
["keyword", "Banner"],
["keyword", "BGFont"],
["keyword", "BGGradient"],
["keyword", "BGImage"],
["keyword", "BrandingText"],
["keyword", "BringToFront"],
["keyword", "Call"],
["keyword", "CallInstDLL"],
["keyword", "Caption"],
["keyword", "ChangeUI"],
["keyword", "CheckBitmap"],
["keyword", "ClearErrors"],
["keyword", "CompletedText"],
["keyword", "ComponentText"],
["keyword", "CopyFiles"],
["keyword", "CRCCheck"],
["keyword", "CreateDirectory"],
["keyword", "CreateFont"],
["keyword", "CreateShortCut"],
["keyword", "Delete"],
["keyword", "DeleteINISec"],
["keyword", "DeleteINIStr"],
["keyword", "DeleteRegKey"],
["keyword", "DeleteRegValue"],
["keyword", "DetailPrint"],
["keyword", "DetailsButtonText"],
["keyword", "Dialer"],
["keyword", "DirText"],
["keyword", "DirVar"],
["keyword", "DirVerify"],
["keyword", "EnableWindow"],
["keyword", "EnumRegKey"],
["keyword", "EnumRegValue"],
["keyword", "Exch"],
["keyword", "Exec"],
["keyword", "ExecShell"],
["keyword", "ExecWait"],
["keyword", "ExecShellWait"],
["keyword", "ExpandEnvStrings"],
["keyword", "File"],
["keyword", "FileBufSize"],
["keyword", "FileClose"],
["keyword", "FileErrorText"],
["keyword", "FileOpen"],
["keyword", "FileRead"],
["keyword", "FileReadByte"],
["keyword", "FileReadUTF16LE"],
["keyword", "FileReadWord"],
["keyword", "FileSeek"],
["keyword", "FileWrite"],
["keyword", "FileWriteByte"],
["keyword", "FileWriteUTF16LE"],
["keyword", "FileWriteWord"],
["keyword", "FindClose"],
["keyword", "FindFirst"],
["keyword", "FindNext"],
["keyword", "FindWindow"],
["keyword", "FlushINI"],
["keyword", "GetCurInstType"],
["keyword", "GetCurrentAddress"],
["keyword", "GetDlgItem"],
["keyword", "GetDLLVersion"],
["keyword", "GetDLLVersionLocal"],
["keyword", "GetErrorLevel"],
["keyword", "GetFileTime"],
["keyword", "GetFileTimeLocal"],
["keyword", "GetFullPathName"],
["keyword", "GetFunction"],
["keyword", "GetFunctionAddress"],
["keyword", "GetFunctionEnd"],
["keyword", "GetInstDirError"],
["keyword", "GetKnownFolderPath"],
["keyword", "GetLabelAddress"],
["keyword", "GetTempFileName"],
["keyword", "GetWinVer"],
["keyword", "Goto"],
["keyword", "HideWindow"],
["keyword", "Icon"],
["keyword", "IfAbort"],
["keyword", "IfErrors"],
["keyword", "IfFileExists"],
["keyword", "IfRebootFlag"],
["keyword", "IfRtlLanguage"],
["keyword", "IfShellVarContextAll"],
["keyword", "IfSilent"],
["keyword", "InitPluginsDir"],
["keyword", "InstallButtonText"],
["keyword", "InstallColors"],
["keyword", "InstallDir"],
["keyword", "InstallDirRegKey"],
["keyword", "InstProgressFlags"],
["keyword", "InstType"],
["keyword", "InstTypeGetText"],
["keyword", "InstTypeSetText"],
["keyword", "Int64Cmp"],
["keyword", "Int64CmpU"],
["keyword", "Int64Fmt"],
["keyword", "IntCmp"],
["keyword", "IntCmpU"],
["keyword", "IntFmt"],
["keyword", "IntOp"],
["keyword", "IntPtrCmp"],
["keyword", "IntPtrCmpU"],
["keyword", "IntPtrOp"],
["keyword", "IsWindow"],
["keyword", "LangDLL"],
["keyword", "LangString"],
["keyword", "LicenseBkColor"],
["keyword", "LicenseData"],
["keyword", "LicenseForceSelection"],
["keyword", "LicenseLangString"],
["keyword", "LicenseText"],
["keyword", "LoadLanguageFile"],
["keyword", "LockWindow"],
["keyword", "LogSet"],
["keyword", "LogText"],
["keyword", "ManifestDPIAware"],
["keyword", "ManifestSupportedOS"],
["keyword", "Math"],
["keyword", "MessageBox"],
["keyword", "MiscButtonText"],
["keyword", "Name"],
["keyword", "Nop"],
["keyword", "nsDialogs"],
["keyword", "nsExec"],
["keyword", "NSISdl"],
["keyword", "OutFile"],
["keyword", "Page"],
["keyword", "PageCallbacks"],
["keyword", "PEDllCharacteristics"],
["keyword", "PESubsysVer"],
["keyword", "Pop"],
["keyword", "Push"],
["keyword", "Quit"],
["keyword", "ReadEnvStr"],
["keyword", "ReadINIStr"],
["keyword", "ReadRegDWORD"],
["keyword", "ReadRegStr"],
["keyword", "Reboot"],
["keyword", "RegDLL"],
["keyword", "Rename"],
["keyword", "RequestExecutionLevel"],
["keyword", "ReserveFile"],
["keyword", "Return"],
["keyword", "RMDir"],
["keyword", "SearchPath"],
["keyword", "Section"],
["keyword", "SectionEnd"],
["keyword", "SectionGetFlags"],
["keyword", "SectionGetInstTypes"],
["keyword", "SectionGetSize"],
["keyword", "SectionGetText"],
["keyword", "SectionGroup"],
["keyword", "SectionIn"],
["keyword", "SectionSetFlags"],
["keyword", "SectionSetInstTypes"],
["keyword", "SectionSetSize"],
["keyword", "SectionSetText"],
["keyword", "SendMessage"],
["keyword", "SetAutoClose"],
["keyword", "SetBrandingImage"],
["keyword", "SetCompress"],
["keyword", "SetCompressor"],
["keyword", "SetCompressorDictSize"],
["keyword", "SetCtlColors"],
["keyword", "SetCurInstType"],
["keyword", "SetDatablockOptimize"],
["keyword", "SetDateSave"],
["keyword", "SetDetailsPrint"],
["keyword", "SetDetailsView"],
["keyword", "SetErrorLevel"],
["keyword", "SetErrors"],
["keyword", "SetFileAttributes"],
["keyword", "SetFont"],
["keyword", "SetOutPath"],
["keyword", "SetOverwrite"],
["keyword", "SetPluginUnload"],
["keyword", "SetRebootFlag"],
["keyword", "SetRegView"],
["keyword", "SetShellVarContext"],
["keyword", "SetSilent"],
["keyword", "ShowInstDetails"],
["keyword", "ShowUninstDetails"],
["keyword", "ShowWindow"],
["keyword", "SilentInstall"],
["keyword", "SilentUnInstall"],
["keyword", "Sleep"],
["keyword", "SpaceTexts"],
["keyword", "Splash"],
["keyword", "StartMenu"],
["keyword", "StrCmp"],
["keyword", "StrCmpS"],
["keyword", "StrCpy"],
["keyword", "StrLen"],
["keyword", "SubCaption"],
["keyword", "System"],
["keyword", "Target"],
["keyword", "Unicode"],
["keyword", "UninstallButtonText"],
["keyword", "UninstallCaption"],
["keyword", "UninstallIcon"],
["keyword", "UninstallSubCaption"],
["keyword", "UninstallText"],
["keyword", "UninstPage"],
["keyword", "UnRegDLL"],
["keyword", "UserInfo"],
["keyword", "Var"],
["keyword", "VIAddVersionKey"],
["keyword", "VIFileVersion"],
["keyword", "VIProductVersion"],
["keyword", "VPatch"],
["keyword", "WindowIcon"],
["keyword", "WriteINIStr"],
["keyword", "WriteRegBin"],
["keyword", "WriteRegDWORD"],
["keyword", "WriteRegExpandStr"],
["keyword", "WriteRegMultiStr"],
["keyword", "WriteRegNone"],
["keyword", "WriteRegStr"],
["keyword", "WriteUninstaller"],
["keyword", "XPStyle"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/nsis/number_feature.test
================================================
0xBadFace
42
3.14159
3.2e4
1.0e-5
----------------------------------------------------
[
["number", "0xBadFace"],
["number", "42"],
["number", "3.14159"],
["number", "3.2e4"],
["number", "1.0e-5"]
]
----------------------------------------------------
Checks for hexadecimal and decimal numbers.
================================================
FILE: tests/languages/nsis/operator_feature.test
================================================
+ - ++ --
< <= > >=
= == ===
& && | ||
? * / ~
^ %
----------------------------------------------------
[
["operator", "+"], ["operator", "-"], ["operator", "++"], ["operator", "--"],
["operator", "<"], ["operator", "<="], ["operator", ">"], ["operator", ">="],
["operator", "="], ["operator", "=="], ["operator", "==="],
["operator", "&"], ["operator", "&&"], ["operator", "|"], ["operator", "||"],
["operator", "?"], ["operator", "*"], ["operator", "/"], ["operator", "~"],
["operator", "^"], ["operator", "%"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/nsis/property_feature.test
================================================
admin all auto both
colored false force
hide highest lastused
leave listonly none
normal notset off
on open print show
silent silentlog
smooth textonly
true user
ARCHIVE
FILE_ATTRIBUTE_ARCHIVE
FILE_ATTRIBUTE_NORMAL
FILE_ATTRIBUTE_OFFLINE
FILE_ATTRIBUTE_READONLY
FILE_ATTRIBUTE_SYSTEM
FILE_ATTRIBUTE_TEMPORARY
HKCR HKCU HKLM
HKCR32 HKCU32 HKLM32
HKCR64 HKCU64 HKLM64
HKDD HKPD HKU
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_DYN_DATA
HKEY_LOCAL_MACHINE
HKEY_PERFORMANCE_DATA
HKEY_USERS
IDABORT IDCANCEL
IDIGNORE IDNO
IDOK IDRETRY IDYES
MB_ABORTRETRYIGNORE
MB_DEFBUTTON1
MB_DEFBUTTON2
MB_DEFBUTTON3
MB_DEFBUTTON4
MB_ICONEXCLAMATION
MB_ICONINFORMATION
MB_ICONQUESTION
MB_ICONSTOP
MB_OK
MB_OKCANCEL
MB_RETRYCANCEL
MB_RIGHT
MB_RTLREADING
MB_SETFOREGROUND
MB_TOPMOST
MB_USERICON
MB_YESNO
NORMAL OFFLINE
READONLY SHCTX
SHELL_CONTEXT
SYSTEM TEMPORARY
----------------------------------------------------
[
["property", "admin"], ["property", "all"], ["property", "auto"], ["property", "both"],
["property", "colored"], ["property", "false"], ["property", "force"],
["property", "hide"], ["property", "highest"], ["property", "lastused"],
["property", "leave"], ["property", "listonly"], ["property", "none"],
["property", "normal"], ["property", "notset"], ["property", "off"],
["property", "on"], ["property", "open"], ["property", "print"], ["property", "show"],
["property", "silent"], ["property", "silentlog"],
["property", "smooth"], ["property", "textonly"],
["property", "true"], ["property", "user"],
["property", "ARCHIVE"],
["property", "FILE_ATTRIBUTE_ARCHIVE"],
["property", "FILE_ATTRIBUTE_NORMAL"],
["property", "FILE_ATTRIBUTE_OFFLINE"],
["property", "FILE_ATTRIBUTE_READONLY"],
["property", "FILE_ATTRIBUTE_SYSTEM"],
["property", "FILE_ATTRIBUTE_TEMPORARY"],
["property", "HKCR"], ["property", "HKCU"], ["property", "HKLM"],
["property", "HKCR32"], ["property", "HKCU32"], ["property", "HKLM32"],
["property", "HKCR64"], ["property", "HKCU64"], ["property", "HKLM64"],
["property", "HKDD"], ["property", "HKPD"], ["property", "HKU"],
["property", "HKEY_CLASSES_ROOT"],
["property", "HKEY_CURRENT_CONFIG"],
["property", "HKEY_CURRENT_USER"],
["property", "HKEY_DYN_DATA"],
["property", "HKEY_LOCAL_MACHINE"],
["property", "HKEY_PERFORMANCE_DATA"],
["property", "HKEY_USERS"],
["property", "IDABORT"], ["property", "IDCANCEL"],
["property", "IDIGNORE"], ["property", "IDNO"],
["property", "IDOK"], ["property", "IDRETRY"], ["property", "IDYES"],
["property", "MB_ABORTRETRYIGNORE"],
["property", "MB_DEFBUTTON1"],
["property", "MB_DEFBUTTON2"],
["property", "MB_DEFBUTTON3"],
["property", "MB_DEFBUTTON4"],
["property", "MB_ICONEXCLAMATION"],
["property", "MB_ICONINFORMATION"],
["property", "MB_ICONQUESTION"],
["property", "MB_ICONSTOP"],
["property", "MB_OK"],
["property", "MB_OKCANCEL"],
["property", "MB_RETRYCANCEL"],
["property", "MB_RIGHT"],
["property", "MB_RTLREADING"],
["property", "MB_SETFOREGROUND"],
["property", "MB_TOPMOST"],
["property", "MB_USERICON"],
["property", "MB_YESNO"],
["property", "NORMAL"], ["property", "OFFLINE"],
["property", "READONLY"], ["property", "SHCTX"],
["property", "SHELL_CONTEXT"],
["property", "SYSTEM"], ["property", "TEMPORARY"]
]
----------------------------------------------------
Checks for all properties.
================================================
FILE: tests/languages/nsis/string_feature.test
================================================
""
"fo\"o"
''
'fo\'o'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"o\""],
["string", "''"],
["string", "'fo\\'o'"]
]
----------------------------------------------------
Checks for single-quoted and double-quoted strings.
================================================
FILE: tests/languages/nsis/variable_feature.test
================================================
$INTERNET_CACHE
$LANGUAGE
$mui.Button.Next
----------------------------------------------------
[
["variable", "$INTERNET_CACHE"],
["variable", "$LANGUAGE"],
["variable", "$mui.Button.Next"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/objectivec/char_feature.test
================================================
'a'
'\n'
'\000'
'\x00'
'\u0000'
----------------------------------------------------
[
["char", "'a'"],
["char", "'\\n'"],
["char", "'\\000'"],
["char", "'\\x00'"],
["char", "'\\u0000'"]
]
================================================
FILE: tests/languages/objectivec/comment_feature.test
================================================
//
// comment
// the comment \
continues!
/**/
/*
* comment
*/
/* open-ended comment
----------------------------------------------------
[
["comment", "//"],
["comment", "// comment"],
["comment", "// the comment \\\r\n continues!"],
["comment", "/**/"],
["comment", "/*\r\n * comment\r\n */"],
["comment", "/* open-ended comment"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/objectivec/keyword_feature.test
================================================
asm typeof inline
auto break case
char const continue
default do double
else enum extern
float for goto
if int long
register return
short signed
sizeof static
struct switch
typedef union
unsigned void
volatile while
in self super
@interface @end
@implementation
@protocol @class
@public @protected
@private @property
@try @catch
@finally @throw
@synthesize
@dynamic @selector
----------------------------------------------------
[
["keyword", "asm"], ["keyword", "typeof"], ["keyword", "inline"],
["keyword", "auto"], ["keyword", "break"], ["keyword", "case"],
["keyword", "char"], ["keyword", "const"], ["keyword", "continue"],
["keyword", "default"], ["keyword", "do"], ["keyword", "double"],
["keyword", "else"], ["keyword", "enum"], ["keyword", "extern"],
["keyword", "float"], ["keyword", "for"], ["keyword", "goto"],
["keyword", "if"], ["keyword", "int"], ["keyword", "long"],
["keyword", "register"], ["keyword", "return"],
["keyword", "short"], ["keyword", "signed"],
["keyword", "sizeof"], ["keyword", "static"],
["keyword", "struct"], ["keyword", "switch"],
["keyword", "typedef"], ["keyword", "union"],
["keyword", "unsigned"], ["keyword", "void"],
["keyword", "volatile"], ["keyword", "while"],
["keyword", "in"], ["keyword", "self"], ["keyword", "super"],
["keyword", "@interface"], ["keyword", "@end"],
["keyword", "@implementation"],
["keyword", "@protocol"], ["keyword", "@class"],
["keyword", "@public"], ["keyword", "@protected"],
["keyword", "@private"], ["keyword", "@property"],
["keyword", "@try"], ["keyword", "@catch"],
["keyword", "@finally"], ["keyword", "@throw"],
["keyword", "@synthesize"],
["keyword", "@dynamic"], ["keyword", "@selector"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/objectivec/operator_feature.test
================================================
+ - ++ --
! !=
< << <= <<=
> >> >= >>=
-> = ==
^ ~ %
& && | ||
? * / @
----------------------------------------------------
[
["operator", "+"], ["operator", "-"], ["operator", "++"], ["operator", "--"],
["operator", "!"], ["operator", "!="],
["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", "<<="],
["operator", ">"], ["operator", ">>"], ["operator", ">="], ["operator", ">>="],
["operator", "->"], ["operator", "="], ["operator", "=="],
["operator", "^"], ["operator", "~"], ["operator", "%"],
["operator", "&"], ["operator", "&&"], ["operator", "|"], ["operator", "||"],
["operator", "?"], ["operator", "*"], ["operator", "/"], ["operator", "@"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/objectivec/string_feature.test
================================================
""
"fo\"o"
"foo\
bar"
@""
@"fo\"o"
@"foo\
bar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"o\""],
["string", "\"foo\\\r\nbar\""],
["string", "@\"\""],
["string", "@\"fo\\\"o\""],
["string", "@\"foo\\\r\nbar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/ocaml/boolean_feature.test
================================================
false
true
----------------------------------------------------
[
["boolean", "false"],
["boolean", "true"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/ocaml/char_feature.test
================================================
'a'
'\n'
'\''
'\xA9'
'\169'
----------------------------------------------------
[
["char", "'a'"],
["char", "'\\n'"],
["char", "'\\''"],
["char", "'\\xA9'"],
["char", "'\\169'"]
]
================================================
FILE: tests/languages/ocaml/comment_feature.test
================================================
(**)
(* foo
bar *)
----------------------------------------------------
[
["comment", "(**)"],
["comment", "(* foo\r\nbar *)"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/ocaml/directive_feature.test
================================================
#quit
#load
#load_rec
----------------------------------------------------
[
["directive", "#quit"],
["directive", "#load"],
["directive", "#load_rec"]
]
----------------------------------------------------
Checks for directives.
================================================
FILE: tests/languages/ocaml/keyword_feature.test
================================================
as
assert
begin
class
constraint
do
done
downto
else
end
exception
external
for
fun
function
functor
if
in
include
inherit
initializer
lazy
let
match
method
module
mutable
new
nonrec
object
of
open
private
rec
sig
struct
then
to
try
type
val
value
virtual
when
where
while
with
----------------------------------------------------
[
["keyword", "as"],
["keyword", "assert"],
["keyword", "begin"],
["keyword", "class"],
["keyword", "constraint"],
["keyword", "do"],
["keyword", "done"],
["keyword", "downto"],
["keyword", "else"],
["keyword", "end"],
["keyword", "exception"],
["keyword", "external"],
["keyword", "for"],
["keyword", "fun"],
["keyword", "function"],
["keyword", "functor"],
["keyword", "if"],
["keyword", "in"],
["keyword", "include"],
["keyword", "inherit"],
["keyword", "initializer"],
["keyword", "lazy"],
["keyword", "let"],
["keyword", "match"],
["keyword", "method"],
["keyword", "module"],
["keyword", "mutable"],
["keyword", "new"],
["keyword", "nonrec"],
["keyword", "object"],
["keyword", "of"],
["keyword", "open"],
["keyword", "private"],
["keyword", "rec"],
["keyword", "sig"],
["keyword", "struct"],
["keyword", "then"],
["keyword", "to"],
["keyword", "try"],
["keyword", "type"],
["keyword", "val"],
["keyword", "value"],
["keyword", "virtual"],
["keyword", "when"],
["keyword", "where"],
["keyword", "while"],
["keyword", "with"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/ocaml/label_feature.test
================================================
~foo
~bar_42
----------------------------------------------------
[
["label", "~foo"],
["label", "~bar_42"]
]
----------------------------------------------------
Checks for labels.
================================================
FILE: tests/languages/ocaml/number_feature.test
================================================
1234
32.
0xBad_Face
0o754_672
0b1010_1111
42_000
3.14_15_9
3.141_592_653_589_793_12
1e-5
3.2e8
6.1E-7
2.22044604925031308e-16
0.4e+12_415
0x1p-52
----------------------------------------------------
[
["number", "1234"],
["number", "32."],
["number", "0xBad_Face"],
["number", "0o754_672"],
["number", "0b1010_1111"],
["number", "42_000"],
["number", "3.14_15_9"],
["number", "3.141_592_653_589_793_12"],
["number", "1e-5"],
["number", "3.2e8"],
["number", "6.1E-7"],
["number", "2.22044604925031308e-16"],
["number", "0.4e+12_415"],
["number", "0x1p-52"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/ocaml/operator_feature.test
================================================
and asr land
lor lsl lsr
lxor mod or
:= :>
= < > @
^ | & ~ .~
+ - * /
$ % ! ?
..
~=~
----------------------------------------------------
[
["operator", "and"], ["operator", "asr"], ["operator", "land"],
["operator", "lor"], ["operator", "lsl"], ["operator", "lsr"],
["operator", "lxor"], ["operator", "mod"], ["operator", "or"],
["operator", ":="],
["operator", ":>"],
["operator", "="],
["operator", "<"],
["operator", ">"],
["operator", "@"],
["operator", "^"],
["operator", "|"],
["operator", "&"],
["operator", "~"],
["operator", ".~"],
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "$"],
["operator", "%"],
["operator", "!"],
["operator", "?"],
["operator", ".."],
["operator", "~=~"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/ocaml/punctuation_feature.test
================================================
( ) { } [ ]
. , : ;
_
:: ;;
[< [> [| {<
>] >} |]
#
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "."],
["punctuation", ","],
["punctuation", ":"],
["punctuation", ";"],
["punctuation", "_"],
["punctuation", "::"],
["punctuation", ";;"],
["operator-like-punctuation", "[<"],
["operator-like-punctuation", "[>"],
["operator-like-punctuation", "[|"],
["operator-like-punctuation", "{<"],
["operator-like-punctuation", ">]"],
["operator-like-punctuation", ">}"],
["operator-like-punctuation", "|]"],
["punctuation", "#"]
]
================================================
FILE: tests/languages/ocaml/string_feature.test
================================================
""
"Fo\"obar"
"Call me Ishmael. Some years ago — never mind how long \
precisely — having little or no money in my purse, and \
nothing particular to interest me on shore, I thought I\
\ would sail about a little and see the watery part of t\
he world."
{|This is a quoted string, here, neither \ nor " are special characters|}
{|"Hello, World!"|}
{|"\\"|}
{delimiter|the end of this|}quoted string is here|delimiter}
{ext|hello {|world|}|ext}
----------------------------------------------------
[
["string", "\"\""],
["string", "\"Fo\\\"obar\""],
["string", "\"Call me Ishmael. Some years ago — never mind how long \\\r\nprecisely — having little or no money in my purse, and \\\r\nnothing particular to interest me on shore, I thought I\\\r\n\\ would sail about a little and see the watery part of t\\\r\nhe world.\""],
["string", "{|This is a quoted string, here, neither \\ nor \" are special characters|}"],
["string", "{|\"Hello, World!\"|}"],
["string", "{|\"\\\\\"|}"],
["string", "{delimiter|the end of this|}quoted string is here|delimiter}"],
["string", "{ext|hello {|world|}|ext}"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/ocaml/type-variable_feature.test
================================================
'Foo
'bar_42
----------------------------------------------------
[
["type-variable", "'Foo"],
["type-variable", "'bar_42"]
]
----------------------------------------------------
Checks for type variables.
================================================
FILE: tests/languages/ocaml/variant_feature.test
================================================
`Foo
`bar32
`Baz_42
----------------------------------------------------
[
["variant", "`Foo"],
["variant", "`bar32"],
["variant", "`Baz_42"]
]
----------------------------------------------------
Checks for polymorphic variants.
================================================
FILE: tests/languages/odin/boolean_feature.test
================================================
false
nil
true
----------------------------------------------------
[
["boolean", "false"],
["boolean", "nil"],
["boolean", "true"]
]
================================================
FILE: tests/languages/odin/character_feature.test
================================================
' '
'!'
'"'
'0'
'\"'
'\''
'\000'
'\077'
'\U000000'
'\UFFFFFF'
'\Uffffff'
'\\'
'\a'
'\b'
'\e'
'\f'
'\n'
'\r'
'\t'
'\u0000'
'\uFFFF'
'\uffff'
'\v'
'\x00'
'\xFF'
'\xff'
'a'
----------------------------------------------------
[
["char", ["' '"]],
["char", ["'!'"]],
["char", ["'\"'"]],
["char", ["'0'"]],
["char", [
"'",
["symbol", "\\\""],
"'"
]],
["char", [
"'",
["symbol", "\\'"],
"'"
]],
["char", [
"'",
["symbol", "\\000"],
"'"
]],
["char", [
"'",
["symbol", "\\077"],
"'"
]],
["char", [
"'",
["symbol", "\\U000000"],
"'"
]],
["char", [
"'",
["symbol", "\\UFFFFFF"],
"'"
]],
["char", [
"'",
["symbol", "\\Uffffff"],
"'"
]],
["char", [
"'",
["symbol", "\\\\"],
"'"
]],
["char", [
"'",
["symbol", "\\a"],
"'"
]],
["char", [
"'",
["symbol", "\\b"],
"'"
]],
["char", [
"'",
["symbol", "\\e"],
"'"
]],
["char", [
"'",
["symbol", "\\f"],
"'"
]],
["char", [
"'",
["symbol", "\\n"],
"'"
]],
["char", [
"'",
["symbol", "\\r"],
"'"
]],
["char", [
"'",
["symbol", "\\t"],
"'"
]],
["char", [
"'",
["symbol", "\\u0000"],
"'"
]],
["char", [
"'",
["symbol", "\\uFFFF"],
"'"
]],
["char", [
"'",
["symbol", "\\uffff"],
"'"
]],
["char", [
"'",
["symbol", "\\v"],
"'"
]],
["char", [
"'",
["symbol", "\\x00"],
"'"
]],
["char", [
"'",
["symbol", "\\xFF"],
"'"
]],
["char", [
"'",
["symbol", "\\xff"],
"'"
]],
["char", ["'a'"]]
]
================================================
FILE: tests/languages/odin/comment_feature.test
================================================
#!
#! A comment
#!!
#!""
#!#!
#!' '
#!/**/
#!//
#!0
#!``
#!false
#!if
/*
*/
/* 1 /* 2 */ 1 */
/* A comment */
/*!*/
/*""*/
/*"\a"*/
/*#!*/
/*' '*/
/*'\a'*/
/**/
/*/**/*/
/*0*/
/*`\a`*/
/*``*/
/*false*/
/*if*/
//
// A comment
//!
//""
//#!
//' '
///**/
////
//0
//``
//false
//if
Not a comment #! A comment
Not a comment /* A comment */
Not a comment // A comment
----------------------------------------------------
[
["comment", "#!"],
["comment", "#! A comment"],
["comment", "#!!"],
["comment", "#!\"\""],
["comment", "#!#!"],
["comment", "#!' '"],
["comment", "#!/**/"],
["comment", "#!//"],
["comment", "#!0"],
["comment", "#!``"],
["comment", "#!false"],
["comment", "#!if"],
["comment", "/*\r\n*/"],
["comment", "/* 1 /* 2 */ 1 */"],
["comment", "/* A comment */"],
["comment", "/*!*/"],
["comment", "/*\"\"*/"],
["comment", "/*\"\\a\"*/"],
["comment", "/*#!*/"],
["comment", "/*' '*/"],
["comment", "/*'\\a'*/"],
["comment", "/**/"],
["comment", "/*/**/*/"],
["comment", "/*0*/"],
["comment", "/*`\\a`*/"],
["comment", "/*``*/"],
["comment", "/*false*/"],
["comment", "/*if*/"],
["comment", "//"],
["comment", "// A comment"],
["comment", "//!"],
["comment", "//\"\""],
["comment", "//#!"],
["comment", "//' '"],
["comment", "///**/"],
["comment", "////"],
["comment", "//0"],
["comment", "//``"],
["comment", "//false"],
["comment", "//if"],
"\r\nNot a comment ", ["comment", "#! A comment"],
"\r\nNot a comment ", ["comment", "/* A comment */"],
"\r\nNot a comment ", ["comment", "// A comment"]
]
================================================
FILE: tests/languages/odin/constant_parameter_sign_feature.test
================================================
$
----------------------------------------------------
[
["constant-parameter-sign", "$"]
]
================================================
FILE: tests/languages/odin/directive_feature.test
================================================
#assert
#no_bounds_check
----------------------------------------------------
[
["directive", "#assert"],
["directive", "#no_bounds_check"]
]
================================================
FILE: tests/languages/odin/discard_feature.test
================================================
_
----------------------------------------------------
[
["discard", "_"]
]
================================================
FILE: tests/languages/odin/keyword_feature.test
================================================
asm
auto_cast
bit_set
break
case
cast
context
continue
defer
distinct
do
dynamic
else
enum
fallthrough
for
foreign
if
import
in
map
matrix
not_in
or_else
or_return
package
proc
return
struct
switch
transmute
typeid
union
using
when
where
----------------------------------------------------
[
["keyword", "asm"],
["keyword", "auto_cast"],
["keyword", "bit_set"],
["keyword", "break"],
["keyword", "case"],
["keyword", "cast"],
["keyword", "context"],
["keyword", "continue"],
["keyword", "defer"],
["keyword", "distinct"],
["keyword", "do"],
["keyword", "dynamic"],
["keyword", "else"],
["keyword", "enum"],
["keyword", "fallthrough"],
["keyword", "for"],
["keyword", "foreign"],
["keyword", "if"],
["keyword", "import"],
["keyword", "in"],
["keyword", "map"],
["keyword", "matrix"],
["keyword", "not_in"],
["keyword", "or_else"],
["keyword", "or_return"],
["keyword", "package"],
["keyword", "proc"],
["keyword", "return"],
["keyword", "struct"],
["keyword", "switch"],
["keyword", "transmute"],
["keyword", "typeid"],
["keyword", "union"],
["keyword", "using"],
["keyword", "when"],
["keyword", "where"]
]
================================================
FILE: tests/languages/odin/not_a_number_feature.test
================================================
0B0
0D0
0I
0O0
0Z0
0b
0b2
0d
0h
0h0
0h00
0h000
0h00000
0h0000000
0h000000000
0h000000000000000
0h00000000000000000
0h_
0o
0o8
0x
0X0
0xG
0z
0zC
----------------------------------------------------
[
"0B0\r\n0D0\r\n0I\r\n0O0\r\n0Z0\r\n0b\r\n0b2\r\n0d\r\n0h\r\n0h0\r\n0h00\r\n0h000\r\n0h00000\r\n0h0000000\r\n0h000000000\r\n0h000000000000000\r\n0h00000000000000000\r\n0h_\r\n0o\r\n0o8\r\n0x\r\n0X0\r\n0xG\r\n0z\r\n0zC"
]
================================================
FILE: tests/languages/odin/number_feature.test
================================================
.0
0
0.
0E
0b0
0b00
0b01
0b0_
0b_
0b_0
0b_1
0b__
0d0
0d00
0d01
0d0_
0d_
0d_0
0d_1
0d__
0e
0e+
0e+0
0e+0i
0e+i
0e-
0e-0
0e-0i
0e-i
0ei
0h0000
0h00000000
0h0000000000000000
0i
0o0
0o00
0o01
0o0_
0o_
0o_0
0o_1
0o__
0x0
0x00
0x0_
0x0F
0x0f
0x_
0x_0
0x__
0x_F
0x_f
0z0
0z00
0z0_
0z0B
0z0b
0z_
0z_0
0z__
0z_B
0z_b
----------------------------------------------------
[
["number", ".0"],
["number", "0"],
["number", "0."],
["number", "0E"],
["number", "0b0"],
["number", "0b00"],
["number", "0b01"],
["number", "0b0_"],
["number", "0b_"],
["number", "0b_0"],
["number", "0b_1"],
["number", "0b__"],
["number", "0d0"],
["number", "0d00"],
["number", "0d01"],
["number", "0d0_"],
["number", "0d_"],
["number", "0d_0"],
["number", "0d_1"],
["number", "0d__"],
["number", "0e"],
["number", "0e+"],
["number", "0e+0"],
["number", "0e+0i"],
["number", "0e+i"],
["number", "0e-"],
["number", "0e-0"],
["number", "0e-0i"],
["number", "0e-i"],
["number", "0ei"],
["number", "0h0000"],
["number", "0h00000000"],
["number", "0h0000000000000000"],
["number", "0i"],
["number", "0o0"],
["number", "0o00"],
["number", "0o01"],
["number", "0o0_"],
["number", "0o_"],
["number", "0o_0"],
["number", "0o_1"],
["number", "0o__"],
["number", "0x0"],
["number", "0x00"],
["number", "0x0_"],
["number", "0x0F"],
["number", "0x0f"],
["number", "0x_"],
["number", "0x_0"],
["number", "0x__"],
["number", "0x_F"],
["number", "0x_f"],
["number", "0z0"],
["number", "0z00"],
["number", "0z0_"],
["number", "0z0B"],
["number", "0z0b"],
["number", "0z_"],
["number", "0z_0"],
["number", "0z__"],
["number", "0z_B"],
["number", "0z_b"]
]
================================================
FILE: tests/languages/odin/operator_feature.test
================================================
!
!=
%
%%
%%=
%=
&
&&
&&=
&=
&~
&~=
*
*=
+
++
+=
-
--
-=
..
..<
..=
/
/=
<
<<
<<=
<=
=
==
>
>=
>>
>>=
?
^
|
|=
||
||=
~
~=
// ranges
0..<10
----------------------------------------------------
[
["operator", "!"],
["operator", "!="],
["operator", "%"],
["operator", "%%"],
["operator", "%%="],
["operator", "%="],
["operator", "&"],
["operator", "&&"],
["operator", "&&="],
["operator", "&="],
["operator", "&~"],
["operator", "&~="],
["operator", "*"],
["operator", "*="],
["operator", "+"],
["operator", "++"],
["operator", "+="],
["operator", "-"],
["operator", "--"],
["operator", "-="],
["operator", ".."],
["operator", "..<"],
["operator", "..="],
["operator", "/"],
["operator", "/="],
["operator", "<"],
["operator", "<<"],
["operator", "<<="],
["operator", "<="],
["operator", "="],
["operator", "=="],
["operator", ">"],
["operator", ">="],
["operator", ">>"],
["operator", ">>="],
["operator", "?"],
["operator", "^"],
["operator", "|"],
["operator", "|="],
["operator", "||"],
["operator", "||="],
["operator", "~"],
["operator", "~="],
["comment", "// ranges"],
["number", "0"], ["operator", "..<"], ["number", "10"]
]
================================================
FILE: tests/languages/odin/procedure_feature.test
================================================
do_math()
fibonacci()
log10()
cross :: proc(a, b: Vector3) -> Vector3
----------------------------------------------------
[
["procedure-name", "do_math"], ["punctuation", "("], ["punctuation", ")"],
["procedure-name", "fibonacci"], ["punctuation", "("], ["punctuation", ")"],
["procedure-name", "log10"], ["punctuation", "("], ["punctuation", ")"],
["procedure-definition", "cross"],
["punctuation", ":"],
["punctuation", ":"],
["keyword", "proc"],
["punctuation", "("],
"a",
["punctuation", ","],
" b",
["punctuation", ":"],
" Vector3",
["punctuation", ")"],
["arrow", "->"],
" Vector3"
]
================================================
FILE: tests/languages/odin/punctuation_feature.test
================================================
(
)
,
->
.
:
;
@
[
]
{
}
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", ","],
["arrow", "->"],
["punctuation", "."],
["punctuation", ":"],
["punctuation", ";"],
["punctuation", "@"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/odin/raw_string_feature.test
================================================
`
`
`!`
`""`
`"\a"`
`' '`
`'\a'`
`/**/`
`//`
`0`
`\
`
`\"`
`\'`
`\000`
`\077`
`\U000000`
`\UFFFFFF`
`\Uffffff`
`\\`
`\a`
`\b`
`\e`
`\f`
`\n`
`\r`
`\t`
`\u0000`
`\uFFFF`
`\uffff`
`\v`
`\x00`
`\xFF`
`\xff`
`A raw string.`
``
`false`
`if`
----------------------------------------------------
[
["string", "`\r\n`"],
["string", "`!`"],
["string", "`\"\"`"],
["string", "`\"\\a\"`"],
["string", "`' '`"],
["string", "`'\\a'`"],
["string", "`/**/`"],
["string", "`//`"],
["string", "`0`"],
["string", "`\\\r\n`"],
["string", "`\\\"`"],
["string", "`\\'`"],
["string", "`\\000`"],
["string", "`\\077`"],
["string", "`\\U000000`"],
["string", "`\\UFFFFFF`"],
["string", "`\\Uffffff`"],
["string", "`\\\\`"],
["string", "`\\a`"],
["string", "`\\b`"],
["string", "`\\e`"],
["string", "`\\f`"],
["string", "`\\n`"],
["string", "`\\r`"],
["string", "`\\t`"],
["string", "`\\u0000`"],
["string", "`\\uFFFF`"],
["string", "`\\uffff`"],
["string", "`\\v`"],
["string", "`\\x00`"],
["string", "`\\xFF`"],
["string", "`\\xff`"],
["string", "`A raw string.`"],
["string", "``"],
["string", "`false`"],
["string", "`if`"]
]
================================================
FILE: tests/languages/odin/string_feature.test
================================================
"!"
""
"' '"
"'\a'"
"/**/"
"//"
"0"
"\""
"\'"
"\000"
"\077"
"\U000000"
"\UFFFFFF"
"\Uffffff"
"\\"
"\a"
"\b"
"\e"
"\f"
"\n"
"\r"
"\t"
"\u0000"
"\uFFFF"
"\uffff"
"\v"
"\x00"
"\xFF"
"\xff"
"Not
a
string"
"Not\
a\
string"
"String"
"String" Not a string"
"`\a`"
"``"
"false"
"if"
----------------------------------------------------
[
["string", ["\"!\""]],
["string", ["\"\""]],
["string", ["\"' '\""]],
["string", [
"\"'",
["symbol", "\\a"],
"'\""
]],
["string", ["\"/**/\""]],
["string", ["\"//\""]],
["string", ["\"0\""]],
["string", [
"\"",
["symbol", "\\\""],
"\""
]],
["string", [
"\"",
["symbol", "\\'"],
"\""
]],
["string", [
"\"",
["symbol", "\\000"],
"\""
]],
["string", [
"\"",
["symbol", "\\077"],
"\""
]],
["string", [
"\"",
["symbol", "\\U000000"],
"\""
]],
["string", [
"\"",
["symbol", "\\UFFFFFF"],
"\""
]],
["string", [
"\"",
["symbol", "\\Uffffff"],
"\""
]],
["string", [
"\"",
["symbol", "\\\\"],
"\""
]],
["string", [
"\"",
["symbol", "\\a"],
"\""
]],
["string", [
"\"",
["symbol", "\\b"],
"\""
]],
["string", [
"\"",
["symbol", "\\e"],
"\""
]],
["string", [
"\"",
["symbol", "\\f"],
"\""
]],
["string", [
"\"",
["symbol", "\\n"],
"\""
]],
["string", [
"\"",
["symbol", "\\r"],
"\""
]],
["string", [
"\"",
["symbol", "\\t"],
"\""
]],
["string", [
"\"",
["symbol", "\\u0000"],
"\""
]],
["string", [
"\"",
["symbol", "\\uFFFF"],
"\""
]],
["string", [
"\"",
["symbol", "\\uffff"],
"\""
]],
["string", [
"\"",
["symbol", "\\v"],
"\""
]],
["string", [
"\"",
["symbol", "\\x00"],
"\""
]],
["string", [
"\"",
["symbol", "\\xFF"],
"\""
]],
["string", [
"\"",
["symbol", "\\xff"],
"\""
]],
"\r\n\"Not\r\na\r\nstring\"\r\n\"Not\\\r\na\\\r\nstring\"\r\n",
["string", ["\"String\""]],
["string", ["\"String\""]], " Not a string\"\r\n",
["string", [
"\"`",
["symbol", "\\a"],
"`\""
]],
["string", ["\"``\""]],
["string", ["\"false\""]],
["string", ["\"if\""]]
]
================================================
FILE: tests/languages/odin/undefined_feature.test
================================================
---
----------------------------------------------------
[
["undefined", "---"]
]
================================================
FILE: tests/languages/opencl/boolean_feature.test
================================================
false
true
----------------------------------------------------
[
["boolean", "false"],
["boolean", "true"]
]
----------------------------------------------------
Checks for booleans in OpenCL kernel code.
================================================
FILE: tests/languages/opencl/builtin-type_feature.test
================================================
_cl_command_queue
_cl_context
_cl_device_id
_cl_event
_cl_kernel
_cl_mem
_cl_platform_id
_cl_program
_cl_sampler
cl_image_format
cl_mem_fence_flags
clk_event_t
event_t
image1d_array_t
image1d_buffer_t
image1d_t
image2d_array_depth_t
image2d_array_msaa_depth_t
image2d_array_msaa_t
image2d_array_t
image2d_depth_t
image2d_msaa_depth_t
image2d_msaa_t
image2d_t
image3d_t
intptr_t
ndrange_t
ptrdiff_t
queue_t
reserve_id_t
sampler_t
size_t
uintptr_t
----------------------------------------------------
[
["builtin-type", "_cl_command_queue"],
["builtin-type", "_cl_context"],
["builtin-type", "_cl_device_id"],
["builtin-type", "_cl_event"],
["builtin-type", "_cl_kernel"],
["builtin-type", "_cl_mem"],
["builtin-type", "_cl_platform_id"],
["builtin-type", "_cl_program"],
["builtin-type", "_cl_sampler"],
["builtin-type", "cl_image_format"],
["builtin-type", "cl_mem_fence_flags"],
["builtin-type", "clk_event_t"],
["builtin-type", "event_t"],
["builtin-type", "image1d_array_t"],
["builtin-type", "image1d_buffer_t"],
["builtin-type", "image1d_t"],
["builtin-type", "image2d_array_depth_t"],
["builtin-type", "image2d_array_msaa_depth_t"],
["builtin-type", "image2d_array_msaa_t"],
["builtin-type", "image2d_array_t"],
["builtin-type", "image2d_depth_t"],
["builtin-type", "image2d_msaa_depth_t"],
["builtin-type", "image2d_msaa_t"],
["builtin-type", "image2d_t"],
["builtin-type", "image3d_t"],
["builtin-type", "intptr_t"],
["builtin-type", "ndrange_t"],
["builtin-type", "ptrdiff_t"],
["builtin-type", "queue_t"],
["builtin-type", "reserve_id_t"],
["builtin-type", "sampler_t"],
["builtin-type", "size_t"],
["builtin-type", "uintptr_t"]
]
================================================
FILE: tests/languages/opencl/constant_feature.test
================================================
CHAR_BIT
CHAR_MAX
CHAR_MIN
CLK_ADDRESS_CLAMP
CLK_ADDRESS_CLAMP_TO_EDGE
CLK_ADDRESS_NONE
CLK_ADDRESS_REPEAT
CLK_FILTER_LINEAR
CLK_FILTER_NEAREST
CLK_GLOBAL_MEM_FENCE
CLK_LOCAL_MEM_FENCE
CLK_NORMALIZED_COORDS_FALSE
CLK_NORMALIZED_COORDS_TRUE
CL_A
CL_ARGB
CL_BGRA
CL_FLOAT
CL_HALF_FLOAT
CL_INTENSITY
CL_LUMINANCE
CL_R
CL_RA
CL_RG
CL_RGB
CL_RGBA
CL_RGBx
CL_RGx
CL_Rx
CL_SIGNED_INT16
CL_SIGNED_INT32
CL_SIGNED_INT8
CL_SNORM_INT16
CL_SNORM_INT8
CL_UNORM_INT16
CL_UNORM_INT8
CL_UNORM_INT_101010
CL_UNORM_SHORT_555
CL_UNORM_SHORT_565
CL_UNSIGNED_INT16
CL_UNSIGNED_INT32
CL_UNSIGNED_INT8
DBL_DIG
DBL_EPSILON
DBL_MANT_DIG
DBL_MAX
DBL_MAX_10_EXP
DBL_MIN
DBL_MIN_10_EXP
DBL_MIN_EXP
FLT_DIG
FLT_EPSILON
FLT_MANT_DIG
FLT_MAX
FLT_MAX_10_EXP
FLT_MAX_EXP
FLT_MIN
FLT_MIN_10_EXP
FLT_MIN_EXP
FLT_RADIX
HALF_DIG
HALF_EPSILON
HALF_MANT_DIG
HALF_MAX
HALF_MAX_10_EXP
HALF_MAX_EXP
HALF_MIN
HALF_MIN_10_EXP
HALF_MIN_EXP
HUGE_VALF
HUGE_VAL
INFINITY
INT_MAX
INT_MIN
LONG_MAX
LONG_MIN
MAXFLOAT
M_1_PI
M_2_PI
M_2_SQRTPI
M_E
M_LN10
M_LN2
M_LOG10E
M_LOG2E
M_PI
M_PI_2
M_PI_4
M_SQRT1_2
M_SQRT2
M_1_PI_F
M_2_PI_F
M_2_SQRTPI_F
M_E_F
M_LN10_F
M_LN2_F
M_LOG10E_F
M_LOG2E_F
M_PI_F
M_PI_2_F
M_PI_4_F
M_SQRT1_2_F
M_SQRT2_F
M_1_PI_H
M_2_PI_H
M_2_SQRTPI_H
M_E_H
M_LN10_H
M_LN2_H
M_LOG10E_H
M_LOG2E_H
M_PI_H
M_PI_2_H
M_PI_4_H
M_SQRT1_2_H
M_SQRT2_H
NAN
SCHAR_MAX
SCHAR_MIN
SHRT_MAX
SHRT_MIN
UCHAR_MAX
USHRT_MAX
UINT_MAX
ULONG_MAX
----------------------------------------------------
[
["constant-opencl-kernel", "CHAR_BIT"],
["constant-opencl-kernel", "CHAR_MAX"],
["constant-opencl-kernel", "CHAR_MIN"],
["constant-opencl-kernel", "CLK_ADDRESS_CLAMP"],
["constant-opencl-kernel", "CLK_ADDRESS_CLAMP_TO_EDGE"],
["constant-opencl-kernel", "CLK_ADDRESS_NONE"],
["constant-opencl-kernel", "CLK_ADDRESS_REPEAT"],
["constant-opencl-kernel", "CLK_FILTER_LINEAR"],
["constant-opencl-kernel", "CLK_FILTER_NEAREST"],
["constant-opencl-kernel", "CLK_GLOBAL_MEM_FENCE"],
["constant-opencl-kernel", "CLK_LOCAL_MEM_FENCE"],
["constant-opencl-kernel", "CLK_NORMALIZED_COORDS_FALSE"],
["constant-opencl-kernel", "CLK_NORMALIZED_COORDS_TRUE"],
["constant-opencl-kernel", "CL_A"],
["constant-opencl-kernel", "CL_ARGB"],
["constant-opencl-kernel", "CL_BGRA"],
["constant-opencl-kernel", "CL_FLOAT"],
["constant-opencl-kernel", "CL_HALF_FLOAT"],
["constant-opencl-kernel", "CL_INTENSITY"],
["constant-opencl-kernel", "CL_LUMINANCE"],
["constant-opencl-kernel", "CL_R"],
["constant-opencl-kernel", "CL_RA"],
["constant-opencl-kernel", "CL_RG"],
["constant-opencl-kernel", "CL_RGB"],
["constant-opencl-kernel", "CL_RGBA"],
["constant-opencl-kernel", "CL_RGBx"],
["constant-opencl-kernel", "CL_RGx"],
["constant-opencl-kernel", "CL_Rx"],
["constant-opencl-kernel", "CL_SIGNED_INT16"],
["constant-opencl-kernel", "CL_SIGNED_INT32"],
["constant-opencl-kernel", "CL_SIGNED_INT8"],
["constant-opencl-kernel", "CL_SNORM_INT16"],
["constant-opencl-kernel", "CL_SNORM_INT8"],
["constant-opencl-kernel", "CL_UNORM_INT16"],
["constant-opencl-kernel", "CL_UNORM_INT8"],
["constant-opencl-kernel", "CL_UNORM_INT_101010"],
["constant-opencl-kernel", "CL_UNORM_SHORT_555"],
["constant-opencl-kernel", "CL_UNORM_SHORT_565"],
["constant-opencl-kernel", "CL_UNSIGNED_INT16"],
["constant-opencl-kernel", "CL_UNSIGNED_INT32"],
["constant-opencl-kernel", "CL_UNSIGNED_INT8"],
["constant-opencl-kernel", "DBL_DIG"],
["constant-opencl-kernel", "DBL_EPSILON"],
["constant-opencl-kernel", "DBL_MANT_DIG"],
["constant-opencl-kernel", "DBL_MAX"],
["constant-opencl-kernel", "DBL_MAX_10_EXP"],
["constant-opencl-kernel", "DBL_MIN"],
["constant-opencl-kernel", "DBL_MIN_10_EXP"],
["constant-opencl-kernel", "DBL_MIN_EXP"],
["constant-opencl-kernel", "FLT_DIG"],
["constant-opencl-kernel", "FLT_EPSILON"],
["constant-opencl-kernel", "FLT_MANT_DIG"],
["constant-opencl-kernel", "FLT_MAX"],
["constant-opencl-kernel", "FLT_MAX_10_EXP"],
["constant-opencl-kernel", "FLT_MAX_EXP"],
["constant-opencl-kernel", "FLT_MIN"],
["constant-opencl-kernel", "FLT_MIN_10_EXP"],
["constant-opencl-kernel", "FLT_MIN_EXP"],
["constant-opencl-kernel", "FLT_RADIX"],
["constant-opencl-kernel", "HALF_DIG"],
["constant-opencl-kernel", "HALF_EPSILON"],
["constant-opencl-kernel", "HALF_MANT_DIG"],
["constant-opencl-kernel", "HALF_MAX"],
["constant-opencl-kernel", "HALF_MAX_10_EXP"],
["constant-opencl-kernel", "HALF_MAX_EXP"],
["constant-opencl-kernel", "HALF_MIN"],
["constant-opencl-kernel", "HALF_MIN_10_EXP"],
["constant-opencl-kernel", "HALF_MIN_EXP"],
["constant-opencl-kernel", "HUGE_VALF"],
["constant-opencl-kernel", "HUGE_VAL"],
["constant-opencl-kernel", "INFINITY"],
["constant-opencl-kernel", "INT_MAX"],
["constant-opencl-kernel", "INT_MIN"],
["constant-opencl-kernel", "LONG_MAX"],
["constant-opencl-kernel", "LONG_MIN"],
["constant-opencl-kernel", "MAXFLOAT"],
["constant-opencl-kernel", "M_1_PI"],
["constant-opencl-kernel", "M_2_PI"],
["constant-opencl-kernel", "M_2_SQRTPI"],
["constant-opencl-kernel", "M_E"],
["constant-opencl-kernel", "M_LN10"],
["constant-opencl-kernel", "M_LN2"],
["constant-opencl-kernel", "M_LOG10E"],
["constant-opencl-kernel", "M_LOG2E"],
["constant-opencl-kernel", "M_PI"],
["constant-opencl-kernel", "M_PI_2"],
["constant-opencl-kernel", "M_PI_4"],
["constant-opencl-kernel", "M_SQRT1_2"],
["constant-opencl-kernel", "M_SQRT2"],
["constant-opencl-kernel", "M_1_PI_F"],
["constant-opencl-kernel", "M_2_PI_F"],
["constant-opencl-kernel", "M_2_SQRTPI_F"],
["constant-opencl-kernel", "M_E_F"],
["constant-opencl-kernel", "M_LN10_F"],
["constant-opencl-kernel", "M_LN2_F"],
["constant-opencl-kernel", "M_LOG10E_F"],
["constant-opencl-kernel", "M_LOG2E_F"],
["constant-opencl-kernel", "M_PI_F"],
["constant-opencl-kernel", "M_PI_2_F"],
["constant-opencl-kernel", "M_PI_4_F"],
["constant-opencl-kernel", "M_SQRT1_2_F"],
["constant-opencl-kernel", "M_SQRT2_F"],
["constant-opencl-kernel", "M_1_PI_H"],
["constant-opencl-kernel", "M_2_PI_H"],
["constant-opencl-kernel", "M_2_SQRTPI_H"],
["constant-opencl-kernel", "M_E_H"],
["constant-opencl-kernel", "M_LN10_H"],
["constant-opencl-kernel", "M_LN2_H"],
["constant-opencl-kernel", "M_LOG10E_H"],
["constant-opencl-kernel", "M_LOG2E_H"],
["constant-opencl-kernel", "M_PI_H"],
["constant-opencl-kernel", "M_PI_2_H"],
["constant-opencl-kernel", "M_PI_4_H"],
["constant-opencl-kernel", "M_SQRT1_2_H"],
["constant-opencl-kernel", "M_SQRT2_H"],
["constant-opencl-kernel", "NAN"],
["constant-opencl-kernel", "SCHAR_MAX"],
["constant-opencl-kernel", "SCHAR_MIN"],
["constant-opencl-kernel", "SHRT_MAX"],
["constant-opencl-kernel", "SHRT_MIN"],
["constant-opencl-kernel", "UCHAR_MAX"],
["constant-opencl-kernel", "USHRT_MAX"],
["constant-opencl-kernel", "UINT_MAX"],
["constant-opencl-kernel", "ULONG_MAX"]
]
----------------------------------------------------
Checks for all constant names in OpenCL kernel code.
================================================
FILE: tests/languages/opencl/keyword_feature.test
================================================
__attribute__
__constant
__global
__kernel
__local
__private
__read_only
__read_write
__write_only
auto
bool
bool16
bool2
bool3
bool4
bool8
break
case
char
char16
char2
char3
char4
char8
complex
const
constant
continue
do
double
double16
double16x1
double16x16
double16x2
double16x4
double16x8
double1x1
double1x16
double1x2
double1x4
double1x8
double2
double2x1
double2x16
double2x2
double2x4
double2x8
double3
double4
double4x1
double4x16
double4x2
double4x4
double4x8
double8
double8x1
double8x16
double8x2
double8x4
double8x8
else
enum;
extern
float
float16
float16x1
float16x16
float16x2
float16x4
float16x8
float1x1
float1x16
float1x2
float1x4
float1x8
float2
float2x1
float2x16
float2x2
float2x4
float2x8
float3
float4
float4x1
float4x16
float4x2
float4x4
float4x8
float8
float8x1
float8x16
float8x2
float8x4
float8x8
for
global
half
half16
half2
half3
half4
half8
if
imaginary
int
int16
int2
int3
int4
int8
kernel
local
long
long16
long2
long3
long4
long8
packed
pipe
private
quad
quad16
quad2
quad3
quad4
quad8
read_only
read_write
register
restrict
short
short16
short2
short3
short4
short8
static
struct;
switch
typedef
uchar
uchar16
uchar2
uchar3
uchar4
uchar8
uint
uint16
uint2
uint3
uint4
uint8
ulong
ulong16
ulong2
ulong3
ulong4
ulong8
uniform
union
unsigned
ushort
ushort16
ushort2
ushort3
ushort4
ushort8
void
volatile
while
write_only
----------------------------------------------------
[
["keyword", "__attribute__"],
["keyword", "__constant"],
["keyword", "__global"],
["keyword", "__kernel"],
["keyword", "__local"],
["keyword", "__private"],
["keyword", "__read_only"],
["keyword", "__read_write"],
["keyword", "__write_only"],
["keyword", "auto"],
["keyword", "bool"],
["keyword", "bool16"],
["keyword", "bool2"],
["keyword", "bool3"],
["keyword", "bool4"],
["keyword", "bool8"],
["keyword", "break"],
["keyword", "case"],
["keyword", "char"],
["keyword", "char16"],
["keyword", "char2"],
["keyword", "char3"],
["keyword", "char4"],
["keyword", "char8"],
["keyword", "complex"],
["keyword", "const"],
["keyword", "constant"],
["keyword", "continue"],
["keyword", "do"],
["keyword", "double"],
["keyword", "double16"],
["keyword", "double16x1"],
["keyword", "double16x16"],
["keyword", "double16x2"],
["keyword", "double16x4"],
["keyword", "double16x8"],
["keyword", "double1x1"],
["keyword", "double1x16"],
["keyword", "double1x2"],
["keyword", "double1x4"],
["keyword", "double1x8"],
["keyword", "double2"],
["keyword", "double2x1"],
["keyword", "double2x16"],
["keyword", "double2x2"],
["keyword", "double2x4"],
["keyword", "double2x8"],
["keyword", "double3"],
["keyword", "double4"],
["keyword", "double4x1"],
["keyword", "double4x16"],
["keyword", "double4x2"],
["keyword", "double4x4"],
["keyword", "double4x8"],
["keyword", "double8"],
["keyword", "double8x1"],
["keyword", "double8x16"],
["keyword", "double8x2"],
["keyword", "double8x4"],
["keyword", "double8x8"],
["keyword", "else"],
["keyword", "enum"],
["punctuation", ";"],
["keyword", "extern"],
["keyword", "float"],
["keyword", "float16"],
["keyword", "float16x1"],
["keyword", "float16x16"],
["keyword", "float16x2"],
["keyword", "float16x4"],
["keyword", "float16x8"],
["keyword", "float1x1"],
["keyword", "float1x16"],
["keyword", "float1x2"],
["keyword", "float1x4"],
["keyword", "float1x8"],
["keyword", "float2"],
["keyword", "float2x1"],
["keyword", "float2x16"],
["keyword", "float2x2"],
["keyword", "float2x4"],
["keyword", "float2x8"],
["keyword", "float3"],
["keyword", "float4"],
["keyword", "float4x1"],
["keyword", "float4x16"],
["keyword", "float4x2"],
["keyword", "float4x4"],
["keyword", "float4x8"],
["keyword", "float8"],
["keyword", "float8x1"],
["keyword", "float8x16"],
["keyword", "float8x2"],
["keyword", "float8x4"],
["keyword", "float8x8"],
["keyword", "for"],
["keyword", "global"],
["keyword", "half"],
["keyword", "half16"],
["keyword", "half2"],
["keyword", "half3"],
["keyword", "half4"],
["keyword", "half8"],
["keyword", "if"],
["keyword", "imaginary"],
["keyword", "int"],
["keyword", "int16"],
["keyword", "int2"],
["keyword", "int3"],
["keyword", "int4"],
["keyword", "int8"],
["keyword", "kernel"],
["keyword", "local"],
["keyword", "long"],
["keyword", "long16"],
["keyword", "long2"],
["keyword", "long3"],
["keyword", "long4"],
["keyword", "long8"],
["keyword", "packed"],
["keyword", "pipe"],
["keyword", "private"],
["keyword", "quad"],
["keyword", "quad16"],
["keyword", "quad2"],
["keyword", "quad3"],
["keyword", "quad4"],
["keyword", "quad8"],
["keyword", "read_only"],
["keyword", "read_write"],
["keyword", "register"],
["keyword", "restrict"],
["keyword", "short"],
["keyword", "short16"],
["keyword", "short2"],
["keyword", "short3"],
["keyword", "short4"],
["keyword", "short8"],
["keyword", "static"],
["keyword", "struct"],
["punctuation", ";"],
["keyword", "switch"],
["keyword", "typedef"],
["keyword", "uchar"],
["keyword", "uchar16"],
["keyword", "uchar2"],
["keyword", "uchar3"],
["keyword", "uchar4"],
["keyword", "uchar8"],
["keyword", "uint"],
["keyword", "uint16"],
["keyword", "uint2"],
["keyword", "uint3"],
["keyword", "uint4"],
["keyword", "uint8"],
["keyword", "ulong"],
["keyword", "ulong16"],
["keyword", "ulong2"],
["keyword", "ulong3"],
["keyword", "ulong4"],
["keyword", "ulong8"],
["keyword", "uniform"],
["keyword", "union"],
["keyword", "unsigned"],
["keyword", "ushort"],
["keyword", "ushort16"],
["keyword", "ushort2"],
["keyword", "ushort3"],
["keyword", "ushort4"],
["keyword", "ushort8"],
["keyword", "void"],
["keyword", "volatile"],
["keyword", "while"],
["keyword", "write_only"]
]
----------------------------------------------------
Checks for all keywords in OpenCL kernel code.
================================================
FILE: tests/languages/opencl/number_feature.test
================================================
42
3.14159
4e10
2.1e-10
2.1e-10f
2.1e-10h
0.4e+2
0xbabe
0xBABE
0x1.2
0x0.3p-3
0x0.3p-3f
0x0.3p-3h
0x0.3p4L
42f
42F
42h
42H
42u
42U
42l
42L
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "4e10"],
["number", "2.1e-10"],
["number", "2.1e-10f"],
["number", "2.1e-10h"],
["number", "0.4e+2"],
["number", "0xbabe"],
["number", "0xBABE"],
["number", "0x1.2"],
["number", "0x0.3p-3"],
["number", "0x0.3p-3f"],
["number", "0x0.3p-3h"],
["number", "0x0.3p4L"],
["number", "42f"],
["number", "42F"],
["number", "42h"],
["number", "42H"],
["number", "42u"],
["number", "42U"],
["number", "42l"],
["number", "42L"]
]
----------------------------------------------------
Checks for numbers in OpenCL kernel code.
================================================
FILE: tests/languages/opencl-extensions+c/boolean_feature.test
================================================
CL_TRUE
CL_FALSE
----------------------------------------------------
[
["boolean-opencl-host", "CL_TRUE"],
["boolean-opencl-host", "CL_FALSE"]
]
----------------------------------------------------
Checks for reserved boolean types in OpenCL host code (C-API).
================================================
FILE: tests/languages/opencl-extensions+c/constant_feature.test
================================================
CL_A
CL_ABGR
CL_ADDRESS_CLAMP
CL_ADDRESS_CLAMP_TO_EDGE
CL_ADDRESS_MIRRORED_REPEAT
CL_ADDRESS_NONE
CL_ADDRESS_REPEAT
CL_ARGB
CL_BGRA
CL_BLOCKING
CL_BUFFER_CREATE_TYPE_REGION
CL_BUILD_ERROR
CL_BUILD_IN_PROGRESS
CL_BUILD_NONE
CL_BUILD_PROGRAM_FAILURE
CL_BUILD_SUCCESS
CL_COMMAND_ACQUIRE_GL_OBJECTS
CL_COMMAND_BARRIER
CL_COMMAND_COPY_BUFFER
CL_COMMAND_COPY_BUFFER_RECT
CL_COMMAND_COPY_BUFFER_TO_IMAGE
CL_COMMAND_COPY_IMAGE
CL_COMMAND_COPY_IMAGE_TO_BUFFER
CL_COMMAND_FILL_BUFFER
CL_COMMAND_FILL_IMAGE
CL_COMMAND_MAP_BUFFER
CL_COMMAND_MAP_IMAGE
CL_COMMAND_MARKER
CL_COMMAND_MIGRATE_MEM_OBJECTS
CL_COMMAND_MIGRATE_SVM_MEM_OBJECTS
CL_COMMAND_NATIVE_KERNEL
CL_COMMAND_NDRANGE_KERNEL
CL_COMMAND_READ_BUFFER
CL_COMMAND_READ_BUFFER_RECT
CL_COMMAND_READ_IMAGE
CL_COMMAND_RELEASE_GL_OBJECTS
CL_COMMAND_SVM_FREE
CL_COMMAND_SVM_MAP
CL_COMMAND_SVM_MEMCPY
CL_COMMAND_SVM_MEMFILL
CL_COMMAND_SVM_UNMAP
CL_COMMAND_TASK
CL_COMMAND_UNMAP_MEM_OBJECT
CL_COMMAND_USER
CL_COMMAND_WRITE_BUFFER
CL_COMMAND_WRITE_BUFFER_RECT
CL_COMMAND_WRITE_IMAGE
CL_COMPILER_NOT_AVAILABLE
CL_COMPILE_PROGRAM_FAILURE
CL_COMPLETE
CL_CONTEXT_DEVICES
CL_CONTEXT_INTEROP_USER_SYNC
CL_CONTEXT_NUM_DEVICES
CL_CONTEXT_PLATFORM
CL_CONTEXT_PROPERTIES
CL_CONTEXT_REFERENCE_COUNT
CL_DEPTH
CL_DEPTH_STENCIL
CL_DEVICE_ADDRESS_BITS
CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE
CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE
CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE
CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE
CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE
CL_DEVICE_AFFINITY_DOMAIN_NUMA
CL_DEVICE_AVAILABLE
CL_DEVICE_BUILT_IN_KERNELS
CL_DEVICE_COMPILER_AVAILABLE
CL_DEVICE_DOUBLE_FP_CONFIG
CL_DEVICE_ENDIAN_LITTLE
CL_DEVICE_ERROR_CORRECTION_SUPPORT
CL_DEVICE_EXECUTION_CAPABILITIES
CL_DEVICE_EXTENSIONS
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE
CL_DEVICE_GLOBAL_MEM_CACHE_TYPE
CL_DEVICE_GLOBAL_MEM_SIZE
CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE
CL_DEVICE_HOST_UNIFIED_MEMORY
CL_DEVICE_IL_VERSION
CL_DEVICE_IMAGE2D_MAX_HEIGHT
CL_DEVICE_IMAGE2D_MAX_WIDTH
CL_DEVICE_IMAGE3D_MAX_DEPTH
CL_DEVICE_IMAGE3D_MAX_HEIGHT
CL_DEVICE_IMAGE3D_MAX_WIDTH
CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT
CL_DEVICE_IMAGE_MAX_ARRAY_SIZE
CL_DEVICE_IMAGE_MAX_BUFFER_SIZE
CL_DEVICE_IMAGE_PITCH_ALIGNMENT
CL_DEVICE_IMAGE_SUPPORT
CL_DEVICE_LINKER_AVAILABLE
CL_DEVICE_LOCAL_MEM_SIZE
CL_DEVICE_LOCAL_MEM_TYPE
CL_DEVICE_MAX_CLOCK_FREQUENCY
CL_DEVICE_MAX_COMPUTE_UNITS
CL_DEVICE_MAX_CONSTANT_ARGS
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE
CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE
CL_DEVICE_MAX_MEM_ALLOC_SIZE
CL_DEVICE_MAX_NUM_SUB_GROUPS
CL_DEVICE_MAX_ON_DEVICE_EVENTS
CL_DEVICE_MAX_ON_DEVICE_QUEUES
CL_DEVICE_MAX_PARAMETER_SIZE
CL_DEVICE_MAX_PIPE_ARGS
CL_DEVICE_MAX_READ_IMAGE_ARGS
CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS
CL_DEVICE_MAX_SAMPLERS
CL_DEVICE_MAX_WORK_GROUP_SIZE
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS
CL_DEVICE_MAX_WORK_ITEM_SIZES
CL_DEVICE_MAX_WRITE_IMAGE_ARGS
CL_DEVICE_MEM_BASE_ADDR_ALIGN
CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE
CL_DEVICE_NAME
CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR
CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE
CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT
CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF
CL_DEVICE_NATIVE_VECTOR_WIDTH_INT
CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG
CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT
CL_DEVICE_NOT_AVAILABLE
CL_DEVICE_NOT_FOUND
CL_DEVICE_OPENCL_C_VERSION
CL_DEVICE_PARENT_DEVICE
CL_DEVICE_PARTITION_AFFINITY_DOMAIN
CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
CL_DEVICE_PARTITION_BY_COUNTS
CL_DEVICE_PARTITION_BY_COUNTS_LIST_END
CL_DEVICE_PARTITION_EQUALLY
CL_DEVICE_PARTITION_FAILED
CL_DEVICE_PARTITION_MAX_SUB_DEVICES
CL_DEVICE_PARTITION_PROPERTIES
CL_DEVICE_PARTITION_TYPE
CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS
CL_DEVICE_PIPE_MAX_PACKET_SIZE
CL_DEVICE_PLATFORM
CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT
CL_DEVICE_PREFERRED_INTEROP_USER_SYNC
CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT
CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT
CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT
CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG
CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT
CL_DEVICE_PRINTF_BUFFER_SIZE
CL_DEVICE_PROFILE
CL_DEVICE_PROFILING_TIMER_RESOLUTION
CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE
CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE
CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES
CL_DEVICE_QUEUE_ON_HOST_PROPERTIES
CL_DEVICE_QUEUE_PROPERTIES
CL_DEVICE_REFERENCE_COUNT
CL_DEVICE_SINGLE_FP_CONFIG
CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS
CL_DEVICE_SVM_ATOMICS
CL_DEVICE_SVM_CAPABILITIES
CL_DEVICE_SVM_COARSE_GRAIN_BUFFER
CL_DEVICE_SVM_FINE_GRAIN_BUFFER
CL_DEVICE_SVM_FINE_GRAIN_SYSTEM
CL_DEVICE_TYPE
CL_DEVICE_TYPE_ACCELERATOR
CL_DEVICE_TYPE_ALL
CL_DEVICE_TYPE_CPU
CL_DEVICE_TYPE_CUSTOM
CL_DEVICE_TYPE_DEFAULT
CL_DEVICE_TYPE_GPU
CL_DEVICE_VENDOR
CL_DEVICE_VENDOR_ID
CL_DEVICE_VERSION
CL_DRIVER_VERSION
CL_EVENT_COMMAND_EXECUTION_STATUS
CL_EVENT_COMMAND_QUEUE
CL_EVENT_COMMAND_TYPE
CL_EVENT_CONTEXT
CL_EVENT_REFERENCE_COUNT
CL_EXEC_KERNEL
CL_EXEC_NATIVE_KERNEL
CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
CL_FILTER_LINEAR
CL_FILTER_NEAREST
CL_FLOAT
CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT
CL_FP_DENORM
CL_FP_FMA
CL_FP_INF_NAN
CL_FP_ROUND_TO_INF
CL_FP_ROUND_TO_NEAREST
CL_FP_ROUND_TO_ZERO
CL_FP_SOFT_FLOAT
CL_GLOBAL
CL_HALF_FLOAT
CL_IMAGE_ARRAY_SIZE
CL_IMAGE_BUFFER
CL_IMAGE_DEPTH
CL_IMAGE_ELEMENT_SIZE
CL_IMAGE_FORMAT
CL_IMAGE_FORMAT_MISMATCH
CL_IMAGE_FORMAT_NOT_SUPPORTED
CL_IMAGE_HEIGHT
CL_IMAGE_NUM_MIP_LEVELS
CL_IMAGE_NUM_SAMPLES
CL_IMAGE_ROW_PITCH
CL_IMAGE_SLICE_PITCH
CL_IMAGE_WIDTH
CL_INTENSITY
CL_INVALID_ARG_INDEX
CL_INVALID_ARG_SIZE
CL_INVALID_ARG_VALUE
CL_INVALID_BINARY
CL_INVALID_BUFFER_SIZE
CL_INVALID_BUILD_OPTIONS
CL_INVALID_COMMAND_QUEUE
CL_INVALID_COMPILER_OPTIONS
CL_INVALID_CONTEXT
CL_INVALID_DEVICE
CL_INVALID_DEVICE_PARTITION_COUNT
CL_INVALID_DEVICE_QUEUE
CL_INVALID_DEVICE_TYPE
CL_INVALID_EVENT
CL_INVALID_EVENT_WAIT_LIST
CL_INVALID_GLOBAL_OFFSET
CL_INVALID_GLOBAL_WORK_SIZE
CL_INVALID_GL_OBJECT
CL_INVALID_HOST_PTR
CL_INVALID_IMAGE_DESCRIPTOR
CL_INVALID_IMAGE_FORMAT_DESCRIPTOR
CL_INVALID_IMAGE_SIZE
CL_INVALID_KERNEL
CL_INVALID_KERNEL_ARGS
CL_INVALID_KERNEL_DEFINITION
CL_INVALID_KERNEL_NAME
CL_INVALID_LINKER_OPTIONS
CL_INVALID_MEM_OBJECT
CL_INVALID_MIP_LEVEL
CL_INVALID_OPERATION
CL_INVALID_PIPE_SIZE
CL_INVALID_PLATFORM
CL_INVALID_PROGRAM
CL_INVALID_PROGRAM_EXECUTABLE
CL_INVALID_PROPERTY
CL_INVALID_QUEUE_PROPERTIES
CL_INVALID_SAMPLER
CL_INVALID_VALUE
CL_INVALID_WORK_DIMENSION
CL_INVALID_WORK_GROUP_SIZE
CL_INVALID_WORK_ITEM_SIZE
CL_KERNEL_ARG_ACCESS_NONE
CL_KERNEL_ARG_ACCESS_QUALIFIER
CL_KERNEL_ARG_ACCESS_READ_ONLY
CL_KERNEL_ARG_ACCESS_READ_WRITE
CL_KERNEL_ARG_ACCESS_WRITE_ONLY
CL_KERNEL_ARG_ADDRESS_CONSTANT
CL_KERNEL_ARG_ADDRESS_GLOBAL
CL_KERNEL_ARG_ADDRESS_LOCAL
CL_KERNEL_ARG_ADDRESS_PRIVATE
CL_KERNEL_ARG_ADDRESS_QUALIFIER
CL_KERNEL_ARG_INFO_NOT_AVAILABLE
CL_KERNEL_ARG_NAME
CL_KERNEL_ARG_TYPE_CONST
CL_KERNEL_ARG_TYPE_NAME
CL_KERNEL_ARG_TYPE_NONE
CL_KERNEL_ARG_TYPE_PIPE
CL_KERNEL_ARG_TYPE_QUALIFIER
CL_KERNEL_ARG_TYPE_RESTRICT
CL_KERNEL_ARG_TYPE_VOLATILE
CL_KERNEL_ATTRIBUTES
CL_KERNEL_COMPILE_NUM_SUB_GROUPS
CL_KERNEL_COMPILE_WORK_GROUP_SIZE
CL_KERNEL_CONTEXT
CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM
CL_KERNEL_EXEC_INFO_SVM_PTRS
CL_KERNEL_FUNCTION_NAME
CL_KERNEL_GLOBAL_WORK_SIZE
CL_KERNEL_LOCAL_MEM_SIZE
CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT
CL_KERNEL_MAX_NUM_SUB_GROUPS
CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE
CL_KERNEL_NUM_ARGS
CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE
CL_KERNEL_PRIVATE_MEM_SIZE
CL_KERNEL_PROGRAM
CL_KERNEL_REFERENCE_COUNT
CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE
CL_KERNEL_WORK_GROUP_SIZE
CL_LINKER_NOT_AVAILABLE
CL_LINK_PROGRAM_FAILURE
CL_LOCAL
CL_LUMINANCE
CL_MAP_FAILURE
CL_MAP_READ
CL_MAP_WRITE
CL_MAP_WRITE_INVALIDATE_REGION
CL_MEM_ALLOC_HOST_PTR
CL_MEM_ASSOCIATED_MEMOBJECT
CL_MEM_CONTEXT
CL_MEM_COPY_HOST_PTR
CL_MEM_COPY_OVERLAP
CL_MEM_FLAGS
CL_MEM_HOST_NO_ACCESS
CL_MEM_HOST_PTR
CL_MEM_HOST_READ_ONLY
CL_MEM_HOST_WRITE_ONLY
CL_MEM_KERNEL_READ_AND_WRITE
CL_MEM_MAP_COUNT
CL_MEM_OBJECT_ALLOCATION_FAILURE
CL_MEM_OBJECT_BUFFER
CL_MEM_OBJECT_IMAGE1D
CL_MEM_OBJECT_IMAGE1D_ARRAY
CL_MEM_OBJECT_IMAGE1D_BUFFER
CL_MEM_OBJECT_IMAGE2D
CL_MEM_OBJECT_IMAGE2D_ARRAY
CL_MEM_OBJECT_IMAGE3D
CL_MEM_OBJECT_PIPE
CL_MEM_OFFSET
CL_MEM_READ_ONLY
CL_MEM_READ_WRITE
CL_MEM_REFERENCE_COUNT
CL_MEM_SIZE
CL_MEM_SVM_ATOMICS
CL_MEM_SVM_FINE_GRAIN_BUFFER
CL_MEM_TYPE
CL_MEM_USES_SVM_POINTER
CL_MEM_USE_HOST_PTR
CL_MEM_WRITE_ONLY
CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED
CL_MIGRATE_MEM_OBJECT_HOST
CL_MISALIGNED_SUB_BUFFER_OFFSET
CL_NONE
CL_NON_BLOCKING
CL_OUT_OF_HOST_MEMORY
CL_OUT_OF_RESOURCES
CL_PIPE_MAX_PACKETS
CL_PIPE_PACKET_SIZE
CL_PLATFORM_EXTENSIONS
CL_PLATFORM_HOST_TIMER_RESOLUTION
CL_PLATFORM_NAME
CL_PLATFORM_PROFILE
CL_PLATFORM_VENDOR
CL_PLATFORM_VERSION
CL_PROFILING_COMMAND_COMPLETE
CL_PROFILING_COMMAND_END
CL_PROFILING_COMMAND_QUEUED
CL_PROFILING_COMMAND_START
CL_PROFILING_COMMAND_SUBMIT
CL_PROFILING_INFO_NOT_AVAILABLE
CL_PROGRAM_BINARIES
CL_PROGRAM_BINARY_SIZES
CL_PROGRAM_BINARY_TYPE
CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT
CL_PROGRAM_BINARY_TYPE_EXECUTABLE
CL_PROGRAM_BINARY_TYPE_LIBRARY
CL_PROGRAM_BINARY_TYPE_NONE
CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE
CL_PROGRAM_BUILD_LOG
CL_PROGRAM_BUILD_OPTIONS
CL_PROGRAM_BUILD_STATUS
CL_PROGRAM_CONTEXT
CL_PROGRAM_DEVICES
CL_PROGRAM_IL
CL_PROGRAM_KERNEL_NAMES
CL_PROGRAM_NUM_DEVICES
CL_PROGRAM_NUM_KERNELS
CL_PROGRAM_REFERENCE_COUNT
CL_PROGRAM_SOURCE
CL_QUEUED
CL_QUEUE_CONTEXT
CL_QUEUE_DEVICE
CL_QUEUE_DEVICE_DEFAULT
CL_QUEUE_ON_DEVICE
CL_QUEUE_ON_DEVICE_DEFAULT
CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE
CL_QUEUE_PROFILING_ENABLE
CL_QUEUE_PROPERTIES
CL_QUEUE_REFERENCE_COUNT
CL_QUEUE_SIZE
CL_R
CL_RA
CL_READ_ONLY_CACHE
CL_READ_WRITE_CACHE
CL_RG
CL_RGB
CL_RGBA
CL_RGBx
CL_RGx
CL_RUNNING
CL_Rx
CL_SAMPLER_ADDRESSING_MODE
CL_SAMPLER_CONTEXT
CL_SAMPLER_FILTER_MODE
CL_SAMPLER_LOD_MAX
CL_SAMPLER_LOD_MIN
CL_SAMPLER_MIP_FILTER_MODE
CL_SAMPLER_NORMALIZED_COORDS
CL_SAMPLER_REFERENCE_COUNT
CL_SIGNED_INT16
CL_SIGNED_INT32
CL_SIGNED_INT8
CL_SNORM_INT16
CL_SNORM_INT8
CL_SUBMITTED
CL_SUCCESS
CL_UNORM_INT16
CL_UNORM_INT24
CL_UNORM_INT8
CL_UNORM_INT_101010
CL_UNORM_INT_101010_2
CL_UNORM_SHORT_555
CL_UNORM_SHORT_565
CL_UNSIGNED_INT16
CL_UNSIGNED_INT32
CL_UNSIGNED_INT8
CL_VERSION_1_0
CL_VERSION_1_1
CL_VERSION_1_2
CL_VERSION_2_0
CL_VERSION_2_1
CL_sBGRA
CL_sRGB
CL_sRGBA
CL_sRGBx
----------------------------------------------------
[
["constant-opencl-host", "CL_A"],
["constant-opencl-host", "CL_ABGR"],
["constant-opencl-host", "CL_ADDRESS_CLAMP"],
["constant-opencl-host", "CL_ADDRESS_CLAMP_TO_EDGE"],
["constant-opencl-host", "CL_ADDRESS_MIRRORED_REPEAT"],
["constant-opencl-host", "CL_ADDRESS_NONE"],
["constant-opencl-host", "CL_ADDRESS_REPEAT"],
["constant-opencl-host", "CL_ARGB"],
["constant-opencl-host", "CL_BGRA"],
["constant-opencl-host", "CL_BLOCKING"],
["constant-opencl-host", "CL_BUFFER_CREATE_TYPE_REGION"],
["constant-opencl-host", "CL_BUILD_ERROR"],
["constant-opencl-host", "CL_BUILD_IN_PROGRESS"],
["constant-opencl-host", "CL_BUILD_NONE"],
["constant-opencl-host", "CL_BUILD_PROGRAM_FAILURE"],
["constant-opencl-host", "CL_BUILD_SUCCESS"],
["constant-opencl-host", "CL_COMMAND_ACQUIRE_GL_OBJECTS"],
["constant-opencl-host", "CL_COMMAND_BARRIER"],
["constant-opencl-host", "CL_COMMAND_COPY_BUFFER"],
["constant-opencl-host", "CL_COMMAND_COPY_BUFFER_RECT"],
["constant-opencl-host", "CL_COMMAND_COPY_BUFFER_TO_IMAGE"],
["constant-opencl-host", "CL_COMMAND_COPY_IMAGE"],
["constant-opencl-host", "CL_COMMAND_COPY_IMAGE_TO_BUFFER"],
["constant-opencl-host", "CL_COMMAND_FILL_BUFFER"],
["constant-opencl-host", "CL_COMMAND_FILL_IMAGE"],
["constant-opencl-host", "CL_COMMAND_MAP_BUFFER"],
["constant-opencl-host", "CL_COMMAND_MAP_IMAGE"],
["constant-opencl-host", "CL_COMMAND_MARKER"],
["constant-opencl-host", "CL_COMMAND_MIGRATE_MEM_OBJECTS"],
["constant-opencl-host", "CL_COMMAND_MIGRATE_SVM_MEM_OBJECTS"],
["constant-opencl-host", "CL_COMMAND_NATIVE_KERNEL"],
["constant-opencl-host", "CL_COMMAND_NDRANGE_KERNEL"],
["constant-opencl-host", "CL_COMMAND_READ_BUFFER"],
["constant-opencl-host", "CL_COMMAND_READ_BUFFER_RECT"],
["constant-opencl-host", "CL_COMMAND_READ_IMAGE"],
["constant-opencl-host", "CL_COMMAND_RELEASE_GL_OBJECTS"],
["constant-opencl-host", "CL_COMMAND_SVM_FREE"],
["constant-opencl-host", "CL_COMMAND_SVM_MAP"],
["constant-opencl-host", "CL_COMMAND_SVM_MEMCPY"],
["constant-opencl-host", "CL_COMMAND_SVM_MEMFILL"],
["constant-opencl-host", "CL_COMMAND_SVM_UNMAP"],
["constant-opencl-host", "CL_COMMAND_TASK"],
["constant-opencl-host", "CL_COMMAND_UNMAP_MEM_OBJECT"],
["constant-opencl-host", "CL_COMMAND_USER"],
["constant-opencl-host", "CL_COMMAND_WRITE_BUFFER"],
["constant-opencl-host", "CL_COMMAND_WRITE_BUFFER_RECT"],
["constant-opencl-host", "CL_COMMAND_WRITE_IMAGE"],
["constant-opencl-host", "CL_COMPILER_NOT_AVAILABLE"],
["constant-opencl-host", "CL_COMPILE_PROGRAM_FAILURE"],
["constant-opencl-host", "CL_COMPLETE"],
["constant-opencl-host", "CL_CONTEXT_DEVICES"],
["constant-opencl-host", "CL_CONTEXT_INTEROP_USER_SYNC"],
["constant-opencl-host", "CL_CONTEXT_NUM_DEVICES"],
["constant-opencl-host", "CL_CONTEXT_PLATFORM"],
["constant-opencl-host", "CL_CONTEXT_PROPERTIES"],
["constant-opencl-host", "CL_CONTEXT_REFERENCE_COUNT"],
["constant-opencl-host", "CL_DEPTH"],
["constant-opencl-host", "CL_DEPTH_STENCIL"],
["constant-opencl-host", "CL_DEVICE_ADDRESS_BITS"],
["constant-opencl-host", "CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE"],
["constant-opencl-host", "CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE"],
["constant-opencl-host", "CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE"],
["constant-opencl-host", "CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE"],
["constant-opencl-host", "CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE"],
["constant-opencl-host", "CL_DEVICE_AFFINITY_DOMAIN_NUMA"],
["constant-opencl-host", "CL_DEVICE_AVAILABLE"],
["constant-opencl-host", "CL_DEVICE_BUILT_IN_KERNELS"],
["constant-opencl-host", "CL_DEVICE_COMPILER_AVAILABLE"],
["constant-opencl-host", "CL_DEVICE_DOUBLE_FP_CONFIG"],
["constant-opencl-host", "CL_DEVICE_ENDIAN_LITTLE"],
["constant-opencl-host", "CL_DEVICE_ERROR_CORRECTION_SUPPORT"],
["constant-opencl-host", "CL_DEVICE_EXECUTION_CAPABILITIES"],
["constant-opencl-host", "CL_DEVICE_EXTENSIONS"],
["constant-opencl-host", "CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE"],
["constant-opencl-host", "CL_DEVICE_GLOBAL_MEM_CACHE_SIZE"],
["constant-opencl-host", "CL_DEVICE_GLOBAL_MEM_CACHE_TYPE"],
["constant-opencl-host", "CL_DEVICE_GLOBAL_MEM_SIZE"],
["constant-opencl-host", "CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE"],
["constant-opencl-host", "CL_DEVICE_HOST_UNIFIED_MEMORY"],
["constant-opencl-host", "CL_DEVICE_IL_VERSION"],
["constant-opencl-host", "CL_DEVICE_IMAGE2D_MAX_HEIGHT"],
["constant-opencl-host", "CL_DEVICE_IMAGE2D_MAX_WIDTH"],
["constant-opencl-host", "CL_DEVICE_IMAGE3D_MAX_DEPTH"],
["constant-opencl-host", "CL_DEVICE_IMAGE3D_MAX_HEIGHT"],
["constant-opencl-host", "CL_DEVICE_IMAGE3D_MAX_WIDTH"],
["constant-opencl-host", "CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT"],
["constant-opencl-host", "CL_DEVICE_IMAGE_MAX_ARRAY_SIZE"],
["constant-opencl-host", "CL_DEVICE_IMAGE_MAX_BUFFER_SIZE"],
["constant-opencl-host", "CL_DEVICE_IMAGE_PITCH_ALIGNMENT"],
["constant-opencl-host", "CL_DEVICE_IMAGE_SUPPORT"],
["constant-opencl-host", "CL_DEVICE_LINKER_AVAILABLE"],
["constant-opencl-host", "CL_DEVICE_LOCAL_MEM_SIZE"],
["constant-opencl-host", "CL_DEVICE_LOCAL_MEM_TYPE"],
["constant-opencl-host", "CL_DEVICE_MAX_CLOCK_FREQUENCY"],
["constant-opencl-host", "CL_DEVICE_MAX_COMPUTE_UNITS"],
["constant-opencl-host", "CL_DEVICE_MAX_CONSTANT_ARGS"],
["constant-opencl-host", "CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE"],
["constant-opencl-host", "CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE"],
["constant-opencl-host", "CL_DEVICE_MAX_MEM_ALLOC_SIZE"],
["constant-opencl-host", "CL_DEVICE_MAX_NUM_SUB_GROUPS"],
["constant-opencl-host", "CL_DEVICE_MAX_ON_DEVICE_EVENTS"],
["constant-opencl-host", "CL_DEVICE_MAX_ON_DEVICE_QUEUES"],
["constant-opencl-host", "CL_DEVICE_MAX_PARAMETER_SIZE"],
["constant-opencl-host", "CL_DEVICE_MAX_PIPE_ARGS"],
["constant-opencl-host", "CL_DEVICE_MAX_READ_IMAGE_ARGS"],
["constant-opencl-host", "CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS"],
["constant-opencl-host", "CL_DEVICE_MAX_SAMPLERS"],
["constant-opencl-host", "CL_DEVICE_MAX_WORK_GROUP_SIZE"],
["constant-opencl-host", "CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS"],
["constant-opencl-host", "CL_DEVICE_MAX_WORK_ITEM_SIZES"],
["constant-opencl-host", "CL_DEVICE_MAX_WRITE_IMAGE_ARGS"],
["constant-opencl-host", "CL_DEVICE_MEM_BASE_ADDR_ALIGN"],
["constant-opencl-host", "CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE"],
["constant-opencl-host", "CL_DEVICE_NAME"],
["constant-opencl-host", "CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR"],
["constant-opencl-host", "CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE"],
["constant-opencl-host", "CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT"],
["constant-opencl-host", "CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF"],
["constant-opencl-host", "CL_DEVICE_NATIVE_VECTOR_WIDTH_INT"],
["constant-opencl-host", "CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG"],
["constant-opencl-host", "CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT"],
["constant-opencl-host", "CL_DEVICE_NOT_AVAILABLE"],
["constant-opencl-host", "CL_DEVICE_NOT_FOUND"],
["constant-opencl-host", "CL_DEVICE_OPENCL_C_VERSION"],
["constant-opencl-host", "CL_DEVICE_PARENT_DEVICE"],
["constant-opencl-host", "CL_DEVICE_PARTITION_AFFINITY_DOMAIN"],
["constant-opencl-host", "CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN"],
["constant-opencl-host", "CL_DEVICE_PARTITION_BY_COUNTS"],
["constant-opencl-host", "CL_DEVICE_PARTITION_BY_COUNTS_LIST_END"],
["constant-opencl-host", "CL_DEVICE_PARTITION_EQUALLY"],
["constant-opencl-host", "CL_DEVICE_PARTITION_FAILED"],
["constant-opencl-host", "CL_DEVICE_PARTITION_MAX_SUB_DEVICES"],
["constant-opencl-host", "CL_DEVICE_PARTITION_PROPERTIES"],
["constant-opencl-host", "CL_DEVICE_PARTITION_TYPE"],
["constant-opencl-host", "CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS"],
["constant-opencl-host", "CL_DEVICE_PIPE_MAX_PACKET_SIZE"],
["constant-opencl-host", "CL_DEVICE_PLATFORM"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_INTEROP_USER_SYNC"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG"],
["constant-opencl-host", "CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT"],
["constant-opencl-host", "CL_DEVICE_PRINTF_BUFFER_SIZE"],
["constant-opencl-host", "CL_DEVICE_PROFILE"],
["constant-opencl-host", "CL_DEVICE_PROFILING_TIMER_RESOLUTION"],
["constant-opencl-host", "CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE"],
["constant-opencl-host", "CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE"],
["constant-opencl-host", "CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES"],
["constant-opencl-host", "CL_DEVICE_QUEUE_ON_HOST_PROPERTIES"],
["constant-opencl-host", "CL_DEVICE_QUEUE_PROPERTIES"],
["constant-opencl-host", "CL_DEVICE_REFERENCE_COUNT"],
["constant-opencl-host", "CL_DEVICE_SINGLE_FP_CONFIG"],
["constant-opencl-host", "CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS"],
["constant-opencl-host", "CL_DEVICE_SVM_ATOMICS"],
["constant-opencl-host", "CL_DEVICE_SVM_CAPABILITIES"],
["constant-opencl-host", "CL_DEVICE_SVM_COARSE_GRAIN_BUFFER"],
["constant-opencl-host", "CL_DEVICE_SVM_FINE_GRAIN_BUFFER"],
["constant-opencl-host", "CL_DEVICE_SVM_FINE_GRAIN_SYSTEM"],
["constant-opencl-host", "CL_DEVICE_TYPE"],
["constant-opencl-host", "CL_DEVICE_TYPE_ACCELERATOR"],
["constant-opencl-host", "CL_DEVICE_TYPE_ALL"],
["constant-opencl-host", "CL_DEVICE_TYPE_CPU"],
["constant-opencl-host", "CL_DEVICE_TYPE_CUSTOM"],
["constant-opencl-host", "CL_DEVICE_TYPE_DEFAULT"],
["constant-opencl-host", "CL_DEVICE_TYPE_GPU"],
["constant-opencl-host", "CL_DEVICE_VENDOR"],
["constant-opencl-host", "CL_DEVICE_VENDOR_ID"],
["constant-opencl-host", "CL_DEVICE_VERSION"],
["constant-opencl-host", "CL_DRIVER_VERSION"],
["constant-opencl-host", "CL_EVENT_COMMAND_EXECUTION_STATUS"],
["constant-opencl-host", "CL_EVENT_COMMAND_QUEUE"],
["constant-opencl-host", "CL_EVENT_COMMAND_TYPE"],
["constant-opencl-host", "CL_EVENT_CONTEXT"],
["constant-opencl-host", "CL_EVENT_REFERENCE_COUNT"],
["constant-opencl-host", "CL_EXEC_KERNEL"],
["constant-opencl-host", "CL_EXEC_NATIVE_KERNEL"],
["constant-opencl-host", "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST"],
["constant-opencl-host", "CL_FILTER_LINEAR"],
["constant-opencl-host", "CL_FILTER_NEAREST"],
["constant-opencl-host", "CL_FLOAT"],
["constant-opencl-host", "CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT"],
["constant-opencl-host", "CL_FP_DENORM"],
["constant-opencl-host", "CL_FP_FMA"],
["constant-opencl-host", "CL_FP_INF_NAN"],
["constant-opencl-host", "CL_FP_ROUND_TO_INF"],
["constant-opencl-host", "CL_FP_ROUND_TO_NEAREST"],
["constant-opencl-host", "CL_FP_ROUND_TO_ZERO"],
["constant-opencl-host", "CL_FP_SOFT_FLOAT"],
["constant-opencl-host", "CL_GLOBAL"],
["constant-opencl-host", "CL_HALF_FLOAT"],
["constant-opencl-host", "CL_IMAGE_ARRAY_SIZE"],
["constant-opencl-host", "CL_IMAGE_BUFFER"],
["constant-opencl-host", "CL_IMAGE_DEPTH"],
["constant-opencl-host", "CL_IMAGE_ELEMENT_SIZE"],
["constant-opencl-host", "CL_IMAGE_FORMAT"],
["constant-opencl-host", "CL_IMAGE_FORMAT_MISMATCH"],
["constant-opencl-host", "CL_IMAGE_FORMAT_NOT_SUPPORTED"],
["constant-opencl-host", "CL_IMAGE_HEIGHT"],
["constant-opencl-host", "CL_IMAGE_NUM_MIP_LEVELS"],
["constant-opencl-host", "CL_IMAGE_NUM_SAMPLES"],
["constant-opencl-host", "CL_IMAGE_ROW_PITCH"],
["constant-opencl-host", "CL_IMAGE_SLICE_PITCH"],
["constant-opencl-host", "CL_IMAGE_WIDTH"],
["constant-opencl-host", "CL_INTENSITY"],
["constant-opencl-host", "CL_INVALID_ARG_INDEX"],
["constant-opencl-host", "CL_INVALID_ARG_SIZE"],
["constant-opencl-host", "CL_INVALID_ARG_VALUE"],
["constant-opencl-host", "CL_INVALID_BINARY"],
["constant-opencl-host", "CL_INVALID_BUFFER_SIZE"],
["constant-opencl-host", "CL_INVALID_BUILD_OPTIONS"],
["constant-opencl-host", "CL_INVALID_COMMAND_QUEUE"],
["constant-opencl-host", "CL_INVALID_COMPILER_OPTIONS"],
["constant-opencl-host", "CL_INVALID_CONTEXT"],
["constant-opencl-host", "CL_INVALID_DEVICE"],
["constant-opencl-host", "CL_INVALID_DEVICE_PARTITION_COUNT"],
["constant-opencl-host", "CL_INVALID_DEVICE_QUEUE"],
["constant-opencl-host", "CL_INVALID_DEVICE_TYPE"],
["constant-opencl-host", "CL_INVALID_EVENT"],
["constant-opencl-host", "CL_INVALID_EVENT_WAIT_LIST"],
["constant-opencl-host", "CL_INVALID_GLOBAL_OFFSET"],
["constant-opencl-host", "CL_INVALID_GLOBAL_WORK_SIZE"],
["constant-opencl-host", "CL_INVALID_GL_OBJECT"],
["constant-opencl-host", "CL_INVALID_HOST_PTR"],
["constant-opencl-host", "CL_INVALID_IMAGE_DESCRIPTOR"],
["constant-opencl-host", "CL_INVALID_IMAGE_FORMAT_DESCRIPTOR"],
["constant-opencl-host", "CL_INVALID_IMAGE_SIZE"],
["constant-opencl-host", "CL_INVALID_KERNEL"],
["constant-opencl-host", "CL_INVALID_KERNEL_ARGS"],
["constant-opencl-host", "CL_INVALID_KERNEL_DEFINITION"],
["constant-opencl-host", "CL_INVALID_KERNEL_NAME"],
["constant-opencl-host", "CL_INVALID_LINKER_OPTIONS"],
["constant-opencl-host", "CL_INVALID_MEM_OBJECT"],
["constant-opencl-host", "CL_INVALID_MIP_LEVEL"],
["constant-opencl-host", "CL_INVALID_OPERATION"],
["constant-opencl-host", "CL_INVALID_PIPE_SIZE"],
["constant-opencl-host", "CL_INVALID_PLATFORM"],
["constant-opencl-host", "CL_INVALID_PROGRAM"],
["constant-opencl-host", "CL_INVALID_PROGRAM_EXECUTABLE"],
["constant-opencl-host", "CL_INVALID_PROPERTY"],
["constant-opencl-host", "CL_INVALID_QUEUE_PROPERTIES"],
["constant-opencl-host", "CL_INVALID_SAMPLER"],
["constant-opencl-host", "CL_INVALID_VALUE"],
["constant-opencl-host", "CL_INVALID_WORK_DIMENSION"],
["constant-opencl-host", "CL_INVALID_WORK_GROUP_SIZE"],
["constant-opencl-host", "CL_INVALID_WORK_ITEM_SIZE"],
["constant-opencl-host", "CL_KERNEL_ARG_ACCESS_NONE"],
["constant-opencl-host", "CL_KERNEL_ARG_ACCESS_QUALIFIER"],
["constant-opencl-host", "CL_KERNEL_ARG_ACCESS_READ_ONLY"],
["constant-opencl-host", "CL_KERNEL_ARG_ACCESS_READ_WRITE"],
["constant-opencl-host", "CL_KERNEL_ARG_ACCESS_WRITE_ONLY"],
["constant-opencl-host", "CL_KERNEL_ARG_ADDRESS_CONSTANT"],
["constant-opencl-host", "CL_KERNEL_ARG_ADDRESS_GLOBAL"],
["constant-opencl-host", "CL_KERNEL_ARG_ADDRESS_LOCAL"],
["constant-opencl-host", "CL_KERNEL_ARG_ADDRESS_PRIVATE"],
["constant-opencl-host", "CL_KERNEL_ARG_ADDRESS_QUALIFIER"],
["constant-opencl-host", "CL_KERNEL_ARG_INFO_NOT_AVAILABLE"],
["constant-opencl-host", "CL_KERNEL_ARG_NAME"],
["constant-opencl-host", "CL_KERNEL_ARG_TYPE_CONST"],
["constant-opencl-host", "CL_KERNEL_ARG_TYPE_NAME"],
["constant-opencl-host", "CL_KERNEL_ARG_TYPE_NONE"],
["constant-opencl-host", "CL_KERNEL_ARG_TYPE_PIPE"],
["constant-opencl-host", "CL_KERNEL_ARG_TYPE_QUALIFIER"],
["constant-opencl-host", "CL_KERNEL_ARG_TYPE_RESTRICT"],
["constant-opencl-host", "CL_KERNEL_ARG_TYPE_VOLATILE"],
["constant-opencl-host", "CL_KERNEL_ATTRIBUTES"],
["constant-opencl-host", "CL_KERNEL_COMPILE_NUM_SUB_GROUPS"],
["constant-opencl-host", "CL_KERNEL_COMPILE_WORK_GROUP_SIZE"],
["constant-opencl-host", "CL_KERNEL_CONTEXT"],
["constant-opencl-host", "CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM"],
["constant-opencl-host", "CL_KERNEL_EXEC_INFO_SVM_PTRS"],
["constant-opencl-host", "CL_KERNEL_FUNCTION_NAME"],
["constant-opencl-host", "CL_KERNEL_GLOBAL_WORK_SIZE"],
["constant-opencl-host", "CL_KERNEL_LOCAL_MEM_SIZE"],
["constant-opencl-host", "CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT"],
["constant-opencl-host", "CL_KERNEL_MAX_NUM_SUB_GROUPS"],
["constant-opencl-host", "CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE"],
["constant-opencl-host", "CL_KERNEL_NUM_ARGS"],
["constant-opencl-host", "CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE"],
["constant-opencl-host", "CL_KERNEL_PRIVATE_MEM_SIZE"],
["constant-opencl-host", "CL_KERNEL_PROGRAM"],
["constant-opencl-host", "CL_KERNEL_REFERENCE_COUNT"],
["constant-opencl-host", "CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE"],
["constant-opencl-host", "CL_KERNEL_WORK_GROUP_SIZE"],
["constant-opencl-host", "CL_LINKER_NOT_AVAILABLE"],
["constant-opencl-host", "CL_LINK_PROGRAM_FAILURE"],
["constant-opencl-host", "CL_LOCAL"],
["constant-opencl-host", "CL_LUMINANCE"],
["constant-opencl-host", "CL_MAP_FAILURE"],
["constant-opencl-host", "CL_MAP_READ"],
["constant-opencl-host", "CL_MAP_WRITE"],
["constant-opencl-host", "CL_MAP_WRITE_INVALIDATE_REGION"],
["constant-opencl-host", "CL_MEM_ALLOC_HOST_PTR"],
["constant-opencl-host", "CL_MEM_ASSOCIATED_MEMOBJECT"],
["constant-opencl-host", "CL_MEM_CONTEXT"],
["constant-opencl-host", "CL_MEM_COPY_HOST_PTR"],
["constant-opencl-host", "CL_MEM_COPY_OVERLAP"],
["constant-opencl-host", "CL_MEM_FLAGS"],
["constant-opencl-host", "CL_MEM_HOST_NO_ACCESS"],
["constant-opencl-host", "CL_MEM_HOST_PTR"],
["constant-opencl-host", "CL_MEM_HOST_READ_ONLY"],
["constant-opencl-host", "CL_MEM_HOST_WRITE_ONLY"],
["constant-opencl-host", "CL_MEM_KERNEL_READ_AND_WRITE"],
["constant-opencl-host", "CL_MEM_MAP_COUNT"],
["constant-opencl-host", "CL_MEM_OBJECT_ALLOCATION_FAILURE"],
["constant-opencl-host", "CL_MEM_OBJECT_BUFFER"],
["constant-opencl-host", "CL_MEM_OBJECT_IMAGE1D"],
["constant-opencl-host", "CL_MEM_OBJECT_IMAGE1D_ARRAY"],
["constant-opencl-host", "CL_MEM_OBJECT_IMAGE1D_BUFFER"],
["constant-opencl-host", "CL_MEM_OBJECT_IMAGE2D"],
["constant-opencl-host", "CL_MEM_OBJECT_IMAGE2D_ARRAY"],
["constant-opencl-host", "CL_MEM_OBJECT_IMAGE3D"],
["constant-opencl-host", "CL_MEM_OBJECT_PIPE"],
["constant-opencl-host", "CL_MEM_OFFSET"],
["constant-opencl-host", "CL_MEM_READ_ONLY"],
["constant-opencl-host", "CL_MEM_READ_WRITE"],
["constant-opencl-host", "CL_MEM_REFERENCE_COUNT"],
["constant-opencl-host", "CL_MEM_SIZE"],
["constant-opencl-host", "CL_MEM_SVM_ATOMICS"],
["constant-opencl-host", "CL_MEM_SVM_FINE_GRAIN_BUFFER"],
["constant-opencl-host", "CL_MEM_TYPE"],
["constant-opencl-host", "CL_MEM_USES_SVM_POINTER"],
["constant-opencl-host", "CL_MEM_USE_HOST_PTR"],
["constant-opencl-host", "CL_MEM_WRITE_ONLY"],
["constant-opencl-host", "CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED"],
["constant-opencl-host", "CL_MIGRATE_MEM_OBJECT_HOST"],
["constant-opencl-host", "CL_MISALIGNED_SUB_BUFFER_OFFSET"],
["constant-opencl-host", "CL_NONE"],
["constant-opencl-host", "CL_NON_BLOCKING"],
["constant-opencl-host", "CL_OUT_OF_HOST_MEMORY"],
["constant-opencl-host", "CL_OUT_OF_RESOURCES"],
["constant-opencl-host", "CL_PIPE_MAX_PACKETS"],
["constant-opencl-host", "CL_PIPE_PACKET_SIZE"],
["constant-opencl-host", "CL_PLATFORM_EXTENSIONS"],
["constant-opencl-host", "CL_PLATFORM_HOST_TIMER_RESOLUTION"],
["constant-opencl-host", "CL_PLATFORM_NAME"],
["constant-opencl-host", "CL_PLATFORM_PROFILE"],
["constant-opencl-host", "CL_PLATFORM_VENDOR"],
["constant-opencl-host", "CL_PLATFORM_VERSION"],
["constant-opencl-host", "CL_PROFILING_COMMAND_COMPLETE"],
["constant-opencl-host", "CL_PROFILING_COMMAND_END"],
["constant-opencl-host", "CL_PROFILING_COMMAND_QUEUED"],
["constant-opencl-host", "CL_PROFILING_COMMAND_START"],
["constant-opencl-host", "CL_PROFILING_COMMAND_SUBMIT"],
["constant-opencl-host", "CL_PROFILING_INFO_NOT_AVAILABLE"],
["constant-opencl-host", "CL_PROGRAM_BINARIES"],
["constant-opencl-host", "CL_PROGRAM_BINARY_SIZES"],
["constant-opencl-host", "CL_PROGRAM_BINARY_TYPE"],
["constant-opencl-host", "CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT"],
["constant-opencl-host", "CL_PROGRAM_BINARY_TYPE_EXECUTABLE"],
["constant-opencl-host", "CL_PROGRAM_BINARY_TYPE_LIBRARY"],
["constant-opencl-host", "CL_PROGRAM_BINARY_TYPE_NONE"],
["constant-opencl-host", "CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE"],
["constant-opencl-host", "CL_PROGRAM_BUILD_LOG"],
["constant-opencl-host", "CL_PROGRAM_BUILD_OPTIONS"],
["constant-opencl-host", "CL_PROGRAM_BUILD_STATUS"],
["constant-opencl-host", "CL_PROGRAM_CONTEXT"],
["constant-opencl-host", "CL_PROGRAM_DEVICES"],
["constant-opencl-host", "CL_PROGRAM_IL"],
["constant-opencl-host", "CL_PROGRAM_KERNEL_NAMES"],
["constant-opencl-host", "CL_PROGRAM_NUM_DEVICES"],
["constant-opencl-host", "CL_PROGRAM_NUM_KERNELS"],
["constant-opencl-host", "CL_PROGRAM_REFERENCE_COUNT"],
["constant-opencl-host", "CL_PROGRAM_SOURCE"],
["constant-opencl-host", "CL_QUEUED"],
["constant-opencl-host", "CL_QUEUE_CONTEXT"],
["constant-opencl-host", "CL_QUEUE_DEVICE"],
["constant-opencl-host", "CL_QUEUE_DEVICE_DEFAULT"],
["constant-opencl-host", "CL_QUEUE_ON_DEVICE"],
["constant-opencl-host", "CL_QUEUE_ON_DEVICE_DEFAULT"],
["constant-opencl-host", "CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE"],
["constant-opencl-host", "CL_QUEUE_PROFILING_ENABLE"],
["constant-opencl-host", "CL_QUEUE_PROPERTIES"],
["constant-opencl-host", "CL_QUEUE_REFERENCE_COUNT"],
["constant-opencl-host", "CL_QUEUE_SIZE"],
["constant-opencl-host", "CL_R"],
["constant-opencl-host", "CL_RA"],
["constant-opencl-host", "CL_READ_ONLY_CACHE"],
["constant-opencl-host", "CL_READ_WRITE_CACHE"],
["constant-opencl-host", "CL_RG"],
["constant-opencl-host", "CL_RGB"],
["constant-opencl-host", "CL_RGBA"],
["constant-opencl-host", "CL_RGBx"],
["constant-opencl-host", "CL_RGx"],
["constant-opencl-host", "CL_RUNNING"],
["constant-opencl-host", "CL_Rx"],
["constant-opencl-host", "CL_SAMPLER_ADDRESSING_MODE"],
["constant-opencl-host", "CL_SAMPLER_CONTEXT"],
["constant-opencl-host", "CL_SAMPLER_FILTER_MODE"],
["constant-opencl-host", "CL_SAMPLER_LOD_MAX"],
["constant-opencl-host", "CL_SAMPLER_LOD_MIN"],
["constant-opencl-host", "CL_SAMPLER_MIP_FILTER_MODE"],
["constant-opencl-host", "CL_SAMPLER_NORMALIZED_COORDS"],
["constant-opencl-host", "CL_SAMPLER_REFERENCE_COUNT"],
["constant-opencl-host", "CL_SIGNED_INT16"],
["constant-opencl-host", "CL_SIGNED_INT32"],
["constant-opencl-host", "CL_SIGNED_INT8"],
["constant-opencl-host", "CL_SNORM_INT16"],
["constant-opencl-host", "CL_SNORM_INT8"],
["constant-opencl-host", "CL_SUBMITTED"],
["constant-opencl-host", "CL_SUCCESS"],
["constant-opencl-host", "CL_UNORM_INT16"],
["constant-opencl-host", "CL_UNORM_INT24"],
["constant-opencl-host", "CL_UNORM_INT8"],
["constant-opencl-host", "CL_UNORM_INT_101010"],
["constant-opencl-host", "CL_UNORM_INT_101010_2"],
["constant-opencl-host", "CL_UNORM_SHORT_555"],
["constant-opencl-host", "CL_UNORM_SHORT_565"],
["constant-opencl-host", "CL_UNSIGNED_INT16"],
["constant-opencl-host", "CL_UNSIGNED_INT32"],
["constant-opencl-host", "CL_UNSIGNED_INT8"],
["constant-opencl-host", "CL_VERSION_1_0"],
["constant-opencl-host", "CL_VERSION_1_1"],
["constant-opencl-host", "CL_VERSION_1_2"],
["constant-opencl-host", "CL_VERSION_2_0"],
["constant-opencl-host", "CL_VERSION_2_1"],
["constant-opencl-host", "CL_sBGRA"],
["constant-opencl-host", "CL_sRGB"],
["constant-opencl-host", "CL_sRGBA"],
["constant-opencl-host", "CL_sRGBx"]
]
----------------------------------------------------
Checks for all constants in OpenCL host code (C-API).
================================================
FILE: tests/languages/opencl-extensions+c/function_feature.test
================================================
clBuildProgram
clCloneKernel
clCompileProgram
clCreateBuffer
clCreateCommandQueue
clCreateCommandQueueWithProperties
clCreateContext
clCreateContextFromType
clCreateImage
clCreateImage2D
clCreateImage3D
clCreateKernel
clCreateKernelsInProgram
clCreatePipe
clCreateProgramWithBinary
clCreateProgramWithBuiltInKernels
clCreateProgramWithIL
clCreateProgramWithSource
clCreateSampler
clCreateSamplerWithProperties
clCreateSubBuffer
clCreateSubDevices
clCreateUserEvent
clEnqueueBarrier
clEnqueueBarrierWithWaitList
clEnqueueCopyBuffer
clEnqueueCopyBufferRect
clEnqueueCopyBufferToImage
clEnqueueCopyImage
clEnqueueCopyImageToBuffer
clEnqueueFillBuffer
clEnqueueFillImage
clEnqueueMapBuffer
clEnqueueMapImage
clEnqueueMarker
clEnqueueMarkerWithWaitList
clEnqueueMigrateMemObjects
clEnqueueNDRangeKernel
clEnqueueNativeKernel
clEnqueueReadBuffer
clEnqueueReadBufferRect
clEnqueueReadImage
clEnqueueSVMFree
clEnqueueSVMMap
clEnqueueSVMMemFill
clEnqueueSVMMemcpy
clEnqueueSVMMigrateMem
clEnqueueSVMUnmap
clEnqueueTask
clEnqueueUnmapMemObject
clEnqueueWaitForEvents
clEnqueueWriteBuffer
clEnqueueWriteBufferRect
clEnqueueWriteImage
clFinish
clFlush
clGetCommandQueueInfo
clGetContextInfo
clGetDeviceAndHostTimer
clGetDeviceIDs
clGetDeviceInfo
clGetEventInfo
clGetEventProfilingInfo
clGetExtensionFunctionAddress
clGetExtensionFunctionAddressForPlatform
clGetHostTimer
clGetImageInfo
clGetKernelArgInfo
clGetKernelInfo
clGetKernelSubGroupInfo
clGetKernelWorkGroupInfo
clGetMemObjectInfo
clGetPipeInfo
clGetPlatformIDs
clGetPlatformInfo
clGetProgramBuildInfo
clGetProgramInfo
clGetSamplerInfo
clGetSupportedImageFormats
clLinkProgram
clReleaseCommandQueue
clReleaseContext
clReleaseDevice
clReleaseEvent
clReleaseKernel
clReleaseMemObject
clReleaseProgram
clReleaseSampler
clRetainCommandQueue
clRetainContext
clRetainDevice
clRetainEvent
clRetainKernel
clRetainMemObject
clRetainProgram
clRetainSampler
clSVMAlloc
clSVMFree
clSetCommandQueueProperty
clSetDefaultDeviceCommandQueue
clSetEventCallback
clSetKernelArg
clSetKernelArgSVMPointer
clSetKernelExecInfo
clSetMemObjectDestructorCallback
clSetUserEventStatus
clUnloadCompiler
clUnloadPlatformCompiler
clWaitForEvents
----------------------------------------------------
[
["function-opencl-host", "clBuildProgram"],
["function-opencl-host", "clCloneKernel"],
["function-opencl-host", "clCompileProgram"],
["function-opencl-host", "clCreateBuffer"],
["function-opencl-host", "clCreateCommandQueue"],
["function-opencl-host", "clCreateCommandQueueWithProperties"],
["function-opencl-host", "clCreateContext"],
["function-opencl-host", "clCreateContextFromType"],
["function-opencl-host", "clCreateImage"],
["function-opencl-host", "clCreateImage2D"],
["function-opencl-host", "clCreateImage3D"],
["function-opencl-host", "clCreateKernel"],
["function-opencl-host", "clCreateKernelsInProgram"],
["function-opencl-host", "clCreatePipe"],
["function-opencl-host", "clCreateProgramWithBinary"],
["function-opencl-host", "clCreateProgramWithBuiltInKernels"],
["function-opencl-host", "clCreateProgramWithIL"],
["function-opencl-host", "clCreateProgramWithSource"],
["function-opencl-host", "clCreateSampler"],
["function-opencl-host", "clCreateSamplerWithProperties"],
["function-opencl-host", "clCreateSubBuffer"],
["function-opencl-host", "clCreateSubDevices"],
["function-opencl-host", "clCreateUserEvent"],
["function-opencl-host", "clEnqueueBarrier"],
["function-opencl-host", "clEnqueueBarrierWithWaitList"],
["function-opencl-host", "clEnqueueCopyBuffer"],
["function-opencl-host", "clEnqueueCopyBufferRect"],
["function-opencl-host", "clEnqueueCopyBufferToImage"],
["function-opencl-host", "clEnqueueCopyImage"],
["function-opencl-host", "clEnqueueCopyImageToBuffer"],
["function-opencl-host", "clEnqueueFillBuffer"],
["function-opencl-host", "clEnqueueFillImage"],
["function-opencl-host", "clEnqueueMapBuffer"],
["function-opencl-host", "clEnqueueMapImage"],
["function-opencl-host", "clEnqueueMarker"],
["function-opencl-host", "clEnqueueMarkerWithWaitList"],
["function-opencl-host", "clEnqueueMigrateMemObjects"],
["function-opencl-host", "clEnqueueNDRangeKernel"],
["function-opencl-host", "clEnqueueNativeKernel"],
["function-opencl-host", "clEnqueueReadBuffer"],
["function-opencl-host", "clEnqueueReadBufferRect"],
["function-opencl-host", "clEnqueueReadImage"],
["function-opencl-host", "clEnqueueSVMFree"],
["function-opencl-host", "clEnqueueSVMMap"],
["function-opencl-host", "clEnqueueSVMMemFill"],
["function-opencl-host", "clEnqueueSVMMemcpy"],
["function-opencl-host", "clEnqueueSVMMigrateMem"],
["function-opencl-host", "clEnqueueSVMUnmap"],
["function-opencl-host", "clEnqueueTask"],
["function-opencl-host", "clEnqueueUnmapMemObject"],
["function-opencl-host", "clEnqueueWaitForEvents"],
["function-opencl-host", "clEnqueueWriteBuffer"],
["function-opencl-host", "clEnqueueWriteBufferRect"],
["function-opencl-host", "clEnqueueWriteImage"],
["function-opencl-host", "clFinish"],
["function-opencl-host", "clFlush"],
["function-opencl-host", "clGetCommandQueueInfo"],
["function-opencl-host", "clGetContextInfo"],
["function-opencl-host", "clGetDeviceAndHostTimer"],
["function-opencl-host", "clGetDeviceIDs"],
["function-opencl-host", "clGetDeviceInfo"],
["function-opencl-host", "clGetEventInfo"],
["function-opencl-host", "clGetEventProfilingInfo"],
["function-opencl-host", "clGetExtensionFunctionAddress"],
["function-opencl-host", "clGetExtensionFunctionAddressForPlatform"],
["function-opencl-host", "clGetHostTimer"],
["function-opencl-host", "clGetImageInfo"],
["function-opencl-host", "clGetKernelArgInfo"],
["function-opencl-host", "clGetKernelInfo"],
["function-opencl-host", "clGetKernelSubGroupInfo"],
["function-opencl-host", "clGetKernelWorkGroupInfo"],
["function-opencl-host", "clGetMemObjectInfo"],
["function-opencl-host", "clGetPipeInfo"],
["function-opencl-host", "clGetPlatformIDs"],
["function-opencl-host", "clGetPlatformInfo"],
["function-opencl-host", "clGetProgramBuildInfo"],
["function-opencl-host", "clGetProgramInfo"],
["function-opencl-host", "clGetSamplerInfo"],
["function-opencl-host", "clGetSupportedImageFormats"],
["function-opencl-host", "clLinkProgram"],
["function-opencl-host", "clReleaseCommandQueue"],
["function-opencl-host", "clReleaseContext"],
["function-opencl-host", "clReleaseDevice"],
["function-opencl-host", "clReleaseEvent"],
["function-opencl-host", "clReleaseKernel"],
["function-opencl-host", "clReleaseMemObject"],
["function-opencl-host", "clReleaseProgram"],
["function-opencl-host", "clReleaseSampler"],
["function-opencl-host", "clRetainCommandQueue"],
["function-opencl-host", "clRetainContext"],
["function-opencl-host", "clRetainDevice"],
["function-opencl-host", "clRetainEvent"],
["function-opencl-host", "clRetainKernel"],
["function-opencl-host", "clRetainMemObject"],
["function-opencl-host", "clRetainProgram"],
["function-opencl-host", "clRetainSampler"],
["function-opencl-host", "clSVMAlloc"],
["function-opencl-host", "clSVMFree"],
["function-opencl-host", "clSetCommandQueueProperty"],
["function-opencl-host", "clSetDefaultDeviceCommandQueue"],
["function-opencl-host", "clSetEventCallback"],
["function-opencl-host", "clSetKernelArg"],
["function-opencl-host", "clSetKernelArgSVMPointer"],
["function-opencl-host", "clSetKernelExecInfo"],
["function-opencl-host", "clSetMemObjectDestructorCallback"],
["function-opencl-host", "clSetUserEventStatus"],
["function-opencl-host", "clUnloadCompiler"],
["function-opencl-host", "clUnloadPlatformCompiler"],
["function-opencl-host", "clWaitForEvents"]
]
----------------------------------------------------
Checks for all reserved function names in OpenCL host code (C-API).
================================================
FILE: tests/languages/opencl-extensions+c/type_feature.test
================================================
cl_GLenum
cl_GLint
cl_GLuin
cl_addressing_mode
cl_bitfield
cl_bool
cl_buffer_create_type
cl_build_status
cl_channel_order
cl_channel_type
cl_char
cl_char16
cl_char2
cl_char3
cl_char4
cl_char8
cl_command_queue
cl_command_queue_info
cl_command_queue_properties
cl_command_type
cl_context
cl_context_info
cl_context_properties
cl_device_exec_capabilities
cl_device_fp_config
cl_device_id
cl_device_info
cl_device_local_mem_type
cl_device_mem_cache_type
cl_device_type
cl_double
cl_double16
cl_double2
cl_double3
cl_double4
cl_double8
cl_event
cl_event_info
cl_filter_mode
cl_float
cl_float16
cl_float2
cl_float3
cl_float4
cl_float8
cl_half
cl_image_info
cl_int
cl_int16
cl_int2
cl_int3
cl_int4
cl_int8
cl_kernel
cl_kernel_info
cl_kernel_work_group_info
cl_long
cl_long16
cl_long2
cl_long3
cl_long4
cl_long8
cl_map_flags
cl_mem
cl_mem_flags
cl_mem_info
cl_mem_object_type
cl_platform_id
cl_platform_info
cl_profiling_info
cl_program
cl_program_build_info
cl_program_info
cl_sampler
cl_sampler_info
cl_short
cl_short16
cl_short2
cl_short3
cl_short4
cl_short8
cl_uchar
cl_uchar16
cl_uchar2
cl_uchar3
cl_uchar4
cl_uchar8
cl_uint
cl_uint16
cl_uint2
cl_uint3
cl_uint4
cl_uint8
cl_ulong
cl_ulong16
cl_ulong2
cl_ulong3
cl_ulong4
cl_ulong8
cl_ushort
cl_ushort16
cl_ushort2
cl_ushort3
cl_ushort4
cl_ushort8
----------------------------------------------------
[
["type-opencl-host", "cl_GLenum"],
["type-opencl-host", "cl_GLint"],
["type-opencl-host", "cl_GLuin"],
["type-opencl-host", "cl_addressing_mode"],
["type-opencl-host", "cl_bitfield"],
["type-opencl-host", "cl_bool"],
["type-opencl-host", "cl_buffer_create_type"],
["type-opencl-host", "cl_build_status"],
["type-opencl-host", "cl_channel_order"],
["type-opencl-host", "cl_channel_type"],
["type-opencl-host", "cl_char"],
["type-opencl-host", "cl_char16"],
["type-opencl-host", "cl_char2"],
["type-opencl-host", "cl_char3"],
["type-opencl-host", "cl_char4"],
["type-opencl-host", "cl_char8"],
["type-opencl-host", "cl_command_queue"],
["type-opencl-host", "cl_command_queue_info"],
["type-opencl-host", "cl_command_queue_properties"],
["type-opencl-host", "cl_command_type"],
["type-opencl-host", "cl_context"],
["type-opencl-host", "cl_context_info"],
["type-opencl-host", "cl_context_properties"],
["type-opencl-host", "cl_device_exec_capabilities"],
["type-opencl-host", "cl_device_fp_config"],
["type-opencl-host", "cl_device_id"],
["type-opencl-host", "cl_device_info"],
["type-opencl-host", "cl_device_local_mem_type"],
["type-opencl-host", "cl_device_mem_cache_type"],
["type-opencl-host", "cl_device_type"],
["type-opencl-host", "cl_double"],
["type-opencl-host", "cl_double16"],
["type-opencl-host", "cl_double2"],
["type-opencl-host", "cl_double3"],
["type-opencl-host", "cl_double4"],
["type-opencl-host", "cl_double8"],
["type-opencl-host", "cl_event"],
["type-opencl-host", "cl_event_info"],
["type-opencl-host", "cl_filter_mode"],
["type-opencl-host", "cl_float"],
["type-opencl-host", "cl_float16"],
["type-opencl-host", "cl_float2"],
["type-opencl-host", "cl_float3"],
["type-opencl-host", "cl_float4"],
["type-opencl-host", "cl_float8"],
["type-opencl-host", "cl_half"],
["type-opencl-host", "cl_image_info"],
["type-opencl-host", "cl_int"],
["type-opencl-host", "cl_int16"],
["type-opencl-host", "cl_int2"],
["type-opencl-host", "cl_int3"],
["type-opencl-host", "cl_int4"],
["type-opencl-host", "cl_int8"],
["type-opencl-host", "cl_kernel"],
["type-opencl-host", "cl_kernel_info"],
["type-opencl-host", "cl_kernel_work_group_info"],
["type-opencl-host", "cl_long"],
["type-opencl-host", "cl_long16"],
["type-opencl-host", "cl_long2"],
["type-opencl-host", "cl_long3"],
["type-opencl-host", "cl_long4"],
["type-opencl-host", "cl_long8"],
["type-opencl-host", "cl_map_flags"],
["type-opencl-host", "cl_mem"],
["type-opencl-host", "cl_mem_flags"],
["type-opencl-host", "cl_mem_info"],
["type-opencl-host", "cl_mem_object_type"],
["type-opencl-host", "cl_platform_id"],
["type-opencl-host", "cl_platform_info"],
["type-opencl-host", "cl_profiling_info"],
["type-opencl-host", "cl_program"],
["type-opencl-host", "cl_program_build_info"],
["type-opencl-host", "cl_program_info"],
["type-opencl-host", "cl_sampler"],
["type-opencl-host", "cl_sampler_info"],
["type-opencl-host", "cl_short"],
["type-opencl-host", "cl_short16"],
["type-opencl-host", "cl_short2"],
["type-opencl-host", "cl_short3"],
["type-opencl-host", "cl_short4"],
["type-opencl-host", "cl_short8"],
["type-opencl-host", "cl_uchar"],
["type-opencl-host", "cl_uchar16"],
["type-opencl-host", "cl_uchar2"],
["type-opencl-host", "cl_uchar3"],
["type-opencl-host", "cl_uchar4"],
["type-opencl-host", "cl_uchar8"],
["type-opencl-host", "cl_uint"],
["type-opencl-host", "cl_uint16"],
["type-opencl-host", "cl_uint2"],
["type-opencl-host", "cl_uint3"],
["type-opencl-host", "cl_uint4"],
["type-opencl-host", "cl_uint8"],
["type-opencl-host", "cl_ulong"],
["type-opencl-host", "cl_ulong16"],
["type-opencl-host", "cl_ulong2"],
["type-opencl-host", "cl_ulong3"],
["type-opencl-host", "cl_ulong4"],
["type-opencl-host", "cl_ulong8"],
["type-opencl-host", "cl_ushort"],
["type-opencl-host", "cl_ushort16"],
["type-opencl-host", "cl_ushort2"],
["type-opencl-host", "cl_ushort3"],
["type-opencl-host", "cl_ushort4"],
["type-opencl-host", "cl_ushort8"]
]
----------------------------------------------------
Checks for all reserved types in OpenCL host code (C-API).
================================================
FILE: tests/languages/opencl-extensions+cpp/type_feature.test
================================================
Buffer
BufferGL
BufferRenderGL
CommandQueue
Context
Device
DeviceCommandQueue
EnqueueArgs
Event
Image
Image1D
Image1DArray
Image1DBuffer
Image2D
Image2DArray
Image2DGL
Image3D
Image3DGL
ImageFormat
ImageGL
Kernel
KernelFunctor
LocalSpaceArg
Memory
NDRange
Pipe
Platform
Program
Sampler
SVMAllocator
SVMTraitAtomic
SVMTraitCoarse
SVMTraitFine
SVMTraitReadOnly
SVMTraitReadWrite
SVMTraitWriteOnly
UserEvent
----------------------------------------------------
[
["type-opencl-host-cpp", "Buffer"],
["type-opencl-host-cpp", "BufferGL"],
["type-opencl-host-cpp", "BufferRenderGL"],
["type-opencl-host-cpp", "CommandQueue"],
["type-opencl-host-cpp", "Context"],
["type-opencl-host-cpp", "Device"],
["type-opencl-host-cpp", "DeviceCommandQueue"],
["type-opencl-host-cpp", "EnqueueArgs"],
["type-opencl-host-cpp", "Event"],
["type-opencl-host-cpp", "Image"],
["type-opencl-host-cpp", "Image1D"],
["type-opencl-host-cpp", "Image1DArray"],
["type-opencl-host-cpp", "Image1DBuffer"],
["type-opencl-host-cpp", "Image2D"],
["type-opencl-host-cpp", "Image2DArray"],
["type-opencl-host-cpp", "Image2DGL"],
["type-opencl-host-cpp", "Image3D"],
["type-opencl-host-cpp", "Image3DGL"],
["type-opencl-host-cpp", "ImageFormat"],
["type-opencl-host-cpp", "ImageGL"],
["type-opencl-host-cpp", "Kernel"],
["type-opencl-host-cpp", "KernelFunctor"],
["type-opencl-host-cpp", "LocalSpaceArg"],
["type-opencl-host-cpp", "Memory"],
["type-opencl-host-cpp", "NDRange"],
["type-opencl-host-cpp", "Pipe"],
["type-opencl-host-cpp", "Platform"],
["type-opencl-host-cpp", "Program"],
["type-opencl-host-cpp", "Sampler"],
["type-opencl-host-cpp", "SVMAllocator"],
["type-opencl-host-cpp", "SVMTraitAtomic"],
["type-opencl-host-cpp", "SVMTraitCoarse"],
["type-opencl-host-cpp", "SVMTraitFine"],
["type-opencl-host-cpp", "SVMTraitReadOnly"],
["type-opencl-host-cpp", "SVMTraitReadWrite"],
["type-opencl-host-cpp", "SVMTraitWriteOnly"],
["type-opencl-host-cpp", "UserEvent"]
]
----------------------------------------------------
Checks for all types in OpenCL host code (C++-API).
================================================
FILE: tests/languages/openqasm/class-name_feature.test
================================================
angle
bit
bool
creg
fixed
float
int
length
qreg
qubit
stretch
uint
----------------------------------------------------
[
["class-name", "angle"],
["class-name", "bit"],
["class-name", "bool"],
["class-name", "creg"],
["class-name", "fixed"],
["class-name", "float"],
["class-name", "int"],
["class-name", "length"],
["class-name", "qreg"],
["class-name", "qubit"],
["class-name", "stretch"],
["class-name", "uint"]
]
================================================
FILE: tests/languages/openqasm/comment_feature.test
================================================
/*
comment
*/
// comment
----------------------------------------------------
[
["comment", "/*\r\n comment\r\n */"],
["comment", "// comment"]
]
================================================
FILE: tests/languages/openqasm/constant_feature.test
================================================
pi tau euler
π τ ℇ
----------------------------------------------------
[
["constant", "pi"], ["constant", "tau"], ["constant", "euler"],
["constant", "π"], " τ ", ["constant", "ℇ"]
]
================================================
FILE: tests/languages/openqasm/function_feature.test
================================================
sin(
cos(
tan(
exp(
ln(
sqrt(
rotl(
rotr(
popcount(
----------------------------------------------------
[
["function", "sin"], ["punctuation", "("],
["function", "cos"], ["punctuation", "("],
["function", "tan"], ["punctuation", "("],
["function", "exp"], ["punctuation", "("],
["function", "ln"], ["punctuation", "("],
["function", "sqrt"], ["punctuation", "("],
["function", "rotl"], ["punctuation", "("],
["function", "rotr"], ["punctuation", "("],
["function", "popcount"], ["punctuation", "("]
]
================================================
FILE: tests/languages/openqasm/keyword_feature.test
================================================
barrier
boxas
boxto
break
const
continue
ctrl
def
defcal
defcalgrammar
delay
else
end
for
gate
gphase
if
in
include
inv
kernel
lengthof
let
measure
pow
reset
return
rotary
stretchinf
while
OPENQASM
CX
U
#pragma
----------------------------------------------------
[
["keyword", "barrier"],
["keyword", "boxas"],
["keyword", "boxto"],
["keyword", "break"],
["keyword", "const"],
["keyword", "continue"],
["keyword", "ctrl"],
["keyword", "def"],
["keyword", "defcal"],
["keyword", "defcalgrammar"],
["keyword", "delay"],
["keyword", "else"],
["keyword", "end"],
["keyword", "for"],
["keyword", "gate"],
["keyword", "gphase"],
["keyword", "if"],
["keyword", "in"],
["keyword", "include"],
["keyword", "inv"],
["keyword", "kernel"],
["keyword", "lengthof"],
["keyword", "let"],
["keyword", "measure"],
["keyword", "pow"],
["keyword", "reset"],
["keyword", "return"],
["keyword", "rotary"],
["keyword", "stretchinf"],
["keyword", "while"],
["keyword", "OPENQASM"],
["keyword", "CX"],
["keyword", "U"],
["keyword", "#pragma"]
]
================================================
FILE: tests/languages/openqasm/number_feature.test
================================================
1234
1e2
.5
1000ms
1000dt
// not a number
$0
----------------------------------------------------
[
["number", "1234"],
["number", "1e2"],
["number", ".5"],
["number", "1000ms"],
["number", "1000dt"],
["comment", "// not a number"],
"\r\n$0"
]
================================================
FILE: tests/languages/openqasm/operator_feature.test
================================================
> < >= <= == !=
& | ~ ^ << >>
&= |= ~= ^= <<= >>=
! && ||
= -> @
+ - * / %
+= -= *= /= %=
++ --
----------------------------------------------------
[
["operator", ">"],
["operator", "<"],
["operator", ">="],
["operator", "<="],
["operator", "=="],
["operator", "!="],
["operator", "&"],
["operator", "|"],
["operator", "~"],
["operator", "^"],
["operator", "<<"],
["operator", ">>"],
["operator", "&="],
["operator", "|="],
["operator", "~="],
["operator", "^="],
["operator", "<<="],
["operator", ">>="],
["operator", "!"], ["operator", "&&"], ["operator", "||"],
["operator", "="], ["operator", "->"], ["operator", "@"],
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "%="],
["operator", "++"],
["operator", "--"]
]
================================================
FILE: tests/languages/openqasm/punctuation_feature.test
================================================
( ) { } [ ]
; , : .
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ";"],
["punctuation", ","],
["punctuation", ":"],
["punctuation", "."]
]
================================================
FILE: tests/languages/openqasm/string_feature.test
================================================
"foo"
'bar'
----------------------------------------------------
[
["string", "\"foo\""],
["string", "'bar'"]
]
================================================
FILE: tests/languages/oz/atom_feature.test
================================================
''
'fo\'obar'
'foo
bar'
----------------------------------------------------
[
["atom", "''"],
["atom", "'fo\\'obar'"],
["atom", "'foo\r\nbar'"]
]
----------------------------------------------------
Checks for atoms.
================================================
FILE: tests/languages/oz/attr-name_feature.test
================================================
menubutton(text:'Test' underline:0)
% negative example
val:=Value
----------------------------------------------------
[
["function", "menubutton"],
["punctuation", "("],
["attr-name", "text"],
["punctuation", ":"],
["atom", "'Test'"],
["attr-name", "underline"],
["punctuation", ":"],
["number", "0"],
["punctuation", ")"],
["comment", "% negative example"],
"\r\nval", ["operator", ":="], "Value"
]
----------------------------------------------------
Checks for parameter names.
================================================
FILE: tests/languages/oz/comment_feature.test
================================================
%
% Foobar
/**/
/* Foo
bar */
----------------------------------------------------
[
["comment", "%"],
["comment", "% Foobar"],
["comment", "/**/"],
["comment", "/* Foo\r\nbar */"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/oz/function_feature.test
================================================
foobar()
{Foobar}
----------------------------------------------------
[
["function", "foobar"], ["punctuation", "("], ["punctuation", ")"],
["punctuation", "{"], ["function", "Foobar"], ["punctuation", "}"]
]
----------------------------------------------------
Checks for functions and procedures.
================================================
FILE: tests/languages/oz/keyword_feature.test
================================================
$
_
[]
at
attr
case
catch
choice
class
cond
declare
define
dis
else
elsecase
elseif
end
export
fail
false
feat
finally
from
fun
functor
if
import
in
local
lock
meth
nil
not
of
or
prepare
proc
prop
raise
require
self
skip
then
thread
true
try
unit
----------------------------------------------------
[
["keyword", "$"],
["keyword", "_"],
["keyword", "[]"],
["keyword", "at"],
["keyword", "attr"],
["keyword", "case"],
["keyword", "catch"],
["keyword", "choice"],
["keyword", "class"],
["keyword", "cond"],
["keyword", "declare"],
["keyword", "define"],
["keyword", "dis"],
["keyword", "else"],
["keyword", "elsecase"],
["keyword", "elseif"],
["keyword", "end"],
["keyword", "export"],
["keyword", "fail"],
["keyword", "false"],
["keyword", "feat"],
["keyword", "finally"],
["keyword", "from"],
["keyword", "fun"],
["keyword", "functor"],
["keyword", "if"],
["keyword", "import"],
["keyword", "in"],
["keyword", "local"],
["keyword", "lock"],
["keyword", "meth"],
["keyword", "nil"],
["keyword", "not"],
["keyword", "of"],
["keyword", "or"],
["keyword", "prepare"],
["keyword", "proc"],
["keyword", "prop"],
["keyword", "raise"],
["keyword", "require"],
["keyword", "self"],
["keyword", "skip"],
["keyword", "then"],
["keyword", "thread"],
["keyword", "true"],
["keyword", "try"],
["keyword", "unit"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/oz/number_feature.test
================================================
0
42
0154
0xBadFace
0B0101
3.14159
2e8
3.E~7
4.8E12
&0
&a
&\n
&\124
----------------------------------------------------
[
["number", "0"],
["number", "42"],
["number", "0154"],
["number", "0xBadFace"],
["number", "0B0101"],
["number", "3.14159"],
["number", "2e8"],
["number", "3.E~7"],
["number", "4.8E12"],
["number", "&0"],
["number", "&a"],
["number", "&\\n"],
["number", "&\\124"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/oz/operator_feature.test
================================================
:= :: :::
< <- <: <=
= == =: =< =<:
> >= >: >=:
\= \=:
! !!
| # + -
* / , ~
^ @
andthen
div
mod
orelse
----------------------------------------------------
[
["operator", ":="], ["operator", "::"], ["operator", ":::"],
["operator", "<"], ["operator", "<-"], ["operator", "<:"], ["operator", "<="],
["operator", "="], ["operator", "=="], ["operator", "=:"], ["operator", "=<"], ["operator", "=<:"],
["operator", ">"], ["operator", ">="], ["operator", ">:"], ["operator", ">=:"],
["operator", "\\="], ["operator", "\\=:"],
["operator", "!"], ["operator", "!!"],
["operator", "|"], ["operator", "#"], ["operator", "+"], ["operator", "-"],
["operator", "*"], ["operator", "/"], ["operator", ","], ["operator", "~"],
["operator", "^"], ["operator", "@"],
["operator", "andthen"],
["operator", "div"],
["operator", "mod"],
["operator", "orelse"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/oz/string_feature.test
================================================
""
"Fo\"obar"
"Foo
bar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"Fo\\\"obar\""],
["string", "\"Foo\r\nbar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/oz/variable_feature.test
================================================
`foo`
----------------------------------------------------
[
["variable", "`foo`"]
]
================================================
FILE: tests/languages/parigp/comment_feature.test
================================================
/**/
/* foo
bar */
\\
\\ foobar
----------------------------------------------------
[
["comment", "/**/"],
["comment", "/* foo\r\nbar */"],
["comment", "\\\\"],
["comment", "\\\\ foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/parigp/function_feature.test
================================================
foo()
f o o b a r ( )
----------------------------------------------------
[
["function", "foo"], ["punctuation", "("], ["punctuation", ")"],
["function", "f o o b a r"], ["punctuation", "("], ["punctuation", ")"]
]
----------------------------------------------------
Checks for functions. Also checks that whitespaces are ignored.
================================================
FILE: tests/languages/parigp/keyword_feature.test
================================================
break
breakpoint
dbg_down
dbg_err
dbg_up
dbg_x
for
forcomposite
fordiv
forell
forpart
forprime
forstep
forsubgroup
forvec
if
iferr
local
my
next
return
until
while
br e ak
break point
d b g_down
dbg_e r r
dbg _ up
db g _x
f o r
for composite
for div
for ell
for part
for prime
for step
for subgroup
for vec
i f
if err
l o c a l
m y
ne xt
re tu rn
u nti l
whi le
----------------------------------------------------
[
["keyword", "break"],
["keyword", "breakpoint"],
["keyword", "dbg_down"],
["keyword", "dbg_err"],
["keyword", "dbg_up"],
["keyword", "dbg_x"],
["keyword", "for"],
["keyword", "forcomposite"],
["keyword", "fordiv"],
["keyword", "forell"],
["keyword", "forpart"],
["keyword", "forprime"],
["keyword", "forstep"],
["keyword", "forsubgroup"],
["keyword", "forvec"],
["keyword", "if"],
["keyword", "iferr"],
["keyword", "local"],
["keyword", "my"],
["keyword", "next"],
["keyword", "return"],
["keyword", "until"],
["keyword", "while"],
["keyword", "br e ak"],
["keyword", "break point"],
["keyword", "d b g_down"],
["keyword", "dbg_e r r"],
["keyword", "dbg _ up"],
["keyword", "db g _x"],
["keyword", "f o r"],
["keyword", "for composite"],
["keyword", "for div"],
["keyword", "for ell"],
["keyword", "for part"],
["keyword", "for prime"],
["keyword", "for step"],
["keyword", "for subgroup"],
["keyword", "for vec"],
["keyword", "i f"],
["keyword", "if err"],
["keyword", "l o c a l"],
["keyword", "m y"],
["keyword", "ne xt"],
["keyword", "re tu rn"],
["keyword", "u nti l"],
["keyword", "whi le"]
]
----------------------------------------------------
Checks for all keywords. Also checks that whitespaces are ignored.
================================================
FILE: tests/languages/parigp/number_feature.test
================================================
0
42
1 2 3 4 5
4.
4 .
.5
. 5
3.14159
3 . 14 15 9
3E8
3 E 8
2.0e-7
2 . 0 e - 7
.28e+12
. 2 8 e + 1 2
----------------------------------------------------
[
["number", "0"],
["number", "42"],
["number", "1 2 3 4 5"],
["number", "4."],
["number", "4 ."],
["number", ".5"],
["number", ". 5"],
["number", "3.14159"],
["number", "3 . 14 15 9"],
["number", "3E8"],
["number", "3 E 8"],
["number", "2.0e-7"],
["number", "2 . 0 e - 7"],
["number", ".28e+12"],
["number", ". 2 8 e + 1 2"]
]
----------------------------------------------------
Checks for numbers. Also checks that whitespaces are ignored.
================================================
FILE: tests/languages/parigp/operator_feature.test
================================================
..
. .
*
*=
* =
/
/=
/ =
!
!=
! =
%
%=
% =
%#
% #
%'
% '
%#'
% # '
%'''''
% '''''
%#'''''
% # '''''
+
++
+ +
+=
+ =
-
--
- -
-=
- =
->
- >
<
<<
< <
<=
< =
<<=
< < =
<>
< >
>
>>
> >
>=
> =
>>=
> > =
=
==
= =
===
= = =
\
\/
\ /
\=
\ =
\/=
\ / =
&
&&
& &
||
| |
'
#
~
^
----------------------------------------------------
[
["operator", ".."],
["operator", ". ."],
["operator", "*"],
["operator", "*="],
["operator", "* ="],
["operator", "/"],
["operator", "/="],
["operator", "/ ="],
["operator", "!"],
["operator", "!="],
["operator", "! ="],
["operator", "%"],
["operator", "%="],
["operator", "% ="],
["operator", "%#"],
["operator", "% #"],
["operator", "%'"],
["operator", "% '"],
["operator", "%#'"],
["operator", "% # '"],
["operator", "%'''''"],
["operator", "% '''''"],
["operator", "%#'''''"],
["operator", "% # '''''"],
["operator", "+"],
["operator", "++"],
["operator", "+ +"],
["operator", "+="],
["operator", "+ ="],
["operator", "-"],
["operator", "--"],
["operator", "- -"],
["operator", "-="],
["operator", "- ="],
["operator", "->"],
["operator", "- >"],
["operator", "<"],
["operator", "<<"],
["operator", "< <"],
["operator", "<="],
["operator", "< ="],
["operator", "<<="],
["operator", "< < ="],
["operator", "<>"],
["operator", "< >"],
["operator", ">"],
["operator", ">>"],
["operator", "> >"],
["operator", ">="],
["operator", "> ="],
["operator", ">>="],
["operator", "> > ="],
["operator", "="],
["operator", "=="],
["operator", "= ="],
["operator", "==="],
["operator", "= = ="],
["operator", "\\"],
["operator", "\\/"],
["operator", "\\ /"],
["operator", "\\="],
["operator", "\\ ="],
["operator", "\\/="],
["operator", "\\ / ="],
["operator", "&"],
["operator", "&&"],
["operator", "& &"],
["operator", "||"],
["operator", "| |"],
["operator", "'"],
["operator", "#"],
["operator", "~"],
["operator", "^"]
]
----------------------------------------------------
Checks for operators. Also checks that whitespaces are ignored.
================================================
FILE: tests/languages/parigp/string_feature.test
================================================
""
"fo\"obar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/parser/boolean_feature.test
================================================
(true)
(false)
----------------------------------------------------
[
["expression", [
["punctuation", "("],
["boolean", "true"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["boolean", "false"],
["punctuation", ")"]
]]
]
----------------------------------------------------
Checks for booleans inside expressions.
================================================
FILE: tests/languages/parser/escape_feature.test
================================================
^$
^^
^;
^@
^(
^)
^[
^]
^{
^}
^"
^'
^:
^#
^#20
^#af
^#AF
^^date::now
^$foobar
----------------------------------------------------
[
["escape", "^$"],
["escape", "^^"],
["escape", "^;"],
["escape", "^@"],
["escape", "^("],
["escape", "^)"],
["escape", "^["],
["escape", "^]"],
["escape", "^{"],
["escape", "^}"],
["escape", "^\""],
["escape", "^'"],
["escape", "^:"],
["escape", "^#"],
["escape", "^#20"],
["escape", "^#af"],
["escape", "^#AF"],
["escape", "^^"], "date::now\r\n",
["escape", "^$"], "foobar\r\n\r\n",
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"foo",
["escape", "^^"],
"bar",
["punctuation", "\""]
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for escapes.
================================================
FILE: tests/languages/parser/expression_feature.test
================================================
((3-(9-2))*4)
^eval(4+2)
----------------------------------------------------
[
["expression", [
["punctuation", "("],
["punctuation", "("],
["number", "3"],
["operator", "-"],
["punctuation", "("],
["number", "9"],
["operator", "-"],
["number", "2"],
["punctuation", ")"],
["punctuation", ")"],
["operator", "*"],
["number", "4"],
["punctuation", ")"]
]],
["keyword", "^eval"],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "+"],
["number", "2"],
["punctuation", ")"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"foo-",
["keyword", "^eval"],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "+"],
["number", "2"],
["punctuation", ")"]
]],
["punctuation", "\""]
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for expressions, up to 3 levels of depth.
================================================
FILE: tests/languages/parser/function_feature.test
================================================
@foo[]
@GET_foo[]
@SET_foo[]
^foo[]
^Foo::create[]
^date::now[]
^foo_bar.menu{}
(^foo[])
----------------------------------------------------
[
["function", ["@foo"]],
["punctuation", "["],
["punctuation", "]"],
["function", [
"@",
["keyword", "GET_"],
"foo"
]],
["punctuation", "["],
["punctuation", "]"],
["function", [
"@",
["keyword", "SET_"],
"foo"
]],
["punctuation", "["],
["punctuation", "]"],
["function", ["^foo"]],
["punctuation", "["],
["punctuation", "]"],
["function", [
"^Foo",
["punctuation", "::"],
"create"
]],
["punctuation", "["],
["punctuation", "]"],
["function", [
"^date",
["punctuation", "::"],
"now"
]],
["punctuation", "["],
["punctuation", "]"],
["function", [
"^foo_bar",
["punctuation", "."],
"menu"
]],
["punctuation", "{"],
["punctuation", "}"],
["expression", [
["punctuation", "("],
["function", ["^foo"]],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ")"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["function", ["^foo"]],
["parser-punctuation", "["],
["parser-punctuation", "]"],
["punctuation", "\""]
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for functions and methods.
================================================
FILE: tests/languages/parser/keyword_feature.test
================================================
^case
^eval
^for
^if
^switch
^throw
@BASE
@CLASS
@GET
@GET_DEFAULT
@OPTIONS
@SET_DEFAULT
@USE
(^eval(2+2))
----------------------------------------------------
[
["keyword", "^case"],
["keyword", "^eval"],
["keyword", "^for"],
["keyword", "^if"],
["keyword", "^switch"],
["keyword", "^throw"],
["keyword", "@BASE"],
["keyword", "@CLASS"],
["keyword", "@GET"],
["keyword", "@GET_DEFAULT"],
["keyword", "@OPTIONS"],
["keyword", "@SET_DEFAULT"],
["keyword", "@USE"],
["expression", [
["punctuation", "("],
["keyword", "^eval"],
["punctuation", "("],
["number", "2"],
["operator", "+"],
["number", "2"],
["punctuation", ")"],
["punctuation", ")"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["keyword", "^if"],
["expression", [
["punctuation", "("],
["variable", ["$foo"]],
["punctuation", ")"]
]],
["parser-punctuation", "{"],
"bar",
["parser-punctuation", "}"],
["parser-punctuation", "{"],
"baz",
["parser-punctuation", "}"],
["punctuation", "\""]
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/parser/number_feature.test
================================================
(42)
(3.14159)
(3e5)
(0.8E-12)
(3.9e+2)
(0xbadface)
(0XBADFACE)
----------------------------------------------------
[
["expression", [
["punctuation", "("],
["number", "42"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "3.14159"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "3e5"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "0.8E-12"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "3.9e+2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "0xbadface"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "0XBADFACE"],
["punctuation", ")"]
]]
]
----------------------------------------------------
Checks for numbers inside expressions.
================================================
FILE: tests/languages/parser/operator_feature.test
================================================
(~42)
(+42)
(-42)
(4/2)
(9\2)
(9%2)
(!true)
(4!|2)
(true!||false)
(4!=2)
(4&2)
(true&&false)
(4|2)
(true||false)
(4==2)
(4<2)
(4<=2)
(4<<2)
(4>2)
(4>=2)
(4>>2)
(-f "foo")
(-d "foo")
(def $foo)
(4 eq 2)
(4 ge 2)
(4 gt 2)
(in "foo")
($foo is string)
(4 le 2)
(4 lt 2)
(4 ne 2)
----------------------------------------------------
[
["expression", [
["punctuation", "("],
["operator", "~"],
["number", "42"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["operator", "+"],
["number", "42"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["operator", "-"],
["number", "42"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "/"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "9"],
["operator", "\\"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "9"],
["operator", "%"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["operator", "!"],
["boolean", "true"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "!|"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["boolean", "true"],
["operator", "!||"],
["boolean", "false"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "!="],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "&"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["boolean", "true"],
["operator", "&&"],
["boolean", "false"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "|"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["boolean", "true"],
["operator", "||"],
["boolean", "false"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "=="],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "<"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "<="],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "<<"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", ">"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", ">="],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", ">>"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["operator", "-f"],
["string", "\"foo\""],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["operator", "-d"],
["string", "\"foo\""],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["operator", "def"],
["variable", ["$foo"]],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "eq"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "ge"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "gt"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["operator", "in"],
["string", "\"foo\""],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["variable", ["$foo"]],
["operator", "is"],
" string",
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "le"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "lt"],
["number", "2"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["number", "4"],
["operator", "ne"],
["number", "2"],
["punctuation", ")"]
]]
]
----------------------------------------------------
Checks for operators inside expressions.
================================================
FILE: tests/languages/parser/parser-comment_feature.test
================================================
Foo
#
# Foobar
----------------------------------------------------
[
"Foo\r\n",
["parser-comment", "#"],
["parser-comment", "# Foobar"]
]
----------------------------------------------------
Checks for comments.
The first line of this test is needed, since we require a whitespace before the hash
and tests are trimmed.
================================================
FILE: tests/languages/parser/string_feature.test
================================================
("")
("foo^"bar")
("foo
bar")
('')
('foo^'bar')
('foo
bar')
----------------------------------------------------
[
["expression", [
["punctuation", "("],
["string", "\"\""],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["string", "\"foo^\"bar\""],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["string", "\"foo\r\nbar\""],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["string", "''"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["string", "'foo^'bar'"],
["punctuation", ")"]
]],
["expression", [
["punctuation", "("],
["string", "'foo\r\nbar'"],
["punctuation", ")"]
]]
]
----------------------------------------------------
Checks for strings inside expressions.
================================================
FILE: tests/languages/parser/variable_feature.test
================================================
$foo
$foo[bar]
$foo_bar[
$.baz[foo]
$.1[bar]
]
$foo.$bar
$foo.[$bar.baz]
$math:PI
($foo)
----------------------------------------------------
[
["variable", ["$foo"]],
["variable", ["$foo"]],
["punctuation", "["],
"bar",
["punctuation", "]"],
["variable", ["$foo_bar"]],
["punctuation", "["],
["variable", [
"$",
["punctuation", "."],
"baz"
]],
["punctuation", "["],
"foo",
["punctuation", "]"],
["variable", [
"$",
["punctuation", "."],
"1"
]],
["punctuation", "["],
"bar",
["punctuation", "]"],
["punctuation", "]"],
["variable", [
"$foo",
["punctuation", "."]
]],
["variable", ["$bar"]],
["variable", [
"$foo",
["punctuation", "."]
]],
["punctuation", "["],
["variable", [
"$bar",
["punctuation", "."],
"baz"
]],
["punctuation", "]"],
["variable", [
"$math",
["punctuation", ":"],
"PI"
]],
["expression", [
["punctuation", "("],
["variable", ["$foo"]],
["punctuation", ")"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["variable", ["$foo"]],
["punctuation", "\""]
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/pascal/asm_feature.test
================================================
program asmDemo(input, output, stderr);
// The $asmMode directive informs the compiler
// which syntax is used in asm-blocks.
// Alternatives are 'att' (AT&T syntax) and 'direct'.
{$asmMode intel}
var
n, m: longint;
begin
n := 42;
m := -7;
writeLn('n = ', n, '; m = ', m);
// instead of declaring another temporary variable
// and writing "tmp := n; n := m; m := tmp;":
asm
mov eax, n // eax := n
// xchg can only operate at most on one memory address
xchg eax, m // swaps values in eax and at m
mov n, eax // n := eax (holding the former m value)
// an array of strings after the asm-block closing 'end'
// tells the compiler which registers have changed
// (you don't wanna mess with the compiler's notion
// which registers mean what)
end ['eax'];
writeLn('n = ', n, '; m = ', m);
end.
program sign(input, output, stderr);
type
signumCodomain = -1..1;
{ returns the sign of an integer }
function signum({$ifNDef CPUx86_64} const {$endIf} x: longint): signumCodomain;
{$ifDef CPUx86_64} // ============= optimized implementation
assembler;
{$asmMode intel}
asm
xor rax, rax // ensure result is not wrong
// due to any residue
test x, x // x ≟ 0
setnz al // al ≔ ¬ZF
sar x, 63 // propagate sign-bit through reg.
cmovs rax, x // if SF then rax ≔ −1
end;
{$else} // ========================== default implementation
begin
// This is what math.sign virtually does.
// The compiled code requires _two_ cmp instructions, though.
if x > 0 then
begin
signum := 1;
end
else if x < 0 then
begin
signum := -1;
end
else
begin
signum := 0;
end;
end;
{$endIf}
// M A I N =================================================
var
x: longint;
begin
readLn(x);
writeLn(signum(x));
end.
----------------------------------------------------
[
["keyword", "program"],
" asmDemo",
["punctuation", "("],
"input",
["punctuation", ","],
" output",
["punctuation", ","],
" stderr",
["punctuation", ")"],
["punctuation", ";"],
["comment", "// The $asmMode directive informs the compiler"],
["comment", "// which syntax is used in asm-blocks."],
["comment", "// Alternatives are 'att' (AT&T syntax) and 'direct'."],
["directive", "{$asmMode intel}"],
["keyword", "var"],
"\r\n\tn",
["punctuation", ","],
" m",
["punctuation", ":"],
" longint",
["punctuation", ";"],
["keyword", "begin"],
"\r\n\tn ",
["operator", ":="],
["number", "42"],
["punctuation", ";"],
"\r\n\tm ",
["operator", ":="],
["operator", "-"],
["number", "7"],
["punctuation", ";"],
"\r\n\twriteLn",
["punctuation", "("],
["string", "'n = '"],
["punctuation", ","],
" n",
["punctuation", ","],
["string", "'; m = '"],
["punctuation", ","],
" m",
["punctuation", ")"],
["punctuation", ";"],
["comment", "// instead of declaring another temporary variable"],
["comment", "// and writing \"tmp := n; n := m; m := tmp;\":"],
["keyword", "asm"],
["asm", [
"\r\n\t\tmov eax",
["punctuation", ","],
" n ",
["comment", "// eax := n"],
["comment", "// xchg can only operate at most on one memory address"],
"\r\n\t\txchg eax",
["punctuation", ","],
" m ",
["comment", "// swaps values in eax and at m"],
"\r\n\t\tmov n",
["punctuation", ","],
" eax ",
["comment", "// n := eax (holding the former m value)"],
["comment", "// an array of strings after the asm-block closing 'end'"],
["comment", "// tells the compiler which registers have changed"],
["comment", "// (you don't wanna mess with the compiler's notion"],
["comment", "// which registers mean what)"]
]],
["keyword", "end"],
["punctuation", "["],
["string", "'eax'"],
["punctuation", "]"],
["punctuation", ";"],
"\r\n\r\n\twriteLn",
["punctuation", "("],
["string", "'n = '"],
["punctuation", ","],
" n",
["punctuation", ","],
["string", "'; m = '"],
["punctuation", ","],
" m",
["punctuation", ")"],
["punctuation", ";"],
["keyword", "end"],
["punctuation", "."],
["keyword", "program"],
" sign",
["punctuation", "("],
"input",
["punctuation", ","],
" output",
["punctuation", ","],
" stderr",
["punctuation", ")"],
["punctuation", ";"],
["keyword", "type"],
"\r\n\tsignumCodomain ",
["operator", "="],
["operator", "-"],
["number", "1"],
["operator", ".."],
["number", "1"],
["punctuation", ";"],
["comment", "{ returns the sign of an integer }"],
["keyword", "function"],
" signum",
["punctuation", "("],
["directive", "{$ifNDef CPUx86_64}"],
["keyword", "const"],
["directive", "{$endIf}"],
" x",
["punctuation", ":"],
" longint",
["punctuation", ")"],
["punctuation", ":"],
" signumCodomain",
["punctuation", ";"],
["directive", "{$ifDef CPUx86_64}"],
["comment", "// ============= optimized implementation"],
["keyword", "assembler"],
["punctuation", ";"],
["directive", "{$asmMode intel}"],
["keyword", "asm"],
["asm", [
"\r\n\txor rax",
["punctuation", ","],
" rax ",
["comment", "// ensure result is not wrong"],
["comment", "// due to any residue"],
"\r\n\r\n\ttest x",
["punctuation", ","],
" x ",
["comment", "// x ≟ 0"],
"\r\n\tsetnz al ",
["comment", "// al ≔ ¬ZF"],
"\r\n\r\n\tsar x",
["punctuation", ","],
["number", "63"],
["comment", "// propagate sign-bit through reg."],
"\r\n\tcmovs rax",
["punctuation", ","],
" x ",
["comment", "// if SF then rax ≔ −1"]
]],
["keyword", "end"],
["punctuation", ";"],
["directive", "{$else}"],
["comment", "// ========================== default implementation"],
["keyword", "begin"],
["comment", "// This is what math.sign virtually does."],
["comment", "// The compiled code requires _two_ cmp instructions, though."],
["keyword", "if"],
" x ",
["operator", ">"],
["number", "0"],
["keyword", "then"],
["keyword", "begin"],
"\r\n\t\tsignum ",
["operator", ":="],
["number", "1"],
["punctuation", ";"],
["keyword", "end"],
["keyword", "else"],
["keyword", "if"],
" x ",
["operator", "<"],
["number", "0"],
["keyword", "then"],
["keyword", "begin"],
"\r\n\t\tsignum ",
["operator", ":="],
["operator", "-"],
["number", "1"],
["punctuation", ";"],
["keyword", "end"],
["keyword", "else"],
["keyword", "begin"],
"\r\n\t\tsignum ",
["operator", ":="],
["number", "0"],
["punctuation", ";"],
["keyword", "end"],
["punctuation", ";"],
["keyword", "end"],
["punctuation", ";"],
["directive", "{$endIf}"],
["comment", "// M A I N ================================================="],
["keyword", "var"],
"\r\n\tx",
["punctuation", ":"],
" longint",
["punctuation", ";"],
["keyword", "begin"],
"\r\n\treadLn",
["punctuation", "("],
"x",
["punctuation", ")"],
["punctuation", ";"],
"\r\n\twriteLn",
["punctuation", "("],
"signum",
["punctuation", "("],
"x",
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "end"],
["punctuation", "."]
]
================================================
FILE: tests/languages/pascal/comment_feature.test
================================================
(* foo *)
(* foo
bar *)
{ foo }
{ foo
bar }
//
// foobar
----------------------------------------------------
[
["comment", "(* foo *)"],
["comment", "(* foo\r\nbar *)"],
["comment", "{ foo }"],
["comment", "{ foo\r\nbar }"],
["comment", "//"],
["comment", "// foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/pascal/directive_feature.test
================================================
{$ASSERTIONS}
{$asmMode intel}
{$ifDef CPUx86_64} // ============= optimized implementation
----------------------------------------------------
[
["directive", "{$ASSERTIONS}"],
["directive", "{$asmMode intel}"],
["directive", "{$ifDef CPUx86_64}"],
["comment", "// ============= optimized implementation"]
]
================================================
FILE: tests/languages/pascal/keyword_feature.test
================================================
absolute array asm
begin case const
constructor
destructor
do downto else
end file for
function goto
if implementation
inherited inline
interface label
nil object of
operator packed
procedure program
record reintroduce
repeat self
set string then
to type unit
until uses var
while with
dispose exit false
new true
class dispinterface
except exports
finalization
finally
initialization
inline library
on out packed
property raise
resourcestring
threadvar try
absolute abstract
alias assembler
bitpacked break
cdecl continue
cppdecl cvar
default deprecated
dynamic enumerator
experimental
export external
far far16
forward generic
helper implements
index interrupt
iochecks local
message name near
nodefault noreturn
nostackframe
oldfpccall
otherwise
overload override
pascal platform
private protected
public published
read register
reintroduce result
safecall saveregisters
softfloat specialize
static stdcall
stored strict
unaligned
unimplemented
varargs virtual
write
----------------------------------------------------
[
["keyword", "absolute"], ["keyword", "array"], ["keyword", "asm"],
["keyword", "begin"], ["keyword", "case"], ["keyword", "const"],
["keyword", "constructor"],
["keyword", "destructor"],
["keyword", "do"], ["keyword", "downto"], ["keyword", "else"],
["keyword", "end"], ["keyword", "file"], ["keyword", "for"],
["keyword", "function"], ["keyword", "goto"],
["keyword", "if"], ["keyword", "implementation"],
["keyword", "inherited"], ["keyword", "inline"],
["keyword", "interface"], ["keyword", "label"],
["keyword", "nil"], ["keyword", "object"], ["keyword", "of"],
["keyword", "operator"], ["keyword", "packed"],
["keyword", "procedure"], ["keyword", "program"],
["keyword", "record"], ["keyword", "reintroduce"],
["keyword", "repeat"], ["keyword", "self"],
["keyword", "set"], ["keyword", "string"], ["keyword", "then"],
["keyword", "to"], ["keyword", "type"], ["keyword", "unit"],
["keyword", "until"], ["keyword", "uses"], ["keyword", "var"],
["keyword", "while"], ["keyword", "with"],
["keyword", "dispose"], ["keyword", "exit"], ["keyword", "false"],
["keyword", "new"], ["keyword", "true"],
["keyword", "class"], ["keyword", "dispinterface"],
["keyword", "except"], ["keyword", "exports"],
["keyword", "finalization"],
["keyword", "finally"],
["keyword", "initialization"],
["keyword", "inline"], ["keyword", "library"],
["keyword", "on"], ["keyword", "out"], ["keyword", "packed"],
["keyword", "property"], ["keyword", "raise"],
["keyword", "resourcestring"],
["keyword", "threadvar"], ["keyword", "try"],
["keyword", "absolute"], ["keyword", "abstract"],
["keyword", "alias"], ["keyword", "assembler"],
["keyword", "bitpacked"], ["keyword", "break"],
["keyword", "cdecl"], ["keyword", "continue"],
["keyword", "cppdecl"], ["keyword", "cvar"],
["keyword", "default"], ["keyword", "deprecated"],
["keyword", "dynamic"], ["keyword", "enumerator"],
["keyword", "experimental"],
["keyword", "export"], ["keyword", "external"],
["keyword", "far"], ["keyword", "far16"],
["keyword", "forward"], ["keyword", "generic"],
["keyword", "helper"], ["keyword", "implements"],
["keyword", "index"], ["keyword", "interrupt"],
["keyword", "iochecks"], ["keyword", "local"],
["keyword", "message"], ["keyword", "name"], ["keyword", "near"],
["keyword", "nodefault"], ["keyword", "noreturn"],
["keyword", "nostackframe"],
["keyword", "oldfpccall"],
["keyword", "otherwise"],
["keyword", "overload"], ["keyword", "override"],
["keyword", "pascal"], ["keyword", "platform"],
["keyword", "private"], ["keyword", "protected"],
["keyword", "public"], ["keyword", "published"],
["keyword", "read"], ["keyword", "register"],
["keyword", "reintroduce"], ["keyword", "result"],
["keyword", "safecall"], ["keyword", "saveregisters"],
["keyword", "softfloat"], ["keyword", "specialize"],
["keyword", "static"], ["keyword", "stdcall"],
["keyword", "stored"], ["keyword", "strict"],
["keyword", "unaligned"],
["keyword", "unimplemented"],
["keyword", "varargs"], ["keyword", "virtual"],
["keyword", "write"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/pascal/number_feature.test
================================================
42
3.14159
2.1e4
1.0e-1
3.8e+24
$7aff
&17
%11110101
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "2.1e4"],
["number", "1.0e-1"],
["number", "3.8e+24"],
["number", "$7aff"],
["number", "&17"],
["number", "%11110101"]
]
----------------------------------------------------
Checks for decimal, hexadecimal, octal and binary numbers.
================================================
FILE: tests/languages/pascal/operator_feature.test
================================================
.. ** :=
< << <= > >> >=
+ - * /
+= -= *= /=
@ ^ =
and as div
exclude in
include is
mod not or
shl shr xor
----------------------------------------------------
[
["operator", ".."], ["operator", "**"], ["operator", ":="],
["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", ">"], ["operator", ">>"], ["operator", ">="],
["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"],
["operator", "+="], ["operator", "-="], ["operator", "*="], ["operator", "/="],
["operator", "@"], ["operator", "^"], ["operator", "="],
["operator", "and"], ["operator", "as"], ["operator", "div"],
["operator", "exclude"], ["operator", "in"],
["operator", "include"], ["operator", "is"],
["operator", "mod"], ["operator", "not"], ["operator", "or"],
["operator", "shl"], ["operator", "shr"], ["operator", "xor"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/pascal/string_feature.test
================================================
''
'fo''o'
^G
#7
#$f4
'foo'#9'bar'
----------------------------------------------------
[
["string", "''"],
["string", "'fo''o'"],
["string", "^G"],
["string", "#7"],
["string", "#$f4"],
["string", "'foo'#9'bar'"]
]
----------------------------------------------------
Checks for strings and chars.
================================================
FILE: tests/languages/pascaligo/boolean_feature.test
================================================
True False
----------------------------------------------------
[
["boolean", "True"], ["boolean", "False"]
]
----------------------------------------------------
Checks for all booleans.
================================================
FILE: tests/languages/pascaligo/builtin_feature.test
================================================
int unit
string nat map
list record bool
----------------------------------------------------
[
["builtin", "int"], ["builtin", "unit"],
["builtin", "string"], ["builtin", "nat"], ["builtin", "map"],
["builtin", "list"], ["builtin", "record"], ["builtin", "bool"]
]
----------------------------------------------------
Checks for builtins.
================================================
FILE: tests/languages/pascaligo/class-name_feature.test
================================================
type storage is int
function add (const store : storage; const delta : int) : storage is store + delta
----------------------------------------------------
[
["keyword", "type"],
["class-name", [
"storage"
]],
["keyword", "is"],
["class-name", [
["builtin", "int"]
]],
["keyword", "function"],
["function", "add"],
["punctuation", "("],
["keyword", "const"],
" store ",
["punctuation", ":"],
["class-name", [
"storage"
]],
["punctuation", ";"],
["keyword", "const"],
" delta ",
["punctuation", ":"],
["class-name", [
["builtin", "int"]
]],
["punctuation", ")"],
["punctuation", ":"],
["class-name", [
"storage"
]],
["keyword", "is"],
" store ",
["operator", "+"],
" delta"
]
================================================
FILE: tests/languages/pascaligo/comment_feature.test
================================================
(* foo *)
(* foo
bar *)
//
// foobar
----------------------------------------------------
[
["comment", "(* foo *)"],
["comment", "(* foo\r\nbar *)"],
["comment", "//"],
["comment", "// foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/pascaligo/function_feature.test
================================================
somefunc()
some_func()
somefunc42()
----------------------------------------------------
[
["function", "somefunc"],
["punctuation", "("],
["punctuation", ")"],
["function", "some_func"],
["punctuation", "("],
["punctuation", ")"],
["function", "somefunc42"],
["punctuation", "("],
["punctuation", ")"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/pascaligo/keyword_feature.test
================================================
if while for
return nil
remove
from else
then skip
with; is function
var
const type
end begin block
case of
----------------------------------------------------
[
["keyword", "if"], ["keyword", "while"], ["keyword", "for"],
["keyword", "return"], ["keyword", "nil"],
["keyword", "remove"],
["keyword", "from"], ["keyword", "else"],
["keyword", "then"], ["keyword", "skip"],
["keyword", "with"], ["punctuation", ";"], ["keyword", "is"], ["keyword", "function"],
["keyword", "var"],
["keyword", "const"], ["keyword", "type"],
["keyword", "end"], ["keyword", "begin"], ["keyword", "block"],
["keyword", "case"], ["keyword", "of"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/pascaligo/number_feature.test
================================================
42
3.14159
2.1e4
1.0e-1
3.8e+24
$7aff
&17
%11110101
123n
123mtz
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "2.1e4"],
["number", "1.0e-1"],
["number", "3.8e+24"],
["number", "$7aff"],
["number", "&17"],
["number", "%11110101"],
["number", "123n"],
["number", "123mtz"]
]
----------------------------------------------------
Checks for decimal, hexadecimal, octal and binary numbers.
================================================
FILE: tests/languages/pascaligo/operator_feature.test
================================================
.. ** :=
< << <= > >> >=
+ - * /
+= -= *= /=
@ ^ = =/=
-> |
mod and or
----------------------------------------------------
[
["operator", ".."], ["operator", "**"], ["operator", ":="],
["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", ">"], ["operator", ">>"], ["operator", ">="],
["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"],
["operator", "+="], ["operator", "-="], ["operator", "*="], ["operator", "/="],
["operator", "@"], ["operator", "^"], ["operator", "="], ["operator", "=/="],
["operator", "->"], ["operator", "|"],
["operator", "mod"], ["operator", "and"], ["operator", "or"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/pascaligo/string_feature.test
================================================
'a'
'ä'
'本'
'\t'
'\xff'
'\u12e4'
"日本語"
"\xff\u00FF"
----------------------------------------------------
[
["string", "'a'"],
["string", "'ä'"],
["string", "'本'"],
["string", "'\\t'"],
["string", "'\\xff'"],
["string", "'\\u12e4'"],
["string", "\"日本語\""],
["string", "\"\\xff\\u00FF\""]
]
----------------------------------------------------
Checks for runes and strings.
================================================
FILE: tests/languages/pcaxis/boolean_feature.test
================================================
YES
NO
----------------------------------------------------
[
["boolean", "YES"],
["boolean", "NO"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/pcaxis/keyword_feature.test
================================================
FOO=0;
FOO[en]=1;
FOO("param")=0;
FOO("param1","param2")=0;
FOO-BAR[en]("param1","param2")=1;
----------------------------------------------------
[
["keyword", [
["keyword", "FOO"]
]],
["operator", "="],
["number", "0"],
["punctuation", ";"],
["keyword", [
["keyword", "FOO"],
["language", [
["punctuation", "["],
["property", "en"],
["punctuation", "]"]
]]
]],
["operator", "="],
["number", "1"],
["punctuation", ";"],
["keyword", [
["keyword", "FOO"],
["sub-key", [
["punctuation", "("],
["parameter", "\"param\""],
["punctuation", ")"]
]]
]],
["operator", "="],
["number", "0"],
["punctuation", ";"],
["keyword", [
["keyword", "FOO"],
["sub-key", [
["punctuation", "("],
["parameter", "\"param1\""],
["punctuation", ","],
["parameter", "\"param2\""],
["punctuation", ")"]
]]
]],
["operator", "="],
["number", "0"],
["punctuation", ";"],
["keyword", [
["keyword", "FOO-BAR"],
["language", [
["punctuation", "["],
["property", "en"],
["punctuation", "]"]
]],
["sub-key", [
["punctuation", "("],
["parameter", "\"param1\""],
["punctuation", ","],
["parameter", "\"param2\""],
["punctuation", ")"]
]]
]],
["operator", "="],
["number", "1"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/pcaxis/number_feature.test
================================================
0
123456789
123.456
0.123
----------------------------------------------------
[
["number", "0"],
["number", "123456789"],
["number", "123.456"],
["number", "0.123"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/pcaxis/string_feature.test
================================================
"foo ,; ()[] bar"
""
----------------------------------------------------
[
["string", "\"foo ,; ()[] bar\""],
["string", "\"\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/pcaxis/tlist_feature.test
================================================
FOO=TLIST(A1),"bar","baz";
FOO=TLIST(A1);
FOO=TLIST(A1,"bar","baz");
FOO=TLIST(A1,"1"-"100");
----------------------------------------------------
[
["keyword", [
["keyword", "FOO"]
]],
["operator", "="],
["tlist", [
["function", "TLIST"],
["punctuation", "("],
["property", "A1"],
["punctuation", ")"]
]],
["punctuation", ","],
["string", "\"bar\""],
["punctuation", ","],
["string", "\"baz\""],
["punctuation", ";"],
["keyword", [
["keyword", "FOO"]
]],
["operator", "="],
["tlist", [
["function", "TLIST"],
["punctuation", "("],
["property", "A1"],
["punctuation", ")"]
]],
["punctuation", ";"],
["keyword", [
["keyword", "FOO"]
]],
["operator", "="],
["tlist", [
["function", "TLIST"],
["punctuation", "("],
["property", "A1"],
["punctuation", ","],
["string", "\"bar\""],
["punctuation", ","],
["string", "\"baz\""],
["punctuation", ")"]
]],
["punctuation", ";"],
["keyword", [
["keyword", "FOO"]
]],
["operator", "="],
["tlist", [
["function", "TLIST"],
["punctuation", "("],
["property", "A1"],
["punctuation", ","],
["string", "\"1\""],
["operator", "-"],
["string", "\"100\""],
["punctuation", ")"]
]],
["punctuation", ";"]
]
----------------------------------------------------
Checks for TLIST.
================================================
FILE: tests/languages/peoplecode/boolean_feature.test
================================================
false
true
----------------------------------------------------
[
["boolean", "false"],
["boolean", "true"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/peoplecode/class-name_feature.test
================================================
class FactorialClass
method factorial(&I as number) returns number;
end-class;
class Fruit
property number FruitCount;
end-class;
class Banana extends Fruit
property number BananaCount;
end-class;
local Banana &MyBanana = Create Banana();
local Fruit &MyFruit = &MyBanana; /* okay, Banana is a subtype of Fruit */
local number &Num = &MyBanana.BananaCount;
/* generic building class */
class BuildingAsset
method Acquire();
method DisasterPrep();
end-class;
method Acquire
%This.DisasterPrep();
end-method;method DisasterPrep
PrepareForFire();
end-method;
/* building in Vancouver */
class VancouverBuilding extends BuildingAssetmethod DisasterPrep();
end-class;
method DisasterPrep
PrepareForEarthquake();%Super.DisasterPrep(); /* call superclass method */
end-method;
/* building in Edmonton */
class EdmontonBuilding extends BuildingAssetmethod DisasterPrep();
end-class;
method DisasterPrep
PrepareForFreezing();%Super.DisasterPrep(); /* call superclass method */
end-method;
local BuildingAsset &Building = Create VancouverBuilding();
&Building.Acquire(); /* calls PrepareForEarthquake then PrepareForFire */
&Building = Create EdmontonBuilding();
&Building.Acquire(); /* calls PrepareForFreezing then PrepareForFire */
----------------------------------------------------
[
["keyword", "class"],
["class-name", ["FactorialClass"]],
["keyword", "method"],
["function-definition", "factorial"],
["punctuation", "("],
"&I ",
["keyword", "as"],
["class-name", ["number"]],
["punctuation", ")"],
["keyword", "returns"],
["class-name", ["number"]],
["punctuation", ";"],
["keyword", "end-class"],
["punctuation", ";"],
["keyword", "class"],
["class-name", ["Fruit"]],
["keyword", "property"],
["class-name", ["number"]],
" FruitCount",
["punctuation", ";"],
["keyword", "end-class"],
["punctuation", ";"],
["keyword", "class"],
["class-name", ["Banana"]],
["keyword", "extends"],
["class-name", ["Fruit"]],
["keyword", "property"],
["class-name", ["number"]],
" BananaCount",
["punctuation", ";"],
["keyword", "end-class"],
["punctuation", ";"],
["keyword", "local"],
["class-name", ["Banana"]],
" &MyBanana ",
["operator", "="],
["keyword", "Create"],
["class-name", ["Banana"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "local"],
["class-name", ["Fruit"]],
" &MyFruit ",
["operator", "="],
" &MyBanana",
["punctuation", ";"],
["comment", "/* okay, Banana is a subtype of Fruit */"],
["keyword", "local"],
["class-name", ["number"]],
" &Num ",
["operator", "="],
" &MyBanana",
["punctuation", "."],
"BananaCount",
["punctuation", ";"],
["comment", "/* generic building class */"],
["keyword", "class"],
["class-name", ["BuildingAsset"]],
["keyword", "method"],
["function-definition", "Acquire"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "method"],
["function-definition", "DisasterPrep"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "end-class"],
["punctuation", ";"],
["keyword", "method"],
["function-definition", "Acquire"],
["variable", "%This"],
["punctuation", "."],
["function", "DisasterPrep"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "end-method"],
["punctuation", ";"],
["keyword", "method"],
["function-definition", "DisasterPrep"],
["function", "PrepareForFire"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "end-method"],
["punctuation", ";"],
["comment", "/* building in Vancouver */"],
["keyword", "class"],
["class-name", ["VancouverBuilding"]],
["keyword", "extends"],
["class-name", ["BuildingAssetmethod"]],
["function", "DisasterPrep"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "end-class"],
["punctuation", ";"],
["keyword", "method"],
["function-definition", "DisasterPrep"],
["function", "PrepareForEarthquake"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["variable", "%Super"],
["punctuation", "."],
["function", "DisasterPrep"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "/* call superclass method */"],
["keyword", "end-method"],
["punctuation", ";"],
["comment", "/* building in Edmonton */"],
["keyword", "class"],
["class-name", ["EdmontonBuilding"]],
["keyword", "extends"],
["class-name", ["BuildingAssetmethod"]],
["function", "DisasterPrep"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "end-class"],
["punctuation", ";"],
["keyword", "method"],
["function-definition", "DisasterPrep"],
["function", "PrepareForFreezing"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["variable", "%Super"],
["punctuation", "."],
["function", "DisasterPrep"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "/* call superclass method */"],
["keyword", "end-method"],
["punctuation", ";"],
["keyword", "local"],
["class-name", ["BuildingAsset"]],
" &Building ",
["operator", "="],
["keyword", "Create"],
["class-name", ["VancouverBuilding"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
"\r\n\r\n&Building",
["punctuation", "."],
["function", "Acquire"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "/* calls PrepareForEarthquake then PrepareForFire */"],
"\r\n\r\n&Building ",
["operator", "="],
["keyword", "Create"],
["class-name", ["EdmontonBuilding"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
"\r\n\r\n&Building",
["punctuation", "."],
["function", "Acquire"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "/* calls PrepareForFreezing then PrepareForFire */"]
]
================================================
FILE: tests/languages/peoplecode/comment_feature.test
================================================
/*
comment
*/
REM comment;
REM comment
statement;
<*
comment
*>
<*
<*
comment
*>
*>
/+
comment
+/
----------------------------------------------------
[
["comment", "/*\r\ncomment\r\n*/"],
["comment", "REM comment;"],
["comment", "REM comment\r\nstatement;"],
["comment", "<*\r\ncomment\r\n*>"],
["comment", "<*\r\n<*\r\ncomment\r\n*>\r\n*>"],
["comment", "/+\r\ncomment\r\n+/"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/peoplecode/function_feature.test
================================================
GetCurrEffRow()
----------------------------------------------------
[
["function", "GetCurrEffRow"],
["punctuation", "("],
["punctuation", ")"]
]
================================================
FILE: tests/languages/peoplecode/keyword_feature.test
================================================
abstract
alias
as;
catch;
class;
component;
constant;
create;
declare
else
end-class
end-evaluate
end-for
end-function
end-get
end-if
end-method
end-set
end-try
end-while
evaluate
extends;
for
function
get
global;
implements;
import
instance;
if
library
local;
method
null
of;
out
peopleCode
private
program
property;
protected
readonly
ref
repeat
return
returns;
set
step
then
throw
to
try
until
value
when
when-other
while
----------------------------------------------------
[
["keyword", "abstract"],
["keyword", "alias"],
["keyword", "as"], ["punctuation", ";"],
["keyword", "catch"], ["punctuation", ";"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "component"], ["punctuation", ";"],
["keyword", "constant"], ["punctuation", ";"],
["keyword", "create"], ["punctuation", ";"],
["keyword", "declare"],
["keyword", "else"],
["keyword", "end-class"],
["keyword", "end-evaluate"],
["keyword", "end-for"],
["keyword", "end-function"],
["keyword", "end-get"],
["keyword", "end-if"],
["keyword", "end-method"],
["keyword", "end-set"],
["keyword", "end-try"],
["keyword", "end-while"],
["keyword", "evaluate"],
["keyword", "extends"], ["punctuation", ";"],
["keyword", "for"],
["keyword", "function"],
["function-definition", "get"],
["keyword", "global"], ["punctuation", ";"],
["keyword", "implements"], ["punctuation", ";"],
["keyword", "import"],
["keyword", "instance"], ["punctuation", ";"],
["keyword", "if"],
["keyword", "library"],
["keyword", "local"], ["punctuation", ";"],
["keyword", "method"],
["function-definition", "null"],
["keyword", "of"], ["punctuation", ";"],
["keyword", "out"],
["keyword", "peopleCode"],
["keyword", "private"],
["keyword", "program"],
["keyword", "property"], ["punctuation", ";"],
["keyword", "protected"],
["keyword", "readonly"],
["keyword", "ref"],
["keyword", "repeat"],
["keyword", "return"],
["keyword", "returns"], ["punctuation", ";"],
["keyword", "set"],
["keyword", "step"],
["keyword", "then"],
["keyword", "throw"],
["keyword", "to"],
["keyword", "try"],
["keyword", "until"],
["keyword", "value"],
["keyword", "when"],
["keyword", "when-other"],
["keyword", "while"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/peoplecode/operator_feature.test
================================================
+ - * / **
> >= < <= = != <>
| @
and or not
AND OR NOT
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "**"],
["operator", ">"],
["operator", ">="],
["operator", "<"],
["operator", "<="],
["operator", "="],
["operator", "!="],
["operator", "<>"],
["operator", "|"],
["operator", "@"],
["operator-keyword", "and"],
["operator-keyword", "or"],
["operator-keyword", "not"],
["operator-keyword", "AND"],
["operator-keyword", "OR"],
["operator-keyword", "NOT"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/peoplecode/string_feature.test
================================================
""
"foo"
"""foo"" "
''
'foo'
'''foo'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\""],
["string", "\"\"\"foo\"\" \""],
["string", "''"],
["string", "'foo'"],
["string", "'''foo'"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/perl/comment_feature.test
================================================
=label foo
bar
=cut
#
# foobar
----------------------------------------------------
[
["comment", "=label foo\r\nbar\r\n=cut"],
["comment", "#"],
["comment", "# foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/perl/filehandle_feature.test
================================================
_
<>
----------------------------------------------------
[
["filehandle", "_"],
["filehandle", "<>"],
["filehandle", ""],
["filehandle", ""]
]
----------------------------------------------------
Checks for file handles.
================================================
FILE: tests/languages/perl/function_feature.test
================================================
sub foo
sub Foo_Bar42
----------------------------------------------------
[
["keyword", "sub"], ["function", "foo"],
["keyword", "sub"], ["function", "Foo_Bar42"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/perl/keyword_feature.test
================================================
any break continue
default delete die
do else elsif eval
for foreach given
goto if last local
my next our package
print redo require
return say state sub
switch undef unless
until use when while
----------------------------------------------------
[
["keyword", "any"], ["keyword", "break"], ["keyword", "continue"],
["keyword", "default"], ["keyword", "delete"], ["keyword", "die"],
["keyword", "do"], ["keyword", "else"], ["keyword", "elsif"], ["keyword", "eval"],
["keyword", "for"], ["keyword", "foreach"], ["keyword", "given"],
["keyword", "goto"], ["keyword", "if"], ["keyword", "last"], ["keyword", "local"],
["keyword", "my"], ["keyword", "next"], ["keyword", "our"], ["keyword", "package"],
["keyword", "print"], ["keyword", "redo"], ["keyword", "require"],
["keyword", "return"], ["keyword", "say"], ["keyword", "state"], ["keyword", "sub"],
["keyword", "switch"], ["keyword", "undef"], ["keyword", "unless"],
["keyword", "until"], ["keyword", "use"], ["keyword", "when"], ["keyword", "while"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/perl/number_feature.test
================================================
0xFF
0xBad_Face
0b1100
0b1111_0000
42
42_000
3.14_15_9
1.2e4
1_423.6E-2
0.8E+12
----------------------------------------------------
[
["number", "0xFF"],
["number", "0xBad_Face"],
["number", "0b1100"],
["number", "0b1111_0000"],
["number", "42"],
["number", "42_000"],
["number", "3.14_15_9"],
["number", "1.2e4"],
["number", "1_423.6E-2"],
["number", "0.8E+12"]
]
----------------------------------------------------
Checks for hexadecimal, binary and decimal numbers.
================================================
FILE: tests/languages/perl/operator_feature.test
================================================
-r -w -x -o -R
-W -X -O -e -z
-s -f -d -l -p
-S -b -c -t -u
-g -k -T -B -M
-A -C
+ ++ +=
- -- -= ->
* ** *= **=
1 / 2
1 // 2
$a /= 2
$a //= 2
= == =~ =>
~ ~~ ~=
| || |= ||=
& && &= &&=
< <= << <<= <=>
> >= >> >>=
! !~ !=
% %=
^ ^=
. .= .. ...
\ ?
lt gt le ge
eq ne cmp not
and or xor
x x=
----------------------------------------------------
[
["operator", "-r"], ["operator", "-w"], ["operator", "-x"], ["operator", "-o"], ["operator", "-R"],
["operator", "-W"], ["operator", "-X"], ["operator", "-O"], ["operator", "-e"], ["operator", "-z"],
["operator", "-s"], ["operator", "-f"], ["operator", "-d"], ["operator", "-l"], ["operator", "-p"],
["operator", "-S"], ["operator", "-b"], ["operator", "-c"], ["operator", "-t"], ["operator", "-u"],
["operator", "-g"], ["operator", "-k"], ["operator", "-T"], ["operator", "-B"], ["operator", "-M"],
["operator", "-A"], ["operator", "-C"],
["operator", "+"], ["operator", "++"], ["operator", "+="],
["operator", "-"], ["operator", "--"], ["operator", "-="], ["operator", "->"],
["operator", "*"], ["operator", "**"], ["operator", "*="], ["operator", "**="],
["number", "1"], ["operator", "/"], ["number", "2"],
["number", "1"], ["operator", "//"], ["number", "2"],
["variable", "$a"], ["operator", "/="], ["number", "2"],
["variable", "$a"], ["operator", "//="], ["number", "2"],
["operator", "="], ["operator", "=="], ["operator", "=~"], ["operator", "=>"],
["operator", "~"], ["operator", "~~"], ["operator", "~="],
["operator", "|"], ["operator", "||"], ["operator", "|="], ["operator", "||="],
["operator", "&"], ["operator", "&&"], ["operator", "&="], ["operator", "&&="],
["operator", "<"], ["operator", "<="], ["operator", "<<"], ["operator", "<<="], ["operator", "<=>"],
["operator", ">"], ["operator", ">="], ["operator", ">>"], ["operator", ">>="],
["operator", "!"], ["operator", "!~"], ["operator", "!="],
["operator", "%"], ["operator", "%="],
["operator", "^"], ["operator", "^="],
["operator", "."], ["operator", ".="], ["operator", ".."], ["operator", "..."],
["operator", "\\"], ["operator", "?"],
["operator", "lt"], ["operator", "gt"], ["operator", "le"], ["operator", "ge"],
["operator", "eq"], ["operator", "ne"], ["operator", "cmp"], ["operator", "not"],
["operator", "and"], ["operator", "or"], ["operator", "xor"],
["operator", "x"], ["operator", "x="]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/perl/regex_feature.test
================================================
m//
qr!foo\!bar!msix
m,foo
bar,aa
qr aa
m afoob\araaa
qr pfoo
barpxpn
m()c
qr(foo\(\)bar)u
m(foo
bar)l
qr{}d
m{foo\{\}bar}
qr{foo
bar}
m[]
qr[foo\[\]bar]
m[foo
bar]
qr<>s
mbar>i
qrx
s///
tr%foo\%bar%baz%c
y!foo
bar!foo
baz!d
s kkkmsix
tr afoob\arab\azas
y pfoo
barpfoo
bazpr
s()()
tr(foo\(bar)(ba\)z)
y(foo
bar)(foo
baz)csr
s{}{}
tr{foo\{bar}{ba\}z}
y{foo
bar}{foo
baz}
y[][]
s[foo\[bar][ba\]z]u
y[foo
bar][foo
baz]
tr<><>c
ya>
s
tr()<>c
y{foo\a]
s(foo
baz)
//
/foo/gsx
/foo\/bar/n
----------------------------------------------------
[
["regex", "m//"],
["regex", "qr!foo\\!bar!msix"],
["regex", "m,foo\r\nbar,aa"],
["regex", "qr aa"],
["regex", "m afoob\\araaa"],
["regex", "qr pfoo\r\nbarpxpn"],
["regex", "m()c"],
["regex", "qr(foo\\(\\)bar)u"],
["regex", "m(foo\r\nbar)l"],
["regex", "qr{}d"],
["regex", "m{foo\\{\\}bar}"],
["regex", "qr{foo\r\nbar}"],
["regex", "m[]"],
["regex", "qr[foo\\[\\]bar]"],
["regex", "m[foo\r\nbar]"],
["regex", "qr<>s"],
["regex", "mbar>i"],
["regex", "qrx"],
["regex", "s///"],
["regex", "tr%foo\\%bar%baz%c"],
["regex", "y!foo\r\nbar!foo\r\nbaz!d"],
["regex", "s kkkmsix"],
["regex", "tr afoob\\arab\\azas"],
["regex", "y pfoo\r\nbarpfoo\r\nbazpr"],
["regex", "s()()"],
["regex", "tr(foo\\(bar)(ba\\)z)"],
["regex", "y(foo\r\nbar)(foo\r\nbaz)csr"],
["regex", "s{}{}"],
["regex", "tr{foo\\{bar}{ba\\}z}"],
["regex", "y{foo\r\nbar}{foo\r\nbaz}"],
["regex", "y[][]"],
["regex", "s[foo\\[bar][ba\\]z]u"],
["regex", "y[foo\r\nbar][foo\r\nbaz]"],
["regex", "tr<><>c"],
["regex", "ya>"],
["regex", "s"],
["regex", "tr()<>c"],
["regex", "y{foo\\a]"],
["regex", "s(foo\r\nbaz)"],
["regex", "//"],
["regex", "/foo/gsx"],
["regex", "/foo\\/bar/n"]
]
----------------------------------------------------
Checks for regex and regex quote-like operators.
================================================
FILE: tests/languages/perl/string_feature.test
================================================
q//
q/foobar/
q/foo\/bar/
q/foo
bar/
qq!!
qq!foobar!
qq!foo\!bar!
qq!foo
bar!
qw__
qx_foobar_
qx_foo\_bar_
qw_foo
bar_
qw??
qw?foobar?
qw?foo\?bar?
qw?foo
bar?
q aa
q afoob\ara
q 4foobar4
q pfoo
barp
qq()
qq(foobar)
qq(foo\(\)bar)
qq(foo
bar)
qx{}
qx{foobar}
qx{foo\{\}bar}
qx{foo
bar}
qw[]
qw[foobar]
qw[foo\[\]bar]
qw[foo
bar]
q<>
q
qbar>
q
""
"foo\"bar"
"foo
bar"
''
'foo\'bar'
``
`foo\`bar`
`foo
bar`
----------------------------------------------------
[
["string", "q//"],
["string", "q/foobar/"],
["string", "q/foo\\/bar/"],
["string", "q/foo\r\nbar/"],
["string", "qq!!"],
["string", "qq!foobar!"],
["string", "qq!foo\\!bar!"],
["string", "qq!foo\r\nbar!"],
["string", "qw__"],
["string", "qx_foobar_"],
["string", "qx_foo\\_bar_"],
["string", "qw_foo\r\nbar_"],
["string", "qw??"],
["string", "qw?foobar?"],
["string", "qw?foo\\?bar?"],
["string", "qw?foo\r\nbar?"],
["string", "q aa"],
["string", "q afoob\\ara"],
["string", "q 4foobar4"],
["string", "q pfoo\r\nbarp"],
["string", "qq()"],
["string", "qq(foobar)"],
["string", "qq(foo\\(\\)bar)"],
["string", "qq(foo\r\nbar)"],
["string", "qx{}"],
["string", "qx{foobar}"],
["string", "qx{foo\\{\\}bar}"],
["string", "qx{foo\r\nbar}"],
["string", "qw[]"],
["string", "qw[foobar]"],
["string", "qw[foo\\[\\]bar]"],
["string", "qw[foo\r\nbar]"],
["string", "q<>"],
["string", "q"],
["string", "qbar>"],
["string", "q"],
["string", "\"\""],
["string", "\"foo\\\"bar\""],
["string", "\"foo\r\nbar\""],
["string", "''"],
["string", "'foo\\'bar'"],
["string", "``"],
["string", "`foo\\`bar`"],
["string", "`foo\r\nbar`"]
]
----------------------------------------------------
Checks for strings and quote operators.
================================================
FILE: tests/languages/perl/v-string_feature.test
================================================
v1.2
1.2.3
----------------------------------------------------
[
["v-string", "v1.2"],
["v-string", "1.2.3"]
]
----------------------------------------------------
Checks for v-strings.
================================================
FILE: tests/languages/perl/variable_feature.test
================================================
$foo
$#foo
${^POSTMATCH}
${...}
$^V
@1
$42
$$
$_
%!
%'foo
$foo'bar
$::::'foo
$foo::'bar
----------------------------------------------------
[
["variable", "$foo"],
["variable", "$#foo"],
["variable", "${^POSTMATCH}"],
["variable", "$"],
["punctuation", "{"],
["operator", "..."],
["punctuation", "}"],
["variable", "$^V"],
["variable", "@1"],
["variable", "$42"],
["variable", "$$"],
["variable", "$_"],
["variable", "%!"],
["variable", "%'foo"],
["variable", "$foo'bar"],
["variable", "$::::'foo"],
["variable", "$foo::'bar"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/php/argument-name_feature.test
================================================
foo(
a: 'bar',
qux: 'baz'
);
foo(a: 'bar', qux: 'baz' );
----------------------------------------------------
[
["function", ["foo"]],
["punctuation", "("],
["argument-name", "a"],
["punctuation", ":"],
["string", "'bar'"],
["punctuation", ","],
["argument-name", "qux"],
["punctuation", ":"],
["string", "'baz'"],
["punctuation", ")"],
["punctuation", ";"],
["function", ["foo"]],
["punctuation", "("],
["argument-name", "a"],
["punctuation", ":"],
["string", "'bar'"],
["punctuation", ","],
["argument-name", "qux"],
["punctuation", ":"],
["string", "'baz'"],
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for named arguments.
================================================
FILE: tests/languages/php/array_feature.test
================================================
$a = [
1 => [0, 1],
2 => [2, 3],
3 => [
[0, 1],
[2, 3]
]
];
$b = array(
Array(1, 2)
);
$c = [...$a, ...$b, [5, 6]];
$d = [0, 1] + [2];
[$e] = [2, 3];
$f[] = 3;
$g['key'] = 3;
----------------------------------------------------
[
["variable", "$a"],
["operator", "="],
["punctuation", "["],
["number", "1"],
["operator", "=>"],
["punctuation", "["],
["number", "0"],
["punctuation", ","],
["number", "1"],
["punctuation", "]"],
["punctuation", ","],
["number", "2"],
["operator", "=>"],
["punctuation", "["],
["number", "2"],
["punctuation", ","],
["number", "3"],
["punctuation", "]"],
["punctuation", ","],
["number", "3"],
["operator", "=>"],
["punctuation", "["],
["punctuation", "["],
["number", "0"],
["punctuation", ","],
["number", "1"],
["punctuation", "]"],
["punctuation", ","],
["punctuation", "["],
["number", "2"],
["punctuation", ","],
["number", "3"],
["punctuation", "]"],
["punctuation", "]"],
["punctuation", "]"],
["punctuation", ";"],
["variable", "$b"],
["operator", "="],
["keyword", "array"],
["punctuation", "("],
["keyword", "Array"],
["punctuation", "("],
["number", "1"],
["punctuation", ","],
["number", "2"],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ";"],
["variable", "$c"],
["operator", "="],
["punctuation", "["],
["operator", "..."],
["variable", "$a"],
["punctuation", ","],
["operator", "..."],
["variable", "$b"],
["punctuation", ","],
["punctuation", "["],
["number", "5"],
["punctuation", ","],
["number", "6"],
["punctuation", "]"],
["punctuation", "]"],
["punctuation", ";"],
["variable", "$d"],
["operator", "="],
["punctuation", "["],
["number", "0"],
["punctuation", ","],
["number", "1"],
["punctuation", "]"],
["operator", "+"],
["punctuation", "["],
["number", "2"],
["punctuation", "]"],
["punctuation", ";"],
["punctuation", "["],
["variable", "$e"],
["punctuation", "]"],
["operator", "="],
["punctuation", "["],
["number", "2"],
["punctuation", ","],
["number", "3"],
["punctuation", "]"],
["punctuation", ";"],
["variable", "$f"],
["punctuation", "["],
["punctuation", "]"],
["operator", "="],
["number", "3"],
["punctuation", ";"],
["variable", "$g"],
["punctuation", "["],
["string", "'key'"],
["punctuation", "]"],
["operator", "="],
["number", "3"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for arrays.
================================================
FILE: tests/languages/php/attribute_feature.test
================================================
// #[Foo]
#[]
#[
// something ]
Foo,
/* something
else #[] */
Bar
# shell comments aren't confusing at all in here
]
#[Foo([0, 1])]
#[
Foo(
[
1 => [0, 1],
2 => [2, 3],
3 => [
[0, 1],
[2, 3]
]
]
)
]
#[Foo]
#[Foo\Bar\Baz]
#[Route(Http::POST, '/products/create', 1)]
#[
Http\Route(Http::POST, '/products/create', 1),
Foo\Bar\Baz,
AttributeFoo('value')
]
#[A1(1), A1(2), A2(3)]
class Foo {
public function foo(#[A1(5)] $a, #[A1(6)] $b) { }
}
$object = new #[A1(7)] class () {};
function foo(
#[Attribute] $param1,
$param2
) {}
$f1 = #[ExampleAttribute] function () {};
$ref = new \ReflectionFunction(#[A1] #[A2] function () { });
#[DeprecationReason('reason: ')]
function main() {}
----------------------------------------------------
[
["comment", "// #[Foo]"],
"\r\n\r\n#", ["punctuation", "["], ["punctuation", "]"],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["comment", "// something ]"],
["attribute-class-name", "Foo"], ["punctuation", ","],
["comment", "/* something\r\n\telse #[] */"],
["attribute-class-name", "Bar"],
["comment", "# shell comments aren't confusing at all in here"]
]],
["delimiter", "]"]
]],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "Foo"],
["punctuation", "("],
["punctuation", "["],
["number", "0"],
["punctuation", ","],
["number", "1"],
["punctuation", "]"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "Foo"],
["punctuation", "("],
["punctuation", "["],
["number", "1"],
["operator", "=>"],
["punctuation", "["],
["number", "0"],
["punctuation", ","],
["number", "1"],
["punctuation", "]"],
["punctuation", ","],
["number", "2"],
["operator", "=>"],
["punctuation", "["],
["number", "2"],
["punctuation", ","],
["number", "3"],
["punctuation", "]"],
["punctuation", ","],
["number", "3"],
["operator", "=>"],
["punctuation", "["],
["punctuation", "["],
["number", "0"],
["punctuation", ","],
["number", "1"],
["punctuation", "]"],
["punctuation", ","],
["punctuation", "["],
["number", "2"],
["punctuation", ","],
["number", "3"],
["punctuation", "]"],
["punctuation", "]"],
["punctuation", "]"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "Foo"]
]],
["delimiter", "]"]
]],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", [
"Foo",
["punctuation", "\\"],
"Bar",
["punctuation", "\\"],
"Baz"
]]
]],
["delimiter", "]"]
]],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "Route"],
["punctuation", "("],
["attribute-class-name", "Http"],
["operator", "::"],
["constant", "POST"],
["punctuation", ","],
["string", "'/products/create'"],
["punctuation", ","],
["number", "1"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", [
"Http",
["punctuation", "\\"],
"Route"
]],
["punctuation", "("],
["attribute-class-name", "Http"],
["operator", "::"],
["constant", "POST"],
["punctuation", ","],
["string", "'/products/create'"],
["punctuation", ","],
["number", "1"],
["punctuation", ")"],
["punctuation", ","],
["attribute-class-name", [
"Foo",
["punctuation", "\\"],
"Bar",
["punctuation", "\\"],
"Baz"
]],
["punctuation", ","],
["attribute-class-name", "AttributeFoo"],
["punctuation", "("],
["string", "'value'"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "A1"],
["punctuation", "("],
["number", "1"],
["punctuation", ")"],
["punctuation", ","],
["attribute-class-name", "A1"],
["punctuation", "("],
["number", "2"],
["punctuation", ")"],
["punctuation", ","],
["attribute-class-name", "A2"],
["punctuation", "("],
["number", "3"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["keyword", "class"],
["class-name-definition", "Foo"],
["punctuation", "{"],
["keyword", "public"],
["keyword", "function"],
["function-definition", "foo"],
["punctuation", "("],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "A1"],
["punctuation", "("],
["number", "5"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["variable", "$a"],
["punctuation", ","],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "A1"],
["punctuation", "("],
["number", "6"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["variable", "$b"],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "}"],
["variable", "$object"],
["operator", "="],
["keyword", "new"],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "A1"],
["punctuation", "("],
["number", "7"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["keyword", "class"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "function"],
["function-definition", "foo"],
["punctuation", "("],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "Attribute"]
]],
["delimiter", "]"]
]],
["variable", "$param1"],
["punctuation", ","],
["variable", "$param2"],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["variable", "$f1"],
["operator", "="],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "ExampleAttribute"]
]],
["delimiter", "]"]
]],
["keyword", "function"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ";"],
["variable", "$ref"],
["operator", "="],
["keyword", "new"],
["class-name", [
["punctuation", "\\"],
"ReflectionFunction"
]],
["punctuation", "("],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "A1"]
]],
["delimiter", "]"]
]],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "A2"]
]],
["delimiter", "]"]
]],
["keyword", "function"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ")"],
["punctuation", ";"],
["attribute", [
["delimiter", "#["],
["attribute-content", [
["attribute-class-name", "DeprecationReason"],
["punctuation", "("],
["string", "'reason: '"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["keyword", "function"],
["function-definition", "main"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for attributes.
================================================
FILE: tests/languages/php/boolean_feature.test
================================================
FALSE
false
TRUE
true
----------------------------------------------------
[
["constant", "FALSE"],
["constant", "false"],
["constant", "TRUE"],
["constant", "true"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/php/class-name_feature.test
================================================
public Foo $a;
Foo::bar();
\Foo::bar();
\Package\Foo::bar();
function f(Foo $variable): Foo {}
function f(\Foo $variable): \Foo {}
function f(\Package\Foo $variable): \Package\Foo {}
function f($variable): ?Foo {}
function f(Foo|Bar $variable): Foo|Bar {}
function f(Foo|false $variable): Foo|Bar {}
function f(Foo|null $variable): Foo|Bar {}
function f(\Package\Foo|\Package\Bar $variable): \Package\Foo|\Package\Bar {}
class Foo extends Bar implements Baz {}
class Foo extends \Package\Bar implements App\Baz {}
----------------------------------------------------
[
["keyword", "public"],
["class-name", "Foo"],
["variable", "$a"],
["punctuation", ";"],
["class-name", "Foo"],
["operator", "::"],
["function", ["bar"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["class-name", [
["punctuation", "\\"],
"Foo"
]],
["operator", "::"],
["function", ["bar"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["class-name", [
["punctuation", "\\"],
"Package",
["punctuation", "\\"],
"Foo"
]],
["operator", "::"],
["function", ["bar"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "function"],
["function-definition", "f"],
["punctuation", "("],
["class-name", "Foo"],
["variable", "$variable"],
["punctuation", ")"],
["punctuation", ":"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "function"],
["function-definition", "f"],
["punctuation", "("],
["class-name", [
["punctuation", "\\"],
"Foo"
]],
["variable", "$variable"],
["punctuation", ")"],
["punctuation", ":"],
["class-name", [
["punctuation", "\\"],
"Foo"
]],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "function"],
["function-definition", "f"],
["punctuation", "("],
["class-name", [
["punctuation", "\\"],
"Package",
["punctuation", "\\"],
"Foo"
]],
["variable", "$variable"],
["punctuation", ")"],
["punctuation", ":"],
["class-name", [
["punctuation", "\\"],
"Package",
["punctuation", "\\"],
"Foo"
]],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "function"],
["function-definition", "f"],
["punctuation", "("],
["variable", "$variable"],
["punctuation", ")"],
["punctuation", ":"],
["operator", "?"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "function"],
["function-definition", "f"],
["punctuation", "("],
["class-name", "Foo"],
["operator", "|"],
["class-name", "Bar"],
["variable", "$variable"],
["punctuation", ")"],
["punctuation", ":"],
["class-name", "Foo"],
["operator", "|"],
["class-name", "Bar"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "function"],
["function-definition", "f"],
["punctuation", "("],
["class-name", "Foo"],
["operator", "|"],
["keyword", "false"],
["variable", "$variable"],
["punctuation", ")"],
["punctuation", ":"],
["class-name", "Foo"],
["operator", "|"],
["class-name", "Bar"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "function"],
["function-definition", "f"],
["punctuation", "("],
["class-name", "Foo"],
["operator", "|"],
["keyword", "null"],
["variable", "$variable"],
["punctuation", ")"],
["punctuation", ":"],
["class-name", "Foo"],
["operator", "|"],
["class-name", "Bar"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "function"],
["function-definition", "f"],
["punctuation", "("],
["class-name", [
["punctuation", "\\"],
"Package",
["punctuation", "\\"],
"Foo"
]],
["operator", "|"],
["class-name", [
["punctuation", "\\"],
"Package",
["punctuation", "\\"],
"Bar"
]],
["variable", "$variable"],
["punctuation", ")"],
["punctuation", ":"],
["class-name", [
["punctuation", "\\"],
"Package",
["punctuation", "\\"],
"Foo"
]],
["operator", "|"],
["class-name", [
["punctuation", "\\"],
"Package",
["punctuation", "\\"],
"Bar"
]],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "class"],
["class-name-definition", "Foo"],
["keyword", "extends"],
["class-name", "Bar"],
["keyword", "implements"],
["class-name", "Baz"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "class"],
["class-name-definition", "Foo"],
["keyword", "extends"],
["class-name", [
["punctuation", "\\"],
"Package",
["punctuation", "\\"],
"Bar"
]],
["keyword", "implements"],
["class-name", [
"App",
["punctuation", "\\"],
"Baz"
]],
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/php/comment_feature.test
================================================
//
// foobar
/* foo
bar */
/* */
/**/
/** doc comment */
#
# foobar
----------------------------------------------------
[
["comment", "//"],
["comment", "// foobar"],
["comment", "/* foo\r\nbar */"],
["comment", "/* */"],
["comment", "/**/"],
["doc-comment", "/** doc comment */"],
["comment", "#"],
["comment", "# foobar"]
]
----------------------------------------------------
Checks for single-line and multi-line comments.
================================================
FILE: tests/languages/php/constant_feature.test
================================================
null
_
X
AZ
PRISM
FOOBAR_42
class Foo{
const BAR = 1;
const baz = 2;
}
Foo::BAR;
Foo::baz;
switch ($i) {
case NULL:
break;
case X:
break;
}
----------------------------------------------------
[
["constant", "null"],
["constant", "_"],
["constant", "X"],
["constant", "AZ"],
["constant", "PRISM"],
["constant", "FOOBAR_42"],
["keyword", "class"],
["class-name-definition", "Foo"],
["punctuation", "{"],
["keyword", "const"],
["constant", "BAR"],
["operator", "="],
["number", "1"],
["punctuation", ";"],
["keyword", "const"],
["constant", "baz"],
["operator", "="],
["number", "2"],
["punctuation", ";"],
["punctuation", "}"],
["class-name", "Foo"], ["operator", "::"], ["constant", "BAR"], ["punctuation", ";"],
["class-name", "Foo"], ["operator", "::"], ["constant", "baz"], ["punctuation", ";"],
["keyword", "switch"],
["punctuation", "("],
["variable", "$i"],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "case"],
["constant", "NULL"],
["punctuation", ":"],
["keyword", "break"],
["punctuation", ";"],
["keyword", "case"],
["constant", "X"],
["punctuation", ":"],
["keyword", "break"],
["punctuation", ";"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for constants.
================================================
FILE: tests/languages/php/delimiter_feature.test
================================================
?>
= // ?>
')]
function main() {}
// php is not ended yet
?>
----------------------------------------------------
[
["php", [
["delimiter", ""],
["delimiter", "?>"]
]],
["php", [
["delimiter", ""]
]],
["php", [
["delimiter", "="],
["comment", "// "],
["delimiter", "?>"]
]],
["php", [
["delimiter", "'"],
["punctuation", ")"]
]],
["delimiter", "]"]
]],
["keyword", "function"],
["function-definition", "main"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["comment", "// php is not ended yet"],
["delimiter", "?>"]
]]
]
----------------------------------------------------
Checks for delimiters.
================================================
FILE: tests/languages/php/enum_feature.test
================================================
enum Foo implements Bar {}
enum Suit {
case Hearts;
case Diamonds = 'D';
}
$val = Suit::Diamonds;
Suit::Spades->name;
----------------------------------------------------
[
["keyword", "enum"],
["class-name-definition", "Foo"],
["keyword", "implements"],
["class-name", "Bar"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "enum"],
["class-name-definition", "Suit"],
["punctuation", "{"],
["keyword", "case"],
["constant", "Hearts"],
["punctuation", ";"],
["keyword", "case"],
["constant", "Diamonds"],
["operator", "="],
["string", "'D'"],
["punctuation", ";"],
["punctuation", "}"],
["variable", "$val"],
["operator", "="],
["class-name", "Suit"],
["operator", "::"],
["constant", "Diamonds"],
["punctuation", ";"],
["class-name", "Suit"],
["operator", "::"],
["constant", "Spades"],
["operator", "->"],
["property", "name"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for enums.
================================================
FILE: tests/languages/php/function_feature.test
================================================
class A {
function __call() {}
}
$a = new A();
$a->if(); // it's allowed to call a magic method with keyword since forever in PHP
class A {
function if() {} // error before 7.0, allowed now
}
$variable->foreach(); // this "foreach" is a method
$variable->method(); // this is also a method
$var->match()
foreach ($list as $value) { // this "foreach" is a keyword
}
Test::foreach(); // this is "foreach" static method
Test::method(); // this is "method" static method
// The only exception: class
$variable->class(); // this "class" should be interpreted as "keyword"
Test::class; // This "class" should still be a keyword
mb_string(); // call to a global function
\mb_string(); // namespace \ is global
\a\b\c\mb_string(); // function in \a\b\c namespace
----------------------------------------------------
[
["keyword", "class"],
["class-name-definition", "A"],
["punctuation", "{"],
["keyword", "function"],
["function-definition", "__call"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "}"],
["variable", "$a"],
["operator", "="],
["keyword", "new"],
["class-name", "A"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["variable", "$a"],
["operator", "->"],
["function", ["if"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "// it's allowed to call a magic method with keyword since forever in PHP"],
["keyword", "class"],
["class-name-definition", "A"],
["punctuation", "{"],
["keyword", "function"],
["function-definition", "if"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["comment", "// error before 7.0, allowed now"],
["punctuation", "}"],
["variable", "$variable"],
["operator", "->"],
["function", ["foreach"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "// this \"foreach\" is a method"],
["variable", "$variable"],
["operator", "->"],
["function", ["method"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "// this is also a method"],
["variable", "$var"],
["operator", "->"],
["function", ["match"]],
["punctuation", "("],
["punctuation", ")"],
["keyword", "foreach"],
["punctuation", "("],
["variable", "$list"],
["keyword", "as"],
["variable", "$value"],
["punctuation", ")"],
["punctuation", "{"],
["comment", "// this \"foreach\" is a keyword"],
["punctuation", "}"],
["class-name", "Test"],
["operator", "::"],
["function", ["foreach"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "// this is \"foreach\" static method"],
["class-name", "Test"],
["operator", "::"],
["function", ["method"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "// this is \"method\" static method"],
["comment", "// The only exception: class"],
["variable", "$variable"],
["operator", "->"],
["keyword", "class"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "// this \"class\" should be interpreted as \"keyword\""],
["class-name", "Test"],
["operator", "::"],
["keyword", "class"],
["punctuation", ";"],
["comment", "// This \"class\" should still be a keyword"],
["function", ["mb_string"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "// call to a global function"],
["function", [
["punctuation", "\\"],
"mb_string"
]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "// namespace \\ is global"],
["function", [
["punctuation", "\\"],
"a",
["punctuation", "\\"],
"b",
["punctuation", "\\"],
"c",
["punctuation", "\\"],
"mb_string"
]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["comment", "// function in \\a\\b\\c namespace"]
]
================================================
FILE: tests/languages/php/issue2156.test
================================================
// Session starten und confog.php includen
session_start();
include ("config.php");
// CaptchaCodes abfragen
$CAPTCHA_RandomText = "";
if (isset($_POST['txtCode'])){
$CAPTCHA_EnteredText = str_replace("<","",str_replace(">","",str_replace("'","",str_replace("[","",str_replace("]","",$_POST['txtCode'])))));
}
if (isset($_SESSION['CAPTCHA_RndText'])) {
$CAPTCHA_RandomText = $_SESSION['CAPTCHA_RndText'];
}
// Eingabefelder abfragen
$_SESSION['company'] = $_POST['company'];
$_SESSION['name'] = $_POST['name'];
$_SESSION['address'] = $_POST['address'];
$_SESSION['zip_code'] = $_POST['zip_code'];
$_SESSION['city'] = $_POST['city'];
$_SESSION['county'] = $_POST['county'];
$_SESSION['country'] = $_POST['country'];
$_SESSION['phone'] = $_POST['phone'];
$_SESSION['fax'] = $_POST['fax'];
$_SESSION['email'] = $_POST['email'];
$_SESSION['nachricht'] = $_POST['nachricht'];
$email_i = $_SESSION['email'];
// Email Funktion
function pruefe_mail($email_i) {
if(strstr($email_i, "@")) {
$email_i = explode ("@", $email_i);
if(strstr($email_i[1], ".")) $ok = TRUE;
}
return $ok;
}
// Eingaben prüfen
$fehler = "";
if(!pruefe_mail($email_i) && !empty($email_i)) {
$fehler .= "email ";
}
if ($_SESSION['name'] == ""){
$fehler .= "name ";
}
if ($_SESSION['city'] == ""){
$fehler .= "city ";
}
if ($_SESSION['country'] == ""){
$fehler .= "country ";
}
if ($_SESSION['phone'] == ""){
$fehler .= "phone ";
}
if ($_SESSION['email'] == ""){
$fehler .= "email ";
}
if ($_SESSION['message'] == ""){
$fehler .= "message ";
}
if ($CAPTCHA_EnteredText == $CAPTCHA_RandomText and isset($_POST['txtCode']) == true and isset($_SESSION['CAPTCHA_RndText'])){
$captcha = true;
} else {
$fehler .= "code ";
}
echo '';
if ($fehler == ""){
// Email zumsammensetzen
$email = "From: " . $_SESSION['email'];
$nachrichtfertig =
"Company: " . $_SESSION['company'] "n\"
"Name: " $_SESSION['name'] "n\"
"Address: " $_SESSION['address'] "n\"
"ZIP Code: " $_SESSION['zip_code'] "n\"
"City: " $_SESSION['city'] "n\"
"County: " $_SESSION['county'] "n\"
"Country: " $_SESSION['country'] "n\"
"Phone: " $_SESSION['phone'] "n\"
"Fax: " $_SESSION['fax'] "n\"
"eMail: " $_SESSION['email'] "n\n\"
"Message: " $_SESSION['message'];
$versand = mail($empfaenger, $betreff, $nachrichtfertig, $email);
if ($versand) {
echo '
Thank you very much!
The message were send successfully
';
// Sessionvariablen löschen
unset($_SESSION['company']);
unset($_SESSION['name']);
unset($_SESSION['address']);
unset($_SESSION['zip_code']);
unset($_SESSION['city']);
unset($_SESSION['county']);
unset($_SESSION['country']);
unset($_SESSION['phone']);
unset($_SESSION['fax']);
unset($_SESSION['email']);
unset($_SESSION['nachricht']);
}
} else {
echo '
Error
';
echo '
Please fill in all the $fehler field. back
';
}
echo '
';
// Session unset
unset($_SESSION['CAPTCHA_RndText']);
?>
----------------------------------------------------
[
["prolog", "\r\n\t// Session starten und confog.php includen\r\n\tsession_start();\r\n\tinclude (\"config.php\");\r\n\r\n\t// CaptchaCodes abfragen\r\n\t$CAPTCHA_RandomText = \"\";\r\n\tif (isset($_POST['txtCode'])){\r\n\t$CAPTCHA_EnteredText = str_replace(\"<\",\"\",str_replace(\">\",\"\",str_replace(\"'\",\"\",str_replace(\"[\",\"\",str_replace(\"]\",\"\",$_POST['txtCode'])))));\r\n\t}\r\n\tif (isset($_SESSION['CAPTCHA_RndText'])) {\r\n\t$CAPTCHA_RandomText = $_SESSION['CAPTCHA_RndText'];\r\n\t}\r\n\r\n\t// Eingabefelder abfragen\r\n\t$_SESSION['company'] = $_POST['company'];\r\n\t$_SESSION['name'] = $_POST['name'];\r\n\t$_SESSION['address'] = $_POST['address'];\r\n\t$_SESSION['zip_code'] = $_POST['zip_code'];\r\n\t$_SESSION['city'] = $_POST['city'];\r\n\t$_SESSION['county'] = $_POST['county'];\r\n\t$_SESSION['country'] = $_POST['country'];\r\n\t$_SESSION['phone'] = $_POST['phone'];\r\n\t$_SESSION['fax'] = $_POST['fax'];\r\n\t$_SESSION['email'] = $_POST['email'];\r\n\t$_SESSION['nachricht'] = $_POST['nachricht'];\r\n\r\n\t$email_i = $_SESSION['email'];\r\n\r\n\t// Email Funktion\r\n\tfunction pruefe_mail($email_i) {\r\n\t\t if(strstr($email_i, \"@\")) {\r\n\t\t\t$email_i = explode (\"@\", $email_i);\r\n\t\t\tif(strstr($email_i[1], \".\")) $ok = TRUE;\r\n\t\t }\r\n\t\t return $ok;\r\n\t\t}\r\n\r\n\t// Eingaben prüfen\r\n\t$fehler = \"\";\r\n\tif(!pruefe_mail($email_i) && !empty($email_i)) {\r\n\t\t\t$fehler .= \"email \";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['name'] == \"\"){\r\n\t\t\t$fehler .= \"name \";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['city'] == \"\"){\r\n\t\t\t$fehler .= \"city \";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['country'] == \"\"){\r\n\t\t\t$fehler .= \"country \";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['phone'] == \"\"){\r\n\t\t\t$fehler .= \"phone \";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['email'] == \"\"){\r\n\t\t\t$fehler .= \"email \";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['message'] == \"\"){\r\n\t\t\t$fehler .= \"message \";\r\n\t\t\t}\r\n\t\t\tif ($CAPTCHA_EnteredText == $CAPTCHA_RandomText and isset($_POST['txtCode']) == true and isset($_SESSION['CAPTCHA_RndText'])){\r\n\t\t\t$captcha = true;\r\n\t\t\t} else {\r\n\t\t\t$fehler .= \"code \";\r\n\t\t\t}\r\n\techo '';\r\n\tif ($fehler == \"\"){\r\n\t// Email zumsammensetzen\r\n\t$email = \"From: \" . $_SESSION['email'];\r\n\r\n\r\n\t$nachrichtfertig =\r\n\t\"Company: \" . $_SESSION['company'] \"n\\\"\r\n\t\"Name: \" $_SESSION['name'] \"n\\\"\r\n\t\"Address: \" $_SESSION['address'] \"n\\\"\r\n\t\"ZIP Code: \" $_SESSION['zip_code'] \"n\\\"\r\n\t\"City: \" $_SESSION['city'] \"n\\\"\r\n\t\"County: \" $_SESSION['county'] \"n\\\"\r\n\t\"Country: \" $_SESSION['country'] \"n\\\"\r\n\t\"Phone: \" $_SESSION['phone'] \"n\\\"\r\n\t\"Fax: \" $_SESSION['fax'] \"n\\\"\r\n\t\"eMail: \" $_SESSION['email'] \"n\\n\\\"\r\n\t\"Message: \" $_SESSION['message'];\r\n\r\n\r\n\t$versand = mail($empfaenger, $betreff, $nachrichtfertig, $email);\r\n\t\t\tif ($versand) {\r\n\t\t\techo '
Thank you very much!
\r\n\t\t\t\t
The message were send successfully
';\r\n\r\n\t\t\t// Sessionvariablen löschen\r\n\t\t\tunset($_SESSION['company']);\r\n\t\t\tunset($_SESSION['name']);\r\n\t\t\tunset($_SESSION['address']);\r\n\t\t\tunset($_SESSION['zip_code']);\r\n\t\t\tunset($_SESSION['city']);\r\n\t\t\tunset($_SESSION['county']);\r\n\t\t\tunset($_SESSION['country']);\r\n\t\t\tunset($_SESSION['phone']);\r\n\t\t\tunset($_SESSION['fax']);\r\n\t\t\tunset($_SESSION['email']);\r\n\t\t\tunset($_SESSION['nachricht']);\r\n\t\t\t}\r\n\r\n\t} else {\r\n\techo '
Error
';\r\n\techo '
Please fill in all the $fehler field. back
';\r\n\t}\r\n\techo '
';\r\n\r\n\t// Session unset\r\n\tunset($_SESSION['CAPTCHA_RndText']);\r\n\r\n?>"]
]
----------------------------------------------------
Checks for issue #2156.
================================================
FILE: tests/languages/php/issue2614.test
================================================
class First {}
class Second {}
----------------------------------------------------
[
["keyword", "class"],
["class-name-definition", "First"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "class"],
["class-name-definition", "Second"],
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for issue #2614.
================================================
FILE: tests/languages/php/keyword_feature.test
================================================
__halt_compiler
abstract
and
array()
as
break
callable
case
catch
class;
clone
const
continue
declare
default
die
do
echo
else
elseif
empty
enddeclare
endfor
endforeach
endif
endswitch
endwhile
eval
exit
extends;
final
finally
fn
for
foreach
function
global
goto
if
implements;
include
include_once
instanceof;
insteadof
interface;
isset
list
namespace;
match
never
new;
or
parent
parent::;
print
private
protected
public
readonly
require
require_once
return
self
new self
self::;
static
static::;
switch
throw
trait;
try
unset
use;
var
void
while
xor
yield
yield from
----------------------------------------------------
[
["keyword", "__halt_compiler"],
["keyword", "abstract"],
["keyword", "and"],
["keyword", "array"], ["punctuation", "("], ["punctuation", ")"],
["keyword", "as"],
["keyword", "break"],
["keyword", "callable"],
["keyword", "case"],
["keyword", "catch"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "clone"],
["keyword", "const"],
["keyword", "continue"],
["keyword", "declare"],
["keyword", "default"],
["keyword", "die"],
["keyword", "do"],
["keyword", "echo"],
["keyword", "else"],
["keyword", "elseif"],
["keyword", "empty"],
["keyword", "enddeclare"],
["keyword", "endfor"],
["keyword", "endforeach"],
["keyword", "endif"],
["keyword", "endswitch"],
["keyword", "endwhile"],
["keyword", "eval"],
["keyword", "exit"],
["keyword", "extends"], ["punctuation", ";"],
["keyword", "final"],
["keyword", "finally"],
["keyword", "fn"],
["keyword", "for"],
["keyword", "foreach"],
["keyword", "function"],
["keyword", "global"],
["keyword", "goto"],
["keyword", "if"],
["keyword", "implements"], ["punctuation", ";"],
["keyword", "include"],
["keyword", "include_once"],
["keyword", "instanceof"], ["punctuation", ";"],
["keyword", "insteadof"],
["keyword", "interface"], ["punctuation", ";"],
["keyword", "isset"],
["keyword", "list"],
["keyword", "namespace"], ["punctuation", ";"],
["keyword", "match"],
["keyword", "never"],
["keyword", "new"], ["punctuation", ";"],
["keyword", "or"],
["keyword", "parent"],
["keyword", "parent"], ["operator", "::"], ["punctuation", ";"],
["keyword", "print"],
["keyword", "private"],
["keyword", "protected"],
["keyword", "public"],
["keyword", "readonly"],
["keyword", "require"],
["keyword", "require_once"],
["keyword", "return"],
["keyword", "self"],
["keyword", "new"], ["keyword", "self"],
["keyword", "self"], ["operator", "::"], ["punctuation", ";"],
["keyword", "static"],
["keyword", "static"], ["operator", "::"], ["punctuation", ";"],
["keyword", "switch"],
["keyword", "throw"],
["keyword", "trait"], ["punctuation", ";"],
["keyword", "try"],
["keyword", "unset"],
["keyword", "use"], ["punctuation", ";"],
["keyword", "var"],
["keyword", "void"],
["keyword", "while"],
["keyword", "xor"],
["keyword", "yield"],
["keyword", "yield"], ["keyword", "from"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/php/number_feature.test
================================================
664.6
107_925_284.88_4
1e7
1.2e3
1E-7
0b10100111001
0x539
0x1A
0123
0o123
0O123
0b1111_0000_111
0o1111_0000_123
0O1111_0000_123
01111_0000_123
0xAAAA_FFF_0123
----------------------------------------------------
[
["number", "664.6"],
["number", "107_925_284.88_4"],
["number", "1e7"],
["number", "1.2e3"],
["number", "1E-7"],
["number", "0b10100111001"],
["number", "0x539"],
["number", "0x1A"],
["number", "0123"],
["number", "0o123"],
["number", "0O123"],
["number", "0b1111_0000_111"],
["number", "0o1111_0000_123"],
["number", "0O1111_0000_123"],
["number", "01111_0000_123"],
["number", "0xAAAA_FFF_0123"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/php/operators_feature.test
================================================
=>
<=>
??
??=
->
?->
::
...
/
/=
^
^=
|
||
|=
%
%=
*
*=
**
**=
&
&&
&=
<
<=
>
>=
.
.=
+
++
+=
-
--
>>
<<
-=
?
~
==
!=
===
!==
----------------------------------------------------
[
["operator", "=>"],
["operator", "<=>"],
["operator", "??"],
["operator", "??="],
["operator", "->"],
["operator", "?->"],
["operator", "::"],
["operator", "..."],
["operator", "/"],
["operator", "/="],
["operator", "^"],
["operator", "^="],
["operator", "|"],
["operator", "||"],
["operator", "|="],
["operator", "%"],
["operator", "%="],
["operator", "*"],
["operator", "*="],
["operator", "**"],
["operator", "**="],
["operator", "&"],
["operator", "&&"],
["operator", "&="],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "."],
["operator", ".="],
["operator", "+"],
["operator", "++"],
["operator", "+="],
["operator", "-"],
["operator", "--"],
["operator", ">>"],
["operator", "<<"],
["operator", "-="],
["operator", "?"],
["operator", "~"],
["operator", "=="],
["operator", "!="],
["operator", "==="],
["operator", "!=="]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/php/package_feature.test
================================================
namespace App
namespace \foo
namespace \foo\bar\baz
use \foo
use \foo\bar\baz
use function \foo
use function \foo\bar\baz
----------------------------------------------------
[
["keyword", "namespace"],
["package", ["App"]],
["keyword", "namespace"],
["package", [["punctuation", "\\"], "foo"]],
["keyword", "namespace"],
["package", [
["punctuation", "\\"], "foo",
["punctuation", "\\"], "bar",
["punctuation", "\\"], "baz"
]],
["keyword", "use"],
["package", [["punctuation", "\\"], "foo"]],
["keyword", "use"],
["package", [
["punctuation", "\\"], "foo",
["punctuation", "\\"], "bar",
["punctuation", "\\"], "baz"
]],
["keyword", "use"],
["keyword", "function"],
["package", [["punctuation", "\\"], "foo"]],
["keyword", "use"],
["keyword", "function"],
["package", [
["punctuation", "\\"], "foo",
["punctuation", "\\"], "bar",
["punctuation", "\\"], "baz"
]]
]
----------------------------------------------------
Checks for packages.
================================================
FILE: tests/languages/php/property_feature.test
================================================
$variable->property;
$foo->bar->baz;
----------------------------------------------------
[
["variable", "$variable"],
["operator", "->"],
["property", "property"],
["punctuation", ";"],
["variable", "$foo"],
["operator", "->"],
["property", "bar"],
["operator", "->"],
["property", "baz"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for properties.
================================================
FILE: tests/languages/php/punctuation_feature.test
================================================
{
}
[
]
(
)
,
:
;
----------------------------------------------------
[
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ","],
["punctuation", ":"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for punctuation.
================================================
FILE: tests/languages/php/string-interpolation_feature.test
================================================
"This $variable is interpolated"
"$foo[2], $bar[-4], $foo[$bar]"
"$foo->bar"
"More {$interpolation}"
"{$arr['key']}, {$arr['foo'][3]}"
"{${$name}}, but not {\${\$name}}"
"the return value of getName(): {${getName()}}"
"the return value of \$object->getName(): {${$object->getName()}}"
"{$foo->$bar}, {$foo->{$baz[1]}}"
<<support {${$string->interpolation()}}
FOO;
<<<"FOO_BAR"
{${$name}}, but not {\${\$name}}
FOO_BAR;
$value = "$this->property->property";
$value = "$foo[0][1]";
----------------------------------------------------
[
["string", [
"\"This ",
["interpolation", [
["variable", "$variable"]
]],
" is interpolated\""
]],
["string", [
"\"",
["interpolation", [
["variable", "$foo"],
["punctuation", "["],
["number", "2"],
["punctuation", "]"]
]],
", ",
["interpolation", [
["variable", "$bar"],
["punctuation", "["],
["operator", "-"],
["number", "4"],
["punctuation", "]"]
]],
", ",
["interpolation", [
["variable", "$foo"],
["punctuation", "["],
["variable", "$bar"],
["punctuation", "]"]
]],
"\""
]],
["string", [
"\"",
["interpolation", [
["variable", "$foo"],
["operator", "->"],
["property", "bar"]
]],
"\""
]],
["string", [
"\"More ",
["interpolation", [
["punctuation", "{"],
["variable", "$interpolation"],
["punctuation", "}"]
]],
"\""
]],
["string", [
"\"",
["interpolation", [
["punctuation", "{"],
["variable", "$arr"],
["punctuation", "["],
["string", "'key'"],
["punctuation", "]"],
["punctuation", "}"]
]],
", ",
["interpolation", [
["punctuation", "{"],
["variable", "$arr"],
["punctuation", "["],
["string", "'foo'"],
["punctuation", "]"],
["punctuation", "["],
["number", "3"],
["punctuation", "]"],
["punctuation", "}"]
]],
"\""
]],
["string", [
"\"",
["interpolation", [
["punctuation", "{"],
["variable", "$"],
["punctuation", "{"],
["variable", "$name"],
["punctuation", "}"],
["punctuation", "}"]
]],
", but not {\\${\\$name}}\""
]],
["string", [
"\"the return value of getName(): ",
["interpolation", [
["punctuation", "{"],
["variable", "$"],
["punctuation", "{"],
["function", ["getName"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["punctuation", "}"]
]],
"\""
]],
["string", [
"\"the return value of \\$object->getName(): ",
["interpolation", [
["punctuation", "{"],
["variable", "$"],
["punctuation", "{"],
["variable", "$object"],
["operator", "->"],
["function", ["getName"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["punctuation", "}"]
]],
"\""
]],
["string", [
"\"",
["interpolation", [
["punctuation", "{"],
["variable", "$foo"],
["operator", "->"],
["variable", "$bar"],
["punctuation", "}"]
]],
", ",
["interpolation", [
["punctuation", "{"],
["variable", "$foo"],
["operator", "->"],
["punctuation", "{"],
["variable", "$baz"],
["punctuation", "["],
["number", "1"],
["punctuation", "]"],
["punctuation", "}"],
["punctuation", "}"]
]],
"\""
]],
["string", [
["delimiter", [
["punctuation", "<<<"],
"FOO"
]],
"\r\nHeredoc strings ",
["interpolation", [
["variable", "$also"],
["operator", "->"],
["property", "support"]
]],
["interpolation", [
["punctuation", "{"],
["variable", "$"],
["punctuation", "{"],
["variable", "$string"],
["operator", "->"],
["function", ["interpolation"]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"],
["punctuation", "}"]
]],
["delimiter", [
"FOO",
["punctuation", ";"]
]]
]],
["string", [
["delimiter", [
["punctuation", "<<<\""],
"FOO_BAR",
["punctuation", "\""]
]],
["interpolation", [
["punctuation", "{"],
["variable", "$"],
["punctuation", "{"],
["variable", "$name"],
["punctuation", "}"],
["punctuation", "}"]
]],
", but not {\\${\\$name}}\r\n",
["delimiter", [
"FOO_BAR",
["punctuation", ";"]
]]
]],
["variable", "$value"],
["operator", "="],
["string", [
"\"",
["interpolation", [
["variable", "$this"],
["operator", "->"],
["property", "property"]
]],
"->property\""
]],
["punctuation", ";"],
["variable", "$value"],
["operator", "="],
["string", [
"\"",
["interpolation", [
["variable", "$foo"],
["punctuation", "["],
["number", "0"],
["punctuation", "]"]
]],
"[1]\""
]],
["punctuation", ";"]
]
----------------------------------------------------
Checks for interpolation inside strings.
================================================
FILE: tests/languages/php/string_feature.test
================================================
<<
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["img"]],
["special-attr", [
["attr-name", "style"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["value", [
["property", "width"],
["punctuation", ":"],
["php", [
["delimiter", ""]
]],
"%"
]],
["punctuation", "\""]
]]
]],
["punctuation", "/>"]
]]
]
----------------------------------------------------
Checks for #2008 where a part of markup templating's placeholder was tokenized as `number` by CSS Extras.
================================================
FILE: tests/languages/php!+php-extras/global_feature.test
================================================
$GLOBALS
$_SERVER
$_GET
$_POST
$_FILES
$_REQUEST
$_SESSION
$_ENV
$_COOKIE
$php_errormsg
$HTTP_RAW_POST_DATA
$http_response_header
$argc
$argv
----------------------------------------------------
[
["global", "$GLOBALS"],
["global", "$_SERVER"],
["global", "$_GET"],
["global", "$_POST"],
["global", "$_FILES"],
["global", "$_REQUEST"],
["global", "$_SESSION"],
["global", "$_ENV"],
["global", "$_COOKIE"],
["global", "$php_errormsg"],
["global", "$HTTP_RAW_POST_DATA"],
["global", "$http_response_header"],
["global", "$argc"],
["global", "$argv"]
]
----------------------------------------------------
Checks for superglobals.
================================================
FILE: tests/languages/php!+php-extras/scope_feature.test
================================================
static::foo()
self::bar()
parent::baz()
----------------------------------------------------
[
["scope", [
["keyword", "static"],
["punctuation", "::"]
]],
["function", ["foo"]],
["punctuation", "("],
["punctuation", ")"],
["scope", [
["keyword", "self"],
["punctuation", "::"]
]],
["function", ["bar"]],
["punctuation", "("],
["punctuation", ")"],
["scope", [
["keyword", "parent"],
["punctuation", "::"]
]],
["function", ["baz"]],
["punctuation", "("],
["punctuation", ")"]
]
----------------------------------------------------
Checks for scopes.
================================================
FILE: tests/languages/php!+php-extras/this_feature.test
================================================
$this
----------------------------------------------------
[
["this", "$this"]
]
----------------------------------------------------
Checks for $this.
================================================
FILE: tests/languages/phpdoc/class-name_feature.test
================================================
/**
* @param string|null $parameter a parameter
* @return self
* @var MyClass[int]
* @throws \foo\MyException if something bad happens
*/
/**
* @param callback $parameter
* @param resource $parameter
* @param boolean $parameter
* @param integer $parameter
* @param double $parameter
* @param object $parameter
* @param string $parameter
* @param array $parameter
* @param false $parameter
* @param float $parameter
* @param mixed $parameter
* @param bool $parameter
* @param null $parameter
* @param self $parameter
* @param true $parameter
* @param void $parameter
* @param int $parameter
*/
----------------------------------------------------
[
"/**\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "string"],
["punctuation", "|"],
["keyword", "null"]
]],
["parameter", "$parameter"],
" a parameter\r\n * ",
["keyword", "@return"],
["class-name", [
["keyword", "self"]
]],
"\r\n * ",
["keyword", "@var"],
["class-name", [
"MyClass",
["punctuation", "["],
["keyword", "int"],
["punctuation", "]"]
]],
"\r\n * ",
["keyword", "@throws"],
["class-name", [
["punctuation", "\\"],
"foo",
["punctuation", "\\"],
"MyException"
]],
" if something bad happens\r\n */\r\n\r\n/**\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "callback"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "resource"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "boolean"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "integer"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "double"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "object"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "string"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "array"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "false"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "float"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "mixed"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "bool"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "null"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "self"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "true"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "void"]
]],
["parameter", "$parameter"],
"\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "int"]
]],
["parameter", "$parameter"],
"\r\n */"
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/phpdoc/issue2197.test
================================================
/** @var Git_Driver_Gerrit_ProjectCreator_Factory */
----------------------------------------------------
[
"/** ",
["keyword", "@var"],
["class-name", [
"Git_Driver_Gerrit_ProjectCreator_Factory"
]],
" */"
]
----------------------------------------------------
Checks exponential backtracking for types. See #2197.
================================================
FILE: tests/languages/phpdoc/keyword_feature.test
================================================
/**
* @api
* @author
* @category
* @copyright
* @deprecated
* @example
* @filesource
* @global
* @ignore
* @internal
* @license
* @link
* @method
* @package
* @param
* @property
* @property-read
* @property-write
* @return
* @see
* @since
* @source
* @subpackage
* @throws
* @todo
* @uses
* @used-by
* @var
* @version
*/
----------------------------------------------------
[
"/**\r\n * ", ["keyword", "@api"],
"\r\n * ", ["keyword", "@author"],
"\r\n * ", ["keyword", "@category"],
"\r\n * ", ["keyword", "@copyright"],
"\r\n * ", ["keyword", "@deprecated"],
"\r\n * ", ["keyword", "@example"],
"\r\n * ", ["keyword", "@filesource"],
"\r\n * ", ["keyword", "@global"],
"\r\n * ", ["keyword", "@ignore"],
"\r\n * ", ["keyword", "@internal"],
"\r\n * ", ["keyword", "@license"],
"\r\n * ", ["keyword", "@link"],
"\r\n * ", ["keyword", "@method"],
"\r\n * ", ["keyword", "@package"],
"\r\n * ", ["keyword", "@param"],
"\r\n * ", ["keyword", "@property"],
"\r\n * ", ["keyword", "@property-read"],
"\r\n * ", ["keyword", "@property-write"],
"\r\n * ", ["keyword", "@return"],
"\r\n * ", ["keyword", "@see"],
"\r\n * ", ["keyword", "@since"],
"\r\n * ", ["keyword", "@source"],
"\r\n * ", ["keyword", "@subpackage"],
"\r\n * ", ["keyword", "@throws"],
"\r\n * ", ["keyword", "@todo"],
"\r\n * ", ["keyword", "@uses"],
"\r\n * ", ["keyword", "@used-by"],
"\r\n * ", ["keyword", "@var"],
"\r\n * ", ["keyword", "@version"],
"\r\n */"
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/phpdoc/parameter_feature.test
================================================
/**
* @param string $parameter a parameter
* @param $arg2 a second parameter
*/
----------------------------------------------------
[
"/**\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "string"]
]],
["parameter", "$parameter"],
" a parameter\r\n * ",
["keyword", "@param"],
["parameter", "$arg2"],
" a second parameter\r\n */"
]
----------------------------------------------------
Checks for parameters.
================================================
FILE: tests/languages/phpdoc+php/phpdoc_inclusion.test
================================================
/**
* @param string|null $parameter a parameter
* @return self
* @var MyClass[int]
* @throws \foo\MyException if something bad happens
*/
----------------------------------------------------
[
["doc-comment", [
"/**\r\n * ",
["keyword", "@param"],
["class-name", [
["keyword", "string"],
["punctuation", "|"],
["keyword", "null"]
]],
["parameter", "$parameter"],
" a parameter\r\n * ",
["keyword", "@return"],
["class-name", [
["keyword", "self"]
]],
"\r\n * ",
["keyword", "@var"],
["class-name", [
"MyClass",
["punctuation", "["],
["keyword", "int"],
["punctuation", "]"]
]],
"\r\n * ",
["keyword", "@throws"],
["class-name", [
["punctuation", "\\"],
"foo",
["punctuation", "\\"],
"MyException"
]],
" if something bad happens\r\n */"
]]
]
----------------------------------------------------
Checks for PHPDoc doc comments in PHP.
================================================
FILE: tests/languages/plant-uml/arrow_feature.test
================================================
-> --> <- <-- <-> <-->
->> -->> <<- <<-- <<->> <<-->>
-/ --/ /- /-- /-/ /--/
-// --// //- //-- //-// //--//
-\ --\ \- \-- \-\ \--\
-\\ --\\ \\- \\-- \\-\\ \\--\\
@startuml
Bob ->x Alice
Bob -> Alice
Bob ->> Alice
Bob -\ Alice
Bob \\- Alice
Bob //-- Alice
Bob ->o Alice
Bob o\\-- Alice
Bob <-> Alice
Bob <->o Alice
@enduml
@startuml
Bob -[#red]> Alice : hello
Alice -[#0000FF]->Bob : ok
@enduml
@startuml
participant Alice
participant Bob #lightblue
Alice -> Bob
Bob -> Carol
...
[-> Bob
[o-> Bob
[o->o Bob
[x-> Bob
...
[<- Bob
[x<- Bob
...
Bob ->]
Bob ->o]
Bob o->o]
Bob ->x]
...
Bob <-]
Bob x<-]
@enduml
@startuml
?-> Alice
[-> Alice
[-> Bob
?-> Bob
Alice ->]
Alice ->?
Alice -> Bob
@enduml
@startuml
(Use case 1) <.. :user:
(Use case 2) <- :user:
@enduml
@startuml
:user: -left-> (dummyLeft)
:user: -right-> (dummyRight)
:user: -up-> (dummyUp)
:user: -down-> (dummyDown)
@enduml
@startuml
Class11 <|.. Class12
Class13 --> Class14
Class15 ..> Class16
Class17 ..|> Class18
Class19 <--* Class20
Class21 #-- Class22
Class23 x-- Class24
Class25 }-- Class26
Class27 +-- Class28
Class29 ^-- Class30
@enduml
----------------------------------------------------
[
["arrow", ["->"]],
["arrow", ["-->"]],
["arrow", ["<-"]],
["arrow", ["<--"]],
["arrow", ["<->"]],
["arrow", ["<-->"]],
["arrow", ["->>"]],
["arrow", ["-->>"]],
["arrow", ["<<-"]],
["arrow", ["<<--"]],
["arrow", ["<<->>"]],
["arrow", ["<<-->>"]],
["arrow", ["-/"]],
["arrow", ["--/"]],
["arrow", ["/-"]],
["arrow", ["/--"]],
["arrow", ["/-/"]],
["arrow", ["/--/"]],
["arrow", ["-//"]],
["arrow", ["--//"]],
["arrow", ["//-"]],
["arrow", ["//--"]],
["arrow", ["//-//"]],
["arrow", ["//--//"]],
["arrow", ["-\\"]],
["arrow", ["--\\"]],
["arrow", ["\\-"]],
["arrow", ["\\--"]],
["arrow", ["\\-\\"]],
["arrow", ["\\--\\"]],
["arrow", ["-\\\\"]],
["arrow", ["--\\\\"]],
["arrow", ["\\\\-"]],
["arrow", ["\\\\--"]],
["arrow", ["\\\\-\\\\"]],
["arrow", ["\\\\--\\\\"]],
["delimiter", "@startuml"],
"\r\nBob ",
["arrow", ["->x"]],
" Alice\r\nBob ",
["arrow", ["->"]],
" Alice\r\nBob ",
["arrow", ["->>"]],
" Alice\r\nBob ",
["arrow", ["-\\"]],
" Alice\r\nBob ",
["arrow", ["\\\\-"]],
" Alice\r\nBob ",
["arrow", ["//--"]],
" Alice\r\n\r\nBob ",
["arrow", ["->o"]],
" Alice\r\nBob ",
["arrow", ["o\\\\--"]],
" Alice\r\n\r\nBob ",
["arrow", ["<->"]],
" Alice\r\nBob ",
["arrow", ["<->o"]],
" Alice\r\n",
["delimiter", "@enduml"],
["delimiter", "@startuml"],
"\r\nBob ",
["arrow", [
"-",
["punctuation", "["],
["expression", [
["color", "#red"]
]],
["punctuation", "]"],
">"
]],
" Alice ",
["punctuation", ":"],
" hello\r\nAlice ",
["arrow", [
"-",
["punctuation", "["],
["expression", [
["color", "#0000FF"]
]],
["punctuation", "]"],
"->"
]],
"Bob ",
["punctuation", ":"],
" ok\r\n",
["delimiter", "@enduml"],
["delimiter", "@startuml"],
["keyword", "participant"],
" Alice\r\n",
["keyword", "participant"],
" Bob ",
["color", "#lightblue"],
"\r\nAlice ",
["arrow", ["->"]],
" Bob\r\nBob ",
["arrow", ["->"]],
" Carol\r\n",
["punctuation", "..."],
["arrow", ["[->"]],
" Bob\r\n",
["arrow", ["[o->"]],
" Bob\r\n",
["arrow", ["[o->o"]],
" Bob\r\n",
["arrow", ["[x->"]],
" Bob\r\n",
["punctuation", "..."],
["arrow", ["[<-"]],
" Bob\r\n",
["arrow", ["[x<-"]],
" Bob\r\n",
["punctuation", "..."],
"\r\nBob ",
["arrow", ["->]"]],
"\r\nBob ",
["arrow", ["->o]"]],
"\r\nBob ",
["arrow", ["o->o]"]],
"\r\nBob ",
["arrow", ["->x]"]],
["punctuation", "..."],
"\r\nBob ",
["arrow", ["<-]"]],
"\r\nBob ",
["arrow", ["x<-]"]],
["delimiter", "@enduml"],
["delimiter", "@startuml"],
["arrow", ["?->"]], " Alice\r\n",
["arrow", ["[->"]], " Alice\r\n",
["arrow", ["[->"]], " Bob\r\n",
["arrow", ["?->"]], " Bob\r\nAlice ", ["arrow", ["->]"]],
"\r\nAlice ", ["arrow", ["->?"]],
"\r\nAlice ", ["arrow", ["->"]], " Bob\r\n",
["delimiter", "@enduml"],
["delimiter", "@startuml"],
["punctuation", "("],
"Use case 1",
["punctuation", ")"],
["arrow", ["<.."]],
["punctuation", ":"],
"user",
["punctuation", ":"],
["punctuation", "("],
"Use case 2",
["punctuation", ")"],
["arrow", ["<-"]],
["punctuation", ":"],
"user",
["punctuation", ":"],
["delimiter", "@enduml"],
["delimiter", "@startuml"],
["punctuation", ":"],
"user",
["punctuation", ":"],
["arrow", ["-left->"]],
["punctuation", "("],
"dummyLeft",
["punctuation", ")"],
["punctuation", ":"],
"user",
["punctuation", ":"],
["arrow", ["-right->"]],
["punctuation", "("],
"dummyRight",
["punctuation", ")"],
["punctuation", ":"],
"user",
["punctuation", ":"],
["arrow", ["-up->"]],
["punctuation", "("],
"dummyUp",
["punctuation", ")"],
["punctuation", ":"],
"user",
["punctuation", ":"],
["arrow", ["-down->"]],
["punctuation", "("],
"dummyDown",
["punctuation", ")"],
["delimiter", "@enduml"],
["delimiter", "@startuml"],
"\r\nClass11 ",
["arrow", ["<|.."]],
" Class12\r\nClass13 ",
["arrow", ["-->"]],
" Class14\r\nClass15 ",
["arrow", ["..>"]],
" Class16\r\nClass17 ",
["arrow", ["..|>"]],
" Class18\r\nClass19 ",
["arrow", ["<--*"]],
" Class20\r\nClass21 ",
["arrow", ["#--"]],
" Class22\r\nClass23 ",
["arrow", ["x--"]],
" Class24\r\nClass25 ",
["arrow", ["}--"]],
" Class26\r\nClass27 ",
["arrow", ["+--"]],
" Class28\r\nClass29 ",
["arrow", ["^--"]],
" Class30\r\n",
["delimiter", "@enduml"]
]
================================================
FILE: tests/languages/plant-uml/color_feature.test
================================================
#palegreen
#gold
#FF00FF
----------------------------------------------------
[
["color", "#palegreen"],
["color", "#gold"],
["color", "#FF00FF"]
]
================================================
FILE: tests/languages/plant-uml/comment_feature.test
================================================
' comment
/'
comment
'/
----------------------------------------------------
[
["comment", "' comment"],
["comment", "/'\r\n comment\r\n'/"]
]
================================================
FILE: tests/languages/plant-uml/delimiter_feature.test
================================================
@startuml
@enduml
----------------------------------------------------
[
["delimiter", "@startuml"],
["delimiter", "@enduml"]
]
================================================
FILE: tests/languages/plant-uml/divider_feature.test
================================================
== Initialization ==
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
== Repetition ==
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
----------------------------------------------------
[
["divider", "== Initialization =="],
"\r\n\r\nAlice ",
["arrow", ["->"]],
" Bob",
["punctuation", ":"],
" Authentication Request\r\nBob ",
["arrow", ["-->"]],
" Alice",
["punctuation", ":"],
" Authentication Response\r\n\r\n",
["divider", "== Repetition =="],
"\r\n\r\nAlice ",
["arrow", ["->"]],
" Bob",
["punctuation", ":"],
" Another authentication Request\r\nAlice ",
["arrow", ["<--"]],
" Bob",
["punctuation", ":"],
" another authentication Response"
]
================================================
FILE: tests/languages/plant-uml/keyword_feature.test
================================================
if "Some Test" then
-->[true] "Some Action"
--> "Another Action"
-right-> (*)
else
->[false] "Something else"
-->[Ending process] (*)
endif
if (Graphviz installed?) then (yes)
:process all\ndiagrams;
else (no)
:process only
__sequence__ and __activity__ diagrams;
endif
if (color?) is (red) then
:print red;
else
:print not red;
if (counter?) equals (5) then
:print 5;
else
:print not 5;
start
if (condition A) then (yes)
:Text 1;
elseif (condition B) then (yes)
:Text 2;
stop
(no) elseif (condition C) then (yes)
:Text 3;
(no) elseif (condition D) then (yes)
:Text 4;
else (nothing)
:Text else;
endif
stop
switch (test?)
case ( condition A )
:Text 1;
case ( condition B )
:Text 2;
case ( condition C )
:Text 3;
case ( condition D )
:Text 4;
case ( condition E )
:Text 5;
endswitch
repeat
:read data;
:generate diagrams;
repeat while (more data?) is (yes)
->no;
repeat while (Something went wrong with long text?) is (yes) not (no)
->//merged step//;
----------------------------------------------------
[
["keyword", "if"],
["string", "\"Some Test\""],
["keyword", "then"],
["arrow", ["-->"]],
["punctuation", "["],
"true",
["punctuation", "]"],
["string", "\"Some Action\""],
["arrow", ["-->"]],
["string", "\"Another Action\""],
["arrow", ["-right->"]],
["punctuation", "("],
"*",
["punctuation", ")"],
["keyword", "else"],
["arrow", ["->"]],
["punctuation", "["],
"false",
["punctuation", "]"],
["string", "\"Something else\""],
["arrow", ["-->"]],
["punctuation", "["],
"Ending process",
["punctuation", "]"],
["punctuation", "("],
"*",
["punctuation", ")"],
["keyword", "endif"],
["keyword", "if"],
["punctuation", "("],
"Graphviz installed?",
["punctuation", ")"],
["keyword", "then"],
["punctuation", "("],
"yes",
["punctuation", ")"],
["punctuation", ":"],
"process all\\ndiagrams",
["punctuation", ";"],
["keyword", "else"],
["punctuation", "("],
"no",
["punctuation", ")"],
["punctuation", ":"],
"process only\r\n __sequence__ and __activity__ diagrams",
["punctuation", ";"],
["keyword", "endif"],
["keyword", "if"],
["punctuation", "("],
"color?",
["punctuation", ")"],
["keyword", "is"],
["punctuation", "("],
"red",
["punctuation", ")"],
["keyword", "then"],
["punctuation", ":"],
"print red",
["punctuation", ";"],
["keyword", "else"],
["punctuation", ":"],
"print not red",
["punctuation", ";"],
["keyword", "if"],
["punctuation", "("],
"counter?",
["punctuation", ")"],
["keyword", "equals"],
["punctuation", "("],
"5",
["punctuation", ")"],
["keyword", "then"],
["punctuation", ":"],
"print 5",
["punctuation", ";"],
["keyword", "else"],
["punctuation", ":"],
"print not 5",
["punctuation", ";"],
["keyword", "start"],
["keyword", "if"],
["punctuation", "("],
"condition A",
["punctuation", ")"],
["keyword", "then"],
["punctuation", "("],
"yes",
["punctuation", ")"],
["punctuation", ":"],
"Text 1",
["punctuation", ";"],
["keyword", "elseif"],
["punctuation", "("],
"condition B",
["punctuation", ")"],
["keyword", "then"],
["punctuation", "("],
"yes",
["punctuation", ")"],
["punctuation", ":"],
"Text 2",
["punctuation", ";"],
["keyword", "stop"],
["punctuation", "("],
"no",
["punctuation", ")"],
["keyword", "elseif"],
["punctuation", "("],
"condition C",
["punctuation", ")"],
["keyword", "then"],
["punctuation", "("],
"yes",
["punctuation", ")"],
["punctuation", ":"],
"Text 3",
["punctuation", ";"],
["punctuation", "("],
"no",
["punctuation", ")"],
["keyword", "elseif"],
["punctuation", "("],
"condition D",
["punctuation", ")"],
["keyword", "then"],
["punctuation", "("],
"yes",
["punctuation", ")"],
["punctuation", ":"],
"Text 4",
["punctuation", ";"],
["keyword", "else"],
["punctuation", "("],
"nothing",
["punctuation", ")"],
["punctuation", ":"],
"Text else",
["punctuation", ";"],
["keyword", "endif"],
["keyword", "stop"],
["keyword", "switch"],
["punctuation", "("],
"test?",
["punctuation", ")"],
["keyword", "case"],
["punctuation", "("],
" condition A ",
["punctuation", ")"],
["punctuation", ":"],
"Text 1",
["punctuation", ";"],
["keyword", "case"],
["punctuation", "("],
" condition B ",
["punctuation", ")"],
["punctuation", ":"],
"Text 2",
["punctuation", ";"],
["keyword", "case"],
["punctuation", "("],
" condition C ",
["punctuation", ")"],
["punctuation", ":"],
"Text 3",
["punctuation", ";"],
["keyword", "case"],
["punctuation", "("],
" condition D ",
["punctuation", ")"],
["punctuation", ":"],
"Text 4",
["punctuation", ";"],
["keyword", "case"],
["punctuation", "("],
" condition E ",
["punctuation", ")"],
["punctuation", ":"],
"Text 5",
["punctuation", ";"],
["keyword", "endswitch"],
["keyword", "repeat"],
["punctuation", ":"],
"read data",
["punctuation", ";"],
["punctuation", ":"],
"generate diagrams",
["punctuation", ";"],
["keyword", "repeat"],
["keyword", "while"],
["punctuation", "("],
"more data?",
["punctuation", ")"],
["keyword", "is"],
["punctuation", "("],
"yes",
["punctuation", ")"],
["arrow", ["->"]],
"no",
["punctuation", ";"],
["keyword", "repeat"],
["keyword", "while"],
["punctuation", "("],
"Something went wrong with long text?",
["punctuation", ")"],
["keyword", "is"],
["punctuation", "("],
"yes",
["punctuation", ")"],
["keyword", "not"],
["punctuation", "("],
"no",
["punctuation", ")"],
["arrow", ["->"]],
"//merged step//",
["punctuation", ";"]
]
================================================
FILE: tests/languages/plant-uml/preprocessor_feature.test
================================================
!pragma useVerticalIf on
----------------------------------------------------
[
["preprocessor", ["!pragma useVerticalIf on"]]
]
================================================
FILE: tests/languages/plant-uml/string_feature.test
================================================
"foo"
""
----------------------------------------------------
[
["string", "\"foo\""],
["string", "\"\""]
]
================================================
FILE: tests/languages/plant-uml/text_feature.test
================================================
Alice -> Bob: Authentication request
Bob --> Alice: Response
participant Participant [
=Title
----
""SubTitle""
]
----------------------------------------------------
[
"Alice ",
["arrow", ["->"]],
" Bob",
["punctuation", ":"],
" Authentication request\r\nBob ",
["arrow", ["-->"]],
" Alice",
["punctuation", ":"],
" Response\r\n\r\n",
["keyword", "participant"],
" Participant ",
["punctuation", "["],
["text", " =Title\r\n ----\r\n \"\"SubTitle\"\"\r\n"],
["punctuation", "]"]
]
================================================
FILE: tests/languages/plant-uml/time_feature.test
================================================
@startuml
clock clk with period 1
binary "enable" as EN
concise "dataBus" as db
@0 as :start
@5 as :en_high
@10 as :en_low
@:en_high-2 as :en_highMinus2
@:start
EN is low
db is "0x0000"
@:en_high
EN is high
@:en_low
EN is low
@:en_highMinus2
db is "0xf23a"
@:en_high+6
db is "0x0000"
@enduml
@1:15:00
@2000/12/31
----------------------------------------------------
[
["delimiter", "@startuml"],
["keyword", "clock"],
" clk with period 1\r\n",
["keyword", "binary"],
["string", "\"enable\""],
["keyword", "as"],
" EN\r\n",
["keyword", "concise"],
["string", "\"dataBus\""],
["keyword", "as"],
" db\r\n\r\n",
["time", "@0"],
["keyword", "as"],
["punctuation", ":"],
"start\r\n",
["time", "@5"],
["keyword", "as"],
["punctuation", ":"],
"en_high\r\n",
["time", "@10"],
["keyword", "as"],
["punctuation", ":"],
"en_low\r\n",
["time", "@:en_high-2"],
["keyword", "as"],
["punctuation", ":"],
"en_highMinus2\r\n\r\n",
["time", "@:start"],
"\r\nEN ",
["keyword", "is"],
" low\r\ndb ",
["keyword", "is"],
["string", "\"0x0000\""],
["time", "@:en_high"],
"\r\nEN ", ["keyword", "is"], " high\r\n\r\n",
["time", "@:en_low"],
"\r\nEN ", ["keyword", "is"], " low\r\n\r\n",
["time", "@:en_highMinus2"],
"\r\ndb ", ["keyword", "is"], ["string", "\"0xf23a\""],
["time", "@:en_high+6"],
"\r\ndb ", ["keyword", "is"], ["string", "\"0x0000\""],
["delimiter", "@enduml"],
["time", "@1:15:00"],
["time", "@2000/12/31"]
]
================================================
FILE: tests/languages/plant-uml/variable_feature.test
================================================
$foo
$bar
%autonumber%
%page%
----------------------------------------------------
[
["variable", "$foo"],
["variable", "$bar"],
["variable", "%autonumber%"],
["variable", "%page%"]
]
================================================
FILE: tests/languages/plsql/comment_feature.test
================================================
/**/
/* foo
bar */
--
-- foo
----------------------------------------------------
[
["comment", "/**/"],
["comment", "/* foo\r\nbar */"],
["comment", "--"],
["comment", "-- foo"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/plsql/keyword_feature.test
================================================
A
ACCESSIBLE
ADD
AGENT
AGGREGATE
ALL
ALTER
AND
ANY
ARRAY
AS
ASC
AT
ATTRIBUTE
AUTHID
AVG
BEGIN
BETWEEN
BFILE_BASE
BINARY
BLOB_BASE
BLOCK
BODY
BOTH
BOUND
BULK
BY
BYTE
C
CALL
CALLING
CASCADE
CASE
CHAR
CHAR_BASE
CHARACTER
CHARSET
CHARSETFORM
CHARSETID
CHECK
CLOB_BASE
CLONE
CLOSE
CLUSTER
CLUSTERS
COLAUTH
COLLECT
COLUMNS
COMMENT
COMMIT
COMMITTED
COMPILED
COMPRESS
CONNECT
CONSTANT
CONSTRUCTOR
CONTEXT
CONTINUE
CONVERT
COUNT
CRASH
CREATE
CREDENTIAL
CURRENT
CURSOR
CUSTOMDATUM
DANGLING
DATA
DATE
DATE_BASE
DAY
DECLARE
DEFAULT
DEFINE
DELETE
DESC
DETERMINISTIC
DIRECTORY
DISTINCT
DOUBLE
DROP
DURATION
ELEMENT
ELSE
ELSIF
EMPTY
END
ESCAPE
EXCEPT
EXCEPTION
EXCEPTIONS
EXCLUSIVE
EXECUTE
EXISTS
EXIT
EXTERNAL
FETCH
FINAL
FIRST
FIXED
FLOAT
FOR
FORALL
FORCE
FROM
FUNCTION
GENERAL
GOTO
GRANT
GROUP
HASH
HAVING
HEAP
HIDDEN
HOUR
IDENTIFIED
IF
IMMEDIATE
IMMUTABLE
IN
INCLUDING
INDEX
INDEXES
INDICATOR
INDICES
INFINITE
INSERT
INSTANTIABLE
INT
INTERFACE
INTERSECT
INTERVAL
INTO
INVALIDATE
IS
ISOLATION
JAVA
LANGUAGE
LARGE
LEADING
LENGTH
LEVEL
LIBRARY
LIKE
LIKE2
LIKE4
LIKEC
LIMIT
LIMITED
LOCAL
LOCK
LONG
LOOP
MAP
MAX
MAXLEN
MEMBER
MERGE
MIN
MINUS
MINUTE
MOD
MODE
MODIFY
MONTH
MULTISET
MUTABLE
NAME
NAN
NATIONAL
NATIVE
NCHAR
NEW
NOCOMPRESS
NOCOPY
NOT
NOWAIT
NULL
NUMBER_BASE
OBJECT
OCICOLL
OCIDATE
OCIDATETIME
OCIDURATION
OCIINTERVAL
OCILOBLOCATOR
OCINUMBER
OCIRAW
OCIREF
OCIREFCURSOR
OCIROWID
OCISTRING
OCITYPE
OF
OLD
ON
ONLY
OPAQUE
OPEN
OPERATOR
OPTION
OR
ORACLE
ORADATA
ORDER
ORGANIZATION
ORLANY
ORLVARY
OTHERS
OUT
OVERLAPS
OVERRIDING
PACKAGE
PARALLEL_ENABLE
PARAMETER
PARAMETERS
PARENT
PARTITION
PASCAL
PERSISTABLE
PIPE
PIPELINED
PLUGGABLE
POLYMORPHIC
PRAGMA
PRECISION
PRIOR
PRIVATE
PROCEDURE
PUBLIC
RAISE
RANGE
RAW
READ
RECORD
REF
REFERENCE
RELIES_ON
REM
REMAINDER
RENAME
RESOURCE
RESULT
RESULT_CACHE
RETURN
RETURNING
REVERSE
REVOKE
ROLLBACK
ROW
SAMPLE
SAVE
SAVEPOINT
SB1
SB2
SB4
SECOND
SEGMENT
SELECT
SELF
SEPARATE
SEQUENCE
SERIALIZABLE
SET
SHARE
SHORT
SIZE
SIZE_T
SOME
SPARSE
SQL
SQLCODE
SQLDATA
SQLNAME
SQLSTATE
STANDARD
START
STATIC
STDDEV
STORED
STRING
STRUCT
STYLE
SUBMULTISET
SUBPARTITION
SUBSTITUTABLE
SUBTYPE
SUM
SYNONYM
TABAUTH
TABLE
TDO
THE
THEN
TIME
TIMESTAMP
TIMEZONE_ABBR
TIMEZONE_HOUR
TIMEZONE_MINUTE
TIMEZONE_REGION
TO
TRAILING
TRANSACTION
TRANSACTIONAL
TRUSTED
TYPE
UB1
UB2
UB4
UNDER
UNION
UNIQUE
UNPLUG
UNSIGNED
UNTRUSTED
UPDATE
USE
USING
VALIST
VALUE
VALUES
VARIABLE
VARIANCE
VARRAY
VARYING
VIEW
VIEWS
VOID
WHEN
WHERE
WHILE
WITH
WORK
WRAPPED
WRITE
YEAR
ZONE
----------------------------------------------------
[
["keyword", "A"],
["keyword", "ACCESSIBLE"],
["keyword", "ADD"],
["keyword", "AGENT"],
["keyword", "AGGREGATE"],
["keyword", "ALL"],
["keyword", "ALTER"],
["keyword", "AND"],
["keyword", "ANY"],
["keyword", "ARRAY"],
["keyword", "AS"],
["keyword", "ASC"],
["keyword", "AT"],
["keyword", "ATTRIBUTE"],
["keyword", "AUTHID"],
["keyword", "AVG"],
["keyword", "BEGIN"],
["keyword", "BETWEEN"],
["keyword", "BFILE_BASE"],
["keyword", "BINARY"],
["keyword", "BLOB_BASE"],
["keyword", "BLOCK"],
["keyword", "BODY"],
["keyword", "BOTH"],
["keyword", "BOUND"],
["keyword", "BULK"],
["keyword", "BY"],
["keyword", "BYTE"],
["keyword", "C"],
["keyword", "CALL"],
["keyword", "CALLING"],
["keyword", "CASCADE"],
["keyword", "CASE"],
["keyword", "CHAR"],
["keyword", "CHAR_BASE"],
["keyword", "CHARACTER"],
["keyword", "CHARSET"],
["keyword", "CHARSETFORM"],
["keyword", "CHARSETID"],
["keyword", "CHECK"],
["keyword", "CLOB_BASE"],
["keyword", "CLONE"],
["keyword", "CLOSE"],
["keyword", "CLUSTER"],
["keyword", "CLUSTERS"],
["keyword", "COLAUTH"],
["keyword", "COLLECT"],
["keyword", "COLUMNS"],
["keyword", "COMMENT"],
["keyword", "COMMIT"],
["keyword", "COMMITTED"],
["keyword", "COMPILED"],
["keyword", "COMPRESS"],
["keyword", "CONNECT"],
["keyword", "CONSTANT"],
["keyword", "CONSTRUCTOR"],
["keyword", "CONTEXT"],
["keyword", "CONTINUE"],
["keyword", "CONVERT"],
["keyword", "COUNT"],
["keyword", "CRASH"],
["keyword", "CREATE"],
["keyword", "CREDENTIAL"],
["keyword", "CURRENT"],
["keyword", "CURSOR"],
["keyword", "CUSTOMDATUM"],
["keyword", "DANGLING"],
["keyword", "DATA"],
["keyword", "DATE"],
["keyword", "DATE_BASE"],
["keyword", "DAY"],
["keyword", "DECLARE"],
["keyword", "DEFAULT"],
["keyword", "DEFINE"],
["keyword", "DELETE"],
["keyword", "DESC"],
["keyword", "DETERMINISTIC"],
["keyword", "DIRECTORY"],
["keyword", "DISTINCT"],
["keyword", "DOUBLE"],
["keyword", "DROP"],
["keyword", "DURATION"],
["keyword", "ELEMENT"],
["keyword", "ELSE"],
["keyword", "ELSIF"],
["keyword", "EMPTY"],
["keyword", "END"],
["keyword", "ESCAPE"],
["keyword", "EXCEPT"],
["keyword", "EXCEPTION"],
["keyword", "EXCEPTIONS"],
["keyword", "EXCLUSIVE"],
["keyword", "EXECUTE"],
["keyword", "EXISTS"],
["keyword", "EXIT"],
["keyword", "EXTERNAL"],
["keyword", "FETCH"],
["keyword", "FINAL"],
["keyword", "FIRST"],
["keyword", "FIXED"],
["keyword", "FLOAT"],
["keyword", "FOR"],
["keyword", "FORALL"],
["keyword", "FORCE"],
["keyword", "FROM"],
["keyword", "FUNCTION"],
["keyword", "GENERAL"],
["keyword", "GOTO"],
["keyword", "GRANT"],
["keyword", "GROUP"],
["keyword", "HASH"],
["keyword", "HAVING"],
["keyword", "HEAP"],
["keyword", "HIDDEN"],
["keyword", "HOUR"],
["keyword", "IDENTIFIED"],
["keyword", "IF"],
["keyword", "IMMEDIATE"],
["keyword", "IMMUTABLE"],
["keyword", "IN"],
["keyword", "INCLUDING"],
["keyword", "INDEX"],
["keyword", "INDEXES"],
["keyword", "INDICATOR"],
["keyword", "INDICES"],
["keyword", "INFINITE"],
["keyword", "INSERT"],
["keyword", "INSTANTIABLE"],
["keyword", "INT"],
["keyword", "INTERFACE"],
["keyword", "INTERSECT"],
["keyword", "INTERVAL"],
["keyword", "INTO"],
["keyword", "INVALIDATE"],
["keyword", "IS"],
["keyword", "ISOLATION"],
["keyword", "JAVA"],
["keyword", "LANGUAGE"],
["keyword", "LARGE"],
["keyword", "LEADING"],
["keyword", "LENGTH"],
["keyword", "LEVEL"],
["keyword", "LIBRARY"],
["keyword", "LIKE"],
["keyword", "LIKE2"],
["keyword", "LIKE4"],
["keyword", "LIKEC"],
["keyword", "LIMIT"],
["keyword", "LIMITED"],
["keyword", "LOCAL"],
["keyword", "LOCK"],
["keyword", "LONG"],
["keyword", "LOOP"],
["keyword", "MAP"],
["keyword", "MAX"],
["keyword", "MAXLEN"],
["keyword", "MEMBER"],
["keyword", "MERGE"],
["keyword", "MIN"],
["keyword", "MINUS"],
["keyword", "MINUTE"],
["keyword", "MOD"],
["keyword", "MODE"],
["keyword", "MODIFY"],
["keyword", "MONTH"],
["keyword", "MULTISET"],
["keyword", "MUTABLE"],
["keyword", "NAME"],
["keyword", "NAN"],
["keyword", "NATIONAL"],
["keyword", "NATIVE"],
["keyword", "NCHAR"],
["keyword", "NEW"],
["keyword", "NOCOMPRESS"],
["keyword", "NOCOPY"],
["keyword", "NOT"],
["keyword", "NOWAIT"],
["keyword", "NULL"],
["keyword", "NUMBER_BASE"],
["keyword", "OBJECT"],
["keyword", "OCICOLL"],
["keyword", "OCIDATE"],
["keyword", "OCIDATETIME"],
["keyword", "OCIDURATION"],
["keyword", "OCIINTERVAL"],
["keyword", "OCILOBLOCATOR"],
["keyword", "OCINUMBER"],
["keyword", "OCIRAW"],
["keyword", "OCIREF"],
["keyword", "OCIREFCURSOR"],
["keyword", "OCIROWID"],
["keyword", "OCISTRING"],
["keyword", "OCITYPE"],
["keyword", "OF"],
["keyword", "OLD"],
["keyword", "ON"],
["keyword", "ONLY"],
["keyword", "OPAQUE"],
["keyword", "OPEN"],
["keyword", "OPERATOR"],
["keyword", "OPTION"],
["keyword", "OR"],
["keyword", "ORACLE"],
["keyword", "ORADATA"],
["keyword", "ORDER"],
["keyword", "ORGANIZATION"],
["keyword", "ORLANY"],
["keyword", "ORLVARY"],
["keyword", "OTHERS"],
["keyword", "OUT"],
["keyword", "OVERLAPS"],
["keyword", "OVERRIDING"],
["keyword", "PACKAGE"],
["keyword", "PARALLEL_ENABLE"],
["keyword", "PARAMETER"],
["keyword", "PARAMETERS"],
["keyword", "PARENT"],
["keyword", "PARTITION"],
["keyword", "PASCAL"],
["keyword", "PERSISTABLE"],
["keyword", "PIPE"],
["keyword", "PIPELINED"],
["keyword", "PLUGGABLE"],
["keyword", "POLYMORPHIC"],
["keyword", "PRAGMA"],
["keyword", "PRECISION"],
["keyword", "PRIOR"],
["keyword", "PRIVATE"],
["keyword", "PROCEDURE"],
["keyword", "PUBLIC"],
["keyword", "RAISE"],
["keyword", "RANGE"],
["keyword", "RAW"],
["keyword", "READ"],
["keyword", "RECORD"],
["keyword", "REF"],
["keyword", "REFERENCE"],
["keyword", "RELIES_ON"],
["keyword", "REM"],
["keyword", "REMAINDER"],
["keyword", "RENAME"],
["keyword", "RESOURCE"],
["keyword", "RESULT"],
["keyword", "RESULT_CACHE"],
["keyword", "RETURN"],
["keyword", "RETURNING"],
["keyword", "REVERSE"],
["keyword", "REVOKE"],
["keyword", "ROLLBACK"],
["keyword", "ROW"],
["keyword", "SAMPLE"],
["keyword", "SAVE"],
["keyword", "SAVEPOINT"],
["keyword", "SB1"],
["keyword", "SB2"],
["keyword", "SB4"],
["keyword", "SECOND"],
["keyword", "SEGMENT"],
["keyword", "SELECT"],
["keyword", "SELF"],
["keyword", "SEPARATE"],
["keyword", "SEQUENCE"],
["keyword", "SERIALIZABLE"],
["keyword", "SET"],
["keyword", "SHARE"],
["keyword", "SHORT"],
["keyword", "SIZE"],
["keyword", "SIZE_T"],
["keyword", "SOME"],
["keyword", "SPARSE"],
["keyword", "SQL"],
["keyword", "SQLCODE"],
["keyword", "SQLDATA"],
["keyword", "SQLNAME"],
["keyword", "SQLSTATE"],
["keyword", "STANDARD"],
["keyword", "START"],
["keyword", "STATIC"],
["keyword", "STDDEV"],
["keyword", "STORED"],
["keyword", "STRING"],
["keyword", "STRUCT"],
["keyword", "STYLE"],
["keyword", "SUBMULTISET"],
["keyword", "SUBPARTITION"],
["keyword", "SUBSTITUTABLE"],
["keyword", "SUBTYPE"],
["keyword", "SUM"],
["keyword", "SYNONYM"],
["keyword", "TABAUTH"],
["keyword", "TABLE"],
["keyword", "TDO"],
["keyword", "THE"],
["keyword", "THEN"],
["keyword", "TIME"],
["keyword", "TIMESTAMP"],
["keyword", "TIMEZONE_ABBR"],
["keyword", "TIMEZONE_HOUR"],
["keyword", "TIMEZONE_MINUTE"],
["keyword", "TIMEZONE_REGION"],
["keyword", "TO"],
["keyword", "TRAILING"],
["keyword", "TRANSACTION"],
["keyword", "TRANSACTIONAL"],
["keyword", "TRUSTED"],
["keyword", "TYPE"],
["keyword", "UB1"],
["keyword", "UB2"],
["keyword", "UB4"],
["keyword", "UNDER"],
["keyword", "UNION"],
["keyword", "UNIQUE"],
["keyword", "UNPLUG"],
["keyword", "UNSIGNED"],
["keyword", "UNTRUSTED"],
["keyword", "UPDATE"],
["keyword", "USE"],
["keyword", "USING"],
["keyword", "VALIST"],
["keyword", "VALUE"],
["keyword", "VALUES"],
["keyword", "VARIABLE"],
["keyword", "VARIANCE"],
["keyword", "VARRAY"],
["keyword", "VARYING"],
["keyword", "VIEW"],
["keyword", "VIEWS"],
["keyword", "VOID"],
["keyword", "WHEN"],
["keyword", "WHERE"],
["keyword", "WHILE"],
["keyword", "WITH"],
["keyword", "WORK"],
["keyword", "WRAPPED"],
["keyword", "WRITE"],
["keyword", "YEAR"],
["keyword", "ZONE"]
]
================================================
FILE: tests/languages/plsql/label_feature.test
================================================
<< foo >>
----------------------------------------------------
[
["label", "<< foo >>"]
]
================================================
FILE: tests/languages/plsql/operator_feature.test
================================================
+ - * / **
:= :
=>
%
||
..
= != <> ~= ^= < > <= >=
@
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "**"],
["operator", ":="],
["operator", ":"],
["operator", "=>"],
["operator", "%"],
["operator", "||"],
["operator", ".."],
["operator", "="],
["operator", "!="],
["operator", "<"],
["operator", ">"],
["operator", "~="],
["operator", "^="],
["operator", "<"],
["operator", ">"],
["operator", "<="],
["operator", ">="],
["operator", "@"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/powerquery/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for boolean.
================================================
FILE: tests/languages/powerquery/comment_feature.test
================================================
/**/
/* foo
bar */
//
// foo
----------------------------------------------------
[
["comment", "/**/"],
["comment", "/* foo\r\nbar */"],
["comment", "//"],
["comment", "// foo"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/powerquery/constant_feature.test
================================================
Day.Sunday
Day.Monday
Day.Tuesday
Day.Wednesday
Day.Thursday
Day.Friday
Day.Saturday
TraceLevel.Critical
TraceLevel.Error
TraceLevel.Information
TraceLevel.Verbose
TraceLevel.Warning
Occurrence.First
Occurrence.Last
Occurrence.All
Order.Ascending
Order.Descending
RoundingMode.AwayFromZero
RoundingMode.Down
RoundingMode.ToEven
RoundingMode.TowardZero
RoundingMode.Up
MissingField.Error
MissingField.Ignore
MissingField.UseNull
QuoteStyle.Csv
QuoteStyle.None
JoinKind.Inner
JoinKind.LeftOuter
JoinKind.RightOuter
JoinKind.FullOuter
JoinKind.LeftAnti
JoinKind.RightAnti
GroupKind.Global
GroupKind.Local
ExtraValues.List
ExtraValues.Ignore
ExtraValues.Error
JoinAlgorithm.Dynamic
JoinAlgorithm.PairwiseHash
JoinAlgorithm.SortMerge
JoinAlgorithm.LeftHash
JoinAlgorithm.RightHash
JoinAlgorithm.LeftIndex
JoinAlgorithm.RightIndex
JoinSide.Left
JoinSide.Right
Precision.Double
Precision.Decimal
RelativePosition.FromEnd
RelativePosition.FromStart
TextEncoding.Ascii
TextEncoding.BigEndianUnicode
TextEncoding.Unicode
TextEncoding.Utf8
TextEncoding.Utf16
TextEncoding.Windows
Any.Type
Binary.Type
Date.Type
DateTime.Type
DateTimeZone.Type
Duration.Type
Int8.Type
Int16.Type
Int32.Type
Int64.Type
Function.Type
List.Type
Logical.Type
None.Type
Number.Type
Record.Type
Table.Type
Text.Type
Time.Type
null
----------------------------------------------------
[
["constant", "Day.Sunday"],
["constant", "Day.Monday"],
["constant", "Day.Tuesday"],
["constant", "Day.Wednesday"],
["constant", "Day.Thursday"],
["constant", "Day.Friday"],
["constant", "Day.Saturday"],
["constant", "TraceLevel.Critical"],
["constant", "TraceLevel.Error"],
["constant", "TraceLevel.Information"],
["constant", "TraceLevel.Verbose"],
["constant", "TraceLevel.Warning"],
["constant", "Occurrence.First"],
["constant", "Occurrence.Last"],
["constant", "Occurrence.All"],
["constant", "Order.Ascending"],
["constant", "Order.Descending"],
["constant", "RoundingMode.AwayFromZero"],
["constant", "RoundingMode.Down"],
["constant", "RoundingMode.ToEven"],
["constant", "RoundingMode.TowardZero"],
["constant", "RoundingMode.Up"],
["constant", "MissingField.Error"],
["constant", "MissingField.Ignore"],
["constant", "MissingField.UseNull"],
["constant", "QuoteStyle.Csv"],
["constant", "QuoteStyle.None"],
["constant", "JoinKind.Inner"],
["constant", "JoinKind.LeftOuter"],
["constant", "JoinKind.RightOuter"],
["constant", "JoinKind.FullOuter"],
["constant", "JoinKind.LeftAnti"],
["constant", "JoinKind.RightAnti"],
["constant", "GroupKind.Global"],
["constant", "GroupKind.Local"],
["constant", "ExtraValues.List"],
["constant", "ExtraValues.Ignore"],
["constant", "ExtraValues.Error"],
["constant", "JoinAlgorithm.Dynamic"],
["constant", "JoinAlgorithm.PairwiseHash"],
["constant", "JoinAlgorithm.SortMerge"],
["constant", "JoinAlgorithm.LeftHash"],
["constant", "JoinAlgorithm.RightHash"],
["constant", "JoinAlgorithm.LeftIndex"],
["constant", "JoinAlgorithm.RightIndex"],
["constant", "JoinSide.Left"],
["constant", "JoinSide.Right"],
["constant", "Precision.Double"],
["constant", "Precision.Decimal"],
["constant", "RelativePosition.FromEnd"],
["constant", "RelativePosition.FromStart"],
["constant", "TextEncoding.Ascii"],
["constant", "TextEncoding.BigEndianUnicode"],
["constant", "TextEncoding.Unicode"],
["constant", "TextEncoding.Utf8"],
["constant", "TextEncoding.Utf16"],
["constant", "TextEncoding.Windows"],
["constant", "Any.Type"],
["constant", "Binary.Type"],
["constant", "Date.Type"],
["constant", "DateTime.Type"],
["constant", "DateTimeZone.Type"],
["constant", "Duration.Type"],
["constant", "Int8.Type"],
["constant", "Int16.Type"],
["constant", "Int32.Type"],
["constant", "Int64.Type"],
["constant", "Function.Type"],
["constant", "List.Type"],
["constant", "Logical.Type"],
["constant", "None.Type"],
["constant", "Number.Type"],
["constant", "Record.Type"],
["constant", "Table.Type"],
["constant", "Text.Type"],
["constant", "Time.Type"],
["constant", "null"]
]
----------------------------------------------------
Checks for contant.
================================================
FILE: tests/languages/powerquery/datatype_feature.test
================================================
any
anynonnull
binary
date
datetime
datetimezone
duration
function
list
logical
none
number
record
table
text
time
----------------------------------------------------
[
["data-type", "any"],
["data-type", "anynonnull"],
["data-type", "binary"],
["data-type", "date"],
["data-type", "datetime"],
["data-type", "datetimezone"],
["data-type", "duration"],
["data-type", "function"],
["data-type", "list"],
["data-type", "logical"],
["data-type", "none"],
["data-type", "number"],
["data-type", "record"],
["data-type", "table"],
["data-type", "text"],
["data-type", "time"]
]
----------------------------------------------------
Checks for data-type.
================================================
FILE: tests/languages/powerquery/function_feature.test
================================================
Table.ReplaceValue (
UserDefinedFunction (
----------------------------------------------------
[
["function", "Table.ReplaceValue"], ["punctuation","("],
["function", "UserDefinedFunction"], ["punctuation","("]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/powerquery/keyword_feature.test
================================================
and
as
each
else
error
if
in
is
let
meta
not
otherwise
or
section
shared
then
try
type
#binary
#date
#datetime
#datetimezone
#duration
#infinity
#nan
#sections
#shared
#table
#time
----------------------------------------------------
[
["keyword", "and"],
["keyword", "as"],
["keyword", "each"],
["keyword", "else"],
["keyword", "error"],
["keyword", "if"],
["keyword", "in"],
["keyword", "is"],
["keyword", "let"],
["keyword", "meta"],
["keyword", "not"],
["keyword", "otherwise"],
["keyword", "or"],
["keyword", "section"],
["keyword", "shared"],
["keyword", "then"],
["keyword", "try"],
["keyword", "type"],
["keyword", "#binary"],
["keyword", "#date"],
["keyword", "#datetime"],
["keyword", "#datetimezone"],
["keyword", "#duration"],
["keyword", "#infinity"],
["keyword", "#nan"],
["keyword", "#sections"],
["keyword", "#shared"],
["keyword", "#table"],
["keyword", "#time"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/powerquery/number_feature.test
================================================
42
-42
+42
0.154
.123
0xF2
42e5
42.5e2
123
123e45
123e+45
123e-45
123E45
123E+45
123E-45
123.78e-45
.78e-45
123..456
----------------------------------------------------
[
["number", "42"],
["number", "-42"],
["number", "+42"],
["number", "0.154"],
["number", ".123"],
["number", "0xF2"],
["number", "42e5"],
["number", "42.5e2"],
["number", "123"],
["number", "123e45"],
["number", "123e+45"],
["number", "123e-45"],
["number", "123E45"],
["number", "123E+45"],
["number", "123E-45"],
["number", "123.78e-45"],
["number", ".78e-45"],
["number", "123"], ["operator", ".."], ["number", "456"]
]
----------------------------------------------------
Checks for number feature.
================================================
FILE: tests/languages/powerquery/operator_feature.test
================================================
+ - * / ^
= > >= < <= <>
& @ ?
=>
.. ...
----------------------------------------------------
[
["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], ["operator", "^"],
["operator", "="], ["operator", ">"], ["operator", ">="], ["operator", "<"], ["operator", "<="], ["operator", "<>"],
["operator", "&"], ["operator", "@"], ["operator", "?"],
["operator", "=>"],
["operator", ".."], ["operator", "..."]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/powerquery/quoted_identifier_feature.test
================================================
#"foo"
#"foo bar"
#"foo'bar"
#"foo""bar"
----------------------------------------------------
[
["quoted-identifier", "#\"foo\""],
["quoted-identifier", "#\"foo bar\""],
["quoted-identifier", "#\"foo'bar\""],
["quoted-identifier", "#\"foo\"\"bar\""]
]
----------------------------------------------------
Checks for quoted-identifier.
================================================
FILE: tests/languages/powerquery/string_feature.test
================================================
""
"foo"
"foo""bar"
#!"Hello world#(cr,lf)"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\""],
["string", "\"foo\"\"bar\""],
["string", "#!\"Hello world#(cr,lf)\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/powershell/boolean_feature.test
================================================
$true $True $TRUE
$false $False $FALSE
----------------------------------------------------
[
["boolean", "$true"],
["boolean", "$True"],
["boolean", "$TRUE"],
["boolean", "$false"],
["boolean", "$False"],
["boolean", "$FALSE"]
]
----------------------------------------------------
Testing Booleans
================================================
FILE: tests/languages/powershell/comment_feature.test
================================================
# single comment
# comment with $variable
<# multi
line
comment
#>
not a `# comment # is a comment
----------------------------------------------------
[
["comment", "# single comment"],
["comment", "# comment with $variable"],
["comment", "<# multi\r\n\tline\r\n\tcomment\r\n#>"],
"\r\nnot a `# comment ",
["comment", "# is a comment"]
]
----------------------------------------------------
Testing comments
================================================
FILE: tests/languages/powershell/function_feature.test
================================================
ac cat chdir clc cli clp clv compare copy cp cpi cpp cvpa dbp del diff dir ebp
echo epal epcsv epsn erase fc fl ft fw gal gbp gc gci gcs gdr gi gl gm gp gps
group gsv gu gv gwmi iex ii ipal ipcsv ipsn irm iwmi iwr kill lp ls measure mi
mount move mp mv nal ndr ni nv ogv popd ps pushd pwd rbp rd rdr ren ri rm rmdir
rni rnp rp rv rvpa rwmi sal saps sasv sbp sc select set shcm si sl sleep sls
sort sp spps spsv start sv swmi tee trcm type write
Add-Computer Add-Content Add-History Add-Member Add-PSSnapin Add-Type
Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Item
Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction
Connect-PSSession ConvertFrom-Csv ConvertFrom-Json ConvertFrom-StringData
Convert-Path ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-Xml
Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore
Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration
Disconnect-PSSession Enable-ComputerRestore Enable-PSBreakpoint
Enable-PSRemoting Enable-PSSessionConfiguration Enter-PSSession Exit-PSSession
Export-Alias Export-Clixml Export-Console Export-Csv Export-FormatData
Export-ModuleMember Export-PSSession ForEach-Object Format-Custom Format-List
Format-Table Format-Wide Get-Alias Get-ChildItem Get-Command
Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Culture Get-Date
Get-Event Get-EventLog Get-EventSubscriber Get-FormatData Get-Help Get-History
Get-Host Get-HotFix Get-Item Get-ItemProperty Get-Job Get-Location Get-Member
Get-Module Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive
Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random
Get-Service Get-TraceSource Get-Transaction Get-TypeData Get-UICulture
Get-Unique Get-Variable Get-WmiObject Group-Object Import-Alias Import-Clixml
Import-Csv Import-LocalizedData Import-Module Import-PSSession Invoke-Command
Invoke-Expression Invoke-History Invoke-Item Invoke-RestMethod Invoke-WebRequest
Invoke-WmiMethod Join-Path Limit-EventLog Measure-Command Measure-Object
Move-Item Move-ItemProperty New-Alias New-Event New-EventLog New-Item
New-ItemProperty New-Module New-ModuleManifest New-Object New-PSDrive
New-PSSession New-PSSessionConfigurationFile New-PSSessionOption
New-PSTransportOption New-Service New-TimeSpan New-Variable New-WebServiceProxy
Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String
Pop-Location Push-Location Read-Host Receive-Job Receive-PSSession
Register-EngineEvent Register-ObjectEvent Register-PSSessionConfiguration
Register-WmiEvent Remove-Computer Remove-Event Remove-EventLog Remove-Item
Remove-ItemProperty Remove-Job Remove-Module Remove-PSBreakpoint Remove-PSDrive
Remove-PSSession Remove-PSSnapin Remove-TypeData Remove-Variable
Remove-WmiObject Rename-Computer Rename-Item Rename-ItemProperty
Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service
Restore-Computer Resume-Job Resume-Service Save-Help Select-Object Select-String
Select-Xml Send-MailMessage Set-Alias Set-Content Set-Date Set-Item
Set-ItemProperty Set-Location Set-PSBreakpoint Set-PSDebug
Set-PSSessionConfiguration Set-Service Set-StrictMode Set-TraceSource
Set-Variable Set-WmiInstance Show-Command Show-ControlPanelItem Show-EventLog
Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep
Start-Transaction Stop-Computer Stop-Job Stop-Process Stop-Service Suspend-Job
Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection
Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command
Unblock-File Undo-Transaction Unregister-Event
Unregister-PSSessionConfiguration Update-FormatData Update-Help Update-List
Update-TypeData Use-Transaction Wait-Event Wait-Job Wait-Process Where-Object
Write-Debug Write-Error Write-EventLog Write-Host Write-Output Write-Progress
Write-Verbose Write-Warning
Get-AppxPackage
----------------------------------------------------
[
["function", "ac"],
["function", "cat"],
["function", "chdir"],
["function", "clc"],
["function", "cli"],
["function", "clp"],
["function", "clv"],
["function", "compare"],
["function", "copy"],
["function", "cp"],
["function", "cpi"],
["function", "cpp"],
["function", "cvpa"],
["function", "dbp"],
["function", "del"],
["function", "diff"],
["function", "dir"],
["function", "ebp"],
["function", "echo"],
["function", "epal"],
["function", "epcsv"],
["function", "epsn"],
["function", "erase"],
["function", "fc"],
["function", "fl"],
["function", "ft"],
["function", "fw"],
["function", "gal"],
["function", "gbp"],
["function", "gc"],
["function", "gci"],
["function", "gcs"],
["function", "gdr"],
["function", "gi"],
["function", "gl"],
["function", "gm"],
["function", "gp"],
["function", "gps"],
["function", "group"],
["function", "gsv"],
["function", "gu"],
["function", "gv"],
["function", "gwmi"],
["function", "iex"],
["function", "ii"],
["function", "ipal"],
["function", "ipcsv"],
["function", "ipsn"],
["function", "irm"],
["function", "iwmi"],
["function", "iwr"],
["function", "kill"],
["function", "lp"],
["function", "ls"],
["function", "measure"],
["function", "mi"],
["function", "mount"],
["function", "move"],
["function", "mp"],
["function", "mv"],
["function", "nal"],
["function", "ndr"],
["function", "ni"],
["function", "nv"],
["function", "ogv"],
["function", "popd"],
["function", "ps"],
["function", "pushd"],
["function", "pwd"],
["function", "rbp"],
["function", "rd"],
["function", "rdr"],
["function", "ren"],
["function", "ri"],
["function", "rm"],
["function", "rmdir"],
["function", "rni"],
["function", "rnp"],
["function", "rp"],
["function", "rv"],
["function", "rvpa"],
["function", "rwmi"],
["function", "sal"],
["function", "saps"],
["function", "sasv"],
["function", "sbp"],
["function", "sc"],
["function", "select"],
["function", "set"],
["function", "shcm"],
["function", "si"],
["function", "sl"],
["function", "sleep"],
["function", "sls"],
["function", "sort"],
["function", "sp"],
["function", "spps"],
["function", "spsv"],
["function", "start"],
["function", "sv"],
["function", "swmi"],
["function", "tee"],
["function", "trcm"],
["function", "type"],
["function", "write"],
["function", "Add-Computer"],
["function", "Add-Content"],
["function", "Add-History"],
["function", "Add-Member"],
["function", "Add-PSSnapin"],
["function", "Add-Type"],
["function", "Checkpoint-Computer"],
["function", "Clear-Content"],
["function", "Clear-EventLog"],
["function", "Clear-History"],
["function", "Clear-Item"],
["function", "Clear-ItemProperty"],
["function", "Clear-Variable"],
["function", "Compare-Object"],
["function", "Complete-Transaction"],
["function", "Connect-PSSession"],
["function", "ConvertFrom-Csv"],
["function", "ConvertFrom-Json"],
["function", "ConvertFrom-StringData"],
["function", "Convert-Path"],
["function", "ConvertTo-Csv"],
["function", "ConvertTo-Html"],
["function", "ConvertTo-Json"],
["function", "ConvertTo-Xml"],
["function", "Copy-Item"],
["function", "Copy-ItemProperty"],
["function", "Debug-Process"],
["function", "Disable-ComputerRestore"],
["function", "Disable-PSBreakpoint"],
["function", "Disable-PSRemoting"],
["function", "Disable-PSSessionConfiguration"],
["function", "Disconnect-PSSession"],
["function", "Enable-ComputerRestore"],
["function", "Enable-PSBreakpoint"],
["function", "Enable-PSRemoting"],
["function", "Enable-PSSessionConfiguration"],
["function", "Enter-PSSession"],
["function", "Exit-PSSession"],
["function", "Export-Alias"],
["function", "Export-Clixml"],
["function", "Export-Console"],
["function", "Export-Csv"],
["function", "Export-FormatData"],
["function", "Export-ModuleMember"],
["function", "Export-PSSession"],
["function", "ForEach-Object"],
["function", "Format-Custom"],
["function", "Format-List"],
["function", "Format-Table"],
["function", "Format-Wide"],
["function", "Get-Alias"],
["function", "Get-ChildItem"],
["function", "Get-Command"],
["function", "Get-ComputerRestorePoint"],
["function", "Get-Content"],
["function", "Get-ControlPanelItem"],
["function", "Get-Culture"],
["function", "Get-Date"],
["function", "Get-Event"],
["function", "Get-EventLog"],
["function", "Get-EventSubscriber"],
["function", "Get-FormatData"],
["function", "Get-Help"],
["function", "Get-History"],
["function", "Get-Host"],
["function", "Get-HotFix"],
["function", "Get-Item"],
["function", "Get-ItemProperty"],
["function", "Get-Job"],
["function", "Get-Location"],
["function", "Get-Member"],
["function", "Get-Module"],
["function", "Get-Process"],
["function", "Get-PSBreakpoint"],
["function", "Get-PSCallStack"],
["function", "Get-PSDrive"],
["function", "Get-PSProvider"],
["function", "Get-PSSession"],
["function", "Get-PSSessionConfiguration"],
["function", "Get-PSSnapin"],
["function", "Get-Random"],
["function", "Get-Service"],
["function", "Get-TraceSource"],
["function", "Get-Transaction"],
["function", "Get-TypeData"],
["function", "Get-UICulture"],
["function", "Get-Unique"],
["function", "Get-Variable"],
["function", "Get-WmiObject"],
["function", "Group-Object"],
["function", "Import-Alias"],
["function", "Import-Clixml"],
["function", "Import-Csv"],
["function", "Import-LocalizedData"],
["function", "Import-Module"],
["function", "Import-PSSession"],
["function", "Invoke-Command"],
["function", "Invoke-Expression"],
["function", "Invoke-History"],
["function", "Invoke-Item"],
["function", "Invoke-RestMethod"],
["function", "Invoke-WebRequest"],
["function", "Invoke-WmiMethod"],
["function", "Join-Path"],
["function", "Limit-EventLog"],
["function", "Measure-Command"],
["function", "Measure-Object"],
["function", "Move-Item"],
["function", "Move-ItemProperty"],
["function", "New-Alias"],
["function", "New-Event"],
["function", "New-EventLog"],
["function", "New-Item"],
["function", "New-ItemProperty"],
["function", "New-Module"],
["function", "New-ModuleManifest"],
["function", "New-Object"],
["function", "New-PSDrive"],
["function", "New-PSSession"],
["function", "New-PSSessionConfigurationFile"],
["function", "New-PSSessionOption"],
["function", "New-PSTransportOption"],
["function", "New-Service"],
["function", "New-TimeSpan"],
["function", "New-Variable"],
["function", "New-WebServiceProxy"],
["function", "Out-Default"],
["function", "Out-File"],
["function", "Out-GridView"],
["function", "Out-Host"],
["function", "Out-Null"],
["function", "Out-Printer"],
["function", "Out-String"],
["function", "Pop-Location"],
["function", "Push-Location"],
["function", "Read-Host"],
["function", "Receive-Job"],
["function", "Receive-PSSession"],
["function", "Register-EngineEvent"],
["function", "Register-ObjectEvent"],
["function", "Register-PSSessionConfiguration"],
["function", "Register-WmiEvent"],
["function", "Remove-Computer"],
["function", "Remove-Event"],
["function", "Remove-EventLog"],
["function", "Remove-Item"],
["function", "Remove-ItemProperty"],
["function", "Remove-Job"],
["function", "Remove-Module"],
["function", "Remove-PSBreakpoint"],
["function", "Remove-PSDrive"],
["function", "Remove-PSSession"],
["function", "Remove-PSSnapin"],
["function", "Remove-TypeData"],
["function", "Remove-Variable"],
["function", "Remove-WmiObject"],
["function", "Rename-Computer"],
["function", "Rename-Item"],
["function", "Rename-ItemProperty"],
["function", "Reset-ComputerMachinePassword"],
["function", "Resolve-Path"],
["function", "Restart-Computer"],
["function", "Restart-Service"],
["function", "Restore-Computer"],
["function", "Resume-Job"],
["function", "Resume-Service"],
["function", "Save-Help"],
["function", "Select-Object"],
["function", "Select-String"],
["function", "Select-Xml"],
["function", "Send-MailMessage"],
["function", "Set-Alias"],
["function", "Set-Content"],
["function", "Set-Date"],
["function", "Set-Item"],
["function", "Set-ItemProperty"],
["function", "Set-Location"],
["function", "Set-PSBreakpoint"],
["function", "Set-PSDebug"],
["function", "Set-PSSessionConfiguration"],
["function", "Set-Service"],
["function", "Set-StrictMode"],
["function", "Set-TraceSource"],
["function", "Set-Variable"],
["function", "Set-WmiInstance"],
["function", "Show-Command"],
["function", "Show-ControlPanelItem"],
["function", "Show-EventLog"],
["function", "Sort-Object"],
["function", "Split-Path"],
["function", "Start-Job"],
["function", "Start-Process"],
["function", "Start-Service"],
["function", "Start-Sleep"],
["function", "Start-Transaction"],
["function", "Stop-Computer"],
["function", "Stop-Job"],
["function", "Stop-Process"],
["function", "Stop-Service"],
["function", "Suspend-Job"],
["function", "Suspend-Service"],
["function", "Tee-Object"],
["function", "Test-ComputerSecureChannel"],
["function", "Test-Connection"],
["function", "Test-ModuleManifest"],
["function", "Test-Path"],
["function", "Test-PSSessionConfigurationFile"],
["function", "Trace-Command"],
["function", "Unblock-File"],
["function", "Undo-Transaction"],
["function", "Unregister-Event"],
["function", "Unregister-PSSessionConfiguration"],
["function", "Update-FormatData"],
["function", "Update-Help"],
["function", "Update-List"],
["function", "Update-TypeData"],
["function", "Use-Transaction"],
["function", "Wait-Event"],
["function", "Wait-Job"],
["function", "Wait-Process"],
["function", "Where-Object"],
["function", "Write-Debug"],
["function", "Write-Error"],
["function", "Write-EventLog"],
["function", "Write-Host"],
["function", "Write-Output"],
["function", "Write-Progress"],
["function", "Write-Verbose"],
["function", "Write-Warning"],
["function", "Get-AppxPackage"]
]
----------------------------------------------------
Testing functions and aliases
================================================
FILE: tests/languages/powershell/issue1407.test
================================================
While($true){
Write-Output "$($($InFiles | Where-Object {$_.ToCopy -eq 0}).count)"
}
----------------------------------------------------
[
["keyword", "While"],
["punctuation", "("],
["boolean", "$true"],
["punctuation", ")"],
["punctuation", "{"],
["function", "Write-Output"],
["string", [
"\"",
["function", [
"$",
["punctuation", "("],
"$",
["punctuation", "("],
["variable", "$InFiles"],
["punctuation", "|"],
["function", "Where-Object"],
["punctuation", "{"],
["variable", "$_"],
["punctuation", "."],
"ToCopy ",
["operator", "-eq"],
" 0",
["punctuation", "}"],
["punctuation", ")"],
["punctuation", "."],
"count",
["punctuation", ")"]
]],
"\""
]],
["punctuation", "}"]
]
----------------------------------------------------
Checks for nested expressions in strings. See #1407
================================================
FILE: tests/languages/powershell/keyword_feature.test
================================================
Begin Break Catch Class Continue Data Define Do DynamicParam Else ElseIf End
Exit Filter Finally For ForEach From Function If InlineScript Parallel Param
Process Return Sequence Switch Throw Trap Try Until Using Var While Workflow
----------------------------------------------------
[
["keyword", "Begin"],
["keyword", "Break"],
["keyword", "Catch"],
["keyword", "Class"],
["keyword", "Continue"],
["keyword", "Data"],
["keyword", "Define"],
["keyword", "Do"],
["keyword", "DynamicParam"],
["keyword", "Else"],
["keyword", "ElseIf"],
["keyword", "End"],
["keyword", "Exit"],
["keyword", "Filter"],
["keyword", "Finally"],
["keyword", "For"],
["keyword", "ForEach"],
["keyword", "From"],
["keyword", "Function"],
["keyword", "If"],
["keyword", "InlineScript"],
["keyword", "Parallel"],
["keyword", "Param"],
["keyword", "Process"],
["keyword", "Return"],
["keyword", "Sequence"],
["keyword", "Switch"],
["keyword", "Throw"],
["keyword", "Trap"],
["keyword", "Try"],
["keyword", "Until"],
["keyword", "Using"],
["keyword", "Var"],
["keyword", "While"],
["keyword", "Workflow"]
]
----------------------------------------------------
Testing keywords
================================================
FILE: tests/languages/powershell/namespace_feature.test
================================================
[System.String]::Empty;
[Foo.Bar+Baz]::Abc;
[int] 42;
[string[]]
[OutputType([System.Collections.Generic.List[int]])]
----------------------------------------------------
[
["namespace", "[System.String]"],"::Empty",["punctuation", ";"],
["namespace", "[Foo.Bar+Baz]"],"::Abc",["punctuation", ";"],
["namespace", "[int]"]," 42",["punctuation", ";"],
["namespace", "[string[]]"],
["namespace", "[OutputType([System.Collections.Generic.List[int]])]"]
]
----------------------------------------------------
Testing namespaces
================================================
FILE: tests/languages/powershell/operator_feature.test
================================================
! -eq -ne -gt -ge -lt -le -shl -shr -not -band -and -bxor -bor -or
-Like -Match -Contains -In -NotLike -NotMatch -NotContains -NotIn -Replace -Join
-is -isNot -as
-= += *= /= %= - + * / % -- ++
----------------------------------------------------
[
["operator", "!"],
["operator", "-eq"],
["operator", "-ne"],
["operator", "-gt"],
["operator", "-ge"],
["operator", "-lt"],
["operator", "-le"],
["operator", "-shl"],
["operator", "-shr"],
["operator", "-not"],
["operator", "-band"],
["operator", "-and"],
["operator", "-bxor"],
["operator", "-bor"],
["operator", "-or"],
["operator", "-Like"],
["operator", "-Match"],
["operator", "-Contains"],
["operator", "-In"],
["operator", "-NotLike"],
["operator", "-NotMatch"],
["operator", "-NotContains"],
["operator", "-NotIn"],
["operator", "-Replace"],
["operator", "-Join"],
["operator", "-is"],
["operator", "-isNot"],
["operator", "-as"],
["operator", "-="],
["operator", "+="],
["operator", "*="],
["operator", "/="],
["operator", "%="],
["operator", "-"],
["operator", "+"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "--"],
["operator", "++"]
]
----------------------------------------------------
Testing operators.
================================================
FILE: tests/languages/powershell/string_feature.test
================================================
"a simple string"
"has $interpolated variables"
"has $($nesting -and 'interpolation')"
"string `"with`" escaping"
'non-interpolated $string'
'also ''with'' escaping'
'''twas also escaped'
an empty '' string
'can''t'
"a simple #comment string"
"has $interpolated <# variables #>"
"$($expression)"
"`$(escaped expression)"
"$($($exp))"
----------------------------------------------------
[
["string", ["\"a simple string\""]],
["string", [
"\"has ", ["variable", "$interpolated"], " variables\""
]],
["string", [
"\"has ",
[
"function",
[
"$",
["punctuation", "("],
["variable", "$nesting"],
["operator", "-and"],
["string", "'interpolation'"],
["punctuation", ")"]
]
],
"\""
]],
["string", ["\"string `\"with`\" escaping\""]],
["string", "'non-interpolated $string'"],
["string", "'also ''with'' escaping'"],
["string", "'''twas also escaped'"],
"\r\nan empty ", ["string", "''"], " string\r\n",
["string", "'can''t'"],
["string", ["\"a simple #comment string\""]],
["string", [
"\"has ", ["variable", "$interpolated"], " <# variables #>\""
]],
["string", [
"\"",
["function", [
"$",
["punctuation", "("],
["variable", "$expression"],
["punctuation", ")"]
]],
"\""
]],
["string", [
"\"`$(escaped expression)\""
]],
["string", [
"\"",
["function", [
"$",
["punctuation", "("],
"$",
["punctuation", "("],
["variable", "$exp"],
["punctuation", ")"],
["punctuation", ")"]
]],
"\""
]]
]
----------------------------------------------------
Testing strings
================================================
FILE: tests/languages/powershell/variable_feature.test
================================================
$foo $bar_baz $var4u $1 $true_as $falsey
----------------------------------------------------
[
["variable", "$foo"],
["variable", "$bar_baz"],
["variable", "$var4u"],
["variable", "$1"],
["variable", "$true_as"],
["variable", "$falsey"]
]
----------------------------------------------------
Testing variables
================================================
FILE: tests/languages/processing/constant_feature.test
================================================
FOOBAR
FOO_BAR_42
----------------------------------------------------
[
["constant", "FOOBAR"],
["constant", "FOO_BAR_42"]
]
----------------------------------------------------
Checks for constants.
================================================
FILE: tests/languages/processing/function_feature.test
================================================
foo(
foo_bar_42 (
----------------------------------------------------
[
["function", "foo"], ["punctuation", "("],
["function", "foo_bar_42"], ["punctuation", "("]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/processing/keyword_feature.test
================================================
break
catch
case
class;
continue
default
else
extends;
final
for
if
implements;
import
new;
null
private
public
return
static
super
switch
this
try
void
while
----------------------------------------------------
[
["keyword", "break"],
["keyword", "catch"],
["keyword", "case"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "continue"],
["keyword", "default"],
["keyword", "else"],
["keyword", "extends"], ["punctuation", ";"],
["keyword", "final"],
["keyword", "for"],
["keyword", "if"],
["keyword", "implements"], ["punctuation", ";"],
["keyword", "import"],
["keyword", "new"], ["punctuation", ";"],
["keyword", "null"],
["keyword", "private"],
["keyword", "public"],
["keyword", "return"],
["keyword", "static"],
["keyword", "super"],
["keyword", "switch"],
["keyword", "this"],
["keyword", "try"],
["keyword", "void"],
["keyword", "while"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/processing/operator_feature.test
================================================
< << <=
> >> >=
& &&
| ||
% ?
! !=
= ==
+ +=
- -=
* *=
/ /=
----------------------------------------------------
[
["operator", "<"], ["operator", "<<"], ["operator", "<="],
["operator", ">"], ["operator", ">>"], ["operator", ">="],
["operator", "&"], ["operator", "&&"],
["operator", "|"], ["operator", "||"],
["operator", "%"], ["operator", "?"],
["operator", "!"], ["operator", "!="],
["operator", "="], ["operator", "=="],
["operator", "+"], ["operator", "+="],
["operator", "-"], ["operator", "-="],
["operator", "*"], ["operator", "*="],
["operator", "/"], ["operator", "/="]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/processing/type_feature.test
================================================
boolean
byte
char
color
double
float
int
XML
Foobar
Foo_bar_42
----------------------------------------------------
[
["type", "boolean"],
["type", "byte"],
["type", "char"],
["type", "color"],
["type", "double"],
["type", "float"],
["type", "int"],
["type", "XML"],
["type", "Foobar"],
["type", "Foo_bar_42"]
]
----------------------------------------------------
Checks for types.
================================================
FILE: tests/languages/prolog/builtin_feature.test
================================================
fx
fy
xf xfx xfy
yf yfx
----------------------------------------------------
[
["builtin", "fx"],
["builtin", "fy"],
["builtin", "xf"], ["builtin", "xfx"], ["builtin", "xfy"],
["builtin", "yf"], ["builtin", "yfx"]
]
----------------------------------------------------
Checks for builtins.
================================================
FILE: tests/languages/prolog/comment_feature.test
================================================
% Foobar
/**/
/* Foo
bar */
----------------------------------------------------
[
["comment", "% Foobar"],
["comment", "/**/"],
["comment", "/* Foo\r\nbar */"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/prolog/function_feature.test
================================================
foobar(
foo_bar_42(
abs/1
atan/2
----------------------------------------------------
[
["function", "foobar"], ["punctuation", "("],
["function", "foo_bar_42"], ["punctuation", "("],
["function", "abs/1"],
["function", "atan/2"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/prolog/number_feature.test
================================================
42
3.14159
0
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "0"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/prolog/operator_feature.test
================================================
is mod not xor
: \ =
> < -
? * @
/ ; +
^ | !
$ .
=@=
----------------------------------------------------
[
["operator", "is"], ["operator", "mod"], ["operator", "not"], ["operator", "xor"],
["operator", ":"], ["operator", "\\"], ["operator", "="],
["operator", ">"], ["operator", "<"], ["operator", "-"],
["operator", "?"], ["operator", "*"], ["operator", "@"],
["operator", "/"], ["operator", ";"], ["operator", "+"],
["operator", "^"], ["operator", "|"], ["operator", "!"],
["operator", "$"], ["operator", "."],
["operator", "=@="]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/prolog/string_feature.test
================================================
""
"fo\"obar"
"fo""obar"
"foo\
bar"
''
'fo\'obar'
'fo''obar'
'foo\
bar'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "\"fo\"\"obar\""],
["string", "\"foo\\\r\nbar\""],
["string", "''"],
["string", "'fo\\'obar'"],
["string", "'fo''obar'"],
["string", "'foo\\\r\nbar'"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/promql/aggregate_selection.test
================================================
sum by (job) (
rate(http_requests_total[5m])
)
----------------------------------------------------
[
["keyword", "sum"],
["keyword", "by"],
["vector-match", [
["punctuation", "("],
["label-key", "job"],
["punctuation", ")"]
]],
["punctuation", "("],
["function", "rate"],
["punctuation", "("],
"http_requests_total",
["context-range", [
["punctuation", "["],
["range-duration", "5m"],
["punctuation", "]"]
]],
["punctuation", ")"],
["punctuation", ")"]
]
----------------------------------------------------
Checks aggregate query.
================================================
FILE: tests/languages/promql/comment_feature.test
================================================
# These examples are taken from ...
----------------------------------------------------
[
["comment", "# These examples are taken from ..."]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/promql/keyword_feature.test
================================================
sum
min
max
avg
group
stddev
stdvar
count
count_values
bottomk
topk
quantile
on
ignoring
group_right
group_left
by
without
offset
----------------------------------------------------
[
["keyword", "sum"],
["keyword", "min"],
["keyword", "max"],
["keyword", "avg"],
["keyword", "group"],
["keyword", "stddev"],
["keyword", "stdvar"],
["keyword", "count"],
["keyword", "count_values"],
["keyword", "bottomk"],
["keyword", "topk"],
["keyword", "quantile"],
["keyword", "on"],
["keyword", "ignoring"],
["keyword", "group_right"],
["keyword", "group_left"],
["keyword", "by"],
["keyword", "without"],
["keyword", "offset"]
]
================================================
FILE: tests/languages/promql/number_feature.test
================================================
23
-2.43
3.4e-9
0x8f
-Inf
NaN
----------------------------------------------------
[
["number", "23"],
["number", "-2.43"],
["number", "3.4e-9"],
["number", "0x8f"],
["number", "-Inf"],
["number", "NaN"]
]
================================================
FILE: tests/languages/promql/operator_feature.test
================================================
^ * / % + -
== != <= < >= >
and unless or
----------------------------------------------------
[
["operator", "^"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "+"],
["operator", "-"],
["operator", "=="],
["operator", "!="],
["operator", "<="],
["operator", "<"],
["operator", ">="],
["operator", ">"],
["operator", "and"],
["operator", "unless"],
["operator", "or"]
]
================================================
FILE: tests/languages/promql/subquery_selection.test
================================================
max_over_time(deriv(rate(distance_covered_total[5s])[30s:5s])[10m:])
----------------------------------------------------
[
["function", "max_over_time"],
["punctuation", "("],
["function", "deriv"],
["punctuation", "("],
["function", "rate"],
["punctuation", "("],
"distance_covered_total",
["context-range", [
["punctuation", "["],
["range-duration", "5s"],
["punctuation", "]"]
]],
["punctuation", ")"],
["context-range", [
["punctuation", "["],
["range-duration", "30s"],
["punctuation", ":"],
["range-duration", "5s"],
["punctuation", "]"]
]],
["punctuation", ")"],
["context-range", [
["punctuation", "["],
["range-duration", "10m"],
["punctuation", ":"],
["punctuation", "]"]
]],
["punctuation", ")"]
]
----------------------------------------------------
Checks subquery.
================================================
FILE: tests/languages/promql/time_series_selection.test
================================================
http_requests_total{job="apiserver", handler="/api/comments"}[5m]
http_requests_total offset 5m
http_requests_total{job=~".*server"}
----------------------------------------------------
[
"http_requests_total",
["context-labels", [
["punctuation", "{"],
["label-key", "job"],
["punctuation", "="],
["label-value", "\"apiserver\""],
["punctuation", ","],
["label-key", "handler"],
["punctuation", "="],
["label-value", "\"/api/comments\""],
["punctuation", "}"]
]],
["context-range", [
["punctuation", "["],
["range-duration", "5m"],
["punctuation", "]"]
]],
"\r\n\r\nhttp_requests_total ",
["keyword", "offset"],
["context-range", [
["range-duration", "5m"]
]],
"\r\n\r\nhttp_requests_total",
["context-labels", [
["punctuation", "{"],
["label-key", "job"],
["punctuation", "=~"],
["label-value", "\".*server\""],
["punctuation", "}"]
]]
]
----------------------------------------------------
Checks simple time series queries.
================================================
FILE: tests/languages/properties/comment_feature.test
================================================
#
!
# Foobar baz
! Foobar baz
----------------------------------------------------
[
["comment", "#"],
["comment", "!"],
["comment", "# Foobar baz"],
["comment", "! Foobar baz"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/properties/key_value_feature.test
================================================
foo bar
foo\:\=\ bar bar\:\= \
baz
foo = bar
foo\:\=\ bar = bar\:\= \
baz
foo : bar
foo\:\=\ bar : bar\:\= \
baz
----------------------------------------------------
[
["key", "foo"],
["value", "bar"],
["key", "foo\\:\\=\\ bar"],
["value", "bar\\:\\= \\\r\nbaz"],
["key", "foo"],
["punctuation", "="],
["value", "bar"],
["key", "foo\\:\\=\\ bar"],
["punctuation", "="],
["value", "bar\\:\\= \\\r\nbaz"],
["key", "foo"],
["punctuation", ":"],
["value", "bar"],
["key", "foo\\:\\=\\ bar"],
["punctuation", ":"],
["value", "bar\\:\\= \\\r\nbaz"]
]
----------------------------------------------------
Checks for keys and values.
================================================
FILE: tests/languages/protobuf/annotation_feature.test
================================================
int32 foo = 1 [deprecated=true];
----------------------------------------------------
[
["builtin", "int32"],
" foo ",
["operator", "="],
["number", "1"],
["punctuation", "["],
["annotation", "deprecated"],
["operator", "="],
["boolean", "true"],
["punctuation", "]"],
["punctuation", ";"]
]
----------------------------------------------------
Check for annotations.
================================================
FILE: tests/languages/protobuf/builtin_feature.test
================================================
double
float
int32
int64
uint32
uint64
sint32
sint64
fixed32
fixed64
sfixed32
sfixed64
bool
string
bytes
----------------------------------------------------
[
["builtin", "double"],
["builtin", "float"],
["builtin", "int32"],
["builtin", "int64"],
["builtin", "uint32"],
["builtin", "uint64"],
["builtin", "sint32"],
["builtin", "sint64"],
["builtin", "fixed32"],
["builtin", "fixed64"],
["builtin", "sfixed32"],
["builtin", "sfixed64"],
["builtin", "bool"],
["builtin", "string"],
["builtin", "bytes"]
]
----------------------------------------------------
Check for builtin types.
================================================
FILE: tests/languages/protobuf/class-name_feature.test
================================================
syntax = "proto2";
syntax = "proto3";
option java_multiple_files = true;
import public "new.proto";
import "other.proto";
enum Foo {}
extend Foo {}
service Foo {}
message Foo {
Bar Bar = 0;
foo.Bar Bar2 = 0;
.baz.Bar Bar3 = 0;
}
----------------------------------------------------
[
["keyword", "syntax"],
["operator", "="],
["string", "\"proto2\""],
["punctuation", ";"],
["keyword", "syntax"],
["operator", "="],
["string", "\"proto3\""],
["punctuation", ";"],
["keyword", "option"],
" java_multiple_files ",
["operator", "="],
["boolean", "true"],
["punctuation", ";"],
["keyword", "import"],
["keyword", "public"],
["string", "\"new.proto\""],
["punctuation", ";"],
["keyword", "import"],
["string", "\"other.proto\""],
["punctuation", ";"],
["keyword", "enum"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "extend"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "service"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "message"],
["class-name", "Foo"],
["punctuation", "{"],
["positional-class-name", [
"Bar"
]],
" Bar ",
["operator", "="],
["number", "0"],
["punctuation", ";"],
["positional-class-name", [
"foo",
["punctuation", "."],
"Bar"
]],
" Bar2 ",
["operator", "="],
["number", "0"],
["punctuation", ";"],
["positional-class-name", [
["punctuation", "."],
"baz",
["punctuation", "."],
"Bar"
]],
" Bar3 ",
["operator", "="],
["number", "0"],
["punctuation", ";"],
["punctuation", "}"]
]
----------------------------------------------------
Check for class names
================================================
FILE: tests/languages/protobuf/keyword_feature.test
================================================
enum
extend
extensions
import
message
oneof
option
optional
package
public
repeated
required
reserved
returns
rpc LotsOfReplies(
service
stream
syntax
to
----------------------------------------------------
[
["keyword", "enum"],
["keyword", "extend"],
["keyword", "extensions"],
["keyword", "import"],
["keyword", "message"],
["keyword", "oneof"],
["keyword", "option"],
["keyword", "optional"],
["keyword", "package"],
["keyword", "public"],
["keyword", "repeated"],
["keyword", "required"],
["keyword", "reserved"],
["keyword", "returns"],
["keyword", "rpc"],
["function", "LotsOfReplies"],
["punctuation", "("],
["keyword", "service"],
["keyword", "stream"],
["keyword", "syntax"],
["keyword", "to"]
]
----------------------------------------------------
Check for keywords
================================================
FILE: tests/languages/protobuf/map_feature.test
================================================
map bar;
----------------------------------------------------
[
["map", [
"map",
["punctuation", "<"],
["builtin", "string"],
["punctuation", ","],
["punctuation", "."],
"foo",
["punctuation", "."],
"Foo",
["punctuation", ">"]
]],
" bar",
["punctuation", ";"]
]
----------------------------------------------------
Check for maps.
================================================
FILE: tests/languages/protobuf/rpc_feature.test
================================================
rpc LotsOfReplies(HelloRequest) returns (stream HelloResponse);
rpc BidiHello(stream HelloRequest) returns (stream HelloResponse);
rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) {
option (google.api.http) = { post: "/v1/{name=operations/**}:cancel" body: "*" };
}
----------------------------------------------------
[
["keyword", "rpc"],
["function", "LotsOfReplies"],
["punctuation", "("],
["class-name", "HelloRequest"],
["punctuation", ")"],
["keyword", "returns"],
["punctuation", "("],
["keyword", "stream"],
["class-name", "HelloResponse"],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "rpc"],
["function", "BidiHello"],
["punctuation", "("],
["keyword", "stream"],
["class-name", "HelloRequest"],
["punctuation", ")"],
["keyword", "returns"],
["punctuation", "("],
["keyword", "stream"],
["class-name", "HelloResponse"],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "rpc"],
["function", "CancelOperation"],
["punctuation", "("],
["class-name", "CancelOperationRequest"],
["punctuation", ")"],
["keyword", "returns"],
["punctuation", "("],
["class-name", "google.protobuf.Empty"],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "option"],
["punctuation", "("],
"google",
["punctuation", "."],
"api",
["punctuation", "."],
"http",
["punctuation", ")"],
["operator", "="],
["punctuation", "{"],
" post",
["punctuation", ":"],
["string", "\"/v1/{name=operations/**}:cancel\""],
" body",
["punctuation", ":"],
["string", "\"*\""],
["punctuation", "}"],
["punctuation", ";"],
["punctuation", "}"]
]
----------------------------------------------------
Check for RPC definitions.
================================================
FILE: tests/languages/protobuf/string_feature.test
================================================
""
''
"foo"
'foo'
"'foo'"
'"bar"'
" // comment "
----------------------------------------------------
[
["string", "\"\""],
["string", "''"],
["string", "\"foo\""],
["string", "'foo'"],
["string", "\"'foo'\""],
["string", "'\"bar\"'"],
["string", "\" // comment \""]
]
----------------------------------------------------
Checks for single-quoted and double-quoted strings.
================================================
FILE: tests/languages/psl/boolean_feature.test
================================================
FALSE
False
false
TRUE
True
true
NO
No
no
YES
Yes
yes
----------------------------------------------------
[
["boolean", "FALSE"],
["boolean", "False"],
["boolean", "false"],
["boolean", "TRUE"],
["boolean", "True"],
["boolean", "true"],
["boolean", "NO"],
["boolean", "No"],
["boolean", "no"],
["boolean", "YES"],
["boolean", "Yes"],
["boolean", "yes"]
]
================================================
FILE: tests/languages/psl/builtin_feature.test
================================================
acos
add_diary
annotate
annotate_get
asctime
asin
atan
atexit
ascii_to_ebcdic
batch_set
blackout
cat
ceil
chan_exists
change_state
close
code_cvt
cond_signal
cond_wait
console_type
convert_base
convert_date
convert_locale_date
cos
cosh
create
destroy_lock
dump_hist
date
destroy
difference
dget_text
dcget_text
ebcdic_to_ascii
encrypt
event_archive
event_catalog_get
event_check
event_query
event_range_manage
event_range_query
event_report
event_schedule
event_trigger
event_trigger2
execute
exists
exp
fabs
floor
fmod
full_discovery
file
fopen
ftell
fseek
grep
get_vars
getenv
get
get_chan_info
get_ranges
get_text
gethostinfo
getpid
getpname
history_get_retention
history
index
int
is_var
intersection
isnumber
internal
in_transition
join
kill
length
lines
lock
lock_info
log
loge
log10
matchline
msg_check
msg_get_format
msg_get_severity
msg_printf
msg_sprintf
ntharg
num_consoles
nthargf
nthline
nthlinef
num_bytes
print
proc_exists
process
popen
printf
pconfig
poplines
pow
PslExecute
PslFunctionCall
PslFunctionExists
PslSetOptions
random
read
readln
refresh_parameters
remote_check
remote_close
remote_event_query
remote_event_trigger
remote_file_send
remote_open
remove
replace
rindex
sec_check_priv
sec_store_get
sec_store_set
set_alarm_ranges
set_locale
share
sin
sinh
sleep
sopen
sqrt
srandom
subset
set
substr
system
sprintf
sort
subset
snmp_agent_config
_snmp_debug
snmp_agent_stop
snmp_agent_start
snmp_h_set
snmp_h_get_next
snmp_h_get
snmp_set
snmp_walk
snmp_get_next
snmp_get
snmp_config
snmp_close
snmp_open
snmp_trap_receive
snmp_trap_ignore
snmp_trap_listen
snmp_trap_send
snmp_trap_raise_std_trap
snmp_trap_register_im
splitline
strcasecmp
str_repeat
trim
tail
tan
tanh
time
tmpnam
tolower
toupper
trace_psl_process
text_domain
unlock
unique
union
unset
va_arg
va_start
write
----------------------------------------------------
[
["builtin", "acos"],
["builtin", "add_diary"],
["builtin", "annotate"],
["builtin", "annotate_get"],
["builtin", "asctime"],
["builtin", "asin"],
["builtin", "atan"],
["builtin", "atexit"],
["builtin", "ascii_to_ebcdic"],
["builtin", "batch_set"],
["builtin", "blackout"],
["builtin", "cat"],
["builtin", "ceil"],
["builtin", "chan_exists"],
["builtin", "change_state"],
["builtin", "close"],
["builtin", "code_cvt"],
["builtin", "cond_signal"],
["builtin", "cond_wait"],
["builtin", "console_type"],
["builtin", "convert_base"],
["builtin", "convert_date"],
["builtin", "convert_locale_date"],
["builtin", "cos"],
["builtin", "cosh"],
["builtin", "create"],
["builtin", "destroy_lock"],
["builtin", "dump_hist"],
["builtin", "date"],
["builtin", "destroy"],
["builtin", "difference"],
["builtin", "dget_text"],
["builtin", "dcget_text"],
["builtin", "ebcdic_to_ascii"],
["builtin", "encrypt"],
["builtin", "event_archive"],
["builtin", "event_catalog_get"],
["builtin", "event_check"],
["builtin", "event_query"],
["builtin", "event_range_manage"],
["builtin", "event_range_query"],
["builtin", "event_report"],
["builtin", "event_schedule"],
["builtin", "event_trigger"],
["builtin", "event_trigger2"],
["builtin", "execute"],
["builtin", "exists"],
["builtin", "exp"],
["builtin", "fabs"],
["builtin", "floor"],
["builtin", "fmod"],
["builtin", "full_discovery"],
["builtin", "file"],
["builtin", "fopen"],
["builtin", "ftell"],
["builtin", "fseek"],
["builtin", "grep"],
["builtin", "get_vars"],
["builtin", "getenv"],
["builtin", "get"],
["builtin", "get_chan_info"],
["builtin", "get_ranges"],
["builtin", "get_text"],
["builtin", "gethostinfo"],
["builtin", "getpid"],
["builtin", "getpname"],
["builtin", "history_get_retention"],
["builtin", "history"],
["builtin", "index"],
["builtin", "int"],
["builtin", "is_var"],
["builtin", "intersection"],
["builtin", "isnumber"],
["builtin", "internal"],
["builtin", "in_transition"],
["builtin", "join"],
["builtin", "kill"],
["builtin", "length"],
["builtin", "lines"],
["builtin", "lock"],
["builtin", "lock_info"],
["builtin", "log"],
["builtin", "loge"],
["builtin", "log10"],
["builtin", "matchline"],
["builtin", "msg_check"],
["builtin", "msg_get_format"],
["builtin", "msg_get_severity"],
["builtin", "msg_printf"],
["builtin", "msg_sprintf"],
["builtin", "ntharg"],
["builtin", "num_consoles"],
["builtin", "nthargf"],
["builtin", "nthline"],
["builtin", "nthlinef"],
["builtin", "num_bytes"],
["builtin", "print"],
["builtin", "proc_exists"],
["builtin", "process"],
["builtin", "popen"],
["builtin", "printf"],
["builtin", "pconfig"],
["builtin", "poplines"],
["builtin", "pow"],
["builtin", "PslExecute"],
["builtin", "PslFunctionCall"],
["builtin", "PslFunctionExists"],
["builtin", "PslSetOptions"],
["builtin", "random"],
["builtin", "read"],
["builtin", "readln"],
["builtin", "refresh_parameters"],
["builtin", "remote_check"],
["builtin", "remote_close"],
["builtin", "remote_event_query"],
["builtin", "remote_event_trigger"],
["builtin", "remote_file_send"],
["builtin", "remote_open"],
["builtin", "remove"],
["builtin", "replace"],
["builtin", "rindex"],
["builtin", "sec_check_priv"],
["builtin", "sec_store_get"],
["builtin", "sec_store_set"],
["builtin", "set_alarm_ranges"],
["builtin", "set_locale"],
["builtin", "share"],
["builtin", "sin"],
["builtin", "sinh"],
["builtin", "sleep"],
["builtin", "sopen"],
["builtin", "sqrt"],
["builtin", "srandom"],
["builtin", "subset"],
["builtin", "set"],
["builtin", "substr"],
["builtin", "system"],
["builtin", "sprintf"],
["builtin", "sort"],
["builtin", "subset"],
["builtin", "snmp_agent_config"],
["builtin", "_snmp_debug"],
["builtin", "snmp_agent_stop"],
["builtin", "snmp_agent_start"],
["builtin", "snmp_h_set"],
["builtin", "snmp_h_get_next"],
["builtin", "snmp_h_get"],
["builtin", "snmp_set"],
["builtin", "snmp_walk"],
["builtin", "snmp_get_next"],
["builtin", "snmp_get"],
["builtin", "snmp_config"],
["builtin", "snmp_close"],
["builtin", "snmp_open"],
["builtin", "snmp_trap_receive"],
["builtin", "snmp_trap_ignore"],
["builtin", "snmp_trap_listen"],
["builtin", "snmp_trap_send"],
["builtin", "snmp_trap_raise_std_trap"],
["builtin", "snmp_trap_register_im"],
["builtin", "splitline"],
["builtin", "strcasecmp"],
["builtin", "str_repeat"],
["builtin", "trim"],
["builtin", "tail"],
["builtin", "tan"],
["builtin", "tanh"],
["builtin", "time"],
["builtin", "tmpnam"],
["builtin", "tolower"],
["builtin", "toupper"],
["builtin", "trace_psl_process"],
["builtin", "text_domain"],
["builtin", "unlock"],
["builtin", "unique"],
["builtin", "union"],
["builtin", "unset"],
["builtin", "va_arg"],
["builtin", "va_start"],
["builtin", "write"]
]
----------------------------------------------------
Test for PSL built-in functions
================================================
FILE: tests/languages/psl/comment_feature.test
================================================
# Comment
# This is not a "string"
# This is not a <<>=2
1^=2
1*=2
1/=2
1%=2
1|=2
1&=2
1||2
1&&2
1|2
1^2
1&2
1!=2
1==2
1=~2
1!~2
1<2
1<=2
1>2
1>=2
1<<2
1>>2
1+2
1*2
1/2
1%2
"a"."b"
1-2
!1
1++2
1--2
1?2:3
----------------------------------------------------
[
["number", "1"],
["operator", "="],
["number", "2"],
["number", "1"],
["operator", "+="],
["number", "2"],
["number", "1"],
["operator", "-="],
["number", "2"],
["number", "1"],
["operator", "<<="],
["number", "2"],
["number", "1"],
["operator", ">>="],
["number", "2"],
["number", "1"],
["operator", "^="],
["number", "2"],
["number", "1"],
["operator", "*="],
["number", "2"],
["number", "1"],
["operator", "/="],
["number", "2"],
["number", "1"],
["operator", "%="],
["number", "2"],
["number", "1"],
["operator", "|="],
["number", "2"],
["number", "1"],
["operator", "&="],
["number", "2"],
["number", "1"],
["operator", "||"],
["number", "2"],
["number", "1"],
["operator", "&&"],
["number", "2"],
["number", "1"],
["operator", "|"],
["number", "2"],
["number", "1"],
["operator", "^"],
["number", "2"],
["number", "1"],
["operator", "&"],
["number", "2"],
["number", "1"],
["operator", "!="],
["number", "2"],
["number", "1"],
["operator", "=="],
["number", "2"],
["number", "1"],
["operator", "=~"],
["number", "2"],
["number", "1"],
["operator", "!~"],
["number", "2"],
["number", "1"],
["operator", "<"],
["number", "2"],
["number", "1"],
["operator", "<="],
["number", "2"],
["number", "1"],
["operator", ">"],
["number", "2"],
["number", "1"],
["operator", ">="],
["number", "2"],
["number", "1"],
["operator", "<<"],
["number", "2"],
["number", "1"],
["operator", ">>"],
["number", "2"],
["number", "1"],
["operator", "+"],
["number", "2"],
["number", "1"],
["operator", "*"],
["number", "2"],
["number", "1"],
["operator", "/"],
["number", "2"],
["number", "1"],
["operator", "%"],
["number", "2"],
["string", ["\"a\""]],
["operator", "."],
["string", ["\"b\""]],
["number", "1"],
["operator", "-"],
["number", "2"],
["operator", "!"],
["number", "1"],
["number", "1"],
["operator", "++"],
["number", "2"],
["number", "1"],
["operator", "--"],
["number", "2"],
["number", "1"],
["operator", "?"],
["number", "2"],
["operator", ":"],
["number", "3"]
]
----------------------------------------------------
Test for oper1tors
================================================
FILE: tests/languages/psl/overall_feature.test
================================================
function test(limit) {
for (i = 0 ; i < limit ; i++) {
s = s + i; # s has not been initialized!
}
print(s."\n");
}
----------------------------------------------------
[
["keyword", "function"],
["function", "test"],
["punctuation", "("],
"limit",
["punctuation", ")"],
["punctuation", "{"],
["keyword", "for"],
["punctuation", "("],
"i ",
["operator", "="],
["number", "0"],
["punctuation", ";"],
" i ",
["operator", "<"],
" limit ",
["punctuation", ";"],
" i",
["operator", "++"],
["punctuation", ")"],
["punctuation", "{"],
"\r\n\t\ts ",
["operator", "="],
" s ",
["operator", "+"],
" i",
["punctuation", ";"],
["comment", "# s has not been initialized!"],
["punctuation", "}"],
["builtin", "print"],
["punctuation", "("],
"s",
["operator", "."],
["string", [
"\"",
["symbol", "\\n"],
"\""
]],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"]
]
----------------------------------------------------
General test for the most common PSL statements, all mixed together
================================================
FILE: tests/languages/psl/string_feature.test
================================================
"abc"
"a \"bc\""
"a\nbc"
"a\invalid"
"foo # not a comment"
"multi
line string"
----------------------------------------------------
[
["string", ["\"abc\""]],
["string", [
"\"a ",
["symbol", "\\\""],
"bc",
["symbol", "\\\""],
"\""
]],
["string", [
"\"a",
["symbol", "\\n"],
"bc\""
]],
["string", ["\"a\\invalid\""]],
["string", ["\"foo # not a comment\""]],
["string", ["\"multi\r\nline string\""]]
]
----------------------------------------------------
Test for strings
================================================
FILE: tests/languages/psl/variable_feature.test
================================================
errno
exit_status
PslDebug
----------------------------------------------------
[
["variable", "errno"],
["variable", "exit_status"],
["variable", "PslDebug"]
]
----------------------------------------------------
Test for variables
================================================
FILE: tests/languages/pug/code_feature.test
================================================
- if(foo)
p= 'This code is' + ' !'
span
!= 'Not escaped'
----------------------------------------------------
[
["punctuation", "-"],
["code", [
["keyword", "if"],
["punctuation", "("],
"foo",
["punctuation", ")"]
]],
["tag", ["p"]],
["punctuation", "="],
["code", [
["string", "'This code is'"],
["operator", "+"],
["string", "' !'"]
]],
["tag", ["span"]],
["punctuation", "!="],
["code", [
["string", "'Not escaped'"]
]]
]
----------------------------------------------------
Checks for inline code.
================================================
FILE: tests/languages/pug/comment_feature.test
================================================
// foo
bar
// foo
bar baz
// foo
// bar
----------------------------------------------------
[
["comment", "// foo\r\n bar"],
["comment", "// foo\r\n\t\tbar baz"],
["comment", "// foo"],
["comment", "// bar"]
]
----------------------------------------------------
Checks for single-line comments.
================================================
FILE: tests/languages/pug/doctype_feature.test
================================================
doctype html
doctype 1.1
doctype html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN"
----------------------------------------------------
[
["doctype", "doctype html"],
["doctype", "doctype 1.1"],
["doctype", "doctype html PUBLIC \"-//W3C//DTD XHTML Basic 1.1//EN\""]
]
----------------------------------------------------
Checks for doctypes.
================================================
FILE: tests/languages/pug/filter_feature.test
================================================
:language
code
----------------------------------------------------
[
["filter", [
["filter-name", ":language"],
["text", "code"]
]]
]
================================================
FILE: tests/languages/pug/flow-control_feature.test
================================================
each val, index in [1,2,3]
if foo
else if bar
else
unless foo
while n < 4
case foo
when "bar"
default
----------------------------------------------------
[
["flow-control", [
["each", [
["keyword", "each"],
" val",
["punctuation", ","],
" index ",
["keyword", "in"]
]],
["punctuation", "["],
["number", "1"],
["punctuation", ","],
["number", "2"],
["punctuation", ","],
["number", "3"],
["punctuation", "]"]
]],
["flow-control", [
["branch", "if"],
" foo"
]],
["flow-control", [
["branch", "else"],
["keyword", "if"],
" bar"
]],
["flow-control", [
["branch", "else"]
]],
["flow-control", [
["branch", "unless"],
" foo"
]],
["flow-control", [
["branch", "while"],
" n ",
["operator", "<"],
["number", "4"]
]],
["flow-control", [
["branch", "case"],
" foo"
]],
["flow-control", [
["branch", "when"],
["string", "\"bar\""]
]],
["flow-control", [
["branch", "default"]
]]
]
----------------------------------------------------
Checks for all flow-control structures.
================================================
FILE: tests/languages/pug/keyword_feature.test
================================================
block title
extends ./foo.pug
include ./bar.pug
block append foo
append bar
block prepend foo
prepend bar
----------------------------------------------------
[
["keyword", "block title"],
["keyword", "extends ./foo.pug"],
["keyword", "include ./bar.pug"],
["keyword", "block append foo"],
["keyword", "append bar"],
["keyword", "block prepend foo"],
["keyword", "prepend bar"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/pug/mixin_feature.test
================================================
mixin foo
mixin pet(name)
+foo
+pet('cat')
----------------------------------------------------
[
["mixin", [
["keyword", "mixin"],
["function", "foo"]
]],
["mixin", [
["keyword", "mixin"],
["function", "pet"],
["punctuation", "("],
"name",
["punctuation", ")"]
]],
["mixin", [
["name", "+foo"]
]],
["mixin", [
["name", "+pet"],
["punctuation", "("],
["string", "'cat'"],
["punctuation", ")"]
]]
]
----------------------------------------------------
Checks for mixins declaration and usage.
================================================
FILE: tests/languages/pug/multiline-plain-text_feature.test
================================================
div.
foobar
baz
.
div.
foobar
baz
----------------------------------------------------
[
["tag", [
"div"
]],
["punctuation", "."],
["multiline-plain-text", "\r\n foobar\r\n\r\n baz"],
["punctuation", "."],
["tag", [
"div"
]],
["punctuation", "."],
["multiline-plain-text", "\r\n\t\tfoobar\r\n\t\tbaz"]
]
----------------------------------------------------
Checks for multi-line plain text.
================================================
FILE: tests/languages/pug/multiline-script_feature.test
================================================
script.
alert(42);
.
script(type='text/javascript').
if(foo) {
bar(1 + 5);
}
----------------------------------------------------
[
["tag", [
"script"
]],
["punctuation", "."],
["multiline-script", [
["function", "alert"],
["punctuation", "("],
["number", "42"],
["punctuation", ")"],
["punctuation", ";"]
]],
["punctuation", "."],
["tag", [
"script",
["attributes", [
["punctuation", "("],
["attr-name", "type"],
["punctuation", "="],
["attr-value", [["string", "'text/javascript'"]]],
["punctuation", ")"]
]]
]],
["punctuation", "."],
["multiline-script", [
["keyword", "if"],
["punctuation", "("],
"foo",
["punctuation", ")"],
["punctuation", "{"],
["function", "bar"],
["punctuation", "("],
["number", "1"],
["operator", "+"],
["number", "5"],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"]
]]
]
----------------------------------------------------
Checks for multi-line scripts. The alone dot serves as a separator.
================================================
FILE: tests/languages/pug/plain-text_feature.test
================================================
div foo
span foo bar
----------------------------------------------------
[
["tag", [
"div"
]],
["plain-text", "foo"],
["tag", [
"span"
]],
["plain-text", "foo bar"]
]
----------------------------------------------------
Checks for single-line plain text.
================================================
FILE: tests/languages/pug/script_feature.test
================================================
script alert(42);
script(type='text/javascript') alert(42);
----------------------------------------------------
[
["tag", [
"script"
]],
["script", [
["function", "alert"],
["punctuation", "("],
["number", "42"],
["punctuation", ")"],
["punctuation", ";"]
]],
["tag", [
"script",
["attributes", [
["punctuation", "("],
["attr-name", "type"],
["punctuation", "="],
["attr-value", [["string", "'text/javascript'"]]],
["punctuation", ")"]
]]
]],
["script", [
["function", "alert"],
["punctuation", "("],
["number", "42"],
["punctuation", ")"],
["punctuation", ";"]
]]
]
----------------------------------------------------
Checks for single-line scripts.
================================================
FILE: tests/languages/pug/tag_feature.test
================================================
div
span&attributes({'data-foo': 'bar'})
input(data-bar="foo", type='checkbox', checked)
a(style={color: 'red', background: 'green'})
div(unescaped!="")
a.button
.content
a#main-link
#content
div#test-id.test-class1.test-class2
.test-class1#test-id.test-class2
a: span
----------------------------------------------------
[
["tag", ["div"]],
["tag", [
"span",
["attributes", [
["operator", "&"],
["function", "attributes"],
["punctuation", "("],
["punctuation", "{"],
["string-property", "'data-foo'"],
["operator", ":"],
["string", "'bar'"],
["punctuation", "}"],
["punctuation", ")"]
]]
]],
["tag", [
"input",
["attributes", [
["punctuation", "("],
["attr-name", "data-bar"],
["punctuation", "="],
["attr-value", [
["string", "\"foo\""]
]],
["punctuation", ","],
["attr-name", "type"],
["punctuation", "="],
["attr-value", [
["string", "'checkbox'"]
]],
["punctuation", ","],
["attr-name", "checked"],
["punctuation", ")"]
]]
]],
["tag", [
"a",
["attributes", [
["punctuation", "("],
["attr-name", "style"],
["punctuation", "="],
["attr-value", [
["punctuation", "{"],
["literal-property", "color"],
["operator", ":"],
["string", "'red'"],
["punctuation", ","],
["literal-property", "background"],
["operator", ":"],
["string", "'green'"],
["punctuation", "}"]
]],
["punctuation", ")"]
]]
]],
["tag", [
"div",
["attributes", [
["punctuation", "("],
["attr-name", "unescaped"],
["punctuation", "!="],
["attr-value", [
["string", "\"\""]
]],
["punctuation", ")"]
]]
]],
["tag", [
"a",
["attr-class", ".button"]
]],
["tag", [
["attr-class", ".content"]
]],
["tag", [
"a",
["attr-id", "#main-link"]
]],
["tag", [
["attr-id", "#content"]
]],
["tag", [
"div",
["attr-id", "#test-id"],
["attr-class", ".test-class1"],
["attr-class", ".test-class2"]
]],
["tag", [
["attr-class", ".test-class1"],
["attr-id", "#test-id"],
["attr-class", ".test-class2"]
]],
["tag", [
"a",
["punctuation", ":"]
]],
["tag", ["span"]]
]
----------------------------------------------------
Checks for tags and attributes.
================================================
FILE: tests/languages/puppet/attr-name_feature.test
================================================
foo {
bar => bar,
* => {}
}
----------------------------------------------------
[
"foo ", ["punctuation", "{"],
["attr-name", "bar"], ["operator", "=>"],
" bar", ["punctuation", ","],
["attr-name", "*"], ["operator", "=>"],
["punctuation", "{"], ["punctuation", "}"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for attributes.
================================================
FILE: tests/languages/puppet/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/puppet/comment_feature.test
================================================
#
# Foobar
/* Foo
bar */
/* @(foo) */
# @(foo)
# foo /* bar */ baz
----------------------------------------------------
[
["comment", "#"],
["comment", "# Foobar"],
["multiline-comment", "/* Foo\r\nbar */"],
["multiline-comment", "/* @(foo) */"],
["comment", "# @(foo)"],
["comment", "# foo /* bar */ baz"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/puppet/datatype_feature.test
================================================
Any
Array
Boolean
Callable
Catalogentry
Class
Collection
Data
Default
Enum
Float
Hash
Integer
NotUndef
Numeric
Optional
Pattern
Regexp
Resource
Runtime
Scalar
String
Struct
Tuple
Type
Undef
Variant
----------------------------------------------------
[
["datatype", "Any"],
["datatype", "Array"],
["datatype", "Boolean"],
["datatype", "Callable"],
["datatype", "Catalogentry"],
["datatype", "Class"],
["datatype", "Collection"],
["datatype", "Data"],
["datatype", "Default"],
["datatype", "Enum"],
["datatype", "Float"],
["datatype", "Hash"],
["datatype", "Integer"],
["datatype", "NotUndef"],
["datatype", "Numeric"],
["datatype", "Optional"],
["datatype", "Pattern"],
["datatype", "Regexp"],
["datatype", "Resource"],
["datatype", "Runtime"],
["datatype", "Scalar"],
["datatype", "String"],
["datatype", "Struct"],
["datatype", "Tuple"],
["datatype", "Type"],
["datatype", "Undef"],
["datatype", "Variant"]
]
----------------------------------------------------
Checks for data types.
================================================
FILE: tests/languages/puppet/function_feature.test
================================================
$foo.foobar
foo_bar_42()
contain
debug
err
fail
include
info
notice
realize
require
tag
warning
----------------------------------------------------
[
["variable", ["$foo"]], ["punctuation", "."], ["function", "foobar"],
["function", "foo_bar_42"], ["punctuation", "("], ["punctuation", ")"],
["function", "contain"],
["function", "debug"],
["function", "err"],
["function", "fail"],
["function", "include"],
["function", "info"],
["function", "notice"],
["function", "realize"],
["function", "require"],
["function", "tag"],
["function", "warning"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/puppet/heredoc_feature.test
================================================
@("FOO")
bar
$baz
FOO
@(FOO BAR/)
bar
$baz
| FOO BAR
@(foo!)
bar
|-foo!
@("some text..."/nrts$uL)
some text
some text..
some text...
$foo = @(FOOBAR) == $bar
Foobar
-FOOBAR
----------------------------------------------------
[
["heredoc", ["@(", ["punctuation", "\"FOO\""], ")"]],
["heredoc", [
"\tbar\r\n\t",
["interpolation", ["$baz"]],
["punctuation", "FOO"]
]],
["heredoc", ["@(", ["punctuation", "FOO BAR/"], ")"]],
["heredoc", [
"\tbar\r\n\t$baz\r\n\t",
["punctuation", "| FOO BAR"]
]],
["heredoc", ["@(", ["punctuation", "foo!"], ")"]],
["heredoc", ["bar\r\n", ["punctuation", "|-foo!"]]],
["heredoc", ["@(", ["punctuation", "\"some text...\"/nrts$uL"], ")"]],
["heredoc", ["some text\r\nsome text..\r\n", ["punctuation", "some text..."]]],
["variable", ["$foo"]], ["operator", "="],
["heredoc", ["@(", ["punctuation", "FOOBAR"], ")"]],
["operator", "=="], ["variable", ["$bar"]],
["heredoc", ["\tFoobar\r\n\t", ["punctuation", "-FOOBAR"]]]
]
----------------------------------------------------
Checks for heredoc strings.
Also checks that string interpolation applies only inside quoted heredoc strings.
================================================
FILE: tests/languages/puppet/interpolation_feature.test
================================================
"$foo ${::foo} ${foo::bar.foobar}
${foobar(42)} ${::interfaces.split(",")[3]}
${[1,20,3].filter |$value| { $value < 10 }}"
----------------------------------------------------
[
["string", [["double-quoted", [
"\"",
["interpolation", ["$foo"]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["short-variable", [["punctuation", "::"], "foo"]],
["punctuation", "}"]
]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["short-variable", ["foo", ["punctuation", "::"], "bar"]],
["punctuation", "."], ["function", "foobar"],
["punctuation", "}"]
]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["function", "foobar"], ["punctuation", "("],
["number", "42"], ["punctuation", ")"],
["punctuation", "}"]
]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["short-variable", [["punctuation", "::"], "interfaces"]],
["punctuation", "."], ["function", "split"],
["punctuation", "("], ["string", [["double-quoted", ["\",\""]]]],
["punctuation", ")"], ["punctuation", "["],
["number", "3"], ["punctuation", "]"],
["punctuation", "}"]
]],
["interpolation", [
["delimiter", "$"], ["punctuation", "{"],
["punctuation", "["], ["number", "1"],
["punctuation", ","], ["number", "20"],
["punctuation", ","], ["number", "3"], ["punctuation", "]"],
["punctuation", "."], ["function", "filter"],
["operator", "|"], ["variable", ["$value"]], ["operator", "|"],
["punctuation", "{"], ["variable", ["$value"]],
["operator", "<"], ["number", "10"], ["punctuation", "}"],
["punctuation", "}"]
]],
"\""
]]]]
]
----------------------------------------------------
Checks for interpolation.
================================================
FILE: tests/languages/puppet/keyword_feature.test
================================================
application
attr
case
class
consumes
default
define
else
elsif
function
if
import
inherits
node
private
produces
type
undef
unless
----------------------------------------------------
[
["keyword", "application"],
["keyword", "attr"],
["keyword", "case"],
["keyword", "class"],
["keyword", "consumes"],
["keyword", "default"],
["keyword", "define"],
["keyword", "else"],
["keyword", "elsif"],
["keyword", "function"],
["keyword", "if"],
["keyword", "import"],
["keyword", "inherits"],
["keyword", "node"],
["keyword", "private"],
["keyword", "produces"],
["keyword", "type"],
["keyword", "undef"],
["keyword", "unless"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/puppet/number_feature.test
================================================
0
42
3.14159
3e8
3.2E-7
0777
0xBadFace
0XBADFACE
----------------------------------------------------
[
["number", "0"],
["number", "42"],
["number", "3.14159"],
["number", "3e8"],
["number", "3.2E-7"],
["number", "0777"],
["number", "0xBadFace"],
["number", "0XBADFACE"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/puppet/operator_feature.test
================================================
= == =~ =>
! != !~
< << <<|
<= <~ <| <-
> >> >=
- ->
~>
| |> |>>
* / % + ?
and in or
----------------------------------------------------
[
["operator", "="], ["operator", "=="], ["operator", "=~"], ["operator", "=>"],
["operator", "!"], ["operator", "!="], ["operator", "!~"],
["operator", "<"], ["operator", "<<"], ["operator", "<<|"],
["operator", "<="], ["operator", "<~"], ["operator", "<|"], ["operator", "<-"],
["operator", ">"], ["operator", ">>"], ["operator", ">="],
["operator", "-"], ["operator", "->"],
["operator", "~>"],
["operator", "|"], ["operator", "|>"], ["operator", "|>>"],
["operator", "*"], ["operator", "/"], ["operator", "%"], ["operator", "+"], ["operator", "?"],
["operator", "and"], ["operator", "in"], ["operator", "or"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/puppet/regex_feature.test
================================================
node /f(o)"o"[b]?a\/r/
$foo = /foo
bar # baz
/m
$foo = /foo
bar # baz
/ixm
$foo = /@(foo)/
----------------------------------------------------
[
["keyword", "node"],
["regex", ["/f(o)\"o\"[b]?a\\/r/"]],
["variable", ["$foo"]], ["operator", "="],
["regex", ["/foo\r\nbar # baz\r\n/m"]],
["variable", ["$foo"]], ["operator", "="],
["regex", [
["extended-regex", [
"/foo\r\nbar ",
["comment", "# baz"],
"\r\n/ixm"
]]
]],
["variable", ["$foo"]], ["operator", "="],
["regex", ["/@(foo)/"]]
]
----------------------------------------------------
Checks for regular expressions.
Also checks that extended-regex accept inline comments.
================================================
FILE: tests/languages/puppet/string_feature.test
================================================
''
'fo\'obar'
'foo
$bar
baz'
""
"fo\"obar"
"foo
$bar
baz"
" @(foo) "
"foo /* bar */ baz"
"foo #bar baz"
----------------------------------------------------
[
["string", ["''"]],
["string", ["'fo\\'obar'"]],
["string", ["'foo\r\n$bar\r\nbaz'"]],
["string", [["double-quoted", ["\"\""]]]],
["string", [["double-quoted", ["\"fo\\\"obar\""]]]],
["string", [["double-quoted", [
"\"foo\r\n",
["interpolation", ["$bar"]],
"\r\nbaz\""
]]]],
["string", [["double-quoted", ["\" @(foo) \""]]]],
["string", [["double-quoted", ["\"foo /* bar */ baz\""]]]],
["string", [["double-quoted", ["\"foo #bar baz\""]]]]
]
----------------------------------------------------
Checks for strings.
Also checks that string interpolation only applies to double-quoted strings.
================================================
FILE: tests/languages/puppet/variable_feature.test
================================================
$foo
$::foobar_42
$Foo::Bar_42::baz
----------------------------------------------------
[
["variable", ["$foo"]],
["variable", ["$", ["punctuation", "::"], "foobar_42"]],
["variable", ["$Foo", ["punctuation", "::"], "Bar_42", ["punctuation", "::"], "baz"]]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/pure/comment_feature.test
================================================
//
// Foobar
/**/
/* Foo
bar */
#! --nochecks
----------------------------------------------------
[
["comment", "//"],
["comment", "// Foobar"],
["comment", "/**/"],
["comment", "/* Foo\r\nbar */"],
["comment", "#! --nochecks"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/pure/function_feature.test
================================================
abs
add_fundef
add_fundef_at
add_interface
add_interface_at
add_macdef
add_macdef_at
add_typedef
add_typedef_at
add_addr
add_constdef
add_vardef
all
any
appl
applp
arity
bigint
bigintp
blob
blob_crc
blob_size
blobp
bool
boolp
byte_matrix
byte_pointer
byte_string
byte_cstring
byte_string_pointer
byte_cstring_pointer
calloc
cat
catmap
ceil
char
charp
chars
check_ptrtag
chr
clear_sentry
clearsym
closure
closurep
cmatrix
cmatrixp
col
cols
colcat
colcatmap
colmap
colrev
colvector
colvectorp
colvectorseq
complex
complex_float_matrix
complex_float_pointer
complex_matrix
complex_matrix_view
complex_pointer
complexp
conj
cooked
cookedp
cst
cstring
cstring_dup
cstring_list
cstring_vector
curry
curry3
cycle
cyclen
del_constdef
del_fundef
del_interface
del_macdef
del_typedef
del_vardef
delete
diag
diagmat
dim
dmatrix
dmatrixp
do
double
double_matrix
double_matrix_view
double_pointer
doublep
dowith
dowith3
drop
dropwhile
eval
evalcmd
exactp
filter
fix
fixity
flip
float_matrix
float_pointer
floor
foldl
foldl1
foldr
foldr1
frac
free
fun
funp
function
functionp
gcd
get
get_byte
get_constdef
get_double
get_float
get_fundef
get_int
get_int64
get_interface
get_interface_typedef
get_long
get_macdef
get_pointer
get_ptrtag
get_short
get_sentry
get_string
get_typedef
get_vardef
globsym
hash
head
id
im
imatrix
imatrixp
index
inexactp
infp
init
insert
int
int_matrix
int_matrix_view
int_pointer
intp
int64_matrix
int64_pointer
integer
integerp
iterate
iteraten
iterwhile
join
key
keys
lambda
lambdap
last
lasterr
lasterrpos
lcd
list
list2
listp
listmap
make_ptrtag
malloc
map
matcat
matrix
matrixp
max
member
min
nanp
nargs
nmatrix
nmatrixp
null
number
numberp
ord
pack
packed
pointer
pointer_cast
pointer_tag
pointer_type
pointerp
pow
pred
ptrtag
put
put_byte
put_double
put_float
put_int
put_int64
put_long
put_pointer
put_short
put_string
rational
rationalp
re
real
realp
realloc
record
recordp
redim
reduce
reduce_with
ref
refp
repeat
repeatn
reverse
rlist
rlistp
round
row
rows
rowcat
rowcatmap
rowmap
rowrev
rowvector
rowvectorp
rowvectorseq
same
scanl
scanl1
scanr
scanr1
sentry
sgn
short_matrix
short_pointer
slice
smatrix
smatrixp
sort
split
str
strcat
stream
stride
string
string_dup
string_list
string_vector
stringp
subdiag
subdiagmat
submat
subseq
subseq2
substr
succ
supdiag
supdiagmat
symbol
symbolp
tail
take
takewhile
thunk
thunkp
transpose
trunc
tuple
tuplep
typep
ubyte
uint
uint64
ulong
uncurry
uncurry3
unref
unzip
unzip3
update
ushort
val
vals
var
varp
vector
vectorp
vectorseq
void
zip
zip3
zipwith
zipwith3
----------------------------------------------------
[
["function", "abs"],
["function", "add_fundef"],
["function", "add_fundef_at"],
["function", "add_interface"],
["function", "add_interface_at"],
["function", "add_macdef"],
["function", "add_macdef_at"],
["function", "add_typedef"],
["function", "add_typedef_at"],
["function", "add_addr"],
["function", "add_constdef"],
["function", "add_vardef"],
["function", "all"],
["function", "any"],
["function", "appl"],
["function", "applp"],
["function", "arity"],
["function", "bigint"],
["function", "bigintp"],
["function", "blob"],
["function", "blob_crc"],
["function", "blob_size"],
["function", "blobp"],
["function", "bool"],
["function", "boolp"],
["function", "byte_matrix"],
["function", "byte_pointer"],
["function", "byte_string"],
["function", "byte_cstring"],
["function", "byte_string_pointer"],
["function", "byte_cstring_pointer"],
["function", "calloc"],
["function", "cat"],
["function", "catmap"],
["function", "ceil"],
["function", "char"],
["function", "charp"],
["function", "chars"],
["function", "check_ptrtag"],
["function", "chr"],
["function", "clear_sentry"],
["function", "clearsym"],
["function", "closure"],
["function", "closurep"],
["function", "cmatrix"],
["function", "cmatrixp"],
["function", "col"],
["function", "cols"],
["function", "colcat"],
["function", "colcatmap"],
["function", "colmap"],
["function", "colrev"],
["function", "colvector"],
["function", "colvectorp"],
["function", "colvectorseq"],
["function", "complex"],
["function", "complex_float_matrix"],
["function", "complex_float_pointer"],
["function", "complex_matrix"],
["function", "complex_matrix_view"],
["function", "complex_pointer"],
["function", "complexp"],
["function", "conj"],
["function", "cooked"],
["function", "cookedp"],
["function", "cst"],
["function", "cstring"],
["function", "cstring_dup"],
["function", "cstring_list"],
["function", "cstring_vector"],
["function", "curry"],
["function", "curry3"],
["function", "cycle"],
["function", "cyclen"],
["function", "del_constdef"],
["function", "del_fundef"],
["function", "del_interface"],
["function", "del_macdef"],
["function", "del_typedef"],
["function", "del_vardef"],
["function", "delete"],
["function", "diag"],
["function", "diagmat"],
["function", "dim"],
["function", "dmatrix"],
["function", "dmatrixp"],
["function", "do"],
["function", "double"],
["function", "double_matrix"],
["function", "double_matrix_view"],
["function", "double_pointer"],
["function", "doublep"],
["function", "dowith"],
["function", "dowith3"],
["function", "drop"],
["function", "dropwhile"],
["function", "eval"],
["function", "evalcmd"],
["function", "exactp"],
["function", "filter"],
["function", "fix"],
["function", "fixity"],
["function", "flip"],
["function", "float_matrix"],
["function", "float_pointer"],
["function", "floor"],
["function", "foldl"],
["function", "foldl1"],
["function", "foldr"],
["function", "foldr1"],
["function", "frac"],
["function", "free"],
["function", "fun"],
["function", "funp"],
["function", "function"],
["function", "functionp"],
["function", "gcd"],
["function", "get"],
["function", "get_byte"],
["function", "get_constdef"],
["function", "get_double"],
["function", "get_float"],
["function", "get_fundef"],
["function", "get_int"],
["function", "get_int64"],
["function", "get_interface"],
["function", "get_interface_typedef"],
["function", "get_long"],
["function", "get_macdef"],
["function", "get_pointer"],
["function", "get_ptrtag"],
["function", "get_short"],
["function", "get_sentry"],
["function", "get_string"],
["function", "get_typedef"],
["function", "get_vardef"],
["function", "globsym"],
["function", "hash"],
["function", "head"],
["function", "id"],
["function", "im"],
["function", "imatrix"],
["function", "imatrixp"],
["function", "index"],
["function", "inexactp"],
["function", "infp"],
["function", "init"],
["function", "insert"],
["function", "int"],
["function", "int_matrix"],
["function", "int_matrix_view"],
["function", "int_pointer"],
["function", "intp"],
["function", "int64_matrix"],
["function", "int64_pointer"],
["function", "integer"],
["function", "integerp"],
["function", "iterate"],
["function", "iteraten"],
["function", "iterwhile"],
["function", "join"],
["function", "key"],
["function", "keys"],
["function", "lambda"],
["function", "lambdap"],
["function", "last"],
["function", "lasterr"],
["function", "lasterrpos"],
["function", "lcd"],
["function", "list"],
["function", "list2"],
["function", "listp"],
["function", "listmap"],
["function", "make_ptrtag"],
["function", "malloc"],
["function", "map"],
["function", "matcat"],
["function", "matrix"],
["function", "matrixp"],
["function", "max"],
["function", "member"],
["function", "min"],
["function", "nanp"],
["function", "nargs"],
["function", "nmatrix"],
["function", "nmatrixp"],
["function", "null"],
["function", "number"],
["function", "numberp"],
["function", "ord"],
["function", "pack"],
["function", "packed"],
["function", "pointer"],
["function", "pointer_cast"],
["function", "pointer_tag"],
["function", "pointer_type"],
["function", "pointerp"],
["function", "pow"],
["function", "pred"],
["function", "ptrtag"],
["function", "put"],
["function", "put_byte"],
["function", "put_double"],
["function", "put_float"],
["function", "put_int"],
["function", "put_int64"],
["function", "put_long"],
["function", "put_pointer"],
["function", "put_short"],
["function", "put_string"],
["function", "rational"],
["function", "rationalp"],
["function", "re"],
["function", "real"],
["function", "realp"],
["function", "realloc"],
["function", "record"],
["function", "recordp"],
["function", "redim"],
["function", "reduce"],
["function", "reduce_with"],
["function", "ref"],
["function", "refp"],
["function", "repeat"],
["function", "repeatn"],
["function", "reverse"],
["function", "rlist"],
["function", "rlistp"],
["function", "round"],
["function", "row"],
["function", "rows"],
["function", "rowcat"],
["function", "rowcatmap"],
["function", "rowmap"],
["function", "rowrev"],
["function", "rowvector"],
["function", "rowvectorp"],
["function", "rowvectorseq"],
["function", "same"],
["function", "scanl"],
["function", "scanl1"],
["function", "scanr"],
["function", "scanr1"],
["function", "sentry"],
["function", "sgn"],
["function", "short_matrix"],
["function", "short_pointer"],
["function", "slice"],
["function", "smatrix"],
["function", "smatrixp"],
["function", "sort"],
["function", "split"],
["function", "str"],
["function", "strcat"],
["function", "stream"],
["function", "stride"],
["function", "string"],
["function", "string_dup"],
["function", "string_list"],
["function", "string_vector"],
["function", "stringp"],
["function", "subdiag"],
["function", "subdiagmat"],
["function", "submat"],
["function", "subseq"],
["function", "subseq2"],
["function", "substr"],
["function", "succ"],
["function", "supdiag"],
["function", "supdiagmat"],
["function", "symbol"],
["function", "symbolp"],
["function", "tail"],
["function", "take"],
["function", "takewhile"],
["function", "thunk"],
["function", "thunkp"],
["function", "transpose"],
["function", "trunc"],
["function", "tuple"],
["function", "tuplep"],
["function", "typep"],
["function", "ubyte"],
["function", "uint"],
["function", "uint64"],
["function", "ulong"],
["function", "uncurry"],
["function", "uncurry3"],
["function", "unref"],
["function", "unzip"],
["function", "unzip3"],
["function", "update"],
["function", "ushort"],
["function", "val"],
["function", "vals"],
["function", "var"],
["function", "varp"],
["function", "vector"],
["function", "vectorp"],
["function", "vectorseq"],
["function", "void"],
["function", "zip"],
["function", "zip3"],
["function", "zipwith"],
["function", "zipwith3"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/pure/keyword_feature.test
================================================
ans
break
bt
case
catch
cd
clear
const
def
del
dump
else
end
exit
extern
false
force
help
if
infix
infixl
infixr
interface
let
ls
mem
namespace
nonfix
NULL
of
otherwise
outfix
override
postfix
prefix
private
public
pwd
quit
run
save
show
stats
then
throw
trace
true
type
underride
using
when
with
----------------------------------------------------
[
["keyword", "ans"],
["keyword", "break"],
["keyword", "bt"],
["keyword", "case"],
["keyword", "catch"],
["keyword", "cd"],
["keyword", "clear"],
["keyword", "const"],
["keyword", "def"],
["keyword", "del"],
["keyword", "dump"],
["keyword", "else"],
["keyword", "end"],
["keyword", "exit"],
["keyword", "extern"],
["keyword", "false"],
["keyword", "force"],
["keyword", "help"],
["keyword", "if"],
["keyword", "infix"],
["keyword", "infixl"],
["keyword", "infixr"],
["keyword", "interface"],
["keyword", "let"],
["keyword", "ls"],
["keyword", "mem"],
["keyword", "namespace"],
["keyword", "nonfix"],
["keyword", "NULL"],
["keyword", "of"],
["keyword", "otherwise"],
["keyword", "outfix"],
["keyword", "override"],
["keyword", "postfix"],
["keyword", "prefix"],
["keyword", "private"],
["keyword", "public"],
["keyword", "pwd"],
["keyword", "quit"],
["keyword", "run"],
["keyword", "save"],
["keyword", "show"],
["keyword", "stats"],
["keyword", "then"],
["keyword", "throw"],
["keyword", "trace"],
["keyword", "true"],
["keyword", "type"],
["keyword", "underride"],
["keyword", "using"],
["keyword", "when"],
["keyword", "with"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/pure/number_feature.test
================================================
inf
nan
0xBadFace
0b01010
42
4711L
3.14159
3e8
4.2E-7
0.9e+12
----------------------------------------------------
[
["number", "inf"],
["number", "nan"],
["number", "0xBadFace"],
["number", "0b01010"],
["number", "42"],
["number", "4711L"],
["number", "3.14159"],
["number", "3e8"],
["number", "4.2E-7"],
["number", "0.9e+12"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/pure/operator_feature.test
================================================
and div mod not or
! " # $ % &
' * + - . /
: < = > ? @
\ ^ _ ` ~
¡ ¢ × ÷
<,|
----------------------------------------------------
[
["operator", "and"], ["operator", "div"], ["operator", "mod"], ["operator", "not"], ["operator", "or"],
["operator", "!"], ["operator", "\""], ["operator", "#"], ["operator", "$"], ["operator", "%"], ["operator", "&"],
["operator", "'"], ["operator", "*"], ["operator", "+"], ["operator", "-"], ["operator", "."], ["operator", "/"],
["operator", ":"], ["operator", "<"], ["operator", "="], ["operator", ">"], ["operator", "?"], ["operator", "@"],
["operator", "\\"], ["operator", "^"], ["operator", "_"], ["operator", "`"], ["operator", "~"],
["operator", "¡"], ["operator", "¢"], ["operator", "×"], ["operator", "÷"],
["operator", "<,|"]
]
----------------------------------------------------
Checks for some operators.
================================================
FILE: tests/languages/pure/punctuation_feature.test
================================================
( ) { } [ ] ;
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ";"]
]
================================================
FILE: tests/languages/pure/special_feature.test
================================================
__show__
__cmd__
__with__
----------------------------------------------------
[
["special", "__show__"],
["special", "__cmd__"],
["special", "__with__"]
]
----------------------------------------------------
Checks for special functions.
================================================
FILE: tests/languages/pure/string_feature.test
================================================
""
"fo\"obar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/purebasic/asm_feature.test
================================================
Procedure.i XorTwoBlocks2(*buffer1, *buffer2, length)
; move all the required data to source reg, destination reg and counter reg
!mov esi, [p.p_buffer1] ; read 32-bit integer from p.p_buffer1 and move to esi
!mov edi, [p.p_buffer2] ; read 32-bit integer from p.p_buffer2 and move to edi
!mov ecx, [p.v_length] ; read 32-bit integer from p.v_length and move to ecx
!@@: ; anonymous label, can be reached by @b (back) or @f (forward)
!mov al, byte [edi + ecx - 1] ; read byte from destination
!xor byte [esi + ecx - 1], al ; xor source with destination (i.e. xor bytes from both blocks)
!dec ecx ; decrease counter
!jne @b ; jumb back to first anonymous label behind
ProcedureReturn 0
EndProcedure
!jne label1
!jmp @b
!EXTERN printf
!DEFAULT rel
; source: http://www.jose.it-berater.org/smfforum/index.php?topic=5091.0
Procedure PopCount64(x.q)
!mov rax, [p.v_x]
!mov rdx, rax
!shr rdx, 1
!and rdx, [popcount64_v55]
!sub rax, rdx
;x = (x & $3333333333333333) + ((x >> 2) & $3333333333333333)
!mov rdx, rax ;x
!and rax, [popcount64_v33]
!shr rdx, 2
!and rdx, [popcount64_v33]
!add rax, rdx
;x = (x + (x >> 4)) & $0f0f0f0f0f0f0f0f0f0f
!mov rdx, rax
!shr rdx, 4
!add rax, rdx
!and rax, [popcount64_v0f]
;x * $0101010101010101 >> 56
!imul rax, [popcount64_v01]
!shr rax, 56
ProcedureReturn
!popcount64_v01: dq 0x0101010101010101
!popcount64_v0f: dq 0x0f0f0f0f0f0f0f0f
!popcount64_v33: dq 0x3333333333333333
!popcount64_v55: dq 0x5555555555555555
EndProcedure
----------------------------------------------------
[
["keyword", "Procedure"],
["punctuation", "."],
"i ",
["function", "XorTwoBlocks2"],
["punctuation", "("],
["operator", "*buffer1"],
["punctuation", ","],
["operator", "*buffer2"],
["punctuation", ","],
" length",
["punctuation", ")"],
["comment", "; move all the required data to source reg, destination reg and counter reg"],
["asm", [
["operator", "!"],
["function", "mov"],
["register", "esi"],
["operator", ","],
["operator", "["],
"p",
["operator", "."],
"p_buffer1",
["operator", "]"]
]],
["comment", "; read 32-bit integer from p.p_buffer1 and move to esi"],
["asm", [
["operator", "!"],
["function", "mov"],
["register", "edi"],
["operator", ","],
["operator", "["],
"p",
["operator", "."],
"p_buffer2",
["operator", "]"]
]],
["comment", "; read 32-bit integer from p.p_buffer2 and move to edi"],
["asm", [
["operator", "!"],
["function", "mov"],
["register", "ecx"],
["operator", ","],
["operator", "["],
"p",
["operator", "."],
"v_length",
["operator", "]"]
]],
["comment", "; read 32-bit integer from p.v_length and move to ecx"],
["asm", [
["operator", "!"],
["label", "@@"],
["operator", ":"]
]],
["comment", "; anonymous label, can be reached by @b (back) or @f (forward)"],
["asm", [
["operator", "!"],
["function", "mov"],
["register", "al"],
["operator", ","],
" byte ",
["operator", "["],
["register", "edi"],
["operator", "+"],
["register", "ecx"],
["operator", "-"],
["number", "1"],
["operator", "]"]
]],
["comment", "; read byte from destination"],
["asm", [
["operator", "!"],
["function", "xor"],
" byte ",
["operator", "["],
["register", "esi"],
["operator", "+"],
["register", "ecx"],
["operator", "-"],
["number", "1"],
["operator", "]"],
["operator", ","],
["register", "al"]
]],
["comment", "; xor source with destination (i.e. xor bytes from both blocks)"],
["asm", [
["operator", "!"],
["function", "dec"],
["register", "ecx"]
]],
["comment", "; decrease counter"],
["asm", [
["operator", "!"],
["function", "jne"],
["label-reference-anonymous", "@b"]
]],
["comment", "; jumb back to first anonymous label behind"],
["keyword", "ProcedureReturn"],
["number", "0"],
["keyword", "EndProcedure"],
["asm", [
["operator", "!"],
["function", "jne"],
["label-reference-addressed", "label1"]
]],
["asm", [
["operator", "!"],
["function", "jmp"],
["label-reference-anonymous", "@b"]
]],
["asm", [
["operator", "!"],
["keyword", "EXTERN printf"]
]],
["asm", [
["operator", "!"],
["keyword", "DEFAULT rel"]
]],
["comment", "; source: http://www.jose.it-berater.org/smfforum/index.php?topic=5091.0"],
["keyword", "Procedure"],
["function", "PopCount64"],
["punctuation", "("],
"x",
["punctuation", "."],
"q",
["punctuation", ")"],
["asm", [
["operator", "!"],
["function", "mov"],
["register", "rax"],
["operator", ","],
["operator", "["],
"p",
["operator", "."],
"v_x",
["operator", "]"]
]],
["asm", [
["operator", "!"],
["function", "mov"],
["register", "rdx"],
["operator", ","],
["register", "rax"]
]],
["asm", [
["operator", "!"],
["function", "shr"],
["register", "rdx"],
["operator", ","],
["number", "1"]
]],
["asm", [
["operator", "!"],
["function", "and"],
["register", "rdx"],
["operator", ","],
["operator", "["],
"popcount64_v55",
["operator", "]"]
]],
["asm", [
["operator", "!"],
["function", "sub"],
["register", "rax"],
["operator", ","],
["register", "rdx"]
]],
["comment", ";x = (x & $3333333333333333) + ((x >> 2) & $3333333333333333)"],
["asm", [
["operator", "!"],
["function", "mov"],
["register", "rdx"],
["operator", ","],
["register", "rax"]
]],
["comment", ";x"],
["asm", [
["operator", "!"],
["function", "and"],
["register", "rax"],
["operator", ","],
["operator", "["],
"popcount64_v33",
["operator", "]"]
]],
["asm", [
["operator", "!"],
["function", "shr"],
["register", "rdx"],
["operator", ","],
["number", "2"]
]],
["asm", [
["operator", "!"],
["function", "and"],
["register", "rdx"],
["operator", ","],
["operator", "["],
"popcount64_v33",
["operator", "]"]
]],
["asm", [
["operator", "!"],
["function", "add"],
["register", "rax"],
["operator", ","],
["register", "rdx"]
]],
["comment", ";x = (x + (x >> 4)) & $0f0f0f0f0f0f0f0f0f0f"],
["asm", [
["operator", "!"],
["function", "mov"],
["register", "rdx"],
["operator", ","],
["register", "rax"]
]],
["asm", [
["operator", "!"],
["function", "shr"],
["register", "rdx"],
["operator", ","],
["number", "4"]
]],
["asm", [
["operator", "!"],
["function", "add"],
["register", "rax"],
["operator", ","],
["register", "rdx"]
]],
["asm", [
["operator", "!"],
["function", "and"],
["register", "rax"],
["operator", ","],
["operator", "["],
"popcount64_v0f",
["operator", "]"]
]],
["comment", ";x * $0101010101010101 >> 56"],
["asm", [
["operator", "!"],
["function", "imul"],
["register", "rax"],
["operator", ","],
["operator", "["],
"popcount64_v01",
["operator", "]"]
]],
["asm", [
["operator", "!"],
["function", "shr"],
["register", "rax"],
["operator", ","],
["number", "56"]
]],
["keyword", "ProcedureReturn"],
["asm", [
["operator", "!"],
["label", "popcount64_v01"],
["operator", ":"],
["function-inline", "dq"],
["number", "0x0101010101010101"]
]],
["asm", [
["operator", "!"],
["label", "popcount64_v0f"],
["operator", ":"],
["function-inline", "dq"],
["number", "0x0f0f0f0f0f0f0f0f"]
]],
["asm", [
["operator", "!"],
["label", "popcount64_v33"],
["operator", ":"],
["function-inline", "dq"],
["number", "0x3333333333333333"]
]],
["asm", [
["operator", "!"],
["label", "popcount64_v55"],
["operator", ":"],
["function-inline", "dq"],
["number", "0x5555555555555555"]
]],
["keyword", "EndProcedure"]
]
================================================
FILE: tests/languages/purebasic/comment_feature.test
================================================
;
; comment
a$ = 2 ;Test
----------------------------------------------------
[
["comment", ";"],
["comment", "; comment"],
"\r\n\r\na$ ",
["operator", "="],
["number", "2"],
["comment", ";Test"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/purebasic/function_feature.test
================================================
foo()
----------------------------------------------------
[
["function", "foo"],
["punctuation", "("],
["punctuation", ")"]
]
================================================
FILE: tests/languages/purebasic/keyword_feature.test
================================================
DECLARECDLL
DECLAREDLL
COMPILERSELECT
COMPILERCASE
COMPILERDEFAULT
COMPILERENDSELECT
COMPILERERROR
ENABLEEXPLICIT
DISABLEEXPLICIT
NOT
AND
OR
XOR
CALLDEBUGGER
DEBUGLEVEL
ENABLEDEBUGGER
DISABLEDEBUGGER
RESTORE
READ
INCLUDEPATH
INCLUDEBINARY
THREADED
RUNTIME
WITH
ENDWITH
STRUCTUREUNION
ENDSTRUCTUREUNION
ALIGN
NEWLIST
NEWMAP
INTERFACE
ENDINTERFACE
EXTENDS
ENUMERATION
ENDENUMERATION
SWAP
FOREACH
CONTINUE
FAKERETURN
GOTO
GOSUB
RETURN
BREAK
MODULE
ENDMODULE
DECLAREMODULE
ENDDECLAREMODULE
DECLARE
DECLAREC
PROTOTYPE
PROTOTYPEC
ENABLEASM
DISABLEASM
DIM
REDIM
DATA
DATASECTION
ENDDATASECTION
TO
PROCEDURERETURN
DEBUG
DEFAULT
CASE
SELECT
ENDSELECT
AS
IMPORT
ENDIMPORT
IMPORTC
COMPILERIF
COMPILERELSE
COMPILERENDIF
COMPILERELSEIF
END
STRUCTURE
ENDSTRUCTURE
WHILE
WEND
FOR
NEXT
STEP
IF
ELSE
ELSEIF
ENDIF
REPEAT
UNTIL
PROCEDURE
PROCEDUREDLL
PROCEDUREC
PROCEDURECDLL
ENDPROCEDURE
PROTECTED
SHARED
STATIC
GLOBAL
DEFINE
INCLUDEFILE
XINCLUDEFILE
MACRO
ENDMACRO
FOREVER
----------------------------------------------------
[
["keyword", "DECLARECDLL"],
["keyword", "DECLAREDLL"],
["keyword", "COMPILERSELECT"],
["keyword", "COMPILERCASE"],
["keyword", "COMPILERDEFAULT"],
["keyword", "COMPILERENDSELECT"],
["keyword", "COMPILERERROR"],
["keyword", "ENABLEEXPLICIT"],
["keyword", "DISABLEEXPLICIT"],
["keyword", "NOT"],
["keyword", "AND"],
["keyword", "OR"],
["keyword", "XOR"],
["keyword", "CALLDEBUGGER"],
["keyword", "DEBUGLEVEL"],
["keyword", "ENABLEDEBUGGER"],
["keyword", "DISABLEDEBUGGER"],
["keyword", "RESTORE"],
["keyword", "READ"],
["keyword", "INCLUDEPATH"],
["keyword", "INCLUDEBINARY"],
["keyword", "THREADED"],
["keyword", "RUNTIME"],
["keyword", "WITH"],
["keyword", "ENDWITH"],
["keyword", "STRUCTUREUNION"],
["keyword", "ENDSTRUCTUREUNION"],
["keyword", "ALIGN"],
["keyword", "NEWLIST"],
["keyword", "NEWMAP"],
["keyword", "INTERFACE"],
["keyword", "ENDINTERFACE"],
["keyword", "EXTENDS"],
["keyword", "ENUMERATION"],
["keyword", "ENDENUMERATION"],
["keyword", "SWAP"],
["keyword", "FOREACH"],
["keyword", "CONTINUE"],
["keyword", "FAKERETURN"],
["keyword", "GOTO"],
["keyword", "GOSUB"],
["keyword", "RETURN"],
["keyword", "BREAK"],
["keyword", "MODULE"],
["keyword", "ENDMODULE"],
["keyword", "DECLAREMODULE"],
["keyword", "ENDDECLAREMODULE"],
["keyword", "DECLARE"],
["keyword", "DECLAREC"],
["keyword", "PROTOTYPE"],
["keyword", "PROTOTYPEC"],
["keyword", "ENABLEASM"],
["keyword", "DISABLEASM"],
["keyword", "DIM"],
["keyword", "REDIM"],
["keyword", "DATA"],
["keyword", "DATASECTION"],
["keyword", "ENDDATASECTION"],
["keyword", "TO"],
["keyword", "PROCEDURERETURN"],
["keyword", "DEBUG"],
["keyword", "DEFAULT"],
["keyword", "CASE"],
["keyword", "SELECT"],
["keyword", "ENDSELECT"],
["keyword", "AS"],
["keyword", "IMPORT"],
["keyword", "ENDIMPORT"],
["keyword", "IMPORTC"],
["keyword", "COMPILERIF"],
["keyword", "COMPILERELSE"],
["keyword", "COMPILERENDIF"],
["keyword", "COMPILERELSEIF"],
["keyword", "END"],
["keyword", "STRUCTURE"],
["keyword", "ENDSTRUCTURE"],
["keyword", "WHILE"],
["keyword", "WEND"],
["keyword", "FOR"],
["keyword", "NEXT"],
["keyword", "STEP"],
["keyword", "IF"],
["keyword", "ELSE"],
["keyword", "ELSEIF"],
["keyword", "ENDIF"],
["keyword", "REPEAT"],
["keyword", "UNTIL"],
["keyword", "PROCEDURE"],
["keyword", "PROCEDUREDLL"],
["keyword", "PROCEDUREC"],
["keyword", "PROCEDURECDLL"],
["keyword", "ENDPROCEDURE"],
["keyword", "PROTECTED"],
["keyword", "SHARED"],
["keyword", "STATIC"],
["keyword", "GLOBAL"],
["keyword", "DEFINE"],
["keyword", "INCLUDEFILE"],
["keyword", "XINCLUDEFILE"],
["keyword", "MACRO"],
["keyword", "ENDMACRO"],
["keyword", "FOREVER"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/purebasic/number_feature.test
================================================
42
3.14159
2e8
3.4E-9
0.7E+12
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "2e8"],
["number", "3.4E-9"],
["number", "0.7E+12"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/purebasic/operator_feature.test
================================================
< <=
> >=
+ - *
@ab$
----------------------------------------------------
[
["operator", "<"], ["operator", "<="],
["operator", ">"], ["operator", ">="],
["operator", "+"], ["operator", "-"], ["operator", "*"],
["operator", "@ab$"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/purebasic/string_feature.test
================================================
""
"foobar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foobar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/purebasic/tag_feature.test
================================================
#foo
#NULL$
----------------------------------------------------
[
["tag", "#foo"],
["tag", "#NULL$"]
]
================================================
FILE: tests/languages/purescript/builtin_feature.test
================================================
when
unless
liftA1
apply
bind
discard
join
ifM
identity
whenM
unlessM
liftM1
ap
compose
otherwise
top
bottom
recip
eq
notEq
degree
div
mod
lcm
gcd
flip
const
map
void
flap
conj
disj
not
mempty
compare
min
max
comparing
clamp
between
sub
negate
append
add
zero
mul
one
show
unit
absurd
----------------------------------------------------
[
["builtin", "when"],
["builtin", "unless"],
["builtin", "liftA1"],
["builtin", "apply"],
["builtin", "bind"],
["builtin", "discard"],
["builtin", "join"],
["builtin", "ifM"],
["builtin", "identity"],
["builtin", "whenM"],
["builtin", "unlessM"],
["builtin", "liftM1"],
["builtin", "ap"],
["builtin", "compose"],
["builtin", "otherwise"],
["builtin", "top"],
["builtin", "bottom"],
["builtin", "recip"],
["builtin", "eq"],
["builtin", "notEq"],
["builtin", "degree"],
["builtin", "div"],
["builtin", "mod"],
["builtin", "lcm"],
["builtin", "gcd"],
["builtin", "flip"],
["builtin", "const"],
["builtin", "map"],
["builtin", "void"],
["builtin", "flap"],
["builtin", "conj"],
["builtin", "disj"],
["builtin", "not"],
["builtin", "mempty"],
["builtin", "compare"],
["builtin", "min"],
["builtin", "max"],
["builtin", "comparing"],
["builtin", "clamp"],
["builtin", "between"],
["builtin", "sub"],
["builtin", "negate"],
["builtin", "append"],
["builtin", "add"],
["builtin", "zero"],
["builtin", "mul"],
["builtin", "one"],
["builtin", "show"],
["builtin", "unit"],
["builtin", "absurd"]
]
----------------------------------------------------
Checks for all builtin.
================================================
FILE: tests/languages/purescript/char_feature.test
================================================
'a'
'\n'
'\23'
'\xFE'
----------------------------------------------------
[
["char", "'a'"],
["char", "'\\n'"],
["char", "'\\23'"],
["char", "'\\xFE'"]
]
----------------------------------------------------
Checks for chars.
================================================
FILE: tests/languages/purescript/comment_feature.test
================================================
-- foo
{- foo
bar -}
----------------------------------------------------
[
["comment", "-- foo"],
["comment", "{- foo\r\nbar -}"]
]
----------------------------------------------------
Checks for single-line and multi-line comments.
================================================
FILE: tests/languages/purescript/constant_feature.test
================================================
Foo
Foo.Bar
Baz.Foobar_42
----------------------------------------------------
[
["constant", ["Foo"]],
["constant", [
"Foo",
["punctuation", "."],
"Bar"
]],
["constant", [
"Baz",
["punctuation", "."],
"Foobar_42"
]]
]
----------------------------------------------------
Checks for constants.
================================================
FILE: tests/languages/purescript/hvariable_feature.test
================================================
foo
Foo.bar
Baz.foobar_42
----------------------------------------------------
[
["hvariable", ["foo"]],
["hvariable", [
"Foo",
["punctuation", "."],
"bar"
]],
["hvariable", [
"Baz",
["punctuation", "."],
"foobar_42"
]]
]
----------------------------------------------------
Checks for hvariables.
================================================
FILE: tests/languages/purescript/import_statement_feature.test
================================================
import Foo
import Foo_42.Bar as Foobar
import Foo.Bar as Foo.Baz hiding
import Foo.Bar (test)
----------------------------------------------------
[
["import-statement", [
["keyword", "import"],
" Foo"
]],
["import-statement", [
["keyword", "import"],
" Foo_42",
["punctuation", "."],
"Bar ",
["keyword", "as"],
" Foobar"
]],
["import-statement", [
["keyword", "import"],
" Foo",
["punctuation", "."],
"Bar ",
["keyword", "as"],
" Foo",
["punctuation", "."],
"Baz ",
["keyword", "hiding"]
]],
["import-statement", [
["keyword", "import"],
" Foo",
["punctuation", "."],
"Bar"
]],
["punctuation", "("],
["hvariable", ["test"]],
["punctuation", ")"]
]
----------------------------------------------------
Checks for import statement.
================================================
FILE: tests/languages/purescript/issue3006.test
================================================
readBooleanOrIntAsBoolean ∷ Foreign → Foreign.F Boolean
readBooleanOrIntAsBoolean value =
Foreign.readBoolean value
<|> (toBool =<< Foreign.readInt value)
where
toBool ∷ Int → Foreign.F Boolean
toBool = case _ of
0 → pure false
1 → pure true
int → Foreign.fail (Foreign.ForeignError ("Invalid integer: " <> show int))
isSuccessResponse ∷ ∀ a. AX.Response a → Boolean
isSuccessResponse { status } = status >= (StatusCode 200) && status < (StatusCode 400)
infix 4 eq as ≡
isMempty ∷ ∀ m. Monoid m → Boolean
isMempty = _ ≡ mempty
----------------------------------------------------
[
["hvariable", ["readBooleanOrIntAsBoolean"]],
["operator", "∷"],
["constant", ["Foreign"]],
["operator", "→"],
["constant", [
"Foreign",
["punctuation", "."],
"F"
]],
["constant", ["Boolean"]],
["hvariable", ["readBooleanOrIntAsBoolean"]],
["hvariable", ["value"]],
["operator", "="],
["hvariable", [
"Foreign",
["punctuation", "."],
"readBoolean"
]],
["hvariable", ["value"]],
["operator", "<|>"],
["punctuation", "("],
["hvariable", ["toBool"]],
["operator", "=<<"],
["hvariable", [
"Foreign",
["punctuation", "."],
"readInt"
]],
["hvariable", ["value"]],
["punctuation", ")"],
["keyword", "where"],
["hvariable", ["toBool"]],
["operator", "∷"],
["constant", ["Int"]],
["operator", "→"],
["constant", [
"Foreign",
["punctuation", "."],
"F"
]],
["constant", ["Boolean"]],
["hvariable", ["toBool"]],
["operator", "="],
["keyword", "case"],
["hvariable", ["_"]],
["keyword", "of"],
["number", "0"],
["operator", "→"],
["hvariable", ["pure"]],
["hvariable", ["false"]],
["number", "1"],
["operator", "→"],
["hvariable", ["pure"]],
["hvariable", ["true"]],
["hvariable", ["int"]],
["operator", "→"],
["hvariable", [
"Foreign",
["punctuation", "."],
"fail"
]],
["punctuation", "("],
["constant", [
"Foreign",
["punctuation", "."],
"ForeignError"
]],
["punctuation", "("],
["string", "\"Invalid integer: \""],
["operator", "<>"],
["builtin", "show"],
["hvariable", ["int"]],
["punctuation", ")"],
["punctuation", ")"],
["hvariable", ["isSuccessResponse"]],
["operator", "∷"],
["keyword", "∀"],
["hvariable", ["a"]],
["punctuation", "."],
["constant", [
"AX",
["punctuation", "."],
"Response"
]],
["hvariable", ["a"]],
["operator", "→"],
["constant", ["Boolean"]],
["hvariable", ["isSuccessResponse"]],
["punctuation", "{"],
["hvariable", ["status"]],
["punctuation", "}"],
["operator", "="],
["hvariable", ["status"]],
["operator", ">="],
["punctuation", "("],
["constant", ["StatusCode"]],
["number", "200"],
["punctuation", ")"],
["operator", "&&"],
["hvariable", ["status"]],
["operator", "<"],
["punctuation", "("],
["constant", ["StatusCode"]],
["number", "400"],
["punctuation", ")"],
["hvariable", ["infix"]],
["number", "4"],
["builtin", "eq"],
["hvariable", ["as"]],
["operator", "≡"],
["hvariable", ["isMempty"]],
["operator", "∷"],
["keyword", "∀"],
["hvariable", ["m"]],
["punctuation", "."],
["constant", ["Monoid"]],
["hvariable", ["m"]],
["operator", "→"],
["constant", ["Boolean"]],
["hvariable", ["isMempty"]],
["operator", "="],
["hvariable", ["_"]],
["operator", "≡"],
["builtin", "mempty"]
]
================================================
FILE: tests/languages/purescript/keyword_feature.test
================================================
ado
case
class
data
derive
do
else
forall
if
in
infixl
infixr
instance
let
module
newtype
of
primitive
then
type
where
∀
----------------------------------------------------
[
["keyword", "ado"],
["keyword", "case"],
["keyword", "class"],
["keyword", "data"],
["keyword", "derive"],
["keyword", "do"],
["keyword", "else"],
["keyword", "forall"],
["keyword", "if"],
["keyword", "in"],
["keyword", "infixl"],
["keyword", "infixr"],
["keyword", "instance"],
["keyword", "let"],
["keyword", "module"],
["keyword", "newtype"],
["keyword", "of"],
["keyword", "primitive"],
["keyword", "then"],
["keyword", "type"],
["keyword", "where"],
["keyword", "∀"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/purescript/number_feature.test
================================================
42
3.14159
2E3
1.2e-4
0.9e+1
0o47
0xBadFace
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "2E3"],
["number", "1.2e-4"],
["number", "0.9e+1"],
["number", "0o47"],
["number", "0xBadFace"]
]
----------------------------------------------------
Checks for decimal, octal and hexadecimal numbers.
================================================
FILE: tests/languages/purescript/operator_feature.test
================================================
..
reverse <<< sort
`foo`
`Foo.bar`
+ - * /
^ ^^ **
&& ||
< <= == /=
>= > \ |
++ : !!
\\ <- ->
= :: =>
>> >>= >@>
~ ! @
∷
→ ←
⇒ ⇐
∘
∘ × ÷ ≡ ≠ ⫽ ⩓ ⩔ ∧ ∨ ↝ ⨁ ⊹
----------------------------------------------------
[
["operator", ".."],
["hvariable", ["reverse"]],
["operator", "<<<"],
["hvariable", ["sort"]],
["operator", "`foo`"],
["operator", "`Foo.bar`"],
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "^"],
["operator", "^^"],
["operator", "**"],
["operator", "&&"],
["operator", "||"],
["operator", "<"],
["operator", "<="],
["operator", "=="],
["operator", "/="],
["operator", ">="],
["operator", ">"],
["operator", "\\"],
["operator", "|"],
["operator", "++"],
["operator", ":"],
["operator", "!!"],
["operator", "\\\\"],
["operator", "<-"],
["operator", "->"],
["operator", "="],
["operator", "::"],
["operator", "=>"],
["operator", ">>"],
["operator", ">>="],
["operator", ">@>"],
["operator", "~"],
["operator", "!"],
["operator", "@"],
["operator", "∷"],
["operator", "→"], ["operator", "←"],
["operator", "⇒"], ["operator", "⇐"],
["operator", "∘"],
["operator", "∘"],
["operator", "×"],
["operator", "÷"],
["operator", "≡"],
["operator", "≠"],
["operator", "⫽"],
["operator", "⩓"],
["operator", "⩔"],
["operator", "∧"],
["operator", "∨"],
["operator", "↝"],
["operator", "⨁"],
["operator", "⊹"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/purescript/string_feature.test
================================================
""
"fo\"o"
"foo \
\ bar"
"foo -- comment lookalike \
\ bar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"o\""],
["string", "\"foo \\\r\n \\ bar\""],
["string", "\"foo -- comment lookalike \\\r\n \\ bar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/python/boolean_feature.test
================================================
True
False
None
----------------------------------------------------
[
["boolean", "True"],
["boolean", "False"],
["boolean", "None"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/python/builtin_feature.test
================================================
abs all any apply
ascii basestring bin bool
buffer bytearray bytes callable
chr classmethod cmp coerce
compile complex delattr
dict dir divmod enumerate
eval execfile file
filter float format frozenset
getattr globals hasattr hash
help hex id input
int intern isinstance issubclass
iter len list locals
long map max memoryview
min next object oct
open ord pow property
range raw_input reduce reload
repr reversed round set
setattr slice sorted staticmethod
str sum super tuple
type unichr unicode vars
xrange()
zip(
__import__
----------------------------------------------------
[
["builtin", "abs"], ["builtin", "all"], ["builtin", "any"], ["builtin", "apply"],
["builtin", "ascii"], ["builtin", "basestring"], ["builtin", "bin"], ["builtin", "bool"],
["builtin", "buffer"], ["builtin", "bytearray"], ["builtin", "bytes"], ["builtin", "callable"],
["builtin", "chr"], ["builtin", "classmethod"], ["builtin", "cmp"], ["builtin", "coerce"],
["builtin", "compile"], ["builtin", "complex"], ["builtin", "delattr"],
["builtin", "dict"], ["builtin", "dir"], ["builtin", "divmod"], ["builtin", "enumerate"],
["builtin", "eval"], ["builtin", "execfile"], ["builtin", "file"],
["builtin", "filter"], ["builtin", "float"], ["builtin", "format"], ["builtin", "frozenset"],
["builtin", "getattr"], ["builtin", "globals"], ["builtin", "hasattr"], ["builtin", "hash"],
["builtin", "help"], ["builtin", "hex"], ["builtin", "id"], ["builtin", "input"],
["builtin", "int"], ["builtin", "intern"], ["builtin", "isinstance"], ["builtin", "issubclass"],
["builtin", "iter"], ["builtin", "len"], ["builtin", "list"], ["builtin", "locals"],
["builtin", "long"], ["builtin", "map"], ["builtin", "max"], ["builtin", "memoryview"],
["builtin", "min"], ["builtin", "next"], ["builtin", "object"], ["builtin", "oct"],
["builtin", "open"], ["builtin", "ord"], ["builtin", "pow"], ["builtin", "property"],
["builtin", "range"], ["builtin", "raw_input"], ["builtin", "reduce"], ["builtin", "reload"],
["builtin", "repr"], ["builtin", "reversed"], ["builtin", "round"], ["builtin", "set"],
["builtin", "setattr"], ["builtin", "slice"], ["builtin", "sorted"], ["builtin", "staticmethod"],
["builtin", "str"], ["builtin", "sum"], ["builtin", "super"], ["builtin", "tuple"],
["builtin", "type"], ["builtin", "unichr"], ["builtin", "unicode"], ["builtin", "vars"],
["builtin", "xrange"], ["punctuation", "("], ["punctuation", ")"],
["builtin", "zip"], ["punctuation", "("],
["builtin", "__import__"]
]
----------------------------------------------------
Checks for all builtins.
================================================
FILE: tests/languages/python/class-name_feature.test
================================================
class Foo
class foobar_42
class _
----------------------------------------------------
[
["keyword", "class"], ["class-name", "Foo"],
["keyword", "class"], ["class-name", "foobar_42"],
["keyword", "class"], ["class-name", "_"]
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/python/comment_feature.test
================================================
#
# foobar
----------------------------------------------------
[
["comment", "#"],
["comment", "# foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/python/decorator_feature.test
================================================
@some.decorator(foobar)
def foo(bar):
pass
@decorator
def foo(bar):
pass
@decorator
def foo(bar):
pass
----------------------------------------------------
[
["decorator", [
"@some",
["punctuation", "."],
"decorator"
]],
["punctuation", "("],
"foobar",
["punctuation", ")"],
["keyword", "def"],
["function", "foo"],
["punctuation", "("],
"bar",
["punctuation", ")"],
["punctuation", ":"],
["keyword", "pass"],
["decorator", [
"@decorator"
]],
["keyword", "def"],
["function", "foo"],
["punctuation", "("],
"bar",
["punctuation", ")"],
["punctuation", ":"],
["keyword", "pass"],
["decorator", [
"@decorator"
]],
["keyword", "def"],
["function", "foo"],
["punctuation", "("],
"bar",
["punctuation", ")"],
["punctuation", ":"],
["keyword", "pass"]
]
----------------------------------------------------
Checks for decorators.
================================================
FILE: tests/languages/python/function_feature.test
================================================
def Foo(
def foo_bar_42(
def _(
def foo_ ()
----------------------------------------------------
[
["keyword", "def"], ["function", "Foo"], ["punctuation", "("],
["keyword", "def"], ["function", "foo_bar_42"], ["punctuation", "("],
["keyword", "def"], ["function", "_"], ["punctuation", "("],
["keyword", "def"], ["function", "foo_"], ["punctuation", "("], ["punctuation", ")"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/python/issue1355.test
================================================
print('""#')
print('"trigger="#T'+str(3))
----------------------------------------------------
[
["keyword", "print"],
["punctuation", "("],
["string", "'\"\"#'"],
["punctuation", ")"],
["keyword", "print"],
["punctuation", "("],
["string", "'\"trigger=\"#T'"],
["operator", "+"],
["builtin", "str"],
["punctuation", "("],
["number", "3"],
["punctuation", ")"],
["punctuation", ")"]
]
----------------------------------------------------
Checks for comment-like substrings. See #1355
================================================
FILE: tests/languages/python/keyword_feature.test
================================================
as assert async await
break class;
continue def;
del elif else
except exec finally
for from global if
import in is lambda
pass print raise return
try while with yield
nonlocal
and not or
match case _:
----------------------------------------------------
[
["keyword", "as"], ["keyword", "assert"], ["keyword", "async"], ["keyword", "await"],
["keyword", "break"], ["keyword", "class"], ["punctuation", ";"],
["keyword", "continue"], ["keyword", "def"], ["punctuation", ";"],
["keyword", "del"], ["keyword", "elif"], ["keyword", "else"],
["keyword", "except"], ["keyword", "exec"], ["keyword", "finally"],
["keyword", "for"], ["keyword", "from"], ["keyword", "global"], ["keyword", "if"],
["keyword", "import"], ["keyword", "in"], ["keyword", "is"], ["keyword", "lambda"],
["keyword", "pass"], ["keyword", "print"], ["keyword", "raise"], ["keyword", "return"],
["keyword", "try"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"],
["keyword", "nonlocal"],
["keyword", "and"], ["keyword", "not"], ["keyword", "or"],
["keyword", "match"], ["keyword", "case"], ["keyword", "_"], ["punctuation", ":"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/python/number_feature.test
================================================
0b0001
0o754
0xBadFace
42
3.14159
10.
2.1E10
0.3e-7
4.8e+1
42j
0b_0001
0b0_001
0o_754
0o7_540
0x_BadFace
0xBad_Face
4_200
4_200j
----------------------------------------------------
[
["number", "0b0001"],
["number", "0o754"],
["number", "0xBadFace"],
["number", "42"],
["number", "3.14159"],
["number", "10."],
["number", "2.1E10"],
["number", "0.3e-7"],
["number", "4.8e+1"],
["number", "42j"],
["number", "0b_0001"],
["number", "0b0_001"],
["number", "0o_754"],
["number", "0o7_540"],
["number", "0x_BadFace"],
["number", "0xBad_Face"],
["number", "4_200"],
["number", "4_200j"]
]
----------------------------------------------------
Checks for hexadecimal, octal, binary and decimal numbers.
================================================
FILE: tests/languages/python/operator_feature.test
================================================
+ +=
- -=
* ** *= **=
/ /= // //=
% %=
< <= <> <<
> >= >>
= ==
!=
:=
& | ^ ~
----------------------------------------------------
[
["operator", "+"], ["operator", "+="],
["operator", "-"], ["operator", "-="],
["operator", "*"], ["operator", "**"], ["operator", "*="], ["operator", "**="],
["operator", "/"], ["operator", "/="], ["operator", "//"], ["operator", "//="],
["operator", "%"], ["operator", "%="],
["operator", "<"], ["operator", "<="], ["operator", "<>"], ["operator", "<<"],
["operator", ">"], ["operator", ">="], ["operator", ">>"],
["operator", "="], ["operator", "=="],
["operator", "!="],
["operator", ":="],
["operator", "&"], ["operator", "|"], ["operator", "^"], ["operator", "~"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/python/string-interpolation_feature.test
================================================
f'The value is {value}.'
f"The value is {'4'}."
f'input={value!s:#06x}'
f'{{{4*10}}}'
fr'x={4*10}\n'
f'''{x
+1}'''
f'mapping is { {a:b for (a, b) in ((1, 2), (3, 4))} }'
f'{(lambda x: x*2)(3)}'
----------------------------------------------------
[
["string-interpolation", [
["string", "f'The value is "],
["interpolation", [
["punctuation", "{"],
"value",
["punctuation", "}"]
]],
["string", ".'"]
]],
["string-interpolation", [
["string", "f\"The value is "],
["interpolation", [
["punctuation", "{"],
["string", "'4'"],
["punctuation", "}"]
]],
["string", ".\""]
]],
["string-interpolation", [
["string", "f'input="],
["interpolation", [
["punctuation", "{"],
"value",
["conversion-option", "!s"],
["punctuation", ":"],
["format-spec", "#06x"],
["punctuation", "}"]
]],
["string", "'"]
]],
["string-interpolation", [
["string", "f'{{"],
["interpolation", [
["punctuation", "{"],
["number", "4"],
["operator", "*"],
["number", "10"],
["punctuation", "}"]
]],
["string", "}}'"]
]],
["string-interpolation", [
["string", "fr'x="],
["interpolation", [
["punctuation", "{"],
["number", "4"],
["operator", "*"],
["number", "10"],
["punctuation", "}"]
]],
["string", "\\n'"]
]],
["string-interpolation", [
["string", "f'''"],
["interpolation", [
["punctuation", "{"],
"x\r\n",
["operator", "+"],
["number", "1"],
["punctuation", "}"]
]],
["string", "'''"]
]],
["string-interpolation", [
["string", "f'mapping is "],
["interpolation", [
["punctuation", "{"],
["punctuation", "{"],
"a",
["punctuation", ":"],
"b ",
["keyword", "for"],
["punctuation", "("],
"a",
["punctuation", ","],
" b",
["punctuation", ")"],
["keyword", "in"],
["punctuation", "("],
["punctuation", "("],
["number", "1"],
["punctuation", ","],
["number", "2"],
["punctuation", ")"],
["punctuation", ","],
["punctuation", "("],
["number", "3"],
["punctuation", ","],
["number", "4"],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", "}"],
["punctuation", "}"]
]],
["string", "'"]
]],
["string-interpolation", [
["string", "f'"],
["interpolation", [
["punctuation", "{"],
["punctuation", "("],
["keyword", "lambda"],
" x",
["punctuation", ":"],
" x",
["operator", "*"],
["number", "2"],
["punctuation", ")"],
["punctuation", "("],
["number", "3"],
["punctuation", ")"],
["punctuation", "}"]
]],
["string", "'"]
]]
]
----------------------------------------------------
Checks for string interpolation.
================================================
FILE: tests/languages/python/string_feature.test
================================================
""
"fo\"obar"
''
'fo\'obar'
"fo\" # comment obar"
r"\n"
b'foo'
rb"foo\n"
u"foo"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "''"],
["string", "'fo\\'obar'"],
["string", "\"fo\\\" # comment obar\""],
["string", "r\"\\n\""],
["string", "b'foo'"],
["string", "rb\"foo\\n\""],
["string", "u\"foo\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/python/triple-quoted-string_feature.test
================================================
""""""
"""foobar"""
"""fo"o
#bar
baz"""
''''''
'''foobar'''
'''fo'o
#bar
baz'''
----------------------------------------------------
[
["triple-quoted-string", "\"\"\"\"\"\""],
["triple-quoted-string", "\"\"\"foobar\"\"\""],
["triple-quoted-string", "\"\"\"fo\"o\r\n#bar\r\nbaz\"\"\""],
["triple-quoted-string", "''''''"],
["triple-quoted-string", "'''foobar'''"],
["triple-quoted-string", "'''fo'o\r\n#bar\r\nbaz'''"]
]
----------------------------------------------------
Checks for triple-quoted strings.
================================================
FILE: tests/languages/q/adverb_feature.test
================================================
' ':
+/ +/:
\ \:
each
----------------------------------------------------
[
["adverb", "'"], ["adverb", "':"],
["verb", "+"], ["adverb", "/"], ["verb", "+"], ["adverb", "/:"],
["adverb", "\\"], ["adverb", "\\:"],
["adverb", "each"]
]
----------------------------------------------------
Checks for adverbs.
================================================
FILE: tests/languages/q/comment_feature.test
================================================
#!/usr/bin/env q
/ Foobar "baz"
/
Foo
bar "baz"
\
`john / an atom of type symbol
\
Foo
Bar "baz"
----------------------------------------------------
[
["comment", "#!/usr/bin/env q"],
["comment", "/ Foobar \"baz\""],
["comment", "/\r\nFoo\r\nbar \"baz\"\r\n\\"],
["symbol", "`john"], ["comment", "/ an atom of type symbol"],
["comment", "\\\r\nFoo\r\nBar \"baz\""]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/q/datetime_feature.test
================================================
0Nm 0Nd 0Nz 0Nu 0Nv 0Nt
0Wd 0Wt 0Wz
2015.09m
2015.09.08
2015.09.08d
2015.09.08z
2015.09.08T08:25:32
2015.09.08T08:25:32.000
08:25
08:25u
08:25v
08:25t
08:25:32
08:25:32:000
----------------------------------------------------
[
["datetime", "0Nm"], ["datetime", "0Nd"], ["datetime", "0Nz"], ["datetime", "0Nu"], ["datetime", "0Nv"], ["datetime", "0Nt"],
["datetime", "0Wd"], ["datetime", "0Wt"], ["datetime", "0Wz"],
["datetime", "2015.09m"],
["datetime", "2015.09.08"],
["datetime", "2015.09.08d"],
["datetime", "2015.09.08z"],
["datetime", "2015.09.08T08:25:32"],
["datetime", "2015.09.08T08:25:32.000"],
["datetime", "08:25"],
["datetime", "08:25u"],
["datetime", "08:25v"],
["datetime", "08:25t"],
["datetime", "08:25:32"],
["datetime", "08:25:32:000"]
]
----------------------------------------------------
Checks for dates, times and datetimes.
================================================
FILE: tests/languages/q/keyword_feature.test
================================================
\foo
\foo_bar_42
abs
acos
aj
aj0
all
and
any
asc
asin
asof
atan
attr
avg
avgs
bin
binr
by
ceiling
cols
cor
cos
count
cov
cross
csv
cut
delete
deltas
desc
dev
differ
distinct
div
do
dsave
ej
enlist
eval
except
exec
exit
exp
fby
fills
first
fkeys
flip
floor
from
get
getenv
group
gtime
hclose
hcount
hdel
hopen
hsym
iasc
identity
idesc
if
ij
in
insert
inter
inv
key
keys
last
like
list
lj
ljf
load
log
lower
lsq
ltime
ltrim
mavg
max
maxs
mcount
md5
mdev
med
meta
min
mins
mmax
mmin
mmu
mod
msum
neg
next
not
null
or
over
parse
peach
pj
plist
prd
prds
prev
prior
rand
rank
ratios
raze
read0
read1
reciprocal
reval
reverse
rload
rotate
rsave
rtrim
save
scan
scov
sdev
select
set
setenv
show
signum
sin
sqrt
ss
ssr
string
sublist
sum
sums
sv
svar
system
tables
tan
til
trim
txf
type
uj
ungroup
union
update
upper
upsert
value
var
view
views
vs
wavg
where
while
within
wj
wj1
wsum
ww
xasc
xbar
xcol
xcols
xdesc
xexp
xgroup
xkey
xlog
xprev
xrank
----------------------------------------------------
[
["keyword", "\\foo"],
["keyword", "\\foo_bar_42"],
["keyword", "abs"],
["keyword", "acos"],
["keyword", "aj"],
["keyword", "aj0"],
["keyword", "all"],
["keyword", "and"],
["keyword", "any"],
["keyword", "asc"],
["keyword", "asin"],
["keyword", "asof"],
["keyword", "atan"],
["keyword", "attr"],
["keyword", "avg"],
["keyword", "avgs"],
["keyword", "bin"],
["keyword", "binr"],
["keyword", "by"],
["keyword", "ceiling"],
["keyword", "cols"],
["keyword", "cor"],
["keyword", "cos"],
["keyword", "count"],
["keyword", "cov"],
["keyword", "cross"],
["keyword", "csv"],
["keyword", "cut"],
["keyword", "delete"],
["keyword", "deltas"],
["keyword", "desc"],
["keyword", "dev"],
["keyword", "differ"],
["keyword", "distinct"],
["keyword", "div"],
["keyword", "do"],
["keyword", "dsave"],
["keyword", "ej"],
["keyword", "enlist"],
["keyword", "eval"],
["keyword", "except"],
["keyword", "exec"],
["keyword", "exit"],
["keyword", "exp"],
["keyword", "fby"],
["keyword", "fills"],
["keyword", "first"],
["keyword", "fkeys"],
["keyword", "flip"],
["keyword", "floor"],
["keyword", "from"],
["keyword", "get"],
["keyword", "getenv"],
["keyword", "group"],
["keyword", "gtime"],
["keyword", "hclose"],
["keyword", "hcount"],
["keyword", "hdel"],
["keyword", "hopen"],
["keyword", "hsym"],
["keyword", "iasc"],
["keyword", "identity"],
["keyword", "idesc"],
["keyword", "if"],
["keyword", "ij"],
["keyword", "in"],
["keyword", "insert"],
["keyword", "inter"],
["keyword", "inv"],
["keyword", "key"],
["keyword", "keys"],
["keyword", "last"],
["keyword", "like"],
["keyword", "list"],
["keyword", "lj"],
["keyword", "ljf"],
["keyword", "load"],
["keyword", "log"],
["keyword", "lower"],
["keyword", "lsq"],
["keyword", "ltime"],
["keyword", "ltrim"],
["keyword", "mavg"],
["keyword", "max"],
["keyword", "maxs"],
["keyword", "mcount"],
["keyword", "md5"],
["keyword", "mdev"],
["keyword", "med"],
["keyword", "meta"],
["keyword", "min"],
["keyword", "mins"],
["keyword", "mmax"],
["keyword", "mmin"],
["keyword", "mmu"],
["keyword", "mod"],
["keyword", "msum"],
["keyword", "neg"],
["keyword", "next"],
["keyword", "not"],
["keyword", "null"],
["keyword", "or"],
["keyword", "over"],
["keyword", "parse"],
["keyword", "peach"],
["keyword", "pj"],
["keyword", "plist"],
["keyword", "prd"],
["keyword", "prds"],
["keyword", "prev"],
["keyword", "prior"],
["keyword", "rand"],
["keyword", "rank"],
["keyword", "ratios"],
["keyword", "raze"],
["keyword", "read0"],
["keyword", "read1"],
["keyword", "reciprocal"],
["keyword", "reval"],
["keyword", "reverse"],
["keyword", "rload"],
["keyword", "rotate"],
["keyword", "rsave"],
["keyword", "rtrim"],
["keyword", "save"],
["keyword", "scan"],
["keyword", "scov"],
["keyword", "sdev"],
["keyword", "select"],
["keyword", "set"],
["keyword", "setenv"],
["keyword", "show"],
["keyword", "signum"],
["keyword", "sin"],
["keyword", "sqrt"],
["keyword", "ss"],
["keyword", "ssr"],
["keyword", "string"],
["keyword", "sublist"],
["keyword", "sum"],
["keyword", "sums"],
["keyword", "sv"],
["keyword", "svar"],
["keyword", "system"],
["keyword", "tables"],
["keyword", "tan"],
["keyword", "til"],
["keyword", "trim"],
["keyword", "txf"],
["keyword", "type"],
["keyword", "uj"],
["keyword", "ungroup"],
["keyword", "union"],
["keyword", "update"],
["keyword", "upper"],
["keyword", "upsert"],
["keyword", "value"],
["keyword", "var"],
["keyword", "view"],
["keyword", "views"],
["keyword", "vs"],
["keyword", "wavg"],
["keyword", "where"],
["keyword", "while"],
["keyword", "within"],
["keyword", "wj"],
["keyword", "wj1"],
["keyword", "wsum"],
["keyword", "ww"],
["keyword", "xasc"],
["keyword", "xbar"],
["keyword", "xcol"],
["keyword", "xcols"],
["keyword", "xdesc"],
["keyword", "xexp"],
["keyword", "xgroup"],
["keyword", "xkey"],
["keyword", "xlog"],
["keyword", "xprev"],
["keyword", "xrank"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/q/number_feature.test
================================================
0w 0n
0W 0Wh 0Wj
0N 0Nh 0Nj 0Ne
0xBadFace
42
3.14159
3e8
0.4e-7
3.12e+42
42h 42j 42f
4.00e 1b
----------------------------------------------------
[
["number", "0w"], ["number", "0n"],
["number", "0W"], ["number", "0Wh"], ["number", "0Wj"],
["number", "0N"], ["number", "0Nh"], ["number", "0Nj"], ["number", "0Ne"],
["number", "0xBadFace"],
["number", "42"],
["number", "3.14159"],
["number", "3e8"],
["number", "0.4e-7"],
["number", "3.12e+42"],
["number", "42h"], ["number", "42j"], ["number", "42f"],
["number", "4.00e"], ["number", "1b"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/q/punctuation_feature.test
================================================
( ) { } [ ] ;
sp.s
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ";"],
"\r\n\r\nsp", ["punctuation", "."], "s"
]
================================================
FILE: tests/languages/q/string_feature.test
================================================
""
"Fo\"obar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"Fo\\\"obar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/q/symbol_feature.test
================================================
`
`foobar
`:www.example.com:8888
`.foo
----------------------------------------------------
[
["symbol", "`"],
["symbol", "`foobar"],
["symbol", "`:www.example.com:8888"],
["symbol", "`.foo"]
]
----------------------------------------------------
Checks for symbols.
================================================
FILE: tests/languages/q/verb_feature.test
================================================
. .:
0: 1:
< <: <> <>: <= <=:
> >: >= >=:
: ::
+ +: - -:
* *: % %:
, ,: ! !:
? ?: _ _:
~ ~: = =:
| |: $ $:
& &: # #:
@ @: ^ ^:
----------------------------------------------------
[
["verb", "."], ["verb", ".:"],
["verb", "0:"], ["verb", "1:"],
["verb", "<"], ["verb", "<:"], ["verb", "<>"], ["verb", "<>:"], ["verb", "<="], ["verb", "<=:"],
["verb", ">"], ["verb", ">:"], ["verb", ">="], ["verb", ">=:"],
["verb", ":"], ["verb", "::"],
["verb", "+"], ["verb", "+:"], ["verb", "-"], ["verb", "-:"],
["verb", "*"], ["verb", "*:"], ["verb", "%"], ["verb", "%:"],
["verb", ","], ["verb", ",:"], ["verb", "!"], ["verb", "!:"],
["verb", "?"], ["verb", "?:"], ["verb", "_"], ["verb", "_:"],
["verb", "~"], ["verb", "~:"], ["verb", "="], ["verb", "=:"],
["verb", "|"], ["verb", "|:"], ["verb", "$"], ["verb", "$:"],
["verb", "&"], ["verb", "&:"], ["verb", "#"], ["verb", "#:"],
["verb", "@"], ["verb", "@:"], ["verb", "^"], ["verb", "^:"]
]
----------------------------------------------------
Checks for verbs.
================================================
FILE: tests/languages/qml/class-name_feature.test
================================================
Foo {
bar: FooBar {}
Baz {}
RotationAnimation on rotation {
loops: Animation.Infinite
from: 0
to: 360
}
}
----------------------------------------------------
[
["class-name", "Foo"],
["punctuation", "{"],
["property", "bar"],
["punctuation", ":"],
["class-name", "FooBar"],
["punctuation", "{"],
["punctuation", "}"],
["class-name", "Baz"],
["punctuation", "{"],
["punctuation", "}"],
["class-name", "RotationAnimation"],
["keyword", "on"],
" rotation ",
["punctuation", "{"],
["property", "loops"],
["punctuation", ":"],
["javascript-expression", [
"Animation",
["punctuation", "."],
"Infinite"
]],
["property", "from"],
["punctuation", ":"],
["javascript-expression", [
["number", "0"]
]],
["property", "to"],
["punctuation", ":"],
["javascript-expression", [
["number", "360"]
]],
["punctuation", "}"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/qml/comment_feature.test
================================================
// foo
/*
bar
*/
----------------------------------------------------
[
["comment", "// foo"],
["comment", "/*\r\n bar\r\n */"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/qml/import_feature.test
================================================
import QtQuick 2.9
import QtQml.Models 2.2
import Person 1.0
import "componentCreation.js" as MyScript
----------------------------------------------------
[
["keyword", "import"],
" QtQuick 2.9\r\n",
["keyword", "import"],
" QtQml.Models 2.2\r\n",
["keyword", "import"],
" Person 1.0\r\n",
["keyword", "import"],
["string", "\"componentCreation.js\""],
["keyword", "as"],
" MyScript"
]
----------------------------------------------------
Checks for imports.
================================================
FILE: tests/languages/qml/javascript-function_feature.test
================================================
Foo {
function onClicked(mouse) { foo(mouse) }
function calculateMyHeight() {
return Math.max(otherItem.height, thirdItem.height);
var foo = "//";
let bar = (1 / 1);
if (true) {} else {}
}
}
----------------------------------------------------
[
["class-name", "Foo"],
["punctuation", "{"],
["javascript-function", [
["keyword", "function"],
["function", "onClicked"],
["punctuation", "("],
["parameter", [
"mouse"
]],
["punctuation", ")"],
["punctuation", "{"],
["function", "foo"],
["punctuation", "("],
"mouse",
["punctuation", ")"],
["punctuation", "}"]
]],
["javascript-function", [
["keyword", "function"],
["function", "calculateMyHeight"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
" Math",
["punctuation", "."],
["function", "max"],
["punctuation", "("],
"otherItem",
["punctuation", "."],
"height",
["punctuation", ","],
" thirdItem",
["punctuation", "."],
"height",
["punctuation", ")"],
["punctuation", ";"],
["keyword", "var"],
" foo ",
["operator", "="],
["string", "\"//\""],
["punctuation", ";"],
["keyword", "let"],
" bar ",
["operator", "="],
["punctuation", "("],
["number", "1"],
["operator", "/"],
["number", "1"],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "if"],
["punctuation", "("],
["boolean", "true"],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "else"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "}"]
]],
["punctuation", "}"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/qml/keyword_feature.test
================================================
as
import
on
----------------------------------------------------
[
["keyword", "as"],
["keyword", "import"],
["keyword", "on"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/qml/property_feature.test
================================================
Foo {
bar: 4
a: 0; b: 1; c: 2
Components.foo: 2
Bar { a: 0; b: Baz {}; c: 2 }
property Component mycomponent: comp1
property color color: "green"
// produces warning: "Unable to assign [undefined] to double value"
value: if (mouse.pressed) mouse.mouseX
}
BirthdayParty {
guests: [
Person { name: "Leo Hodges" },
Person { name: "Jack Smith" },
Person { name: "Anne Brown" }
]
}
----------------------------------------------------
[
["class-name", "Foo"],
["punctuation", "{"],
["property", "bar"],
["punctuation", ":"],
["javascript-expression", [
["number", "4"]
]],
["property", "a"],
["punctuation", ":"],
["javascript-expression", [
["number", "0"]
]],
["punctuation", ";"],
["property", "b"],
["punctuation", ":"],
["javascript-expression", [
["number", "1"]
]],
["punctuation", ";"],
["property", "c"],
["punctuation", ":"],
["javascript-expression", [
["number", "2"]
]],
["property", "Components.foo"],
["punctuation", ":"],
["javascript-expression", [
["number", "2"]
]],
["class-name", "Bar"],
["punctuation", "{"],
["property", "a"],
["punctuation", ":"],
["javascript-expression", [
["number", "0"]
]],
["punctuation", ";"],
["property", "b"],
["punctuation", ":"],
["class-name", "Baz"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ";"],
["property", "c"],
["punctuation", ":"],
["javascript-expression", [
["number", "2"]
]],
["punctuation", "}"],
["property", [
["keyword", "property"],
["property", "Component"],
["property", "mycomponent"]
]],
["punctuation", ":"],
["javascript-expression", [
"comp1"
]],
["property", [
["keyword", "property"],
["property", "color"],
["property", "color"]
]],
["punctuation", ":"],
["javascript-expression", [
["string", "\"green\""]
]],
["comment", "// produces warning: \"Unable to assign [undefined] to double value\""],
["property", "value"],
["punctuation", ":"],
["javascript-expression", [
["keyword", "if"],
["punctuation", "("],
"mouse",
["punctuation", "."],
"pressed",
["punctuation", ")"],
" mouse",
["punctuation", "."],
"mouseX"
]],
["punctuation", "}"],
["class-name", "BirthdayParty"],
["punctuation", "{"],
["property", "guests"],
["punctuation", ":"],
["punctuation", "["],
["class-name", "Person"],
["punctuation", "{"],
["property", "name"],
["punctuation", ":"],
["javascript-expression", [
["string", "\"Leo Hodges\""]
]],
["punctuation", "}"],
["punctuation", ","],
["class-name", "Person"],
["punctuation", "{"],
["property", "name"],
["punctuation", ":"],
["javascript-expression", [
["string", "\"Jack Smith\""]
]],
["punctuation", "}"],
["punctuation", ","],
["class-name", "Person"],
["punctuation", "{"],
["property", "name"],
["punctuation", ":"],
["javascript-expression", [
["string", "\"Anne Brown\""]
]],
["punctuation", "}"],
["punctuation", "]"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for properties.
================================================
FILE: tests/languages/qml/punctuation_feature.test
================================================
{} [] : ; ,
----------------------------------------------------
[
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ":"],
["punctuation", ";"],
["punctuation", ","]
]
----------------------------------------------------
Checks for punctuation.
================================================
FILE: tests/languages/qore/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/qore/comment_feature.test
================================================
/* foo */
/* foo
bar */
//
// foobar
#
# foobar
----------------------------------------------------
[
["comment", "/* foo */"],
["comment", "/* foo\r\nbar */"],
["comment", "//"],
["comment", "// foobar"],
["comment", "#"],
["comment", "# foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/qore/function_feature.test
================================================
foo()
foo_bar()
Foo_bar_42()
----------------------------------------------------
[
["function", "foo"], ["punctuation", "("], ["punctuation", ")"],
["function", "foo_bar"], ["punctuation", "("], ["punctuation", ")"],
["function", "Foo_bar_42"], ["punctuation", "("], ["punctuation", ")"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/qore/keyword_feature.test
================================================
abstract any assert binary
bool boolean break byte
case catch char
class;
code const continue data
default do double else
enum
extends;
final finally float for
goto hash if
implements;
import inherits
instanceof;
int
interface;
long my native
new;
nothing null object our
own private reference
rethrow return short
softint softfloat softnumber
softbool softstring softdate
softlist static strictfp
string sub super switch
synchronized this throw
throws transient try
void volatile while
----------------------------------------------------
[
["keyword", "abstract"], ["keyword", "any"], ["keyword", "assert"], ["keyword", "binary"],
["keyword", "bool"], ["keyword", "boolean"], ["keyword", "break"], ["keyword", "byte"],
["keyword", "case"], ["keyword", "catch"], ["keyword", "char"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "code"], ["keyword", "const"], ["keyword", "continue"], ["keyword", "data"],
["keyword", "default"], ["keyword", "do"], ["keyword", "double"], ["keyword", "else"],
["keyword", "enum"],
["keyword", "extends"], ["punctuation", ";"],
["keyword", "final"], ["keyword", "finally"], ["keyword", "float"], ["keyword", "for"],
["keyword", "goto"], ["keyword", "hash"], ["keyword", "if"],
["keyword", "implements"], ["punctuation", ";"],
["keyword", "import"], ["keyword", "inherits"],
["keyword", "instanceof"], ["punctuation", ";"],
["keyword", "int"],
["keyword", "interface"], ["punctuation", ";"],
["keyword", "long"], ["keyword", "my"], ["keyword", "native"],
["keyword", "new"], ["punctuation", ";"],
["keyword", "nothing"], ["keyword", "null"], ["keyword", "object"], ["keyword", "our"],
["keyword", "own"], ["keyword", "private"], ["keyword", "reference"],
["keyword", "rethrow"], ["keyword", "return"], ["keyword", "short"],
["keyword", "softint"], ["keyword", "softfloat"], ["keyword", "softnumber"],
["keyword", "softbool"], ["keyword", "softstring"], ["keyword", "softdate"],
["keyword", "softlist"], ["keyword", "static"], ["keyword", "strictfp"],
["keyword", "string"], ["keyword", "sub"], ["keyword", "super"], ["keyword", "switch"],
["keyword", "synchronized"], ["keyword", "this"], ["keyword", "throw"],
["keyword", "throws"], ["keyword", "transient"], ["keyword", "try"],
["keyword", "void"], ["keyword", "volatile"], ["keyword", "while"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/qore/number_feature.test
================================================
0b11110000
0xBadFace
0xabp-3
42
3.14159
3.2e8f
----------------------------------------------------
[
["number", "0b11110000"],
["number", "0xBadFace"],
["number", "0xabp-3"],
["number", "42"],
["number", "3.14159"],
["number", "3.2e8f"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/qore/operator_feature.test
================================================
+ ++ +=
- -- -=
! != !== !~
~
* *=
/ /=
% %=
^ ^=
?
= == === =~
> >= >> >>=
< <= <=> << <<=
& && &=
| || |=
----------------------------------------------------
[
["operator", "+"], ["operator", "++"], ["operator", "+="],
["operator", "-"], ["operator", "--"], ["operator", "-="],
["operator", "!"], ["operator", "!="], ["operator", "!=="], ["operator", "!~"],
["operator", "~"],
["operator", "*"], ["operator", "*="],
["operator", "/"], ["operator", "/="],
["operator", "%"], ["operator", "%="],
["operator", "^"], ["operator", "^="],
["operator", "?"],
["operator", "="], ["operator", "=="], ["operator", "==="], ["operator", "=~"],
["operator", ">"], ["operator", ">="], ["operator", ">>"], ["operator", ">>="],
["operator", "<"], ["operator", "<="], ["operator", "<=>"], ["operator", "<<"], ["operator", "<<="],
["operator", "&"], ["operator", "&&"], ["operator", "&="],
["operator", "|"], ["operator", "||"], ["operator", "|="]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/qore/string_feature.test
================================================
""
"fo\"o
bar"
''
'fo\'o
bar'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"o\r\nbar\""],
["string", "''"],
["string", "'fo\\'o\r\nbar'"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/qore/variable_feature.test
================================================
$foobar
$foo_bar_42
$Foobar
----------------------------------------------------
[
["variable", "$foobar"],
["variable", "$foo_bar_42"],
["variable", "$Foobar"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/qsharp/comments_feature.test
================================================
// The following using block creates a fresh qubit and initializes it
// in the |0> state.
use qubit = Qubit();
----------------------------------------------------
[
["comment", "// The following using block creates a fresh qubit and initializes it"],
["comment", "// in the |0> state."],
["keyword", "use"],
" qubit ",
["operator", "="],
["keyword", "Qubit"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for comments
================================================
FILE: tests/languages/qsharp/if_with_function_feature.test
================================================
if result == One {
X(qubit);
}
----------------------------------------------------
[
["keyword", "if"],
" result ",
["operator", "=="],
["keyword", "One"],
["punctuation", "{"],
["function", "X"],
["punctuation", "("],
"qubit",
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for if, equality and function
================================================
FILE: tests/languages/qsharp/keyword_feature.test
================================================
// type
Adj
BigInt
Bool
Ctl
Double
false
Int
One
Pauli
PauliI
PauliX
PauliY
PauliZ
Qubit
Range
Result
String
true
Unit
Zero
// other
Adjoint
adjoint
apply
as
auto
body
borrow
borrowing
Controlled
controlled
distribute
elif
else
fail
fixup
for
function
if
in
internal
intrinsic
invert
is
let
mutable
namespace
new
newtype
open
operation
repeat
return
self
set
until
use
using
while
within
----------------------------------------------------
[
["comment", "// type"],
["keyword", "Adj"],
["keyword", "BigInt"],
["keyword", "Bool"],
["keyword", "Ctl"],
["keyword", "Double"],
["keyword", "false"],
["keyword", "Int"],
["keyword", "One"],
["keyword", "Pauli"],
["keyword", "PauliI"],
["keyword", "PauliX"],
["keyword", "PauliY"],
["keyword", "PauliZ"],
["keyword", "Qubit"],
["keyword", "Range"],
["keyword", "Result"],
["keyword", "String"],
["keyword", "true"],
["keyword", "Unit"],
["keyword", "Zero"],
["comment", "// other"],
["keyword", "Adjoint"],
["keyword", "adjoint"],
["keyword", "apply"],
["keyword", "as"],
["keyword", "auto"],
["keyword", "body"],
["keyword", "borrow"],
["keyword", "borrowing"],
["keyword", "Controlled"],
["keyword", "controlled"],
["keyword", "distribute"],
["keyword", "elif"],
["keyword", "else"],
["keyword", "fail"],
["keyword", "fixup"],
["keyword", "for"],
["keyword", "function"],
["keyword", "if"],
["keyword", "in"],
["keyword", "internal"],
["keyword", "intrinsic"],
["keyword", "invert"],
["keyword", "is"],
["keyword", "let"],
["keyword", "mutable"],
["keyword", "namespace"],
["keyword", "new"],
["keyword", "newtype"],
["keyword", "open"],
["keyword", "operation"],
["keyword", "repeat"],
["keyword", "return"],
["keyword", "self"],
["keyword", "set"],
["keyword", "until"],
["keyword", "use"],
["keyword", "using"],
["keyword", "while"],
["keyword", "within"]
]
================================================
FILE: tests/languages/qsharp/namespace_feature.test
================================================
namespace Quantum.App1 {
open Microsoft.Quantum.Canon;
}
----------------------------------------------------
[
["keyword", "namespace"],
["class-name", [
"Quantum",
["punctuation", "."],
"App1"
]],
["punctuation", "{"],
["keyword", "open"],
["class-name", [
"Microsoft",
["punctuation", "."],
"Quantum",
["punctuation", "."],
"Canon"
]],
["punctuation", ";"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for namespace declaration and import
================================================
FILE: tests/languages/qsharp/operators_feature.test
================================================
and or not
and= or=
<- <= -> =>
* / + - = ^ ! %
*= /= += -= == ^= != %=
>>> >>>= <<< <<<=
^^^ ^^^=
||| |||=
&&& &&&=
w/ w/=
~~~
----------------------------------------------------
[
["operator", "and"], ["operator", "or"], ["operator", "not"],
["operator", "and="], ["operator", "or="],
["operator", "<-"], ["operator", "<="], ["operator", "->"], ["operator", "=>"],
["operator", "*"], ["operator", "/"], ["operator", "+"], ["operator", "-"], ["operator", "="], ["operator", "^"], ["operator", "!"], ["operator", "%"],
["operator", "*="], ["operator", "/="], ["operator", "+="], ["operator", "-="], ["operator", "=="], ["operator", "^="], ["operator", "!="], ["operator", "%="],
["operator", ">>>"], ["operator", ">>>="], ["operator", "<<<"], ["operator", "<<<="],
["operator", "^^^"], ["operator", "^^^="],
["operator", "|||"], ["operator", "|||="],
["operator", "&&&"], ["operator", "&&&="],
["operator", "w/"], ["operator", "w/="],
["operator", "~~~"]
]
----------------------------------------------------
Checks for opertors
================================================
FILE: tests/languages/qsharp/string_feature.test
================================================
""
"foo"
"foo\"\n"
$""
$"foo"
$"\""
$"foo{1+1}baz"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\""],
["string", "\"foo\\\"\\n\""],
["interpolation-string", [
["string", "$\"\""]
]],
["interpolation-string", [
["string", "$\"foo\""]
]],
["interpolation-string", [
["string", "$\"\\\"\""]
]],
["interpolation-string", [
["string", "$\"foo"],
["interpolation", [
["punctuation", "{"],
["expression", [
["number", "1"],
["operator", "+"],
["number", "1"]
]],
["punctuation", "}"]
]],
["string", "baz\""]
]]
]
================================================
FILE: tests/languages/qsharp/variable_assignment_numbers_feature.test
================================================
let var1 = 3;
mutable var2 = 5L;
set var2 = var2 + 1.5;
----------------------------------------------------
[
["keyword", "let"],
" var1 ",
["operator", "="],
["number", "3"],
["punctuation", ";"],
["keyword", "mutable"],
" var2 ",
["operator", "="],
["number", "5L"],
["punctuation", ";"],
["keyword", "set"],
" var2 ",
["operator", "="],
" var2 ",
["operator", "+"],
["number", "1.5"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for variable assignment and numbers
================================================
FILE: tests/languages/r/boolean_feature.test
================================================
TRUE
FALSE
----------------------------------------------------
[
["boolean", "TRUE"],
["boolean", "FALSE"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/r/comment_feature.test
================================================
#
# foobar
----------------------------------------------------
[
["comment", "#"],
["comment", "# foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/r/ellipsis_feature.test
================================================
...
..1
..42
----------------------------------------------------
[
["ellipsis", "..."],
["ellipsis", "..1"],
["ellipsis", "..42"]
]
----------------------------------------------------
Checks for ellipsis and special identifiers.
================================================
FILE: tests/languages/r/keyword_feature.test
================================================
if else repeat
while function
for in next
break NULL NA
NA_integer_
NA_real_
NA_complex_
NA_character_
----------------------------------------------------
[
["keyword", "if"], ["keyword", "else"], ["keyword", "repeat"],
["keyword", "while"], ["keyword", "function"],
["keyword", "for"], ["keyword", "in"], ["keyword", "next"],
["keyword", "break"], ["keyword", "NULL"], ["keyword", "NA"],
["keyword", "NA_integer_"],
["keyword", "NA_real_"],
["keyword", "NA_complex_"],
["keyword", "NA_character_"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/r/number_feature.test
================================================
NaN Inf
0xBadFace
0xf4.42
0x21.2p2
0xffP+4
0xeap-1
42
42L
3.14159
3.2E4
4e+8
0.1e-12
2i
4.1i
1e-2i
----------------------------------------------------
[
["number", "NaN"], ["number", "Inf"],
["number", "0xBadFace"],
["number", "0xf4.42"],
["number", "0x21.2p2"],
["number", "0xffP+4"],
["number", "0xeap-1"],
["number", "42"],
["number", "42L"],
["number", "3.14159"],
["number", "3.2E4"],
["number", "4e+8"],
["number", "0.1e-12"],
["number", "2i"],
["number", "4.1i"],
["number", "1e-2i"]
]
----------------------------------------------------
Checks for hexadecimal, decimal and complex numbers.
================================================
FILE: tests/languages/r/operator_feature.test
================================================
+ * / ^
~ $ @
- -> ->>
> >=
< <= <- <<-
= ==
! !=
& &&
| ||
: ::
----------------------------------------------------
[
["operator", "+"], ["operator", "*"], ["operator", "/"], ["operator", "^"],
["operator", "~"], ["operator", "$"], ["operator", "@"],
["operator", "-"], ["operator", "->"], ["operator", "->>"],
["operator", ">"], ["operator", ">="],
["operator", "<"], ["operator", "<="], ["operator", "<-"], ["operator", "<<-"],
["operator", "="], ["operator", "=="],
["operator", "!"], ["operator", "!="],
["operator", "&"], ["operator", "&&"],
["operator", "|"], ["operator", "||"],
["operator", ":"], ["operator", "::"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/r/percent-operator_feature.test
================================================
%% %*% %/%
%in% %o% %x%
%foobar%
----------------------------------------------------
[
["percent-operator", "%%"], ["percent-operator", "%*%"], ["percent-operator", "%/%"],
["percent-operator", "%in%"], ["percent-operator", "%o%"], ["percent-operator", "%x%"],
["percent-operator", "%foobar%"]
]
----------------------------------------------------
Checks for user-defined operators and operators starting with %.
================================================
FILE: tests/languages/r/punctuation_feature.test
================================================
( ) { } [ ] , ;
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ","],
["punctuation", ";"]
]
================================================
FILE: tests/languages/r/string_feature.test
================================================
""
"fo\"obar"
''
'fo\'obar'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "''"],
["string", "'fo\\'obar'"]
]
----------------------------------------------------
Checks for single-quoted and double-quoted strings.
================================================
FILE: tests/languages/racket/boolean_feature.test
================================================
#t
#f
----------------------------------------------------
[
["boolean", "#t"],
["boolean", "#f"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/racket/builtin_feature.test
================================================
(cons)
(car)
(cdr)
(null?)
(pair?)
(boolean?)
(eof-object?)
(char?)
(procedure?)
(number?)
(port?)
(string?)
(vector?)
(symbol?)
(bytevector?)
(list)
(call-with-current-continuation)
(call/cc)
(append)
(abs)
(apply)
(eval)
[cons]
[car]
[cdr]
[null?]
[pair?]
[boolean?]
[eof-object?]
[char?]
[procedure?]
[number?]
[port?]
[string?]
[vector?]
[symbol?]
[bytevector?]
[list]
[call-with-current-continuation]
[call/cc]
[append]
[abs]
[apply]
[eval]
----------------------------------------------------
[
["punctuation", "("], ["builtin", "cons"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "car"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "cdr"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "null?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "pair?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "boolean?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "eof-object?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "char?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "procedure?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "number?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "port?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "string?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "vector?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "symbol?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "bytevector?"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "list"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "call-with-current-continuation"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "call/cc"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "append"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "abs"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "apply"], ["punctuation", ")"],
["punctuation", "("], ["builtin", "eval"], ["punctuation", ")"],
["punctuation", "["], ["builtin", "cons"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "car"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "cdr"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "null?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "pair?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "boolean?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "eof-object?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "char?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "procedure?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "number?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "port?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "string?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "vector?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "symbol?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "bytevector?"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "list"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "call-with-current-continuation"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "call/cc"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "append"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "abs"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "apply"], ["punctuation", "]"],
["punctuation", "["], ["builtin", "eval"], ["punctuation", "]"]
]
----------------------------------------------------
Checks for builtins.
================================================
FILE: tests/languages/racket/char_feature.test
================================================
#\a ; lowercase letter
#\A ; uppercase letter
#\( ; left parenthesis
#\space ; the space character
#\newline ; the newline character
#\c-a ; Control-a
#\meta-b ; Meta-b
#\c-s-m-h-a ; Control-Meta-Super-Hyper-A
#\; #\' #\"
#\u0041
#\x10FFFF
#\λ
#\)
----------------------------------------------------
[
["char", "#\\a"], ["comment", "; lowercase letter"],
["char", "#\\A"], ["comment", "; uppercase letter"],
["char", "#\\("], ["comment", "; left parenthesis"],
["char", "#\\space"], ["comment", "; the space character"],
["char", "#\\newline"], ["comment", "; the newline character"],
["char", "#\\c-a"], ["comment", "; Control-a"],
["char", "#\\meta-b"], ["comment", "; Meta-b"],
["char", "#\\c-s-m-h-a"], ["comment", "; Control-Meta-Super-Hyper-A"],
["char", "#\\;"], ["char", "#\\'"], ["char", "#\\\""],
["char", "#\\u0041"],
["char", "#\\x10FFFF"],
["char", "#\\λ"],
["char", "#\\)"]
]
----------------------------------------------------
Checks for character literals.
================================================
FILE: tests/languages/racket/comment_feature.test
================================================
;
; foobar
----------------------------------------------------
[
["comment", ";"],
["comment", "; foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/racket/function_feature.test
================================================
(fl= 1 2)
(flmin 2 3)
(inexact->exact 3)
(!fact)
(** 10)
(**
(defined foo)
[fl= 1 2]
[flmin 2 3]
[inexact->exact 3]
[!fact]
[** 10]
[**
[defined foo]
----------------------------------------------------
[
["punctuation", "("], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", ")"],
["punctuation", "("], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", ")"],
["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"],
["punctuation", "("], ["function", "!fact"], ["punctuation", ")"],
["punctuation", "("], ["function", "**"], ["number", "10"], ["punctuation", ")"],
["punctuation", "("], ["function", "**"],
["punctuation", "("], ["function", "defined"], " foo", ["punctuation", ")"],
["punctuation", "["], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", "]"],
["punctuation", "["], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", "]"],
["punctuation", "["], ["function", "inexact->exact"], ["number", "3"], ["punctuation", "]"],
["punctuation", "["], ["function", "!fact"], ["punctuation", "]"],
["punctuation", "["], ["function", "**"], ["number", "10"], ["punctuation", "]"],
["punctuation", "["], ["function", "**"],
["punctuation", "["], ["function", "defined"], " foo", ["punctuation", "]"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/racket/identifier_feature.test
================================================
|\x9;\x9;|
----------------------------------------------------
[
["identifier", "|\\x9;\\x9;|"]
]
================================================
FILE: tests/languages/racket/keyword_feature.test
================================================
(define)
[define]
----------------------------------------------------
[
["punctuation", "("], ["keyword", "define"], ["punctuation", ")"],
["punctuation", "["], ["keyword", "define"], ["punctuation", "]"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/racket/lambda_parameter_feature.test
================================================
(lambda (foo bar) (concat foo bar))
(lambda [foo bar] [concat foo bar])
----------------------------------------------------
[
["punctuation", "("],
["keyword", "lambda"],
["punctuation", "("],
["lambda-parameter", "foo"],
" bar",
["punctuation", ")"],
["punctuation", "("],
["function", "concat"],
" foo bar",
["punctuation", ")"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "lambda"],
["punctuation", "["],
["lambda-parameter", "foo"],
" bar",
["punctuation", "]"],
["punctuation", "["],
["function", "concat"],
" foo bar",
["punctuation", "]"],
["punctuation", ")"]
]
----------------------------------------------------
Checks for lambda parameters.
================================================
FILE: tests/languages/racket/lang_feature.test
================================================
#lang racket
#lang racket/base
#lang s-exp "html.rkt"
#lang s-exp pollen/private/dialect
----------------------------------------------------
[
["lang", "#lang racket"],
["lang", "#lang racket/base"],
["lang", "#lang s-exp \"html.rkt\""],
["lang", "#lang s-exp pollen/private/dialect"]
]
----------------------------------------------------
Checks for #lang.
================================================
FILE: tests/languages/racket/number_feature.test
================================================
123
(foo 42 +42 -42)
(foo 1e3 +1e3 -1e3)
(foo 1e+3 1e-3 3.14159 3.14159e-1)
(foo 8/3)
(foo 3+4i 2.5+0.0i 2.5+0.0i -2.5e4+0.0e4i 3+0i -2e-5i)
(list +10i -10i 10+10i 10.10+10.10i 10-10i 10+10e+10i)
(list #d123 #e#d123e-4 #d#i12 #i-1.234i)
(list #xBAD #b1110011 #o777)
(list #i#x10 #i#x10+10i #b10+10i)
10+i
10+.1i
10+1.i
; not a number but a symbol
(define 1+2 10)
[foo 42]
----------------------------------------------------
[
["number", "123"],
["punctuation", "("],
["function", "foo"],
["number", "42"],
["number", "+42"],
["number", "-42"],
["punctuation", ")"],
["punctuation", "("],
["function", "foo"],
["number", "1e3"],
["number", "+1e3"],
["number", "-1e3"],
["punctuation", ")"],
["punctuation", "("],
["function", "foo"],
["number", "1e+3"],
["number", "1e-3"],
["number", "3.14159"],
["number", "3.14159e-1"],
["punctuation", ")"],
["punctuation", "("],
["function", "foo"],
["number", "8/3"],
["punctuation", ")"],
["punctuation", "("],
["function", "foo"],
["number", "3+4i"],
["number", "2.5+0.0i"],
["number", "2.5+0.0i"],
["number", "-2.5e4+0.0e4i"],
["number", "3+0i"],
["number", "-2e-5i"],
["punctuation", ")"],
["punctuation", "("],
["builtin", "list"],
["number", "+10i"],
["number", "-10i"],
["number", "10+10i"],
["number", "10.10+10.10i"],
["number", "10-10i"],
["number", "10+10e+10i"],
["punctuation", ")"],
["punctuation", "("],
["builtin", "list"],
["number", "#d123"],
["number", "#e#d123e-4"],
["number", "#d#i12"],
["number", "#i-1.234i"],
["punctuation", ")"],
["punctuation", "("],
["builtin", "list"],
["number", "#xBAD"],
["number", "#b1110011"],
["number", "#o777"],
["punctuation", ")"],
["punctuation", "("],
["builtin", "list"],
["number", "#i#x10"],
["number", "#i#x10+10i"],
["number", "#b10+10i"],
["punctuation", ")"],
["number", "10+i"],
["number", "10+.1i"],
["number", "10+1.i"],
["comment", "; not a number but a symbol"],
["punctuation", "("],
["keyword", "define"],
" 1+2 ",
["number", "10"],
["punctuation", ")"],
["punctuation", "["],
["function", "foo"],
["number", "42"],
["punctuation", "]"]
]
----------------------------------------------------
Checks for numbers, rational numbers, and complex numbers.
================================================
FILE: tests/languages/racket/operator_feature.test
================================================
(+
(-
(*
(/
(%
(<
(<=
(>
(>=
(=
(=>
[+
[-
[*
[/
[%
[<
[<=
[>
[>=
[=
[=>
----------------------------------------------------
[
["punctuation", "("], ["operator", "+"],
["punctuation", "("], ["operator", "-"],
["punctuation", "("], ["operator", "*"],
["punctuation", "("], ["operator", "/"],
["punctuation", "("], ["operator", "%"],
["punctuation", "("], ["operator", "<"],
["punctuation", "("], ["operator", "<="],
["punctuation", "("], ["operator", ">"],
["punctuation", "("], ["operator", ">="],
["punctuation", "("], ["operator", "="],
["punctuation", "("], ["operator", "=>"],
["punctuation", "["], ["operator", "+"],
["punctuation", "["], ["operator", "-"],
["punctuation", "["], ["operator", "*"],
["punctuation", "["], ["operator", "/"],
["punctuation", "["], ["operator", "%"],
["punctuation", "["], ["operator", "<"],
["punctuation", "["], ["operator", "<="],
["punctuation", "["], ["operator", ">"],
["punctuation", "["], ["operator", ">="],
["punctuation", "["], ["operator", "="],
["punctuation", "["], ["operator", "=>"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/racket/string_feature.test
================================================
""
"fo\"obar"
"
multi
line
"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "\"\r\nmulti\r\nline\r\n\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/racket/symbol_feature.test
================================================
'turkey
(define a 'foo)
----------------------------------------------------
[
["symbol", "'turkey"],
["punctuation", "("], ["keyword", "define"], " a ", ["symbol","'foo"], ["punctuation",")"]
]
----------------------------------------------------
Checks for symbols.
================================================
FILE: tests/languages/reason/char_feature.test
================================================
'a'
'\''
'\\'
'\xff'
'\o214'
----------------------------------------------------
[
["char", "'a'"],
["char", "'\\''"],
["char", "'\\\\'"],
["char", "'\\xff'"],
["char", "'\\o214'"]
]
----------------------------------------------------
Checks for characters.
================================================
FILE: tests/languages/reason/class-name_feature.test
================================================
String.foo
Foo_bar.baz
A.bar
----------------------------------------------------
[
["class-name", "String"], ["punctuation", "."], "foo\r\n",
["class-name", "Foo_bar"], ["punctuation", "."], "baz\r\n",
["class-name", "A"], ["punctuation", "."], "bar"
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/reason/comment_feature.test
================================================
// foobar
/**/
/* Single line comment */
/* Multiline
comment */
/**
Doc comment
*/
----------------------------------------------------
[
["comment", "// foobar"],
["comment", "/**/"],
["comment", "/* Single line comment */"],
["comment", "/* Multiline\r\ncomment */"],
["comment", "/**\r\nDoc comment\r\n*/"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/reason/constructor_feature.test
================================================
Yes
Foo_bar
A
----------------------------------------------------
[
["constructor", "Yes"],
["constructor", "Foo_bar"],
["constructor", "A"]
]
----------------------------------------------------
Checks for constructors.
================================================
FILE: tests/languages/reason/keyword_feature.test
================================================
and
as
assert
begin
class
constraint
do
done
downto
else
end
exception
external
for
fun
function
functor
if
in
include
inherit
initializer
lazy
let
method
module
mutable
new
nonrec
object
of
open
or
private
rec
sig
struct
switch
then
to
try
type
val
virtual
when
while
with
----------------------------------------------------
[
["keyword", "and"],
["keyword", "as"],
["keyword", "assert"],
["keyword", "begin"],
["keyword", "class"],
["keyword", "constraint"],
["keyword", "do"],
["keyword", "done"],
["keyword", "downto"],
["keyword", "else"],
["keyword", "end"],
["keyword", "exception"],
["keyword", "external"],
["keyword", "for"],
["keyword", "fun"],
["keyword", "function"],
["keyword", "functor"],
["keyword", "if"],
["keyword", "in"],
["keyword", "include"],
["keyword", "inherit"],
["keyword", "initializer"],
["keyword", "lazy"],
["keyword", "let"],
["keyword", "method"],
["keyword", "module"],
["keyword", "mutable"],
["keyword", "new"],
["keyword", "nonrec"],
["keyword", "object"],
["keyword", "of"],
["keyword", "open"],
["keyword", "or"],
["keyword", "private"],
["keyword", "rec"],
["keyword", "sig"],
["keyword", "struct"],
["keyword", "switch"],
["keyword", "then"],
["keyword", "to"],
["keyword", "try"],
["keyword", "type"],
["keyword", "val"],
["keyword", "virtual"],
["keyword", "when"],
["keyword", "while"],
["keyword", "with"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/reason/label_feature.test
================================================
foo::bar
a::baz
----------------------------------------------------
[
["label", "foo"], ["operator", "::"], "bar\r\n",
["label", "a"], ["operator", "::"], "baz"
]
----------------------------------------------------
Checks for labels.
================================================
FILE: tests/languages/reason/operator_feature.test
================================================
...
:: :=
= == ===
< <= > >=
| ^ ? '
# ! ~ `
+ - * /
+. -. *. /.
mod land lor lxor
lsl lsr asr
|> ->
----------------------------------------------------
[
["operator", "..."],
["operator", "::"], ["operator", ":="],
["operator", "="], ["operator", "=="], ["operator", "==="],
["operator", "<"], ["operator", "<="], ["operator", ">"], ["operator", ">="],
["operator", "|"], ["operator", "^"], ["operator", "?"], ["operator", "'"],
["operator", "#"], ["operator", "!"], ["operator", "~"], ["operator", "`"],
["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"],
["operator", "+."], ["operator", "-."], ["operator", "*."], ["operator", "/."],
["operator", "mod"], ["operator", "land"], ["operator", "lor"], ["operator", "lxor"],
["operator", "lsl"], ["operator", "lsr"], ["operator", "asr"],
["operator", "|>"], ["operator", "->"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/reason/string_feature.test
================================================
""
"foo\"bar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\\\"bar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/regex/anchor_feature.test
================================================
^
$
\A
\G
\Z
\z
\b
\B
----------------------------------------------------
[
["anchor", "^"],
["anchor", "$"],
["anchor", "\\A"],
["anchor", "\\G"],
["anchor", "\\Z"],
["anchor", "\\z"],
["anchor", "\\b"],
["anchor", "\\B"]
]
----------------------------------------------------
Checks for anchors.
================================================
FILE: tests/languages/regex/backreference_feature.test
================================================
\1 \2 \3 \4 \5 \6 \7 \8 \9
\k
----------------------------------------------------
[
["backreference", "\\1"],
["backreference", "\\2"],
["backreference", "\\3"],
["backreference", "\\4"],
["backreference", "\\5"],
["backreference", "\\6"],
["backreference", "\\7"],
["backreference", "\\8"],
["backreference", "\\9"],
["backreference", [
"\\k<",
["group-name", "name"],
">"
]]
]
----------------------------------------------------
Checks for backreferences.
================================================
FILE: tests/languages/regex/char-class_feature.test
================================================
[]
[^]
[foo]
[\]\b]
[.^$\1]
[\d\D\p{L}]
----------------------------------------------------
[
["char-class", [
["char-class-punctuation", "["],
["char-class-punctuation", "]"]
]],
["char-class", [
["char-class-punctuation", "["],
["char-class-negation", "^"],
["char-class-punctuation", "]"]
]],
["char-class", [
["char-class-punctuation", "["],
"foo",
["char-class-punctuation", "]"]
]],
["char-class", [
["char-class-punctuation", "["],
["special-escape", "\\]"],
["escape", "\\b"],
["char-class-punctuation", "]"]
]],
["char-class", [
["char-class-punctuation", "["],
".^$",
["escape", "\\1"],
["char-class-punctuation", "]"]
]],
["char-class", [
["char-class-punctuation", "["],
["char-set", "\\d"],
["char-set", "\\D"],
["char-set", "\\p{L}"],
["char-class-punctuation", "]"]
]]
]
----------------------------------------------------
Checks for character sets.
================================================
FILE: tests/languages/regex/char-set_feature.test
================================================
.
\w \W
\s \S
\d \D
\p{ASCII}
\P{ASCII}
----------------------------------------------------
[
["char-set", "."],
["char-set", "\\w"], ["char-set", "\\W"],
["char-set", "\\s"], ["char-set", "\\S"],
["char-set", "\\d"], ["char-set", "\\D"],
["char-set", "\\p{ASCII}"],
["char-set", "\\P{ASCII}"]
]
----------------------------------------------------
Checks for character classes.
================================================
FILE: tests/languages/regex/escape_feature.test
================================================
\0 \\ \. \+
\xFF
\uFFFF \u{10FFFF}
\cA \cZ
\01 \077 \377
\n \r \t \f \a
\[ \]
----------------------------------------------------
[
["escape", "\\0"],
["special-escape", "\\\\"],
["special-escape", "\\."],
["special-escape", "\\+"],
["escape", "\\xFF"],
["escape", "\\uFFFF"],
["escape", "\\u{10FFFF}"],
["escape", "\\cA"],
["escape", "\\cZ"],
["escape", "\\01"],
["escape", "\\077"],
["escape", "\\377"],
["escape", "\\n"],
["escape", "\\r"],
["escape", "\\t"],
["escape", "\\f"],
["escape", "\\a"],
["special-escape", "\\["],
["special-escape", "\\]"]
]
----------------------------------------------------
Checks for escapes.
================================================
FILE: tests/languages/regex/group_feature.test
================================================
()
(?:)
(?>)
(?=) (?!)
(?<=) (?)
(?'name')
(?i)
(?i:)
(?idmsuxU-idmsuxU)
(?idmsux-idmsux:X)
----------------------------------------------------
[
["group", ["("]],
["group", ")"],
["group", ["(?:"]],
["group", ")"],
["group", ["(?>"]],
["group", ")"],
["group", ["(?="]],
["group", ")"],
["group", ["(?!"]],
["group", ")"],
["group", ["(?<="]],
["group", ")"],
["group", ["(?"]
],
["group", ")"],
["group", [
"(?'",
["group-name", "name"],
"'"]
],
["group", ")"],
["group", ["(?i"]],
["group", ")"],
["group", ["(?i:"]],
["group", ")"],
["group", ["(?idmsuxU-idmsuxU"]],
["group", ")"],
["group", ["(?idmsux-idmsux:"]],
"X",
["group", ")"]
]
----------------------------------------------------
Checks for groups.
================================================
FILE: tests/languages/regex/quantifier_feature.test
================================================
* + ?
{2} {2,} {0,1}
*? +? ??
{2}? {2,}? {0,1}?
*+ ++ ?+
{2}+ {2,}+ {0,1}+
----------------------------------------------------
[
["quantifier", "*"],
["quantifier", "+"],
["quantifier", "?"],
["quantifier", "{2}"],
["quantifier", "{2,}"],
["quantifier", "{0,1}"],
["quantifier", "*?"],
["quantifier", "+?"],
["quantifier", "??"],
["quantifier", "{2}?"],
["quantifier", "{2,}?"],
["quantifier", "{0,1}?"],
["quantifier", "*+"],
["quantifier", "++"],
["quantifier", "?+"],
["quantifier", "{2}+"],
["quantifier", "{2,}+"],
["quantifier", "{0,1}+"]
]
----------------------------------------------------
Checks for quantifiers.
================================================
FILE: tests/languages/regex/range_feature.test
================================================
[a-zA-Z0-9]
[\xa1-Z\u00FF-\u{256}]
[^-aaa-]
----------------------------------------------------
[
["char-class", [
["char-class-punctuation", "["],
["range", [
"a",
["range-punctuation", "-"],
"z"
]],
["range", [
"A",
["range-punctuation", "-"],
"Z"
]],
["range", [
"0",
["range-punctuation", "-"],
"9"
]],
["char-class-punctuation", "]"]
]],
["char-class", [
["char-class-punctuation", "["],
["range", [
["escape", "\\xa1"],
["range-punctuation", "-"],
"Z"
]],
["range", [
["escape", "\\u00FF"],
["range-punctuation", "-"],
["escape", "\\u{256}"]
]],
["char-class-punctuation", "]"]
]],
["char-class", [
["char-class-punctuation", "["],
["char-class-negation", "^"],
"-aaa-",
["char-class-punctuation", "]"]
]]
]
----------------------------------------------------
Checks for character ranges in sets.
================================================
FILE: tests/languages/rego/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/rego/comment_feature.test
================================================
#
# foobar
----------------------------------------------------
[
["comment", "#"],
["comment", "# foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/rego/function_feature.test
================================================
object.remove({"a": {"b": {"c": 2}}, "x": 123}, {"a": 1}) == {"x": 123}
output := is_set(x)
output := intersection(set[set])
output := regex.match(pattern, value)
output := glob.match("*.github.com", [], "api.github.com")
output := bits.rsh(x, s)
output := io.jwt.verify_ps384(string, certificate)
io.jwt.encode_sign({
"typ": "JWT",
"alg": "HS256"},
{}, {
"kty": "oct",
"k": "AyM1SysPpbyDfgZld3umj1qzKObwVMkoqQ-EstJQLr_T-1qS0gZH75aKtMN3Yj0iPS4hcgUuTwjAzZr1Z9CAow"
})
----------------------------------------------------
[
["function", [
["namespace", "object"],
["punctuation", "."],
"remove"
]],
["punctuation", "("],
["punctuation", "{"],
["property", "\"a\""],
["operator", ":"],
["punctuation", "{"],
["property", "\"b\""],
["operator", ":"],
["punctuation", "{"],
["property", "\"c\""],
["operator", ":"],
["number", "2"],
["punctuation", "}"],
["punctuation", "}"],
["punctuation", ","],
["property", "\"x\""],
["operator", ":"],
["number", "123"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", "{"],
["property", "\"a\""],
["operator", ":"],
["number", "1"],
["punctuation", "}"],
["punctuation", ")"],
["operator", "=="],
["punctuation", "{"],
["property", "\"x\""],
["operator", ":"],
["number", "123"],
["punctuation", "}"],
"\r\n\r\noutput ",
["operator", ":="],
["function", ["is_set"]],
["punctuation", "("],
"x",
["punctuation", ")"],
"\r\noutput ",
["operator", ":="],
["function", ["intersection"]],
["punctuation", "("],
"set",
["punctuation", "["],
"set",
["punctuation", "]"],
["punctuation", ")"],
"\r\noutput ",
["operator", ":="],
["function", [
["namespace", "regex"],
["punctuation", "."],
"match"
]],
["punctuation", "("],
"pattern",
["punctuation", ","],
" value",
["punctuation", ")"],
"\r\noutput ",
["operator", ":="],
["function", [
["namespace", "glob"],
["punctuation", "."],
"match"
]],
["punctuation", "("],
["string", "\"*.github.com\""],
["punctuation", ","],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ","],
["string", "\"api.github.com\""],
["punctuation", ")"],
"\r\noutput ",
["operator", ":="],
["function", [
["namespace", "bits"],
["punctuation", "."],
"rsh"
]],
["punctuation", "("],
"x",
["punctuation", ","],
" s",
["punctuation", ")"],
"\r\noutput ",
["operator", ":="],
["function", [
["namespace", "io"],
["punctuation", "."],
["namespace", "jwt"],
["punctuation", "."],
"verify_ps384"
]],
["punctuation", "("],
"string",
["punctuation", ","],
" certificate",
["punctuation", ")"],
["function", [
["namespace", "io"],
["punctuation", "."],
["namespace", "jwt"],
["punctuation", "."],
"encode_sign"
]],
["punctuation", "("],
["punctuation", "{"],
["property", "\"typ\""],
["operator", ":"],
["string", "\"JWT\""],
["punctuation", ","],
["property", "\"alg\""],
["operator", ":"],
["string", "\"HS256\""],
["punctuation", "}"],
["punctuation", ","],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", "{"],
["property", "\"kty\""],
["operator", ":"],
["string", "\"oct\""],
["punctuation", ","],
["property", "\"k\""],
["operator", ":"],
["string", "\"AyM1SysPpbyDfgZld3umj1qzKObwVMkoqQ-EstJQLr_T-1qS0gZH75aKtMN3Yj0iPS4hcgUuTwjAzZr1Z9CAow\""],
["punctuation", "}"],
["punctuation", ")"]
]
----------------------------------------------------
Checks for all functions.
================================================
FILE: tests/languages/rego/keyword_feature.test
================================================
as
default
else
import
package
not
null
some
with
set()
----------------------------------------------------
[
["keyword", "as"],
["keyword", "default"],
["keyword", "else"],
["keyword", "import"],
["keyword", "package"],
["keyword", "not"],
["keyword", "null"],
["keyword", "some"],
["keyword", "with"],
["keyword", "set"], ["punctuation", "("], ["punctuation", ")"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/rego/number_feature.test
================================================
0
123
3.14159
5.0e8
0.2E+2
47e-5
-1.23
-2.34E33
-4.34E-33
----------------------------------------------------
[
["number", "0"],
["number", "123"],
["number", "3.14159"],
["number", "5.0e8"],
["number", "0.2E+2"],
["number", "47e-5"],
["number", "-1.23"],
["number", "-2.34E33"],
["number", "-4.34E-33"]
]
================================================
FILE: tests/languages/rego/operator_feature.test
================================================
:= = :
== != < <= > >=
+ - / * %
& |
_
----------------------------------------------------
[
["operator", ":="],
["operator", "="],
["operator", ":"],
["operator", "=="],
["operator", "!="],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "+"],
["operator", "-"],
["operator", "/"],
["operator", "*"],
["operator", "%"],
["operator", "&"],
["operator", "|"],
["operator", "_"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/rego/property_feature.test
================================================
instances[instance] {
server := sites[_].servers[_]
instance := {"address": server.hostname, "name": server.name}
} {
container := containers[_]
instance := {"address": container.ipaddress, "name": container.name}
}
apps := [
{
"name": "web",
"servers": ["web-0", "web-1", "web-1000", "web-1001", "web-dev"]
},
{
"name": "mysql",
"servers": ["db-0", "db-1000"]
},
{
"name": "mongodb",
"servers": ["db-dev"]
}
]
not allow with input as {"user": "charlie", "method": "GET"} with data.roles as {"dev": ["bob"]}
allow with input as {"user": "charlie", "method": "GET"} with data.roles as {"dev": ["charlie"]}
----------------------------------------------------
[
"instances",
["punctuation", "["],
"instance",
["punctuation", "]"],
["punctuation", "{"],
"\r\n server ",
["operator", ":="],
" sites",
["punctuation", "["],
["operator", "_"],
["punctuation", "]"],
["punctuation", "."],
"servers",
["punctuation", "["],
["operator", "_"],
["punctuation", "]"],
"\r\n instance ",
["operator", ":="],
["punctuation", "{"],
["property", "\"address\""],
["operator", ":"],
" server",
["punctuation", "."],
"hostname",
["punctuation", ","],
["property", "\"name\""],
["operator", ":"],
" server",
["punctuation", "."],
"name",
["punctuation", "}"],
["punctuation", "}"],
["punctuation", "{"],
"\r\n container ",
["operator", ":="],
" containers",
["punctuation", "["],
["operator", "_"],
["punctuation", "]"],
"\r\n instance ",
["operator", ":="],
["punctuation", "{"],
["property", "\"address\""],
["operator", ":"],
" container",
["punctuation", "."],
"ipaddress",
["punctuation", ","],
["property", "\"name\""],
["operator", ":"],
" container",
["punctuation", "."],
"name",
["punctuation", "}"],
["punctuation", "}"],
"\r\n\r\napps ",
["operator", ":="],
["punctuation", "["],
["punctuation", "{"],
["property", "\"name\""],
["operator", ":"],
["string", "\"web\""],
["punctuation", ","],
["property", "\"servers\""],
["operator", ":"],
["punctuation", "["],
["string", "\"web-0\""],
["punctuation", ","],
["string", "\"web-1\""],
["punctuation", ","],
["string", "\"web-1000\""],
["punctuation", ","],
["string", "\"web-1001\""],
["punctuation", ","],
["string", "\"web-dev\""],
["punctuation", "]"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", "{"],
["property", "\"name\""],
["operator", ":"],
["string", "\"mysql\""],
["punctuation", ","],
["property", "\"servers\""],
["operator", ":"],
["punctuation", "["],
["string", "\"db-0\""],
["punctuation", ","],
["string", "\"db-1000\""],
["punctuation", "]"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", "{"],
["property", "\"name\""],
["operator", ":"],
["string", "\"mongodb\""],
["punctuation", ","],
["property", "\"servers\""],
["operator", ":"],
["punctuation", "["],
["string", "\"db-dev\""],
["punctuation", "]"],
["punctuation", "}"],
["punctuation", "]"],
["keyword", "not"],
" allow ",
["keyword", "with"],
" input ",
["keyword", "as"],
["punctuation", "{"],
["property", "\"user\""],
["operator", ":"],
["string", "\"charlie\""],
["punctuation", ","],
["property", "\"method\""],
["operator", ":"],
["string", "\"GET\""],
["punctuation", "}"],
["keyword", "with"],
" data",
["punctuation", "."],
"roles ",
["keyword", "as"],
["punctuation", "{"],
["property", "\"dev\""],
["operator", ":"],
["punctuation", "["],
["string", "\"bob\""],
["punctuation", "]"],
["punctuation", "}"],
"\r\n\r\nallow ",
["keyword", "with"],
" input ",
["keyword", "as"],
["punctuation", "{"],
["property", "\"user\""],
["operator", ":"],
["string", "\"charlie\""],
["punctuation", ","],
["property", "\"method\""],
["operator", ":"],
["string", "\"GET\""],
["punctuation", "}"],
["keyword", "with"],
" data",
["punctuation", "."],
"roles ",
["keyword", "as"],
["punctuation", "{"],
["property", "\"dev\""],
["operator", ":"],
["punctuation", "["],
["string", "\"charlie\""],
["punctuation", "]"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/rego/punctuation_feature.test
================================================
, ; .
( ) [ ] { }
----------------------------------------------------
[
["punctuation", ","],
["punctuation", ";"],
["punctuation", "."],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/rego/string_feature.test
================================================
""
"foo\"bar"
`raw-string`
jwks = `{
"keys": [{
"kty":"EC",
"crv":"P-256",
"x":"z8J91ghFy5o6f2xZ4g8LsLH7u2wEpT2ntj8loahnlsE",
"y":"7bdeXLH61KrGWRdh7ilnbcGQACxykaPKfmBccTHIOUo"
}]
}`
cert = `-----BEGIN CERTIFICATE-----
MIIBcDCCARagAwIBAgIJAMZmuGSIfvgzMAoGCCqGSM49BAMCMBMxETAPBgNVBAMM
CHdoYXRldmVyMB4XDTE4MDgxMDE0Mjg1NFoXDTE4MDkwOTE0Mjg1NFowEzERMA8G
A1UEAwwId2hhdGV2ZXIwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATPwn3WCEXL
mjp/bFniDwuwsfu7bASlPae2PyWhqGeWwe23Xlyx+tSqxlkXYe4pZ23BkAAscpGj
yn5gXHExyDlKo1MwUTAdBgNVHQ4EFgQUElRjSoVgKjUqY5AXz2o74cLzzS8wHwYD
VR0jBBgwFoAUElRjSoVgKjUqY5AXz2o74cLzzS8wDwYDVR0TAQH/BAUwAwEB/zAK
BggqhkjOPQQDAgNIADBFAiEA4yQ/88ZrUX68c6kOe9G11u8NUaUzd8pLOtkKhniN
OHoCIHmNX37JOqTcTzGn2u9+c8NlnvZ0uDvsd1BmKPaUmjmm
-----END CERTIFICATE-----`
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\\\"bar\""],
["string", "`raw-string`"],
"\r\n\r\njwks ",
["operator", "="],
["string", "`{\r\n \"keys\": [{\r\n \"kty\":\"EC\",\r\n \"crv\":\"P-256\",\r\n \"x\":\"z8J91ghFy5o6f2xZ4g8LsLH7u2wEpT2ntj8loahnlsE\",\r\n \"y\":\"7bdeXLH61KrGWRdh7ilnbcGQACxykaPKfmBccTHIOUo\"\r\n }]\r\n}`"],
"\r\n\r\ncert ",
["operator", "="],
["string", "`-----BEGIN CERTIFICATE-----\r\nMIIBcDCCARagAwIBAgIJAMZmuGSIfvgzMAoGCCqGSM49BAMCMBMxETAPBgNVBAMM\r\nCHdoYXRldmVyMB4XDTE4MDgxMDE0Mjg1NFoXDTE4MDkwOTE0Mjg1NFowEzERMA8G\r\nA1UEAwwId2hhdGV2ZXIwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATPwn3WCEXL\r\nmjp/bFniDwuwsfu7bASlPae2PyWhqGeWwe23Xlyx+tSqxlkXYe4pZ23BkAAscpGj\r\nyn5gXHExyDlKo1MwUTAdBgNVHQ4EFgQUElRjSoVgKjUqY5AXz2o74cLzzS8wHwYD\r\nVR0jBBgwFoAUElRjSoVgKjUqY5AXz2o74cLzzS8wDwYDVR0TAQH/BAUwAwEB/zAK\r\nBggqhkjOPQQDAgNIADBFAiEA4yQ/88ZrUX68c6kOe9G11u8NUaUzd8pLOtkKhniN\r\nOHoCIHmNX37JOqTcTzGn2u9+c8NlnvZ0uDvsd1BmKPaUmjmm\r\n-----END CERTIFICATE-----`"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/renpy/boolean_feature.test
================================================
true false
True False
----------------------------------------------------
[
["boolean", "true"], ["boolean", "false"],
["boolean", "True"], ["boolean", "False"]
]
================================================
FILE: tests/languages/renpy/comment_feature.test
================================================
# comment
----------------------------------------------------
[
["comment", "# comment"]
]
================================================
FILE: tests/languages/renpy/function_feature.test
================================================
renpy.register_bmfont("bmfont", 22, filename="bmfont.fnt")
# Resize the background of the text window if it's too small.
init python:
style.window.background = Frame("frame.png", 10, 10)
----------------------------------------------------
[
["keyword", "renpy"],
["punctuation", "."],
["function", "register_bmfont"],
["punctuation", "("],
["string", "\"bmfont\""],
["punctuation", ","],
["number", "22"],
["punctuation", ","],
" filename",
["operator", "="],
["string", "\"bmfont.fnt\""],
["punctuation", ")"],
["comment", "# Resize the background of the text window if it's too small."],
["keyword", "init"],
["keyword", "python"],
["punctuation", ":"],
["keyword", "style"],
["punctuation", "."],
["tag", "window"],
["punctuation", "."],
["property", "background"],
["operator", "="],
["function", "Frame"],
["punctuation", "("],
["string", "\"frame.png\""],
["punctuation", ","],
["number", "10"],
["punctuation", ","],
["number", "10"],
["punctuation", ")"]
]
================================================
FILE: tests/languages/renpy/keyword_feature.test
================================================
; None
; add
; adjustment
; alignaround
; allow
; angle
; animation
; around
; as
; assert
; behind
; box_layout
; break
; build
; cache
; call
; center
; changed
; child_size
; choice
; circles
; class
; clear
; clicked
; clipping
; clockwise
; config
; contains
; continue
; corner1
; corner2
; counterclockwise
; def
; default
; define
; del
; delay
; disabled
; disabled_text
; dissolve
; elif
; else
; event
; except
; exclude
; exec
; expression
; fade
; finally
; for
; from
; function
; global
; gm_root
; has
; hide
; id
; if
; import
; in
; init
; is
; jump
; knot
; lambda
; left
; less_rounded
; mm_root
; movie
; music
; null
; on
; onlayer
; pass
; pause
; persistent
; play
; print
; python
; queue
; raise
; random
; renpy
; repeat
; return
; right
; rounded_window
; scene
; scope
; set
; show
; slow
; slow_abortable
; slow_done
; sound
; stop
; store
; style
; style_group
; substitute
; suffix
; theme
; transform
; transform_anchor
; transpose
; try
; ui
; unhovered
; updater
; use
; voice
; while
; widget
; widget_hover
; widget_selected
; widget_text
; yield
----------------------------------------------------
[
["punctuation", ";"], ["keyword", "None"],
["punctuation", ";"], ["keyword", "add"],
["punctuation", ";"], ["keyword", "adjustment"],
["punctuation", ";"], ["keyword", "alignaround"],
["punctuation", ";"], ["keyword", "allow"],
["punctuation", ";"], ["keyword", "angle"],
["punctuation", ";"], ["keyword", "animation"],
["punctuation", ";"], ["keyword", "around"],
["punctuation", ";"], ["keyword", "as"],
["punctuation", ";"], ["keyword", "assert"],
["punctuation", ";"], ["keyword", "behind"],
["punctuation", ";"], ["keyword", "box_layout"],
["punctuation", ";"], ["keyword", "break"],
["punctuation", ";"], ["keyword", "build"],
["punctuation", ";"], ["keyword", "cache"],
["punctuation", ";"], ["keyword", "call"],
["punctuation", ";"], ["keyword", "center"],
["punctuation", ";"], ["keyword", "changed"],
["punctuation", ";"], ["keyword", "child_size"],
["punctuation", ";"], ["keyword", "choice"],
["punctuation", ";"], ["keyword", "circles"],
["punctuation", ";"], ["keyword", "class"],
["punctuation", ";"], ["keyword", "clear"],
["punctuation", ";"], ["keyword", "clicked"],
["punctuation", ";"], ["keyword", "clipping"],
["punctuation", ";"], ["keyword", "clockwise"],
["punctuation", ";"], ["keyword", "config"],
["punctuation", ";"], ["keyword", "contains"],
["punctuation", ";"], ["keyword", "continue"],
["punctuation", ";"], ["keyword", "corner1"],
["punctuation", ";"], ["keyword", "corner2"],
["punctuation", ";"], ["keyword", "counterclockwise"],
["punctuation", ";"], ["keyword", "def"],
["punctuation", ";"], ["keyword", "default"],
["punctuation", ";"], ["keyword", "define"],
["punctuation", ";"], ["keyword", "del"],
["punctuation", ";"], ["keyword", "delay"],
["punctuation", ";"], ["keyword", "disabled"],
["punctuation", ";"], ["keyword", "disabled_text"],
["punctuation", ";"], ["keyword", "dissolve"],
["punctuation", ";"], ["keyword", "elif"],
["punctuation", ";"], ["keyword", "else"],
["punctuation", ";"], ["keyword", "event"],
["punctuation", ";"], ["keyword", "except"],
["punctuation", ";"], ["keyword", "exclude"],
["punctuation", ";"], ["keyword", "exec"],
["punctuation", ";"], ["keyword", "expression"],
["punctuation", ";"], ["keyword", "fade"],
["punctuation", ";"], ["keyword", "finally"],
["punctuation", ";"], ["keyword", "for"],
["punctuation", ";"], ["keyword", "from"],
["punctuation", ";"], ["keyword", "function"],
["punctuation", ";"], ["keyword", "global"],
["punctuation", ";"], ["keyword", "gm_root"],
["punctuation", ";"], ["keyword", "has"],
["punctuation", ";"], ["keyword", "hide"],
["punctuation", ";"], ["keyword", "id"],
["punctuation", ";"], ["keyword", "if"],
["punctuation", ";"], ["keyword", "import"],
["punctuation", ";"], ["keyword", "in"],
["punctuation", ";"], ["keyword", "init"],
["punctuation", ";"], ["keyword", "is"],
["punctuation", ";"], ["keyword", "jump"],
["punctuation", ";"], ["keyword", "knot"],
["punctuation", ";"], ["keyword", "lambda"],
["punctuation", ";"], ["keyword", "left"],
["punctuation", ";"], ["keyword", "less_rounded"],
["punctuation", ";"], ["keyword", "mm_root"],
["punctuation", ";"], ["keyword", "movie"],
["punctuation", ";"], ["keyword", "music"],
["punctuation", ";"], ["keyword", "null"],
["punctuation", ";"], ["keyword", "on"],
["punctuation", ";"], ["keyword", "onlayer"],
["punctuation", ";"], ["keyword", "pass"],
["punctuation", ";"], ["keyword", "pause"],
["punctuation", ";"], ["keyword", "persistent"],
["punctuation", ";"], ["keyword", "play"],
["punctuation", ";"], ["keyword", "print"],
["punctuation", ";"], ["keyword", "python"],
["punctuation", ";"], ["keyword", "queue"],
["punctuation", ";"], ["keyword", "raise"],
["punctuation", ";"], ["keyword", "random"],
["punctuation", ";"], ["keyword", "renpy"],
["punctuation", ";"], ["keyword", "repeat"],
["punctuation", ";"], ["keyword", "return"],
["punctuation", ";"], ["keyword", "right"],
["punctuation", ";"], ["keyword", "rounded_window"],
["punctuation", ";"], ["keyword", "scene"],
["punctuation", ";"], ["keyword", "scope"],
["punctuation", ";"], ["keyword", "set"],
["punctuation", ";"], ["keyword", "show"],
["punctuation", ";"], ["keyword", "slow"],
["punctuation", ";"], ["keyword", "slow_abortable"],
["punctuation", ";"], ["keyword", "slow_done"],
["punctuation", ";"], ["keyword", "sound"],
["punctuation", ";"], ["keyword", "stop"],
["punctuation", ";"], ["keyword", "store"],
["punctuation", ";"], ["keyword", "style"],
["punctuation", ";"], ["keyword", "style_group"],
["punctuation", ";"], ["keyword", "substitute"],
["punctuation", ";"], ["keyword", "suffix"],
["punctuation", ";"], ["keyword", "theme"],
["punctuation", ";"], ["keyword", "transform"],
["punctuation", ";"], ["keyword", "transform_anchor"],
["punctuation", ";"], ["keyword", "transpose"],
["punctuation", ";"], ["keyword", "try"],
["punctuation", ";"], ["keyword", "ui"],
["punctuation", ";"], ["keyword", "unhovered"],
["punctuation", ";"], ["keyword", "updater"],
["punctuation", ";"], ["keyword", "use"],
["punctuation", ";"], ["keyword", "voice"],
["punctuation", ";"], ["keyword", "while"],
["punctuation", ";"], ["keyword", "widget"],
["punctuation", ";"], ["keyword", "widget_hover"],
["punctuation", ";"], ["keyword", "widget_selected"],
["punctuation", ";"], ["keyword", "widget_text"],
["punctuation", ";"], ["keyword", "yield"]
]
================================================
FILE: tests/languages/renpy/property_feature.test
================================================
insensitive
idle
hover
selected_idle
selected_hover
background
position
alt
xpos
ypos
pos
xanchor
yanchor
anchor
xalign
yalign
align
xcenter
ycenter
xofsset
yoffset
ymaximum
maximum
xmaximum
xminimum
yminimum
minimum
xsize
ysizexysize
xfill
yfill
area
antialias
black_color
bold
caret
color
first_indent
font
size
italic
justify
kerning
language
layout
line_leading
line_overlap_split
line_spacing
min_width
newline_indent
outlines
rest_indent
ruby_style
slow_cps
slow_cps_multiplier
strikethrough
text_align
underline
hyperlink_functions
vertical
hinting
foreground
left_margin
xmargin
top_margin
bottom_margin
ymargin
left_padding
right_padding
xpadding
top_padding
bottom_padding
ypadding
size_group
child
hover_sound
activate_sound
mouse
focus_mask
keyboard_focus
bar_vertical
bar_invert
bar_resizing
left_gutter
right_gutter
top_gutter
bottom_gutter
left_bar
right_bar
top_bar
bottom_bar
thumb
thumb_shadow
thumb_offset
unscrollable
spacing
first_spacing
box_reverse
box_wrap
order_reverse
fit_first
ysize
thumbnail_width
thumbnail_height
help
text_ypos
text_xpos
idle_color
hover_color
selected_idle_color
selected_hover_color
insensitive_color
alpha
insensitive_background
hover_background
zorder
value
width
xadjustment
xanchoraround
xaround
xinitial
xoffset
xzoom
yadjustment
yanchoraround
yaround
yinitial
yzoom
zoom
ground
height
text_style
text_y_fudge
selected_insensitive
has_sound
has_music
has_voice
focus
hovered
image_style
length
minwidth
mousewheel
offset
prefix
radius
range
right_margin
rotate
rotate_pad
developer
screen_width
screen_height
window_title
name
version
windows_icon
default_fullscreen
default_text_cps
default_afm_time
main_menu_music
sample_sound
enter_sound
exit_sound
save_directory
enter_transition
exit_transition
intra_transition
main_game_transition
game_main_transition
end_splash_transition
end_game_transition
after_load_transition
window_show_transition
window_hide_transition
adv_nvl_transition
nvl_adv_transition
enter_yesno_transition
exit_yesno_transition
enter_replay_transition
exit_replay_transition
say_attribute_transition
directory_name
executable_name
include_update
window_icon
modal
google_play_key
google_play_salt
drag_name
drag_handle
draggable
dragged
droppable
dropped
narrator_menu
action
default_afm_enable
version_name
version_tuple
inside
fadeout
fadein
layers
layer_clipping
linear
scrollbars
side_xpos
side_ypos
side_spacing
edgescroll
drag_joined
drag_raise
drop_shadow
drop_shadow_color
subpixel
easein
easeout
time
crop
auto
update
get_installed_packages
can_update
UpdateVersion
Update
overlay_functions
translations
window_left_padding
show_side_image
show_two_window
----------------------------------------------------
[
["property", "insensitive"],
["property", "idle"],
["property", "hover"],
["property", "selected_idle"],
["property", "selected_hover"],
["property", "background"],
["property", "position"],
["property", "alt"],
["property", "xpos"],
["property", "ypos"],
["property", "pos"],
["property", "xanchor"],
["property", "yanchor"],
["property", "anchor"],
["property", "xalign"],
["property", "yalign"],
["property", "align"],
["property", "xcenter"],
["property", "ycenter"],
["property", "xofsset"],
["property", "yoffset"],
["property", "ymaximum"],
["property", "maximum"],
["property", "xmaximum"],
["property", "xminimum"],
["property", "yminimum"],
["property", "minimum"],
["property", "xsize"],
["property", "ysizexysize"],
["property", "xfill"],
["property", "yfill"],
["property", "area"],
["property", "antialias"],
["property", "black_color"],
["property", "bold"],
["property", "caret"],
["property", "color"],
["property", "first_indent"],
["property", "font"],
["property", "size"],
["property", "italic"],
["property", "justify"],
["property", "kerning"],
["property", "language"],
["property", "layout"],
["property", "line_leading"],
["property", "line_overlap_split"],
["property", "line_spacing"],
["property", "min_width"],
["property", "newline_indent"],
["property", "outlines"],
["property", "rest_indent"],
["property", "ruby_style"],
["property", "slow_cps"],
["property", "slow_cps_multiplier"],
["property", "strikethrough"],
["property", "text_align"],
["property", "underline"],
["property", "hyperlink_functions"],
["property", "vertical"],
["property", "hinting"],
["property", "foreground"],
["property", "left_margin"],
["property", "xmargin"],
["property", "top_margin"],
["property", "bottom_margin"],
["property", "ymargin"],
["property", "left_padding"],
["property", "right_padding"],
["property", "xpadding"],
["property", "top_padding"],
["property", "bottom_padding"],
["property", "ypadding"],
["property", "size_group"],
["property", "child"],
["property", "hover_sound"],
["property", "activate_sound"],
["property", "mouse"],
["property", "focus_mask"],
["property", "keyboard_focus"],
["property", "bar_vertical"],
["property", "bar_invert"],
["property", "bar_resizing"],
["property", "left_gutter"],
["property", "right_gutter"],
["property", "top_gutter"],
["property", "bottom_gutter"],
["property", "left_bar"],
["property", "right_bar"],
["property", "top_bar"],
["property", "bottom_bar"],
["property", "thumb"],
["property", "thumb_shadow"],
["property", "thumb_offset"],
["property", "unscrollable"],
["property", "spacing"],
["property", "first_spacing"],
["property", "box_reverse"],
["property", "box_wrap"],
["property", "order_reverse"],
["property", "fit_first"],
["property", "ysize"],
["property", "thumbnail_width"],
["property", "thumbnail_height"],
["property", "help"],
["property", "text_ypos"],
["property", "text_xpos"],
["property", "idle_color"],
["property", "hover_color"],
["property", "selected_idle_color"],
["property", "selected_hover_color"],
["property", "insensitive_color"],
["property", "alpha"],
["property", "insensitive_background"],
["property", "hover_background"],
["property", "zorder"],
["property", "value"],
["property", "width"],
["property", "xadjustment"],
["property", "xanchoraround"],
["property", "xaround"],
["property", "xinitial"],
["property", "xoffset"],
["property", "xzoom"],
["property", "yadjustment"],
["property", "yanchoraround"],
["property", "yaround"],
["property", "yinitial"],
["property", "yzoom"],
["property", "zoom"],
["property", "ground"],
["property", "height"],
["property", "text_style"],
["property", "text_y_fudge"],
["property", "selected_insensitive"],
["property", "has_sound"],
["property", "has_music"],
["property", "has_voice"],
["property", "focus"],
["property", "hovered"],
["property", "image_style"],
["property", "length"],
["property", "minwidth"],
["property", "mousewheel"],
["property", "offset"],
["property", "prefix"],
["property", "radius"],
["property", "range"],
["property", "right_margin"],
["property", "rotate"],
["property", "rotate_pad"],
["property", "developer"],
["property", "screen_width"],
["property", "screen_height"],
["property", "window_title"],
["property", "name"],
["property", "version"],
["property", "windows_icon"],
["property", "default_fullscreen"],
["property", "default_text_cps"],
["property", "default_afm_time"],
["property", "main_menu_music"],
["property", "sample_sound"],
["property", "enter_sound"],
["property", "exit_sound"],
["property", "save_directory"],
["property", "enter_transition"],
["property", "exit_transition"],
["property", "intra_transition"],
["property", "main_game_transition"],
["property", "game_main_transition"],
["property", "end_splash_transition"],
["property", "end_game_transition"],
["property", "after_load_transition"],
["property", "window_show_transition"],
["property", "window_hide_transition"],
["property", "adv_nvl_transition"],
["property", "nvl_adv_transition"],
["property", "enter_yesno_transition"],
["property", "exit_yesno_transition"],
["property", "enter_replay_transition"],
["property", "exit_replay_transition"],
["property", "say_attribute_transition"],
["property", "directory_name"],
["property", "executable_name"],
["property", "include_update"],
["property", "window_icon"],
["property", "modal"],
["property", "google_play_key"],
["property", "google_play_salt"],
["property", "drag_name"],
["property", "drag_handle"],
["property", "draggable"],
["property", "dragged"],
["property", "droppable"],
["property", "dropped"],
["property", "narrator_menu"],
["property", "action"],
["property", "default_afm_enable"],
["property", "version_name"],
["property", "version_tuple"],
["property", "inside"],
["property", "fadeout"],
["property", "fadein"],
["property", "layers"],
["property", "layer_clipping"],
["property", "linear"],
["property", "scrollbars"],
["property", "side_xpos"],
["property", "side_ypos"],
["property", "side_spacing"],
["property", "edgescroll"],
["property", "drag_joined"],
["property", "drag_raise"],
["property", "drop_shadow"],
["property", "drop_shadow_color"],
["property", "subpixel"],
["property", "easein"],
["property", "easeout"],
["property", "time"],
["property", "crop"],
["property", "auto"],
["property", "update"],
["property", "get_installed_packages"],
["property", "can_update"],
["property", "UpdateVersion"],
["property", "Update"],
["property", "overlay_functions"],
["property", "translations"],
["property", "window_left_padding"],
["property", "show_side_image"],
["property", "show_two_window"]
]
================================================
FILE: tests/languages/renpy/string_feature.test
================================================
"# This isn't a comment, since it's part of a string."
"Since this line contains a string, it continues
even when the line ends."
$ a = [ "Because of parenthesis, this line also",
"spans more than one line." ]
'Strings can\'t contain their delimiter, unless you escape it.'
----------------------------------------------------
[
["string", "\"# This isn't a comment, since it's part of a string.\""],
["string", "\"Since this line contains a string, it continues\r\n even when the line ends.\""],
["tag", "$"],
" a ",
["operator", "="],
["punctuation", "["],
["string", "\"Because of parenthesis, this line also\""],
["punctuation", ","],
["string", "\"spans more than one line.\""],
["punctuation", "]"],
["string", "'Strings can\\'t contain their delimiter, unless you escape it.'"]
]
================================================
FILE: tests/languages/renpy/tag_feature.test
================================================
label
image
menu
hbox
vbox
frame
text
imagemap
imagebutton
bar
vbar
screen
textbutton
buttoscreenn
fixed
grid
input
key
mousearea
side
timer
viewport
window
hotspot
hotbar
self
button
drag
draggroup
tag
mm_menu_frame
nvl
block
$
----------------------------------------------------
[
["tag", "label"],
["tag", "image"],
["tag", "menu"],
["tag", "hbox"],
["tag", "vbox"],
["tag", "frame"],
["tag", "text"],
["tag", "imagemap"],
["tag", "imagebutton"],
["tag", "bar"],
["tag", "vbar"],
["tag", "screen"],
["tag", "textbutton"],
["tag", "buttoscreenn"],
["tag", "fixed"],
["tag", "grid"],
["tag", "input"],
["tag", "key"],
["tag", "mousearea"],
["tag", "side"],
["tag", "timer"],
["tag", "viewport"],
["tag", "window"],
["tag", "hotspot"],
["tag", "hotbar"],
["tag", "self"],
["tag", "button"],
["tag", "drag"],
["tag", "draggroup"],
["tag", "tag"],
["tag", "mm_menu_frame"],
["tag", "nvl"],
["tag", "block"],
["tag", "$"]
]
================================================
FILE: tests/languages/rescript/attr-value_feature.test
================================================
----------------------------------------------------
[
["operator", "<"],
["tag", ["button"]],
["attr-value", "onClick"],
["operator", "="],
["punctuation", "{"],
["class-name", "Js"],
["punctuation", "."],
["function", "log"],
["punctuation", "}"],
["operator", ">"]
]
----------------------------------------------------
Checks for attr-value.
================================================
FILE: tests/languages/rescript/boolean_feature.test
================================================
false
true
----------------------------------------------------
[
["boolean", "false"],
["boolean", "true"]
]
----------------------------------------------------
Checks for boolean.
================================================
FILE: tests/languages/rescript/char_feature.test
================================================
'b'
'\''
'\\'
'\xff'
'\o214'
----------------------------------------------------
[
["char", "'b'"],
["char", "'\\''"],
["char", "'\\\\'"],
["char", "'\\xff'"],
["char", "'\\o214'"]
]
----------------------------------------------------
Checks for characters.
================================================
FILE: tests/languages/rescript/class-name_feature.test
================================================
Belt.Int.toString(n)
@react.component
type poly = [ | #Poly | #Variant ]
----------------------------------------------------
[
["class-name", "Belt"],
["punctuation", "."],
["class-name", "Int"],
["punctuation", "."],
["function", "toString"],
["punctuation", "("],
"n",
["punctuation", ")"],
["operator", "<"],
["class-name", "Button"],
["operator", "/"],
["operator", ">"],
["class-name", "@react.component"],
["keyword", "type"],
["constant", "poly"],
["operator", "="],
["punctuation", "["],
["operator", "|"],
["class-name", "#Poly"],
["operator", "|"],
["class-name", "#Variant"],
["punctuation", "]"]
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/rescript/comment_feature.test
================================================
// foobar
/**/
/* one line */
/* multiline
comment */
/**
another comment
*/
----------------------------------------------------
[
["comment", "// foobar"],
["comment", "/**/"],
["comment", "/* one line */"],
["comment", "/* multiline\r\ncomment */"],
["comment", "/**\r\nanother comment\r\n*/"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/rescript/function_feature.test
================================================
sum(a, b)
Belt.Int.toString(n)
----------------------------------------------------
[
["function", "sum"],
["punctuation", "("],
"a",
["punctuation", ","],
" b",
["punctuation", ")"],
["class-name", "Belt"],
["punctuation", "."],
["class-name", "Int"],
["punctuation", "."],
["function", "toString"],
["punctuation", "("],
"n",
["punctuation", ")"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/rescript/keyword_feature.test
================================================
and
as
assert
begin
bool
class
constraint
do
done
downto
else
end
exception
external
float
for
fun
function
if
in
include
inherit
initializer
int
lazy
let
method
module
mutable
new
nonrec
object
of
open
or
private
rec
string
switch
then
to
try
when
while
with
type
----------------------------------------------------
[
["keyword", "and"],
["keyword", "as"],
["keyword", "assert"],
["keyword", "begin"],
["keyword", "bool"],
["keyword", "class"],
["keyword", "constraint"],
["keyword", "do"],
["keyword", "done"],
["keyword", "downto"],
["keyword", "else"],
["keyword", "end"],
["keyword", "exception"],
["keyword", "external"],
["keyword", "float"],
["keyword", "for"],
["keyword", "fun"],
["keyword", "function"],
["keyword", "if"],
["keyword", "in"],
["keyword", "include"],
["keyword", "inherit"],
["keyword", "initializer"],
["keyword", "int"],
["keyword", "lazy"],
["keyword", "let"],
["keyword", "method"],
["keyword", "module"],
["keyword", "mutable"],
["keyword", "new"],
["keyword", "nonrec"],
["keyword", "object"],
["keyword", "of"],
["keyword", "open"],
["keyword", "or"],
["keyword", "private"],
["keyword", "rec"],
["keyword", "string"],
["keyword", "switch"],
["keyword", "then"],
["keyword", "to"],
["keyword", "try"],
["keyword", "when"],
["keyword", "while"],
["keyword", "with"],
["keyword", "type"]
]
----------------------------------------------------
Checks for keyword.
================================================
FILE: tests/languages/rescript/number_feature.test
================================================
let value = 1
1 + 2
----------------------------------------------------
[
["keyword", "let"], " value ", ["operator", "="], ["number", "1"],
["number", "1"], ["operator", "+"], ["number", "2"]
]
----------------------------------------------------
Checks for number.
================================================
FILE: tests/languages/rescript/operator_feature.test
================================================
...
:: :=
= == ===
< <= > >=
| ^ ? ' :
# ! ~ `
+ - * /
+. -. *. /.
mod land lor lxor
lsl lsr asr
|> ->
----------------------------------------------------
[
["operator", "..."],
["operator", "::"],
["operator", ":="],
["operator", "="],
["operator", "=="],
["operator", "==="],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "|"],
["operator", "^"],
["operator", "?"],
["operator", "'"],
["operator", ":"],
["operator", "#"],
["operator", "!"],
["operator", "~"],
["operator", "`"],
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "+."],
["operator", "-."],
["operator", "*."],
["operator", "/."],
["operator", "mod"],
["operator", "land"],
["operator", "lor"],
["operator", "lxor"],
["operator", "lsl"],
["operator", "lsr"],
["operator", "asr"],
["operator", "|>"],
["operator", "->"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/rescript/punctuation_feature.test
================================================
type poly = [ | #Poly | #Variant ]
type person = { name: string }
----------------------------------------------------
[
["keyword", "type"],
["constant", "poly"],
["operator", "="],
["punctuation", "["],
["operator", "|"],
["class-name", "#Poly"],
["operator", "|"],
["class-name", "#Variant"],
["punctuation", "]"],
["keyword", "type"],
["constant", "person"],
["operator", "="],
["punctuation", "{"],
" name",
["operator", ":"],
["keyword", "string"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for punctuation.
================================================
FILE: tests/languages/rescript/string_feature.test
================================================
""
"foo\"bar"
`foo bar`
let greeting = `Hello
World
👋
${name}
`
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\\\"bar\""],
["template-string", [
["template-punctuation", "`"],
["string", "foo bar"],
["template-punctuation", "`"]
]],
["keyword", "let"],
" greeting ",
["operator", "="],
["template-string", [
["template-punctuation", "`"],
["string", "Hello\r\nWorld\r\n👋\r\n"],
["interpolation", [
["interpolation-punctuation", "${"],
"name",
["interpolation-punctuation", "}"]
]],
["string", "\r\n"],
["template-punctuation", "`"]
]]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/rescript/tag_feature.test
================================================
----------------------------------------------------
[
["operator", "<"],
["tag", ["button"]],
["operator", ">"],
["tag", [
["operator", "<"],
["operator", "/"],
"button"
]],
["operator", ">"]
]
----------------------------------------------------
Checks for tag.
================================================
FILE: tests/languages/rest/command-line-option_feature.test
================================================
-a Simple option
-b
Simple option on next line
--very-long-option Long option
+f Option using +
-f FILE Option with value 1
--file=FILE Option with value 2
-2, --two Two options in a row.
-f FILE, --file=FILE Two options with values in a row.
/V A VMS/DOS-style option.
----------------------------------------------------
[
["command-line-option", "-a"],
" Simple option\r\n",
["command-line-option", "-b"],
"\r\n Simple option on next line\r\n",
["command-line-option", "--very-long-option"],
" Long option\r\n",
["command-line-option", "+f"],
" Option using +\r\n",
["command-line-option", "-f FILE"],
" Option with value 1\r\n",
["command-line-option", "--file=FILE"],
" Option with value 2\r\n",
["command-line-option", "-2, --two"],
" Two options in a row.\r\n",
["command-line-option", "-f FILE, --file=FILE"],
" Two options with values in a row.\r\n",
["command-line-option", "/V"],
" A VMS/DOS-style option."
]
----------------------------------------------------
Checks for command line options.
================================================
FILE: tests/languages/rest/comment_feature.test
================================================
.. foo
.. foo
bar
..
_foo:
[bar]
|baz|
----------------------------------------------------
[
["punctuation", ".."],
["comment", " foo"],
["punctuation", ".."],
["comment", " foo\r\nbar"],
["punctuation", ".."],
["comment", "\r\n\t_foo:\r\n\t[bar]\r\n\t|baz|"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/rest/directive_feature.test
================================================
.. image:: mylogo.jpeg
.. figure:: foo.png
.. note:: This is a paragraph.
----------------------------------------------------
[
["punctuation", ".."],
["directive", [
"image",
["punctuation", "::"]
]],
" mylogo.jpeg\r\n",
["punctuation", ".."],
["directive", [
"figure",
["punctuation", "::"]
]],
" foo.png\r\n\r\n",
["punctuation", ".."],
["directive", [
"note",
["punctuation", "::"]
]],
" This is a paragraph."
]
----------------------------------------------------
Checks for directives.
================================================
FILE: tests/languages/rest/doctest-block_feature.test
================================================
>>> Foo
>>> foo
bar
baz
----------------------------------------------------
[
["doctest-block", [
["punctuation", ">>>"],
" Foo"
]],
["doctest-block", [
["punctuation", ">>>"],
" foo\r\nbar\r\nbaz"
]]
]
----------------------------------------------------
Checks for doctest blocks.
================================================
FILE: tests/languages/rest/field_feature.test
================================================
:scale: 50 %
:alt: map to buried treasure
:width: 11
:height: 11
----------------------------------------------------
[
["field", ":scale:"], " 50 %\r\n\t",
["field", ":alt:"], " map to buried treasure\r\n\r\n",
["field", ":width:"], " 11\r\n",
["field", ":height:"], " 11"
]
----------------------------------------------------
Checks for fields.
================================================
FILE: tests/languages/rest/hr_feature.test
================================================
Foo
!!!!
""""
####
$$$$
%%%%
&&&&
''''
((((
))))
****
++++
,,,,
----
....
////
::::
;;;;
<<<<
====
>>>>
????
@@@@
[[[[
\\\\
]]]]
^^^^
____
````
{{{{
||||
}}}}
~~~~
Foo
----------------------------------------------------
[
"Foo\r\n\r\n",
["hr", "!!!!"],
["hr", "\"\"\"\""],
["hr", "####"],
["hr", "$$$$"],
["hr", "%%%%"],
["hr", "&&&&"],
["hr", "''''"],
["hr", "(((("],
["hr", "))))"],
["hr", "****"],
["hr", "++++"],
["hr", ",,,,"],
["hr", "----"],
["hr", "...."],
["hr", "////"],
["hr", "::::"],
["hr", ";;;;"],
["hr", "<<<<"],
["hr", "===="],
["hr", ">>>>"],
["hr", "????"],
["hr", "@@@@"],
["hr", "[[[["],
["hr", "\\\\\\\\"],
["hr", "]]]]"],
["hr", "^^^^"],
["hr", "____"],
["hr", "````"],
["hr", "{{{{"],
["hr", "||||"],
["hr", "}}}}"],
["hr", "~~~~"],
"\r\n\r\nFoo"
]
----------------------------------------------------
Checks for horizontal lines, with every possible characters.
The "Foo"s are required since tests are trimmed and horizontal lines
require line feeds before and after.
================================================
FILE: tests/languages/rest/inline_feature.test
================================================
Foo *emphasis*.
**Strong** bar.
This is `interpreted text`.
:role:`interpreted text`
`interpreted text`:role:
``inline literals``
This is a regexp: ``[+-]?(\d+(\.\d*)?|\.\d+)``
Usage of |substitution|.
----------------------------------------------------
[
"Foo ",
["inline", [
["punctuation", "*"], ["italic", "emphasis"], ["punctuation", "*"]
]],
".\r\n",
["inline", [
["punctuation", "**"], ["bold", "Strong"], ["punctuation", "**"]
]],
" bar.\r\nThis is ",
["inline", [
["punctuation", "`"], ["interpreted-text", "interpreted text"], ["punctuation", "`"]
]],
".\r\n",
["inline", [
["role", [
["punctuation", ":"], "role", ["punctuation", ":"]
]],
["punctuation", "`"], ["interpreted-text", "interpreted text"], ["punctuation", "`"]
]],
["inline", [
["punctuation", "`"], ["interpreted-text", "interpreted text"], ["punctuation", "`"],
["role", [
["punctuation", ":"], "role", ["punctuation", ":"]
]]
]],
["inline", [
["punctuation", "``"], ["inline-literal", "inline literals"], ["punctuation", "``"]
]],
"\r\nThis is a regexp: ",
["inline", [
["punctuation", "``"], ["inline-literal", "[+-]?(\\d+(\\.\\d*)?|\\.\\d+)"], ["punctuation", "``"]
]],
"\r\nUsage of ",
["inline", [
["punctuation", "|"], ["substitution", "substitution"], ["punctuation", "|"]
]],
"."
]
----------------------------------------------------
Checks for most inline markup: emphasis, bold, interpreted text,
roles, inline literals and substitutions.
================================================
FILE: tests/languages/rest/issue2940.test
================================================
`ALTER ROLE `_ or ``ALTER_ROLE``
`ALTER ROLE `_
or ``ALTER_ROLE``
----------------------------------------------------
[
["link", [
["punctuation", "`"],
"ALTER ROLE ",
["punctuation", "`_"]
]],
" or ",
["inline", [
["punctuation", "``"],
["inline-literal", "ALTER_ROLE"],
["punctuation", "``"]
]],
["link", [
["punctuation", "`"],
"ALTER ROLE ",
["punctuation", "`_"]
]],
"\r\nor ",
["inline", [
["punctuation", "``"],
["inline-literal", "ALTER_ROLE"],
["punctuation", "``"]
]]
]
================================================
FILE: tests/languages/rest/link-target_feature.test
================================================
.. [1] Foo
.. [2] Bar
.. [#] Baz
.. [#foobar] Foobar
.. [CIT2002] Foobar
.. _foobar: Foobar
.. _foo\:bar: Foobar
.. _`foo:bar`: Foobar
.. __: Anonymous
----------------------------------------------------
[
["punctuation", ".."],
["link-target", [
["punctuation", "["],
"1",
["punctuation", "]"]
]],
" Foo\r\n",
["punctuation", ".."],
["link-target", [
["punctuation", "["],
"2",
["punctuation", "]"]
]],
" Bar\r\n",
["punctuation", ".."],
["link-target", [
["punctuation", "["],
"#",
["punctuation", "]"]
]],
" Baz\r\n",
["punctuation", ".."],
["link-target", [
["punctuation", "["],
"#foobar",
["punctuation", "]"]
]],
" Foobar\r\n",
["punctuation", ".."],
["link-target", [
["punctuation", "["],
"CIT2002",
["punctuation", "]"]
]],
" Foobar\r\n\r\n",
["punctuation", ".."],
["link-target", [
["punctuation", "_"],
"foobar",
["punctuation", ":"]
]],
" Foobar\r\n",
["punctuation", ".."],
["link-target", [
["punctuation", "_"],
"foo\\:bar",
["punctuation", ":"]
]],
" Foobar\r\n",
["punctuation", ".."],
["link-target", [
["punctuation", "_"],
"`foo:bar`",
["punctuation", ":"]
]],
" Foobar\r\n",
["punctuation", ".."],
["link-target", [
["punctuation", "_"],
["punctuation", "_"],
["punctuation", ":"]
]],
" Anonymous"
]
----------------------------------------------------
Checks for link targets.
================================================
FILE: tests/languages/rest/link_feature.test
================================================
[1]_
[2]_
[#]_
[#foobar]_
[CIT2002]_
foobar_
foo__
foo:bar_
`foo:bar`_
`foo bar baz`__
_`inline internal target`
----------------------------------------------------
[
["link", [["punctuation", "["], "1", ["punctuation", "]_"]]],
["link", [["punctuation", "["], "2", ["punctuation", "]_"]]],
["link", [["punctuation", "["], "#", ["punctuation", "]_"]]],
["link", [["punctuation", "["], "#foobar", ["punctuation", "]_"]]],
["link", [["punctuation", "["], "CIT2002", ["punctuation", "]_"]]],
["link", ["foobar", ["punctuation", "_"]]],
["link", ["foo", ["punctuation", "__"]]],
["link", ["foo:bar", ["punctuation", "_"]]],
["link", [["punctuation", "`"], "foo:bar", ["punctuation", "`_"]]],
["link", [["punctuation", "`"], "foo bar baz", ["punctuation", "`__"]]],
["link", [["punctuation", "_`"], "inline internal target", ["punctuation", "`"]]]
]
----------------------------------------------------
Checks for links.
================================================
FILE: tests/languages/rest/list-bullet_feature.test
================================================
* foo
+ bar
- baz
• foo
‣ bar
⁃ baz
(42) foo
(a) bar
(xvii) baz
4) foo
h) bar
MLCDXVI) 1666
1. foo
z. bar
mlcdxvi. baz
----------------------------------------------------
[
["list-bullet", "*"], " foo\r\n",
["list-bullet", "+"], " bar\r\n",
["list-bullet", "-"], " baz\r\n",
["list-bullet", "•"], " foo\r\n",
["list-bullet", "‣"], " bar\r\n",
["list-bullet", "⁃"], " baz\r\n\r\n",
["list-bullet", "(42)"], " foo\r\n",
["list-bullet", "(a)"], " bar\r\n",
["list-bullet", "(xvii)"], " baz\r\n\r\n",
["list-bullet", "4)"], " foo\r\n",
["list-bullet", "h)"], " bar\r\n",
["list-bullet", "MLCDXVI)"], " 1666\r\n\r\n",
["list-bullet", "1."], " foo\r\n",
["list-bullet", "z."], " bar\r\n",
["list-bullet", "mlcdxvi."], " baz"
]
----------------------------------------------------
Checks for list bullets.
================================================
FILE: tests/languages/rest/literal-block_feature.test
================================================
::
Foo
Bar
Baz
Foobar::
Foo
Bar
Baz
----------------------------------------------------
[
["literal-block", [
["literal-block-punctuation", "::"],
"\r\n\tFoo\r\n\tBar\r\n\tBaz"
]],
"\r\n\r\nFoobar",
["literal-block", [
["literal-block-punctuation", "::"],
"\r\n Foo\r\n Bar\r\n Baz"
]]
]
----------------------------------------------------
Checks for literal blocks.
================================================
FILE: tests/languages/rest/quoted-literal-block_feature.test
================================================
::
! Foo
!! Bar
! Baz
Foobar ::
" Foo
" Bar
"" Baz
::
# Foo
# Bar
::
$ Foo
$ Bar
::
% Foo
% Bar
::
& Foo
& Bar
::
' Foo
' Bar
::
( Foo
( Bar
::
) Foo
) Bar
::
* Foo
* Bar
::
+ Foo
+ Bar
::
, Foo
, Bar
::
- Foo
- Bar
::
. Foo
. Bar
::
/ Foo
/ Bar
::
: Foo
: Bar
::
; Foo
; Bar
::
< Foo
< Bar
::
= Foo
= Bar
::
> Foo
> Bar
::
? Foo
? Bar
::
@ Foo
@ Bar
::
[ Foo
[ Bar
::
\ Foo
\ Bar
::
] Foo
] Bar
::
^ Foo
^ Bar
::
_ Foo
_ Bar
::
` Foo
` Bar
::
{ Foo
{ Bar
::
| Foo
| Bar
::
} Foo
} Bar
::
~ Foo
~ Bar
----------------------------------------------------
[
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "!"], " Foo\r\n",
["literal-block-punctuation", "!!"], " Bar\r\n",
["literal-block-punctuation", "!"], " Baz"
]],
"\r\n\r\nFoobar ",
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "\""], " Foo\r\n",
["literal-block-punctuation", "\""], " Bar\r\n",
["literal-block-punctuation", "\"\""], " Baz"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "#"], " Foo\r\n",
["literal-block-punctuation", "#"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "$"], " Foo\r\n",
["literal-block-punctuation", "$"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "%"], " Foo\r\n",
["literal-block-punctuation", "%"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "&"], " Foo\r\n",
["literal-block-punctuation", "&"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "'"], " Foo\r\n",
["literal-block-punctuation", "'"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "("], " Foo\r\n",
["literal-block-punctuation", "("], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", ")"], " Foo\r\n",
["literal-block-punctuation", ")"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "*"], " Foo\r\n",
["literal-block-punctuation", "*"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "+"], " Foo\r\n",
["literal-block-punctuation", "+"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", ","], " Foo\r\n",
["literal-block-punctuation", ","], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "-"], " Foo\r\n",
["literal-block-punctuation", "-"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "."], " Foo\r\n",
["literal-block-punctuation", "."], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "/"], " Foo\r\n",
["literal-block-punctuation", "/"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", ":"], " Foo\r\n",
["literal-block-punctuation", ":"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", ";"], " Foo\r\n",
["literal-block-punctuation", ";"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "<"], " Foo\r\n",
["literal-block-punctuation", "<"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "="], " Foo\r\n",
["literal-block-punctuation", "="], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", ">"], " Foo\r\n",
["literal-block-punctuation", ">"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "?"], " Foo\r\n",
["literal-block-punctuation", "?"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "@"], " Foo\r\n",
["literal-block-punctuation", "@"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "["], " Foo\r\n",
["literal-block-punctuation", "["], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "\\"], " Foo\r\n",
["literal-block-punctuation", "\\"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "]"], " Foo\r\n",
["literal-block-punctuation", "]"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "^"], " Foo\r\n",
["literal-block-punctuation", "^"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "_"], " Foo\r\n",
["literal-block-punctuation", "_"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "`"], " Foo\r\n",
["literal-block-punctuation", "`"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "{"], " Foo\r\n",
["literal-block-punctuation", "{"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "|"], " Foo\r\n",
["literal-block-punctuation", "|"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "}"], " Foo\r\n",
["literal-block-punctuation", "}"], " Bar"
]],
["quoted-literal-block", [
["literal-block-punctuation", "::"],
["literal-block-punctuation", "~"], " Foo\r\n",
["literal-block-punctuation", "~"], " Bar"
]]
]
----------------------------------------------------
Checks for quoted literal blocks, with every possible character.
================================================
FILE: tests/languages/rest/substitution-def_feature.test
================================================
.. |biohazard| image:: biohazard.png
.. |Red light| image:: red_light.png
.. |Michael| user:: mjones
.. |Jon| user:: jhl
----------------------------------------------------
[
["punctuation", ".."],
["substitution-def", [
["substitution", [
["punctuation", "|"],
"biohazard",
["punctuation", "|"]
]],
["directive", [
"image",
["punctuation", "::"]
]]
]],
" biohazard.png\r\n",
["punctuation", ".."],
["substitution-def", [
["substitution", [
["punctuation", "|"],
"Red light",
["punctuation", "|"]
]],
["directive", [
"image",
["punctuation", "::"]
]]
]],
" red_light.png\r\n\r\n",
["punctuation", ".."],
["substitution-def", [
["substitution", [
["punctuation", "|"],
"Michael",
["punctuation", "|"]
]],
["directive", [
"user",
["punctuation", "::"]
]]
]],
" mjones\r\n",
["punctuation", ".."],
["substitution-def", [
["substitution", [
["punctuation", "|"],
"Jon",
["punctuation", "|"]
]],
["directive", [
"user",
["punctuation", "::"]
]]
]],
" jhl"
]
----------------------------------------------------
Checks for substitution definitions.
================================================
FILE: tests/languages/rest/table_feature.test
================================================
+-----+---------+
| foo | bar |
+=====+=========+
| foo | bar |
+-----+---------+
+---+
| 1 |
+---+
=== ===
a b
=== ===
1 2
=== ===
==== ==== =====
foo bar
--------- -----
ab cd e
==== ==== =====
1 2 3
4 5 6
==== ==== =====
----------------------------------------------------
[
["table", [
["punctuation", "+-----+---------+"],
["punctuation", "|"], " foo ", ["punctuation", "|"], " bar ", ["punctuation", "|"],
["punctuation", "+=====+=========+"],
["punctuation", "|"], " foo ", ["punctuation", "|"], " bar ", ["punctuation", "|"],
["punctuation", "+-----+---------+"]
]],
["table", [
["punctuation", "+---+"],
["punctuation", "|"], " 1 ", ["punctuation", "|"],
["punctuation", "+---+"]
]],
["table", [
["punctuation", "==="], ["punctuation", "==="],
"\r\n a b\r\n",
["punctuation", "==="], ["punctuation", "==="],
"\r\n 1 2\r\n",
["punctuation", "==="], ["punctuation", "==="]
]],
["table", [
["punctuation", "===="], ["punctuation", "===="], ["punctuation", "====="],
"\r\n\t foo bar\r\n\t",
["punctuation", "---------"], ["punctuation", "-----"],
"\r\n\t ab cd e\r\n\t",
["punctuation", "===="], ["punctuation", "===="], ["punctuation", "====="],
"\r\n\t 1 2 3\r\n\t 4 5 6\r\n\t",
["punctuation", "===="], ["punctuation", "===="], ["punctuation", "====="]
]]
]
----------------------------------------------------
Checks for grid tables and simple tables.
================================================
FILE: tests/languages/rest/title_feature.test
================================================
!!!!
Foo
!!!!
""""
Foo
""""
####
Foo
####
$$$$
Foo
$$$$
%%%%
Foo
%%%%
&&&&
Foo
&&&&
''''
Foo
''''
((((
Foo
((((
))))
Foo
))))
****
Foo
****
++++
Foo
++++
,,,,
Foo
,,,,
---
Foo
---
....
Foo
....
////
Foo
////
::::
Foo
::::
;;;;
Foo
;;;;
<<<<
Foo
<<<<
====
Foo
====
>>>>
Foo
>>>>
????
Foo
????
@@@@
Foo
@@@@
[[[[
Foo
[[[[
\\\\
Foo
\\\\
]]]]
Foo
]]]]
^^^^
Foo
^^^^
____
Foo
____
````
Foo
````
{{{{
Foo
{{{{
||||
Foo
||||
}}}}
Foo
}}}}
~~~~
Foo
~~~~
Bar
!!!!
Bar
""""
Bar
####
Bar
$$$$
Bar
%%%%
Bar
&&&&
Bar
''''
Bar
((((
Bar
))))
Bar
****
Bar
++++
Bar
,,,,
Bar
---
Bar
....
Bar
////
Bar
::::
Bar
;;;;
Bar
<<<<
Bar
====
Bar
>>>>
Bar
????
Bar
@@@@
Bar
[[[[
Bar
\\\\
Bar
]]]]
Bar
^^^^
Bar
____
Bar
````
Bar
{{{{
Bar
||||
Bar
}}}}
Bar
~~~~
----------------------------------------------------
[
["title", [
["punctuation", "!!!!"],
["important", "Foo"],
["punctuation", "!!!!"]
]],
["title", [
["punctuation", "\"\"\"\""],
["important", "Foo"],
["punctuation", "\"\"\"\""]
]],
["title", [
["punctuation", "####"],
["important", "Foo"],
["punctuation", "####"]
]],
["title", [
["punctuation", "$$$$"],
["important", "Foo"],
["punctuation", "$$$$"]
]],
["title", [
["punctuation", "%%%%"],
["important", "Foo"],
["punctuation", "%%%%"]
]],
["title", [
["punctuation", "&&&&"],
["important", "Foo"],
["punctuation", "&&&&"]
]],
["title", [
["punctuation", "''''"],
["important", "Foo"],
["punctuation", "''''"]
]],
["title", [
["punctuation", "(((("],
["important", "Foo"],
["punctuation", "(((("]
]],
["title", [
["punctuation", "))))"],
["important", "Foo"],
["punctuation", "))))"]
]],
["title", [
["punctuation", "****"],
["important", "Foo"],
["punctuation", "****"]
]],
["title", [
["punctuation", "++++"],
["important", "Foo"],
["punctuation", "++++"]
]],
["title", [
["punctuation", ",,,,"],
["important", "Foo"],
["punctuation", ",,,,"]
]],
["title", [
["punctuation", "---"],
["important", "Foo"],
["punctuation", "---"]
]],
["title", [
["punctuation", "...."],
["important", "Foo"],
["punctuation", "...."]
]],
["title", [
["punctuation", "////"],
["important", "Foo"],
["punctuation", "////"]
]],
["title", [
["punctuation", "::::"],
["important", "Foo"],
["punctuation", "::::"]
]],
["title", [
["punctuation", ";;;;"],
["important", "Foo"],
["punctuation", ";;;;"]
]],
["title", [
["punctuation", "<<<<"],
["important", "Foo"],
["punctuation", "<<<<"]
]],
["title", [
["punctuation", "===="],
["important", "Foo"],
["punctuation", "===="]
]],
["title", [
["punctuation", ">>>>"],
["important", "Foo"],
["punctuation", ">>>>"]
]],
["title", [
["punctuation", "????"],
["important", "Foo"],
["punctuation", "????"]
]],
["title", [
["punctuation", "@@@@"],
["important", "Foo"],
["punctuation", "@@@@"]
]],
["title", [
["punctuation", "[[[["],
["important", "Foo"],
["punctuation", "[[[["]
]],
["title", [
["punctuation", "\\\\\\\\"],
["important", "Foo"],
["punctuation", "\\\\\\\\"]
]],
["title", [
["punctuation", "]]]]"],
["important", "Foo"],
["punctuation", "]]]]"]
]],
["title", [
["punctuation", "^^^^"],
["important", "Foo"],
["punctuation", "^^^^"]
]],
["title", [
["punctuation", "____"],
["important", "Foo"],
["punctuation", "____"]
]],
["title", [
["punctuation", "````"],
["important", "Foo"],
["punctuation", "````"]
]],
["title", [
["punctuation", "{{{{"],
["important", "Foo"],
["punctuation", "{{{{"]
]],
["title", [
["punctuation", "||||"],
["important", "Foo"],
["punctuation", "||||"]
]],
["title", [
["punctuation", "}}}}"],
["important", "Foo"],
["punctuation", "}}}}"]
]],
["title", [
["punctuation", "~~~~"],
["important", "Foo"],
["punctuation", "~~~~"]
]],
["title", [
["important", "Bar"],
["punctuation", "!!!!"]
]],
["title", [
["important", "Bar"],
["punctuation", "\"\"\"\""]
]],
["title", [
["important", "Bar"],
["punctuation", "####"]
]],
["title", [
["important", "Bar"],
["punctuation", "$$$$"]
]],
["title", [
["important", "Bar"],
["punctuation", "%%%%"]
]],
["title", [
["important", "Bar"],
["punctuation", "&&&&"]
]],
["title", [
["important", "Bar"],
["punctuation", "''''"]
]],
["title", [
["important", "Bar"],
["punctuation", "(((("]
]],
["title", [
["important", "Bar"],
["punctuation", "))))"]
]],
["title", [
["important", "Bar"],
["punctuation", "****"]
]],
["title", [
["important", "Bar"],
["punctuation", "++++"]
]],
["title", [
["important", "Bar"],
["punctuation", ",,,,"]
]],
["title", [
["important", "Bar"],
["punctuation", "---"]
]],
["title", [
["important", "Bar"],
["punctuation", "...."]
]],
["title", [
["important", "Bar"],
["punctuation", "////"]
]],
["title", [
["important", "Bar"],
["punctuation", "::::"]
]],
["title", [
["important", "Bar"],
["punctuation", ";;;;"]
]],
["title", [
["important", "Bar"],
["punctuation", "<<<<"]
]],
["title", [
["important", "Bar"],
["punctuation", "===="]
]],
["title", [
["important", "Bar"],
["punctuation", ">>>>"]
]],
["title", [
["important", "Bar"],
["punctuation", "????"]
]],
["title", [
["important", "Bar"],
["punctuation", "@@@@"]
]],
["title", [
["important", "Bar"],
["punctuation", "[[[["]
]],
["title", [
["important", "Bar"],
["punctuation", "\\\\\\\\"]
]],
["title", [
["important", "Bar"],
["punctuation", "]]]]"]
]],
["title", [
["important", "Bar"],
["punctuation", "^^^^"]
]],
["title", [
["important", "Bar"],
["punctuation", "____"]
]],
["title", [
["important", "Bar"],
["punctuation", "````"]
]],
["title", [
["important", "Bar"],
["punctuation", "{{{{"]
]],
["title", [
["important", "Bar"],
["punctuation", "||||"]
]],
["title", [
["important", "Bar"],
["punctuation", "}}}}"]
]],
["title", [
["important", "Bar"],
["punctuation", "~~~~"]
]]
]
----------------------------------------------------
Checks for titles, overlined and underlined or underlined only, with every possible adornments.
================================================
FILE: tests/languages/rip/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/rip/builtin_feature.test
================================================
@
System
----------------------------------------------------
[
["builtin", "@"],
["builtin", "System"]
]
----------------------------------------------------
Checks for builtins.
================================================
FILE: tests/languages/rip/char_feature.test
================================================
`a
`b
`Z
----------------------------------------------------
[
["char", "`a"],
["char", "`b"],
["char", "`Z"]
]
----------------------------------------------------
Checks for characters.
================================================
FILE: tests/languages/rip/comment_feature.test
================================================
#
# foobar
----------------------------------------------------
[
["comment", "#"],
["comment", "# foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/rip/date_time_feature.test
================================================
2015-08-30
1970-01-01
17:43:21
00:00:00
2015-08-30T17:43:21
1970-01-01T00:00:00
----------------------------------------------------
[
["date", "2015-08-30"],
["date", "1970-01-01"],
["time", "17:43:21"],
["time", "00:00:00"],
["datetime", "2015-08-30T17:43:21"],
["datetime", "1970-01-01T00:00:00"]
]
----------------------------------------------------
Checks for dates, times and datetimes.
================================================
FILE: tests/languages/rip/keyword_feature.test
================================================
=> ->
class if else
switch case
return exit
try catch
finally raise
----------------------------------------------------
[
["keyword", "=>"], ["keyword", "->"],
["keyword", "class"], ["keyword", "if"], ["keyword", "else"],
["keyword", "switch"], ["keyword", "case"],
["keyword", "return"], ["keyword", "exit"],
["keyword", "try"], ["keyword", "catch"],
["keyword", "finally"], ["keyword", "raise"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/rip/number_feature.test
================================================
42
3.14159
+18
+0.14
-242
-85.21
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "+18"],
["number", "+0.14"],
["number", "-242"],
["number", "-85.21"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/rip/punctuation_feature.test
================================================
.. ...
` , . : ; = / \
( ) < > [ ] { }
----------------------------------------------------
[
["punctuation", ".."], ["punctuation", "..."],
["punctuation", "`"],
["punctuation", ","],
["punctuation", "."],
["punctuation", ":"],
["punctuation", ";"],
["punctuation", "="],
["punctuation", "/"],
["punctuation", "\\"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "<"],
["punctuation", ">"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/rip/reference_feature.test
================================================
foo
foo_bar
----------------------------------------------------
[
["reference", "foo"],
["reference", "foo_bar"]
]
----------------------------------------------------
Checks for reference.
================================================
FILE: tests/languages/rip/regex_feature.test
================================================
/foobar/
/fo[o](?=bar)/
/\/\\\[\]/
/(fo|o?)+b*ar?/
----------------------------------------------------
[
["regex", "/foobar/"],
["regex", "/fo[o](?=bar)/"],
["regex", "/\\/\\\\\\[\\]/"],
["regex", "/(fo|o?)+b*ar?/"]
]
----------------------------------------------------
Checks for regexes.
================================================
FILE: tests/languages/rip/string_feature.test
================================================
""
"fo\"obar"
''
'fo\'obar'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "''"],
["string", "'fo\\'obar'"]
]
----------------------------------------------------
Checks for single-quoted and double-quoted strings.
================================================
FILE: tests/languages/rip/symbol_feature.test
================================================
:foo
:foobar42
:foo_bar
----------------------------------------------------
[
["symbol", ":foo"],
["symbol", ":foobar42"],
["symbol", ":foo_bar"]
]
----------------------------------------------------
Checks for symbols.
================================================
FILE: tests/languages/roboconf/comment_feature.test
================================================
#
# Foobar
----------------------------------------------------
[
["comment", "#"],
["comment", "# Foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/roboconf/component_feature.test
================================================
ApacheServer {}
lb--apache-mod-jk--puppet {}
----------------------------------------------------
[
["component", "ApacheServer"], ["punctuation", "{"], ["punctuation", "}"],
["component", "lb--apache-mod-jk--puppet"], ["punctuation", "{"], ["punctuation", "}"]
]
----------------------------------------------------
Checks for component names.
================================================
FILE: tests/languages/roboconf/keyword_feature.test
================================================
facet Foo {}
instance of Bar {}
external
import
----------------------------------------------------
[
["keyword", "facet"],
["component", "Foo"], ["punctuation", "{"], ["punctuation", "}"],
["keyword", "instance of"],
["component", "Bar"], ["punctuation", "{"], ["punctuation", "}"],
["keyword", "external"],
["keyword", "import"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/roboconf/optional_feature.test
================================================
(optional)
----------------------------------------------------
[
["optional", "(optional)"]
]
----------------------------------------------------
Checks for optional flag.
================================================
FILE: tests/languages/roboconf/property_feature.test
================================================
extends :
imports:
installer:
data.ec2.elastic.ip:
----------------------------------------------------
[
["property", "extends"], ["punctuation", ":"],
["property", "imports"], ["punctuation", ":"],
["property", "installer"], ["punctuation", ":"],
["property", "data.ec2.elastic.ip"], ["punctuation", ":"]
]
----------------------------------------------------
Checks for properties.
================================================
FILE: tests/languages/roboconf/value_feature.test
================================================
port = 8080;
MySQL.port = 3307, My-Client-Database.port = 3308;
my-own-variable = something;
----------------------------------------------------
[
"port ", ["punctuation", "="],
["value", "8080"], ["punctuation", ";"],
"\r\nMySQL", ["punctuation", "."], "port ", ["punctuation", "="],
["value", "3307"], ["punctuation", ","],
" My-Client-Database", ["punctuation", "."], "port ", ["punctuation", "="],
["value", "3308"], ["punctuation", ";"],
"\r\nmy-own-variable ", ["punctuation", "="],
["value", "something"], ["punctuation", ";"]
]
----------------------------------------------------
Checks for default values.
================================================
FILE: tests/languages/roboconf/wildcard_feature.test
================================================
load-balance-able.*
----------------------------------------------------
[
"load-balance-able", ["punctuation", "."],
["wildcard", "*"]
]
----------------------------------------------------
Checks for wildcards.
================================================
FILE: tests/languages/robotframework/comment_feature.test
================================================
# comment
*** Keywords *** # comment
Run Program # comment
[Arguments] @{args} # comment
Run Process program.py @{args} # comment
----------------------------------------------------
[
["comment", "# comment"],
["keywords", [
["section-header", "*** Keywords ***"],
["comment", "# comment"],
["keyword-name", [
"Run Program"
]],
["comment", "# comment"],
["tag", [
["punctuation", "["],
"Arguments",
["punctuation", "]"]
]],
["variable", [
["punctuation", "@{"],
"args",
["punctuation", "}"]
]],
["comment", "# comment"],
["property", [
"Run Process"
]],
" program.py ",
["variable", [
["punctuation", "@{"],
"args",
["punctuation", "}"]
]],
["comment", "# comment"]
]]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/robotframework/documentation_feature.test
================================================
*** Settings ***
Documentation Example using the space separated plain text format.
Documentation This is documentation for this test suite.
... This kind of documentation can often be get quite long...
*** Keywords ***
One line documentation
[Documentation] One line documentation.
Multiline documentation
[Documentation] The first line creates the short doc.
...
... This is the body of the documentation.
... It is not shown in Libdoc outputs but only
... the short doc is shown in logs.
No Operation
----------------------------------------------------
[
["settings", [
["section-header", "*** Settings ***"],
["property", "Documentation"],
["documentation", "Example using the space separated plain text format."],
["property", "Documentation"],
["documentation", "This is documentation for this test suite.\r\n... This kind of documentation can often be get quite long..."]
]],
["keywords", [
["section-header", "*** Keywords ***"],
["keyword-name", [
"One line documentation"
]],
["tag", [
["punctuation", "["],
"Documentation",
["punctuation", "]"]
]],
["documentation", "One line documentation."],
["keyword-name", [
"Multiline documentation"
]],
["tag", [
["punctuation", "["],
"Documentation",
["punctuation", "]"]
]],
["documentation", "The first line creates the short doc.\r\n\t...\r\n\t... This is the body of the documentation.\r\n\t... It is not shown in Libdoc outputs but only\r\n\t... the short doc is shown in logs."],
["property", [
"No Operation"
]]
]]
]
----------------------------------------------------
Checks for documentation.
================================================
FILE: tests/languages/robotframework/name_and_property_feature.test
================================================
*** Test Cases ***
Another Test
Should Be Equal ${MESSAGE} Hello, world!
*** Keywords ***
My Keyword
Directory Should Exist ${path}
I have ${program} open
Start Program ${program}
Result should be ${expected}
${result} = Get Result
Should Be Equal ${result} ${expected}
*** Tasks ***
Process invoice
Read information from PDF
Validate information
----------------------------------------------------
[
["test-cases", [
["section-header", "*** Test Cases ***"],
["test-name", [
"Another Test"
]],
["property", [
"Should Be Equal"
]],
["variable", [
["punctuation", "${"],
"MESSAGE",
["punctuation", "}"]
]],
" Hello, world!\r\n\r"
]],
["keywords", [
["section-header", "*** Keywords ***"],
["keyword-name", [
"My Keyword"
]],
["property", [
"Directory Should Exist"
]],
["variable", [
["punctuation", "${"],
"path",
["punctuation", "}"]
]],
["keyword-name", [
"I have ",
["variable", [
["punctuation", "${"],
"program",
["punctuation", "}"]
]],
" open"
]],
["property", [
"Start Program"
]],
["variable", [
["punctuation", "${"],
"program",
["punctuation", "}"]
]],
["keyword-name", [
"Result should be ",
["variable", [
["punctuation", "${"],
"expected",
["punctuation", "}"]
]]
]],
["property", [
["variable", [
["punctuation", "${"],
"result",
["punctuation", "}"]
]],
" ="
]],
" Get Result\r\n\t",
["property", [
"Should Be Equal"
]],
["variable", [
["punctuation", "${"],
"result",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"expected",
["punctuation", "}"]
]]
]],
["tasks", [
["section-header", "*** Tasks ***"],
["task-name", [
"Process invoice"
]],
["property", [
"Read information from PDF"
]],
["property", [
"Validate information"
]]
]]
]
----------------------------------------------------
Checks for names and properties.
================================================
FILE: tests/languages/robotframework/sections_feature.test
================================================
*** Settings ***
# foo
*** Variables ***
# foo
*** Test Cases ***
# foo
*** Keywords ***
# foo
*** Tasks ***
# foo
----------------------------------------------------
[
["settings", [
["section-header", "*** Settings ***"],
["comment", "# foo"]
]],
["variables", [
["section-header", "*** Variables ***"],
["comment", "# foo"]
]],
["test-cases", [
["section-header", "*** Test Cases ***"],
["comment", "# foo"]
]],
["keywords", [
["section-header", "*** Keywords ***"],
["comment", "# foo"]
]],
["tasks", [
["section-header", "*** Tasks ***"],
["comment", "# foo"]
]]
]
----------------------------------------------------
Checks for all known section types.
================================================
FILE: tests/languages/robotframework/settings_property_feature.test
================================================
*** Settings ***
Documentation Example using the space separated plain text format.
Library OperatingSystem
----------------------------------------------------
[
["settings", [
["section-header", "*** Settings ***"],
["property", "Documentation"],
["documentation", "Example using the space separated plain text format."],
["property", "Library"],
" OperatingSystem"
]]
]
----------------------------------------------------
Checks for setting properties.
================================================
FILE: tests/languages/robotframework/tag_feature.test
================================================
*** Keywords ***
Wrapper With Customizable Timeout
[Arguments] ${timeout} @{args}
[Documentation] Same as the above but timeout given as an argument.
[Timeout] NONE
With Teardown
Do Something
[Teardown] Log keyword teardown
Return Three Values
[Return] foo bar zap
Settings tags using separate setting
[Tags] my fine tags
No Operation
----------------------------------------------------
[
["keywords", [
["section-header", "*** Keywords ***"],
["keyword-name", [
"Wrapper With Customizable Timeout"
]],
["tag", [
["punctuation", "["],
"Arguments",
["punctuation", "]"]
]],
["variable", [
["punctuation", "${"],
"timeout",
["punctuation", "}"]
]],
["variable", [
["punctuation", "@{"],
"args",
["punctuation", "}"]
]],
["tag", [
["punctuation", "["],
"Documentation",
["punctuation", "]"]
]],
["documentation", "Same as the above but timeout given as an argument."],
["tag", [
["punctuation", "["],
"Timeout",
["punctuation", "]"]
]],
" NONE\r\n\r\n",
["keyword-name", [
"With Teardown"
]],
["property", [
"Do Something"
]],
["tag", [
["punctuation", "["],
"Teardown",
["punctuation", "]"]
]],
" Log keyword teardown\r\n\r\n",
["keyword-name", [
"Return Three Values"
]],
["tag", [
["punctuation", "["],
"Return",
["punctuation", "]"]
]],
" foo bar zap\r\n\r\n",
["keyword-name", [
"Settings tags using separate setting"
]],
["tag", [
["punctuation", "["],
"Tags",
["punctuation", "]"]
]],
" my fine tags\r\n\t",
["property", [
"No Operation"
]]
]]
]
----------------------------------------------------
Checks for tags.
================================================
FILE: tests/languages/robotframework/variable_feature.test
================================================
*** Test Cases ***
Variables
Log ${GREET}, ${NAME}!!
Login &{USER}
Environment variables for ${name}
Log Current user: %{USER}
Run %{JAVA_HOME}${/}javac
Assign multiple
${a} ${b} ${c} = Get Three
${first} @{rest} = Get Three
@{before} ${last} = Get Three
${begin} @{middle} ${end} = Get Three
*** Keywords ***
With Positional
[Arguments] ${positional} @{} ${named}
Log Many ${positional} ${named}
With Free Named
[Arguments] @{varargs} ${named only} &{free named}
Log Many @{varargs} ${named only} &{free named}
*** Settings ***
Suite Setup Some Keyword @{KW ARGS}
Suite Setup ${KEYWORD} @{KW ARGS}
*** Variables ***
${ANOTHER VARIABLE} This is pretty easy!
${INTEGER} ${42}
@{STRINGS} one two kolme four
@{NUMBERS} ${1} ${INTEGER} ${3.14}
&{MAPPING} one=${1} two=${2} three=${3}
@{ANIMALS} cat dog
&{FINNISH} cat=kissa dog=koira
${MULTILINE} SEPARATOR=\n First line
... Second line Third line
----------------------------------------------------
[
["test-cases", [
["section-header", "*** Test Cases ***"],
["test-name", [
"Variables"
]],
["property", [
"Log"
]],
["variable", [
["punctuation", "${"],
"GREET",
["punctuation", "}"]
]],
", ",
["variable", [
["punctuation", "${"],
"NAME",
["punctuation", "}"]
]],
"!!\r\n\t",
["property", [
"Login"
]],
["variable", [
["punctuation", "&{"],
"USER",
["punctuation", "}"]
]],
["test-name", [
"Environment variables for ",
["variable", [
["punctuation", "${"],
"name",
["punctuation", "}"]
]]
]],
["property", [
"Log"
]],
" Current user: ",
["variable", [
["punctuation", "%{"],
"USER",
["punctuation", "}"]
]],
["property", [
"Run"
]],
["variable", [
["punctuation", "%{"],
"JAVA_HOME",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"/",
["punctuation", "}"]
]],
"javac\r\n\r\n",
["test-name", [
"Assign multiple"
]],
["property", [
["variable", [
["punctuation", "${"],
"a",
["punctuation", "}"]
]]
]],
["variable", [
["punctuation", "${"],
"b",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"c",
["punctuation", "}"]
]],
" = Get Three\r\n\t",
["property", [
["variable", [
["punctuation", "${"],
"first",
["punctuation", "}"]
]]
]],
["variable", [
["punctuation", "@{"],
"rest",
["punctuation", "}"]
]],
" = Get Three\r\n\t",
["property", [
["variable", [
["punctuation", "@{"],
"before",
["punctuation", "}"]
]]
]],
["variable", [
["punctuation", "${"],
"last",
["punctuation", "}"]
]],
" = Get Three\r\n\t",
["property", [
["variable", [
["punctuation", "${"],
"begin",
["punctuation", "}"]
]]
]],
["variable", [
["punctuation", "@{"],
"middle",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"end",
["punctuation", "}"]
]],
" = Get Three\r\n\r"
]],
["keywords", [
["section-header", "*** Keywords ***"],
["keyword-name", [
"With Positional"
]],
["tag", [
["punctuation", "["],
"Arguments",
["punctuation", "]"]
]],
["variable", [
["punctuation", "${"],
"positional",
["punctuation", "}"]
]],
["variable", [
["punctuation", "@{"],
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"named",
["punctuation", "}"]
]],
["property", [
"Log Many"
]],
["variable", [
["punctuation", "${"],
"positional",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"named",
["punctuation", "}"]
]],
["keyword-name", [
"With Free Named"
]],
["tag", [
["punctuation", "["],
"Arguments",
["punctuation", "]"]
]],
["variable", [
["punctuation", "@{"],
"varargs",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"named only",
["punctuation", "}"]
]],
["variable", [
["punctuation", "&{"],
"free named",
["punctuation", "}"]
]],
["property", [
"Log Many"
]],
["variable", [
["punctuation", "@{"],
"varargs",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"named only",
["punctuation", "}"]
]],
["variable", [
["punctuation", "&{"],
"free named",
["punctuation", "}"]
]]
]],
["settings", [
["section-header", "*** Settings ***"],
["property", "Suite Setup"],
" Some Keyword ",
["variable", [
["punctuation", "@{"],
"KW ARGS",
["punctuation", "}"]
]],
["property", "Suite Setup"],
["variable", [
["punctuation", "${"],
"KEYWORD",
["punctuation", "}"]
]],
["variable", [
["punctuation", "@{"],
"KW ARGS",
["punctuation", "}"]
]]
]],
["variables", [
["section-header", "*** Variables ***"],
["variable", [
["punctuation", "${"],
"ANOTHER VARIABLE",
["punctuation", "}"]
]],
" This is pretty easy!\r\n",
["variable", [
["punctuation", "${"],
"INTEGER",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"42",
["punctuation", "}"]
]],
["variable", [
["punctuation", "@{"],
"STRINGS",
["punctuation", "}"]
]],
" one two kolme four\r\n",
["variable", [
["punctuation", "@{"],
"NUMBERS",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"1",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"INTEGER",
["punctuation", "}"]
]],
["variable", [
["punctuation", "${"],
"3.14",
["punctuation", "}"]
]],
["variable", [
["punctuation", "&{"],
"MAPPING",
["punctuation", "}"]
]],
" one=",
["variable", [
["punctuation", "${"],
"1",
["punctuation", "}"]
]],
" two=",
["variable", [
["punctuation", "${"],
"2",
["punctuation", "}"]
]],
" three=",
["variable", [
["punctuation", "${"],
"3",
["punctuation", "}"]
]],
["variable", [
["punctuation", "@{"],
"ANIMALS",
["punctuation", "}"]
]],
" cat dog\r\n",
["variable", [
["punctuation", "&{"],
"FINNISH",
["punctuation", "}"]
]],
" cat=kissa dog=koira\r\n",
["variable", [
["punctuation", "${"],
"MULTILINE",
["punctuation", "}"]
]],
" SEPARATOR=\\n First line\r\n... Second line Third line"
]]
]
----------------------------------------------------
Checks for variables in different positions.
================================================
FILE: tests/languages/ruby/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/ruby/builtin_feature.test
================================================
Array Bignum Binding
Class;
Continuation Dir Exception
FalseClass File Stat File
Fixnum Float Hash Integer
IO MatchData Method Module
NilClass Numeric Object
Proc Range Regexp String
Struct TMS Symbol ThreadGroup
Thread Time TrueClass
----------------------------------------------------
[
["builtin", "Array"], ["builtin", "Bignum"], ["builtin", "Binding"],
["builtin", "Class"], ["punctuation", ";"],
["builtin", "Continuation"], ["builtin", "Dir"], ["builtin", "Exception"],
["builtin", "FalseClass"], ["builtin", "File"], ["builtin", "Stat"], ["builtin", "File"],
["builtin", "Fixnum"], ["builtin", "Float"], ["builtin", "Hash"], ["builtin", "Integer"],
["builtin", "IO"], ["builtin", "MatchData"], ["builtin", "Method"], ["builtin", "Module"],
["builtin", "NilClass"], ["builtin", "Numeric"], ["builtin", "Object"],
["builtin", "Proc"], ["builtin", "Range"], ["builtin", "Regexp"], ["builtin", "String"],
["builtin", "Struct"], ["builtin", "TMS"], ["builtin", "Symbol"], ["builtin", "ThreadGroup"],
["builtin", "Thread"], ["builtin", "Time"], ["builtin", "TrueClass"]
]
----------------------------------------------------
Checks for all builtins.
================================================
FILE: tests/languages/ruby/class-name_feature.test
================================================
class Customer
@@no_of_customers = 0
end
cust1 = Customer. new
cust2 = Customer. new
class Accounts
def reading_charge
end
def Accounts.return_date
end
end
class Salad
def self.buy_olive_oil
end
end
----------------------------------------------------
[
["keyword", "class"], ["class-name", ["Customer"]],
["variable", "@@no_of_customers"], ["operator", "="], ["number", "0"],
["keyword", "end"],
"\r\n\r\ncust1 ",
["operator", "="],
["class-name", ["Customer"]],
["punctuation", "."],
["keyword", "new"],
"\r\ncust2 ",
["operator", "="],
["class-name", ["Customer"]],
["punctuation", "."],
["keyword", "new"],
["keyword", "class"],
["class-name", ["Accounts"]],
["keyword", "def"],
["method-definition", [
["function", "reading_charge"]
]],
["keyword", "end"],
["keyword", "def"],
["method-definition", [
["class-name", "Accounts"],
["punctuation", "."],
["function", "return_date"]
]],
["keyword", "end"],
["keyword", "end"],
["keyword", "class"],
["class-name", ["Salad"]],
["keyword", "def"],
["method-definition", [
["keyword", "self"],
["punctuation", "."],
["function", "buy_olive_oil"]
]],
["keyword", "end"],
["keyword", "end"]
]
================================================
FILE: tests/languages/ruby/command_feature.test
================================================
`echo foo`
`echo #{user_input}`
`grep hosts /private/etc/* 2>&1`
%x[ ls ]
%x{ ls }
%x
%x!foo #{ 42 }!
%x(foo #{ 42 })
%x{foo #{ 42 }}
%x[foo #{ 42 }]
%x
----------------------------------------------------
[
["command-literal", [
["command", "`echo foo`"]
]],
["command-literal", [
["command", "`echo "],
["interpolation", [
["delimiter", "#{"],
["content", ["user_input"]],
["delimiter", "}"]
]],
["command", "`"]
]],
["command-literal", [
["command", "`grep hosts /private/etc/* 2>&1`"]
]],
["command-literal", [
["command", "%x[ ls ]"]
]],
["command-literal", [
["command", "%x{ ls }"]
]],
["command-literal", [
["command", "%x"]
]],
["command-literal", [
["command", "%x!foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["command", "!"]
]],
["command-literal", [
["command", "%x(foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["command", ")"]
]],
["command-literal", [
["command", "%x{foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["command", "}"]
]],
["command-literal", [
["command", "%x[foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["command", "]"]
]],
["command-literal", [
["command", "%x"]
]]
]
================================================
FILE: tests/languages/ruby/comment_feature.test
================================================
#
# foobar
=begin
foo bar baz
=end
=begin
=end
=begin foo
=end
#{comment}
----------------------------------------------------
[
["comment", "#"],
["comment", "# foobar"],
["comment", "=begin\r\nfoo bar baz\r\n=end"],
["comment", "=begin\r\n=end"],
["comment", "=begin foo\r\n=end"],
["comment", "#{comment}"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/ruby/constant_feature.test
================================================
FOO_BAR_42
F
FOO
BAR?
BAZ!
----------------------------------------------------
[
["constant", "FOO_BAR_42"],
["constant", "F"],
["constant", "FOO"],
["constant", "BAR?"],
["constant", "BAZ!"]
]
----------------------------------------------------
Checks for constants.
================================================
FILE: tests/languages/ruby/issue1336.test
================================================
:Foo
Foo::Bar
----------------------------------------------------
[
["symbol", ":Foo"],
"\r\nFoo", ["double-colon", "::"], "Bar"
]
----------------------------------------------------
Ensures module syntax is not confused with symbols. See #1336
================================================
FILE: tests/languages/ruby/keyword_feature.test
================================================
alias
and
BEGIN
begin
break
case
class;
def;
define_method
defined
do
each
else
elsif
END
end
ensure
extend
for
if
in
include
module;
new;
next
nil
not
or
prepend
protected
private
public
raise
redo
require
rescue
retry
return
self
super
then
throw
undef
unless
until
when
while
yield
----------------------------------------------------
[
["keyword", "alias"],
["keyword", "and"],
["keyword", "BEGIN"],
["keyword", "begin"],
["keyword", "break"],
["keyword", "case"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "def"], ["punctuation", ";"],
["keyword", "define_method"],
["keyword", "defined"],
["keyword", "do"],
["keyword", "each"],
["keyword", "else"],
["keyword", "elsif"],
["keyword", "END"],
["keyword", "end"],
["keyword", "ensure"],
["keyword", "extend"],
["keyword", "for"],
["keyword", "if"],
["keyword", "in"],
["keyword", "include"],
["keyword", "module"], ["punctuation", ";"],
["keyword", "new"], ["punctuation", ";"],
["keyword", "next"],
["keyword", "nil"],
["keyword", "not"],
["keyword", "or"],
["keyword", "prepend"],
["keyword", "protected"],
["keyword", "private"],
["keyword", "public"],
["keyword", "raise"],
["keyword", "redo"],
["keyword", "require"],
["keyword", "rescue"],
["keyword", "retry"],
["keyword", "return"],
["keyword", "self"],
["keyword", "super"],
["keyword", "then"],
["keyword", "throw"],
["keyword", "undef"],
["keyword", "unless"],
["keyword", "until"],
["keyword", "when"],
["keyword", "while"],
["keyword", "yield"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/ruby/method_definition_feature.test
================================================
class Circle
def self.of_diameter(diameter)
new diameter / 2
end
def initialize(radius)
@radius = radius
end
def circumference
Math::PI * radius ** 2
end
# Seattle style
def grow_by factor:
@radius = @radius * factor
end
end
----------------------------------------------------
[
["keyword", "class"],
["class-name", ["Circle"]],
["keyword", "def"],
["method-definition", [
["keyword", "self"],
["punctuation", "."],
["function", "of_diameter"]
]],
["punctuation", "("],
"diameter",
["punctuation", ")"],
["keyword", "new"],
" diameter ",
["operator", "/"],
["number", "2"],
["keyword", "end"],
["keyword", "def"],
["method-definition", [
["function", "initialize"]
]],
["punctuation", "("],
"radius",
["punctuation", ")"],
["variable", "@radius"],
["operator", "="],
" radius\r\n ",
["keyword", "end"],
["keyword", "def"],
["method-definition", [
["function", "circumference"]
]],
"\r\n Math",
["double-colon", "::"],
["constant", "PI"],
["operator", "*"],
" radius ",
["operator", "**"],
["number", "2"],
["keyword", "end"],
["comment", "# Seattle style"],
["keyword", "def"],
["method-definition", [
["function", "grow_by"]
]],
" factor",
["operator", ":"],
["variable", "@radius"],
["operator", "="],
["variable", "@radius"],
["operator", "*"],
" factor\r\n ",
["keyword", "end"],
["keyword", "end"]
]
----------------------------------------------------
Checks that method definitions are highlighted correctly
================================================
FILE: tests/languages/ruby/operator_feature.test
================================================
+ - * / % **
+= -= *= /= %= **=
== != < > <= >= <=> ===
!~ =~
=
& | ^ ~ << >>
&= |= ^= <<= >>=
&& || !
&&= ||=
=>
&.
? :
.. ...
and or not
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "**"],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "%="],
["operator", "**="],
["operator", "=="],
["operator", "!="],
["operator", "<"],
["operator", ">"],
["operator", "<="],
["operator", ">="],
["operator", "<=>"],
["operator", "==="],
["operator", "!~"],
["operator", "=~"],
["operator", "="],
["operator", "&"],
["operator", "|"],
["operator", "^"],
["operator", "~"],
["operator", "<<"],
["operator", ">>"],
["operator", "&="],
["operator", "|="],
["operator", "^="],
["operator", "<<="],
["operator", ">>="],
["operator", "&&"],
["operator", "||"],
["operator", "!"],
["operator", "&&="],
["operator", "||="],
["operator", "=>"],
["operator", "&."],
["operator", "?"], ["operator", ":"],
["operator", ".."], ["operator", "..."],
["keyword", "and"], ["keyword", "or"], ["keyword", "not"]
]
================================================
FILE: tests/languages/ruby/punctuation_feature.test
================================================
( ) { } [ ]
. , ;
::
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "."],
["punctuation", ","],
["punctuation", ";"],
["double-colon", "::"]
]
================================================
FILE: tests/languages/ruby/regex_feature.test
================================================
/[foo]\/bar/gim
/[bar]/,
/./i;
/foo#{bar}/;
/ab+c/ix
%r!foo?bar#{39+3}!
%r(foo?bar#{39+3})
%r{foo?bar#{39+3}}
%r[foo?bar#{39+3}]
%r
/foo/ # comment
/foo#{bar}/ # comment
# flags
/abc/e
/abc/g
/abc/i
/abc/m
/abc/n
/abc/o
/abc/s
/abc/u
/abc/x
----------------------------------------------------
[
["regex-literal", [
["regex", "/[foo]\\/bar/gim"]
]],
["regex-literal", [
["regex", "/[bar]/"]
]],
["punctuation", ","],
["regex-literal", [
["regex", "/./i"]
]],
["punctuation", ";"],
["regex-literal", [
["regex", "/foo"],
["interpolation", [
["delimiter", "#{"],
["content", ["bar"]],
["delimiter", "}"]
]],
["regex", "/"]
]],
["punctuation", ";"],
["regex-literal", [
["regex", "/ab+c/ix"]
]],
["regex-literal", [
["regex", "%r!foo?bar"],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "39"],
["operator", "+"],
["number", "3"]
]],
["delimiter", "}"]
]],
["regex", "!"]
]],
["regex-literal", [
["regex", "%r(foo?bar"],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "39"],
["operator", "+"],
["number", "3"]
]],
["delimiter", "}"]
]],
["regex", ")"]
]],
["regex-literal", [
["regex", "%r{foo?bar"],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "39"],
["operator", "+"],
["number", "3"]
]],
["delimiter", "}"]
]],
["regex", "}"]
]],
["regex-literal", [
["regex", "%r[foo?bar"],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "39"],
["operator", "+"],
["number", "3"]
]],
["delimiter", "}"]
]],
["regex", "]"]
]],
["regex-literal", [
["regex", "%r"]
]],
["regex-literal", [
["regex", "/foo/"]
]],
["comment", "# comment"],
["regex-literal", [
["regex", "/foo"],
["interpolation", [
["delimiter", "#{"],
["content", ["bar"]],
["delimiter", "}"]
]],
["regex", "/"]
]],
["comment", "# comment"],
["comment", "# flags"],
["regex-literal", [
["regex", "/abc/e"]
]],
["regex-literal", [
["regex", "/abc/g"]
]],
["regex-literal", [
["regex", "/abc/i"]
]],
["regex-literal", [
["regex", "/abc/m"]
]],
["regex-literal", [
["regex", "/abc/n"]
]],
["regex-literal", [
["regex", "/abc/o"]
]],
["regex-literal", [
["regex", "/abc/s"]
]],
["regex-literal", [
["regex", "/abc/u"]
]],
["regex-literal", [
["regex", "/abc/x"]
]]
]
----------------------------------------------------
Checks for regex.
================================================
FILE: tests/languages/ruby/string_feature.test
================================================
''
""
'foo'
"foo"
'foo\
bar'
"foo\
bar"
"foo #bar"
"foo #{ 42 } bar"
"\#{a + b}"
%!foo #{ 42 }!
%(foo #{ 42 })
%{foo #{ 42 }}
%[foo #{ 42 }]
%
%Q!foo #{ 42 }!
%Q(foo #{ 42 })
%Q{foo #{ 42 }}
%Q[foo #{ 42 }]
%Q
%I!foo #{ 42 }!
%I(foo #{ 42 })
%I{foo #{ 42 }}
%I[foo #{ 42 }]
%I
%W!foo #{ 42 }!
%W(foo #{ 42 })
%W{foo #{ 42 }}
%W[foo #{ 42 }]
%W
<"]
]],
["string-literal", [
["string", "%Q!foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", "!"]
]],
["string-literal", [
["string", "%Q(foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", ")"]
]],
["string-literal", [
["string", "%Q{foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", "}"]
]],
["string-literal", [
["string", "%Q[foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", "]"]
]],
["string-literal", [
["string", "%Q"]
]],
["string-literal", [
["string", "%I!foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", "!"]
]],
["string-literal", [
["string", "%I(foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", ")"]
]],
["string-literal", [
["string", "%I{foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", "}"]
]],
["string-literal", [
["string", "%I[foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", "]"]
]],
["string-literal", [
["string", "%I"]
]],
["string-literal", [
["string", "%W!foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", "!"]
]],
["string-literal", [
["string", "%W(foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", ")"]
]],
["string-literal", [
["string", "%W{foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", "}"]
]],
["string-literal", [
["string", "%W[foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", "]"]
]],
["string-literal", [
["string", "%W"]
]],
["string-literal", [
["delimiter", [
["punctuation", "<<"],
["symbol", "STRING"]
]],
["string", "\r\n foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", " bar\r\n"],
["delimiter", [
["symbol", "STRING"]
]]
]],
["string-literal", [
["delimiter", [
["punctuation", "<<-"],
["symbol", "STRING"]
]],
["string", "\r\n foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", " bar\r\n "],
["delimiter", [
["symbol", "STRING"]
]]
]],
["string-literal", [
["delimiter", [
["punctuation", "<<~"],
["symbol", "STRING"]
]],
["string", "\r\n foo "],
["interpolation", [
["delimiter", "#{"],
["content", [
["number", "42"]
]],
["delimiter", "}"]
]],
["string", " bar\r\n "],
["delimiter", [
["symbol", "STRING"]
]]
]],
["string-literal", [
["delimiter", [
["punctuation", "<<'"],
["symbol", "STRING"],
["punctuation", "'"]
]],
["string", "\r\n foo #{42} bar\r\n"],
["delimiter", [
["symbol", "STRING"]
]]
]],
["string-literal", [
["delimiter", [
["punctuation", "<<-'"],
["symbol", "STRING"],
["punctuation", "'"]
]],
["string", "\r\n foo #{42} bar\r\n "],
["delimiter", [
["symbol", "STRING"]
]]
]],
["string-literal", [
["delimiter", [
["punctuation", "<<~'"],
["symbol", "STRING"],
["punctuation", "'"]
]],
["string", "\r\n foo #{42} bar\r\n "],
["delimiter", [
["symbol", "STRING"]
]]
]]
]
----------------------------------------------------
Checks for strings and string interpolation.
================================================
FILE: tests/languages/ruby/symbol_feature.test
================================================
:_
:foo
:BAR?
:Baz_42!
:あ
:"name"
:"\u{c4 d6 dc}"
:question?
:exclamation!
:$;
:foo.object_id
# in hashes
{ :one => "eins", :two => "zwei", :three => "drei" }
{ one: "eins", two: "zwei", three: "drei" }
----------------------------------------------------
[
["symbol", ":_"],
["symbol", ":foo"],
["symbol", ":BAR?"],
["symbol", ":Baz_42!"],
["symbol", ":あ"],
["symbol", ":\"name\""],
["symbol", ":\"\\u{c4 d6 dc}\""],
["symbol", ":question?"],
["symbol", ":exclamation!"],
["symbol", ":$;"],
["symbol", ":foo"], ["punctuation", "."], "object_id\r\n\r\n",
["comment", "# in hashes"],
["punctuation", "{"],
["symbol", ":one"],
["operator", "=>"],
["string-literal", [
["string", "\"eins\""]
]],
["punctuation", ","],
["symbol", ":two"],
["operator", "=>"],
["string-literal", [
["string", "\"zwei\""]
]],
["punctuation", ","],
["symbol", ":three"],
["operator", "=>"],
["string-literal", [
["string", "\"drei\""]
]],
["punctuation", "}"],
["punctuation", "{"],
["symbol", "one"],
["operator", ":"],
["string-literal", [
["string", "\"eins\""]
]],
["punctuation", ","],
["symbol", "two"],
["operator", ":"],
["string-literal", [
["string", "\"zwei\""]
]],
["punctuation", ","],
["symbol", "three"],
["operator", ":"],
["string-literal", [
["string", "\"drei\""]
]],
["punctuation", "}"]
]
----------------------------------------------------
Checks for symbols.
================================================
FILE: tests/languages/ruby/variable_feature.test
================================================
$_
$foo
$BAR?
$Baz_42!
@_
@foo
@BAR?
@Baz_42!
----------------------------------------------------
[
["variable", "$_"],
["variable", "$foo"],
["variable", "$BAR?"],
["variable", "$Baz_42!"],
["variable", "@_"],
["variable", "@foo"],
["variable", "@BAR?"],
["variable", "@Baz_42!"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/ruby+haml/ruby_inclusion.test
================================================
:ruby
def circumference
Math::PI * radius ** 2
end
~
:ruby
def circumference
Math::PI * radius ** 2
end
----------------------------------------------------
[
["filter-ruby", [
["filter-name", ":ruby"],
["text", [
["keyword", "def"],
["method-definition", [
["function", "circumference"]
]],
"\r\n\t\tMath",
["double-colon", "::"],
["constant", "PI"],
["operator", "*"],
" radius ",
["operator", "**"],
["number", "2"],
["keyword", "end"]
]]
]],
["punctuation", "~"],
["filter-ruby", [
["filter-name", ":ruby"],
["text", [
["keyword", "def"],
["method-definition", [
["function", "circumference"]
]],
"\r\n\t\t\tMath",
["double-colon", "::"],
["constant", "PI"],
["operator", "*"],
" radius ",
["operator", "**"],
["number", "2"],
["keyword", "end"]
]]
]]
]
================================================
FILE: tests/languages/rust/attribute_feature.test
================================================
#[test]
#![warn(unstable)]
#[doc(hidden)]
#[unstable(
feature = "thread_local_internals",
reason = "recently added to create a key",
issue = "none"
)]
----------------------------------------------------
[
["attribute", [
"#[test]"
]],
["attribute", [
"#![warn(unstable)]"
]],
["attribute", [
"#[doc(hidden)]"
]],
["attribute", [
"#[unstable(\r\n\tfeature = ",
["string", "\"thread_local_internals\""],
",\r\n\treason = ",
["string", "\"recently added to create a key\""],
",\r\n\tissue = ",
["string", "\"none\""],
"\r\n)]"
]]
]
----------------------------------------------------
Checks for attributes.
================================================
FILE: tests/languages/rust/boolean_feature.test
================================================
false
true
----------------------------------------------------
[
["boolean", "false"],
["boolean", "true"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/rust/char_feature.test
================================================
'a'
'स'
'\''
'\n'
'\u{00e9}'
'\x41'
----------------------------------------------------
[
["char", "'a'"],
["char", "'स'"],
["char", "'\\''"],
["char", "'\\n'"],
["char", "'\\u{00e9}'"],
["char", "'\\x41'"]
]
----------------------------------------------------
Checks for chars.
================================================
FILE: tests/languages/rust/class-name_feature.test
================================================
struct foo {}
let foo: CStr;
let foo: &'a CStr;
let foo: &'a Foo;
Option::Some(foo);
Option::None;
// we can differentiate between enum variants and class names
// so let's make the bug a feature!
enum Foo {
Const,
Tuple(i8,i8),
Struct {
foo: u8
}
}
pub trait Summary {
fn summarize(&self) -> String;
}
type Point = (u8, u8);
----------------------------------------------------
[
["keyword", "struct"],
["type-definition", "foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "let"],
" foo",
["punctuation", ":"],
["class-name", "CStr"],
["punctuation", ";"],
["keyword", "let"],
" foo",
["punctuation", ":"],
["operator", "&"],
["lifetime-annotation", "'a"],
["class-name", "CStr"],
["punctuation", ";"],
["keyword", "let"],
" foo",
["punctuation", ":"],
["operator", "&"],
["lifetime-annotation", "'a"],
["class-name", "Foo"],
["operator", "<"],
["keyword", "dyn"],
["class-name", "Bar"],
["operator", ">"],
["punctuation", ";"],
["class-name", "Option"],
["punctuation", "::"],
["class-name", "Some"],
["punctuation", "("],
"foo",
["punctuation", ")"],
["punctuation", ";"],
["class-name", "Option"],
["punctuation", "::"],
["class-name", "None"],
["punctuation", ";"],
["comment", "// we can differentiate between enum variants and class names"],
["comment", "// so let's make the bug a feature!"],
["keyword", "enum"],
["type-definition", "Foo"],
["punctuation", "{"],
["class-name", "Const"],
["punctuation", ","],
["class-name", "Tuple"],
["punctuation", "("],
["keyword", "i8"],
["punctuation", ","],
["keyword", "i8"],
["punctuation", ")"],
["punctuation", ","],
["class-name", "Struct"],
["punctuation", "{"],
"\r\n\t\tfoo",
["punctuation", ":"],
["keyword", "u8"],
["punctuation", "}"],
["punctuation", "}"],
["keyword", "pub"],
["keyword", "trait"],
["type-definition", "Summary"],
["punctuation", "{"],
["keyword", "fn"],
["function-definition", "summarize"],
["punctuation", "("],
["operator", "&"],
["keyword", "self"],
["punctuation", ")"],
["punctuation", "->"],
["class-name", "String"],
["punctuation", ";"],
["punctuation", "}"],
["keyword", "type"],
["type-definition", "Point"],
["operator", "="],
["punctuation", "("],
["keyword", "u8"],
["punctuation", ","],
["keyword", "u8"],
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for class names and enum variants.
================================================
FILE: tests/languages/rust/closure-params_feature.test
================================================
|x: int, y: int| -> int {}
|| {}
vec1.iter().any(|&x| x == 2);
foo(123, || x * x);
let add_one_v2 = |x: u32| -> u32 { x + 1 };
let add_one_v3 = |x| { x + 1 };
let add_one_v4 = |x| x + 1 ;
move || println!("This is a: {}", text)
----------------------------------------------------
[
["closure-params", [
["closure-punctuation", "|"],
"x",
["punctuation", ":"],
" int",
["punctuation", ","],
" y",
["punctuation", ":"],
" int",
["closure-punctuation", "|"]
]],
["punctuation", "->"],
" int ",
["punctuation", "{"],
["punctuation", "}"],
["closure-params", [
["closure-punctuation", "|"],
["closure-punctuation", "|"]
]],
["punctuation", "{"],
["punctuation", "}"],
"\r\n\r\nvec1",
["punctuation", "."],
["function", "iter"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "."],
["function", "any"],
["punctuation", "("],
["closure-params", [
["closure-punctuation", "|"],
["operator", "&"],
"x",
["closure-punctuation", "|"]
]],
" x ",
["operator", "=="],
["number", "2"],
["punctuation", ")"],
["punctuation", ";"],
["function", "foo"],
["punctuation", "("],
["number", "123"],
["punctuation", ","],
["closure-params", [
["closure-punctuation", "|"],
["closure-punctuation", "|"]
]],
" x ",
["operator", "*"],
" x",
["punctuation", ")"],
["punctuation", ";"],
["keyword", "let"],
" add_one_v2 ",
["operator", "="],
["closure-params", [
["closure-punctuation", "|"],
"x",
["punctuation", ":"],
["keyword", "u32"],
["closure-punctuation", "|"]
]],
["punctuation", "->"],
["keyword", "u32"],
["punctuation", "{"],
" x ",
["operator", "+"],
["number", "1"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "let"],
" add_one_v3 ",
["operator", "="],
["closure-params", [
["closure-punctuation", "|"],
"x",
["closure-punctuation", "|"]
]],
["punctuation", "{"],
" x ",
["operator", "+"],
["number", "1"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "let"],
" add_one_v4 ",
["operator", "="],
["closure-params", [
["closure-punctuation", "|"],
"x",
["closure-punctuation", "|"]
]],
" x ",
["operator", "+"],
["number", "1"],
["punctuation", ";"],
["keyword", "move"],
["closure-params", [
["closure-punctuation", "|"],
["closure-punctuation", "|"]
]],
["macro", "println!"],
["punctuation", "("],
["string", "\"This is a: {}\""],
["punctuation", ","],
" text",
["punctuation", ")"]
]
----------------------------------------------------
Checks for closure params.
================================================
FILE: tests/languages/rust/comment_feature.test
================================================
//
// foobar
/**/
/* foo
bar */
/* /* */ /** */ /*! */ */
/*! /* */ /** */ /*! */ */
/** /* */ /** */ /*! */ */
----------------------------------------------------
[
["comment", "//"],
["comment", "// foobar"],
["comment", "/**/"],
["comment", "/* foo\r\nbar */"],
["comment", "/* /* */ /** */ /*! */ */"],
["comment", "/*! /* */ /** */ /*! */ */"],
["comment", "/** /* */ /** */ /*! */ */"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/rust/constant_feature.test
================================================
MAX
SOME_CONSTANT
// not a constant
T
----------------------------------------------------
[
["constant", "MAX"],
["constant", "SOME_CONSTANT"],
["comment", "// not a constant"],
["class-name", "T"]
]
----------------------------------------------------
Checks for constants.
================================================
FILE: tests/languages/rust/function_feature.test
================================================
foo (
foobar(
foo_bar_42(
foo_generic::>()
mem::transmute::, Box>()
fn apply(f: F) where F: FnOnce() {
f();
}
----------------------------------------------------
[
["function", "foo"],
["punctuation", "("],
["function", "foobar"],
["punctuation", "("],
["function", "foo_bar_42"],
["punctuation", "("],
["function", "foo_generic"],
["punctuation", "::"],
["operator", "<"],
["class-name", "T"],
["punctuation", ","],
["class-name", "Option"],
["operator", "<"],
["class-name", "T"],
["operator", ">>"],
["punctuation", "("],
["punctuation", ")"],
["namespace", [
"mem",
["punctuation", "::"]
]],
["function", "transmute"],
["punctuation", "::"],
["operator", "<"],
["class-name", "Box"],
["operator", "<"],
["keyword", "dyn"],
["class-name", "FnOnce"],
["punctuation", "("],
["punctuation", ")"],
["operator", "+"],
["lifetime-annotation", "'a"],
["operator", ">"],
["punctuation", ","],
["class-name", "Box"],
["operator", "<"],
["keyword", "dyn"],
["class-name", "FnOnce"],
["punctuation", "("],
["punctuation", ")"],
["operator", "+"],
["lifetime-annotation", "'static"],
["operator", ">>"],
["punctuation", "("],
["punctuation", ")"],
["keyword", "fn"],
["function-definition", "apply"],
["operator", "<"],
["class-name", "F"],
["operator", ">"],
["punctuation", "("],
"f",
["punctuation", ":"],
["class-name", "F"],
["punctuation", ")"],
["keyword", "where"],
["class-name", "F"],
["punctuation", ":"],
["class-name", "FnOnce"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["function", "f"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for functions and macros.
================================================
FILE: tests/languages/rust/issue1339.test
================================================
const ALL_CARDS: &'static [&'static char] = &["2"]
fn foo<'a> (first: &'a str, second: &'a str) => () { }
----------------------------------------------------
[
["keyword", "const"],
["constant", "ALL_CARDS"],
["punctuation", ":"],
["operator", "&"],
["lifetime-annotation", "'static"],
["punctuation", "["],
["operator", "&"],
["lifetime-annotation", "'static"],
["keyword", "char"],
["punctuation", "]"],
["operator", "="],
["operator", "&"],
["punctuation", "["],
["string", "\"2\""],
["punctuation", "]"],
["keyword", "fn"],
["function-definition", "foo"],
["operator", "<"],
["lifetime-annotation", "'a"],
["operator", ">"],
["punctuation", "("],
"first",
["punctuation", ":"],
["operator", "&"],
["lifetime-annotation", "'a"],
["keyword", "str"],
["punctuation", ","],
" second",
["punctuation", ":"],
["operator", "&"],
["lifetime-annotation", "'a"],
["keyword", "str"],
["punctuation", ")"],
["operator", "=>"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for lifetime annotations in real-world examples. See #1339.
================================================
FILE: tests/languages/rust/issue1353.test
================================================
(*e 0 b'a')
----------------------------------------------------
[
["punctuation", "("],
["operator", "*"],
"e ",
["number", "0"],
["char", "b'a'"],
["punctuation", ")"]
]
----------------------------------------------------
Makes sure lifetime annotations do not mess with bytes. See #1353.
================================================
FILE: tests/languages/rust/keyword_feature.test
================================================
abstract;
as;
async;
await;
become;
box;
break;
const;
continue;
crate;
do;
dyn;
else;
enum;
extern;
final;
fn;
for;
if;
impl;
in;
let;
loop;
macro;
match;
mod;
move;
mut;
override;
priv;
pub;
ref;
return;
self;
Self;
static;
struct;
super;
trait;
try;
type;
typeof;
union;
unsafe;
unsized;
use;
virtual;
where;
while;
yield;
----------------------------------------------------
[
["keyword", "abstract"], ["punctuation", ";"],
["keyword", "as"], ["punctuation", ";"],
["keyword", "async"], ["punctuation", ";"],
["keyword", "await"], ["punctuation", ";"],
["keyword", "become"], ["punctuation", ";"],
["keyword", "box"], ["punctuation", ";"],
["keyword", "break"], ["punctuation", ";"],
["keyword", "const"], ["punctuation", ";"],
["keyword", "continue"], ["punctuation", ";"],
["keyword", "crate"], ["punctuation", ";"],
["keyword", "do"], ["punctuation", ";"],
["keyword", "dyn"], ["punctuation", ";"],
["keyword", "else"], ["punctuation", ";"],
["keyword", "enum"], ["punctuation", ";"],
["keyword", "extern"], ["punctuation", ";"],
["keyword", "final"], ["punctuation", ";"],
["keyword", "fn"], ["punctuation", ";"],
["keyword", "for"], ["punctuation", ";"],
["keyword", "if"], ["punctuation", ";"],
["keyword", "impl"], ["punctuation", ";"],
["keyword", "in"], ["punctuation", ";"],
["keyword", "let"], ["punctuation", ";"],
["keyword", "loop"], ["punctuation", ";"],
["keyword", "macro"], ["punctuation", ";"],
["keyword", "match"], ["punctuation", ";"],
["keyword", "mod"], ["punctuation", ";"],
["keyword", "move"], ["punctuation", ";"],
["keyword", "mut"], ["punctuation", ";"],
["keyword", "override"], ["punctuation", ";"],
["keyword", "priv"], ["punctuation", ";"],
["keyword", "pub"], ["punctuation", ";"],
["keyword", "ref"], ["punctuation", ";"],
["keyword", "return"], ["punctuation", ";"],
["keyword", "self"], ["punctuation", ";"],
["keyword", "Self"], ["punctuation", ";"],
["keyword", "static"], ["punctuation", ";"],
["keyword", "struct"], ["punctuation", ";"],
["keyword", "super"], ["punctuation", ";"],
["keyword", "trait"], ["punctuation", ";"],
["keyword", "try"], ["punctuation", ";"],
["keyword", "type"], ["punctuation", ";"],
["keyword", "typeof"], ["punctuation", ";"],
["keyword", "union"], ["punctuation", ";"],
["keyword", "unsafe"], ["punctuation", ";"],
["keyword", "unsized"], ["punctuation", ";"],
["keyword", "use"], ["punctuation", ";"],
["keyword", "virtual"], ["punctuation", ";"],
["keyword", "where"], ["punctuation", ";"],
["keyword", "while"], ["punctuation", ";"],
["keyword", "yield"], ["punctuation", ";"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/rust/lifetime-annotation_feature.test
================================================
'static
'foo
'a
'_
<'a>
----------------------------------------------------
[
["lifetime-annotation", "'static"],
["lifetime-annotation", "'foo"],
["lifetime-annotation", "'a"],
["lifetime-annotation", "'_"],
["operator", "<"], ["lifetime-annotation", "'a"], ["operator", ">"]
]
----------------------------------------------------
Checks for lifetime annotations.
================================================
FILE: tests/languages/rust/macro_example.test
================================================
macro_rules! write_html {
($w:expr, ) => (());
($w:expr, $e:tt) => (write!($w, "{}", $e));
($w:expr, $tag:ident [ $($inner:tt)* ] $($rest:tt)*) => {{
write!($w, "<{}>", stringify!($tag));
write_html!($w, $($inner)*);
write!($w, "{}>", stringify!($tag));
write_html!($w, $($rest)*);
}};
}
----------------------------------------------------
[
["macro", "macro_rules!"],
" write_html ",
["punctuation", "{"],
["punctuation", "("],
["variable", "$w"],
["punctuation", ":"],
["fragment-specifier", "expr"],
["punctuation", ","],
["punctuation", ")"],
["operator", "=>"],
["punctuation", "("],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "("],
["variable", "$w"],
["punctuation", ":"],
["fragment-specifier", "expr"],
["punctuation", ","],
["variable", "$e"],
["punctuation", ":"],
["fragment-specifier", "tt"],
["punctuation", ")"],
["operator", "=>"],
["punctuation", "("],
["macro", "write!"],
["punctuation", "("],
["variable", "$w"],
["punctuation", ","],
["string", "\"{}\""],
["punctuation", ","],
["variable", "$e"],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "("],
["variable", "$w"],
["punctuation", ":"],
["fragment-specifier", "expr"],
["punctuation", ","],
["variable", "$tag"],
["punctuation", ":"],
["fragment-specifier", "ident"],
["punctuation", "["],
" $",
["punctuation", "("],
["variable", "$inner"],
["punctuation", ":"],
["fragment-specifier", "tt"],
["punctuation", ")"],
["operator", "*"],
["punctuation", "]"],
" $",
["punctuation", "("],
["variable", "$rest"],
["punctuation", ":"],
["fragment-specifier", "tt"],
["punctuation", ")"],
["operator", "*"],
["punctuation", ")"],
["operator", "=>"],
["punctuation", "{"],
["punctuation", "{"],
["macro", "write!"],
["punctuation", "("],
["variable", "$w"],
["punctuation", ","],
["string", "\"<{}>\""],
["punctuation", ","],
["macro", "stringify!"],
["punctuation", "("],
["variable", "$tag"],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ";"],
["macro", "write_html!"],
["punctuation", "("],
["variable", "$w"],
["punctuation", ","],
" $",
["punctuation", "("],
["variable", "$inner"],
["punctuation", ")"],
["operator", "*"],
["punctuation", ")"],
["punctuation", ";"],
["macro", "write!"],
["punctuation", "("],
["variable", "$w"],
["punctuation", ","],
["string", "\"{}>\""],
["punctuation", ","],
["macro", "stringify!"],
["punctuation", "("],
["variable", "$tag"],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ";"],
["macro", "write_html!"],
["punctuation", "("],
["variable", "$w"],
["punctuation", ","],
" $",
["punctuation", "("],
["variable", "$rest"],
["punctuation", ")"],
["operator", "*"],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", "}"],
["punctuation", ";"],
["punctuation", "}"]
]
----------------------------------------------------
Checks this macro example.
================================================
FILE: tests/languages/rust/macro_feature.test
================================================
foo!
foo_bar!
foo_bar_42!
----------------------------------------------------
[
["macro", "foo!"],
["macro", "foo_bar!"],
["macro", "foo_bar_42!"]
]
----------------------------------------------------
Checks for macros.
================================================
FILE: tests/languages/rust/namespace_feature.test
================================================
use std::{
fs::File,
io::{BufRead, BufReader},
path::PathBuf,
};
use ::serde::de::{Error, Visitor};
use std::sync::atomic::{AtomicBool, Ordering};
pub mod sample;
extern crate test;
Result
where D: serde::Deserializer<'de>,
serde_json::from_str(&line)
self.read_records::()
pub static ALLOCATOR: alloc::Tracing = alloc::Tracing::new();
unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 {}
use crate::cool::function as root_function;
self::cool::function();
----------------------------------------------------
[
["keyword", "use"],
["namespace", [
"std",
["punctuation", "::"]
]],
["punctuation", "{"],
["namespace", [
"fs",
["punctuation", "::"]
]],
["class-name", "File"],
["punctuation", ","],
["namespace", [
"io",
["punctuation", "::"]
]],
["punctuation", "{"],
["class-name", "BufRead"],
["punctuation", ","],
["class-name", "BufReader"],
["punctuation", "}"],
["punctuation", ","],
["namespace", [
"path",
["punctuation", "::"]
]],
["class-name", "PathBuf"],
["punctuation", ","],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "use"],
["punctuation", "::"],
["namespace", [
"serde",
["punctuation", "::"],
"de",
["punctuation", "::"]
]],
["punctuation", "{"],
["class-name", "Error"],
["punctuation", ","],
["class-name", "Visitor"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "use"],
["namespace", [
"std",
["punctuation", "::"],
"sync",
["punctuation", "::"],
"atomic",
["punctuation", "::"]
]],
["punctuation", "{"],
["class-name", "AtomicBool"],
["punctuation", ","],
["class-name", "Ordering"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "pub"],
["keyword", "mod"],
["module-declaration", "sample"],
["punctuation", ";"],
["keyword", "extern"],
["keyword", "crate"],
["module-declaration", "test"],
["punctuation", ";"],
["class-name", "Result"],
["operator", "<"],
["keyword", "Self"],
["punctuation", ","],
["class-name", "D"],
["punctuation", "::"],
["class-name", "Error"],
["operator", ">"],
["keyword", "where"],
["class-name", "D"],
["punctuation", ":"],
["namespace", [
"serde",
["punctuation", "::"]
]],
["class-name", "Deserializer"],
["operator", "<"],
["lifetime-annotation", "'de"],
["operator", ">"],
["punctuation", ","],
["namespace", [
"serde_json",
["punctuation", "::"]
]],
["function", "from_str"],
["punctuation", "("],
["operator", "&"],
"line",
["punctuation", ")"],
["keyword", "self"],
["punctuation", "."],
["function", "read_records"],
["punctuation", "::"],
["operator", "<"],
["namespace", [
"smol_str",
["punctuation", "::"]
]],
["class-name", "SmolStr"],
["operator", ">"],
["punctuation", "("],
["punctuation", ")"],
["keyword", "pub"],
["keyword", "static"],
["constant", "ALLOCATOR"],
["punctuation", ":"],
["namespace", [
"alloc",
["punctuation", "::"]
]],
["class-name", "Tracing"],
["operator", "="],
["namespace", [
"alloc",
["punctuation", "::"]
]],
["class-name", "Tracing"],
["punctuation", "::"],
["function", "new"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "unsafe"],
["keyword", "fn"],
["function-definition", "alloc"],
["punctuation", "("],
["operator", "&"],
["keyword", "self"],
["punctuation", ","],
" layout",
["punctuation", ":"],
["namespace", [
"std",
["punctuation", "::"],
"alloc",
["punctuation", "::"]
]],
["class-name", "Layout"],
["punctuation", ")"],
["punctuation", "->"],
["operator", "*"],
["keyword", "mut"],
["keyword", "u8"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "use"],
["keyword", "crate"],
["module-declaration", [
["punctuation", "::"],
"cool",
["punctuation", "::"]
]],
"function ",
["keyword", "as"],
" root_function",
["punctuation", ";"],
["keyword", "self"],
["module-declaration", [
["punctuation", "::"],
"cool",
["punctuation", "::"]
]],
["function", "function"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for namespaces.
================================================
FILE: tests/languages/rust/number_feature.test
================================================
0xBad_Face
0o741_123
0b0000_1111
42_000
3.14_15_9
3e4
3.5E-8
4.6e+41
0xBad_Faceu8
0o741_123i8
0b0000_1111u16
42_000i16
3.14_15_9u32
3e4i32
3.5E-8u64
4.6e+41i64
4.2f32
4.2f64
0usize
----------------------------------------------------
[
["number", "0xBad_Face"],
["number", "0o741_123"],
["number", "0b0000_1111"],
["number", "42_000"],
["number", "3.14_15_9"],
["number", "3e4"],
["number", "3.5E-8"],
["number", "4.6e+41"],
["number", "0xBad_Faceu8"],
["number", "0o741_123i8"],
["number", "0b0000_1111u16"],
["number", "42_000i16"],
["number", "3.14_15_9u32"],
["number", "3e4i32"],
["number", "3.5E-8u64"],
["number", "4.6e+41i64"],
["number", "4.2f32"],
["number", "4.2f64"],
["number", "0usize"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/rust/operator_feature.test
================================================
+ +=
- -=
* *=
/ /=
% %=
! !=
^ ^=
= == =>
& && &= ;
| || |=
< << <= <<=
> >> >= >>=
@ ?
----------------------------------------------------
[
["operator", "+"], ["operator", "+="],
["operator", "-"], ["operator", "-="],
["operator", "*"], ["operator", "*="],
["operator", "/"], ["operator", "/="],
["operator", "%"], ["operator", "%="],
["operator", "!"], ["operator", "!="],
["operator", "^"], ["operator", "^="],
["operator", "="], ["operator", "=="], ["operator", "=>"],
["operator", "&"], ["operator", "&&"], ["operator", "&="], ["punctuation", ";"],
["operator", "|"], ["operator", "||"], ["operator", "|="],
["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", "<<="],
["operator", ">"], ["operator", ">>"], ["operator", ">="], ["operator", ">>="],
["operator", "@"], ["operator", "?"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/rust/punctuation_feature.test
================================================
->
. .. ... ..=
::
{} [] ()
; , :
----------------------------------------------------
[
["punctuation", "->"],
["punctuation", "."],
["punctuation", ".."],
["punctuation", "..."],
["punctuation", "..="],
["punctuation", "::"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", ","],
["punctuation", ":"]
]
----------------------------------------------------
Checks for all punctuation.
================================================
FILE: tests/languages/rust/string_feature.test
================================================
""
"fo\"obar"
"foo\
bar"
"foo
bar"
b""
b"fo\"obar"
r#""#
r#"fo"obar"#
r###"foo
#
bar"###
br#""#
br#"fo"obar"#
br###"foo#bar"###
r"(?x)
(?P\d{4}) # the year
-
(?P\d{2}) # the month
-
(?P\d{2}) # the day
"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "\"foo\\\r\n\tbar\""],
["string", "\"foo\r\nbar\""],
["string", "b\"\""],
["string", "b\"fo\\\"obar\""],
["string", "r#\"\"#"],
["string", "r#\"fo\"obar\"#"],
["string", "r###\"foo\r\n#\r\nbar\"###"],
["string", "br#\"\"#"],
["string", "br#\"fo\"obar\"#"],
["string", "br###\"foo#bar\"###"],
["string", "r\"(?x)\r\n(?P\\d{4}) # the year\r\n-\r\n(?P\\d{2}) # the month\r\n-\r\n(?P\\d{2}) # the day\r\n\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/sas/comment_feature.test
================================================
* foobar;
foo; * foobar;
/* foo
bar */
/*options cashost="cloud.example.com" casport=5570;*/
----------------------------------------------------
[
["comment", "* foobar;"],
"\r\nfoo", ["punctuation", ";"],
["comment", "* foobar;"],
["comment", "/* foo\r\nbar */"],
["comment", "/*options cashost=\"cloud.example.com\" casport=5570;*/"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/sas/datalines_feature.test
================================================
datalines;
1993 2,819 1,120 422 391 63 98
1994 2,477 1,160 500 172 47 70
;
lines;
foo bar baz
;
cards;
foo
bar
baz
;
----------------------------------------------------
[
["datalines", [
["keyword", "datalines"], ["punctuation", ";"],
"\r\n1993 2,819 1,120 422 391 63 98\r\n1994 2,477 1,160 500 172 47 70\r\n",
["punctuation", ";"]
]],
["datalines", [
["keyword", "lines"], ["punctuation", ";"],
"\r\nfoo bar baz\r\n",
["punctuation", ";"]
]],
["datalines", [
["keyword", "cards"], ["punctuation", ";"],
"\r\nfoo\r\nbar\r\nbaz\r\n",
["punctuation", ";"]
]]
]
----------------------------------------------------
Checks for datalines.
================================================
FILE: tests/languages/sas/datetime_feature.test
================================================
'1jan2013'd
'9:25:19pm't
'18jan2003:9:27:05am'dt
* don't match the following just because of "'t";
'foo'¦¦'test';
----------------------------------------------------
[
["datetime", "'1jan2013'd"],
["datetime", "'9:25:19pm't"],
["datetime", "'18jan2003:9:27:05am'dt"],
["comment", "* don't match the following just because of \"'t\";"],
["string", "'foo'"],
["operator", "¦¦"],
["string", "'test'"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for date, times and datetimes.
================================================
FILE: tests/languages/sas/format_feature.test
================================================
put x $hex16.;
format salary uscurrency.;
format=dollar12.;
----------------------------------------------------
[
["altformat",
[
["keyword", "put"],
" x ",
["format", "$hex16."]
]
],
["punctuation", ";"],
["altformat",
[
["keyword","format"],
" salary ",
["format", "uscurrency."]
]
],
["punctuation", ";"],
["format",
[
["keyword", "format"],
["equals", "="],
["format", "dollar12."]
]
],
["punctuation", ";"]
]
----------------------------------------------------
Checks that options captures "options" and correctly tags following text.
================================================
FILE: tests/languages/sas/function_feature.test
================================================
function()
x=addrlong(item);
----------------------------------------------------
[
["function", "function"],
["punctuation", "("],
["punctuation", ")"],
"\r\nx",
["operator", "="],
["function", "addrlong"],
["punctuation", "("],
"item",
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks that options captures "options" and correctly tags following text.
================================================
FILE: tests/languages/sas/input_feature.test
================================================
input name $ score1 score2 score3 team $;
input name $ & score;
input outlook $ 1-8 temperature humidity windy $ 16 - 21 /* golf $22 - 32 */;
----------------------------------------------------
[
[
"input",
[
["input", "input"],
" name $ score1 score2 score3 team $;"
]
],
[
"input",
[
["input", "input"],
" name $ & score;"
]
],
["input",
[
["input", "input"],
" outlook $ ",
["number", "1"],
"-",
["number", "8"],
" temperature humidity windy $ ",
["number", "16"],
" - ",
["number", "21"],
["comment", "/* golf $22 - 32 */"],
";"
]
]
]
----------------------------------------------------
Checks that input captures "input" and text that follows up to and including
the semicolon.
================================================
FILE: tests/languages/sas/keyword_feature.test
================================================
after analysis and array barchart barwidth begingraph by
cas cbarline cfill class classlev close column compute computed contains data=
define document do do over dol drop dul end entryTitle else endcomp eval
evaluate exec execute fill fillattrs filename group groupby headline headskip
histogram if infile keep keylabel keyword label layout legendlabel length
libname merge midpoints name noobs nowd ods or out output overlay plot ranexp
rannor rbreak retain set session sessref statgraph sum summarize table temp then
then do title to var where xaxisopts yaxisopts y2axisopts
----------------------------------------------------
[
["keyword", "after"], ["keyword", "analysis"],
["keyword", "and"], ["keyword", "array"], ["keyword", "barchart"],
["keyword", "barwidth"], ["keyword", "begingraph"], ["keyword", "by"],
["keyword", "cas"], ["keyword", "cbarline"], ["keyword", "cfill"],
["keyword", "class"], ["keyword", "classlev"],
["keyword", "close"], ["keyword", "column"], ["keyword", "compute"],
["keyword", "computed"], ["keyword", "contains"], ["keyword", "data"],
["operator", "="], ["keyword", "define"], ["keyword", "document"],
["keyword", "do"], ["keyword", "do over"], ["keyword", "dol"],
["keyword", "drop"], ["keyword", "dul"], ["keyword", "end"],
["keyword", "entryTitle"], ["keyword", "else"], ["keyword", "endcomp"],
["keyword", "eval"], ["keyword", "evaluate"], ["keyword", "exec"],
["keyword", "execute"], ["keyword", "fill"], ["keyword", "fillattrs"],
["keyword", "filename"], ["keyword", "group"], ["keyword", "groupby"],
["keyword", "headline"], ["keyword", "headskip"], ["keyword", "histogram"],
["keyword", "if"], ["keyword", "infile"], ["keyword", "keep"],
["keyword", "keylabel"], ["keyword", "keyword"], ["keyword", "label"],
["keyword", "layout"], ["keyword", "legendlabel"], ["keyword", "length"],
["keyword", "libname"], ["keyword", "merge"], ["keyword", "midpoints"],
["keyword", "name"], ["keyword", "noobs"], ["keyword", "nowd"],
["keyword", "ods"], ["keyword", "or"], ["keyword", "out"],
["keyword", "output"], ["keyword", "overlay"], ["keyword", "plot"],
["keyword", "ranexp"], ["keyword", "rannor"], ["keyword", "rbreak"],
["keyword", "retain"], ["keyword", "set"], ["keyword", "session"],
["keyword", "sessref"], ["keyword", "statgraph"], ["keyword", "sum"],
["keyword", "summarize"], ["keyword", "table"], ["keyword", "temp"],
["keyword", "then"], ["keyword", "then do"], ["keyword", "title"],
["keyword", "to"], ["keyword", "var"], ["keyword", "where"],
["keyword", "xaxisopts"], ["keyword", "yaxisopts"], ["keyword", "y2axisopts"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/sas/macro_feature.test
================================================
%_zscore(length);
%_test(string, 0.3);
----------------------------------------------------
[
["macro", "%_zscore"],
["punctuation", "("],
"length",
["punctuation", ")"],
["punctuation", ";"],
["macro", "%_test"],
["punctuation", "("],
"string",
["punctuation", ","],
["number", "0.3"],
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks that options captures "options" and correctly tags following text.
================================================
FILE: tests/languages/sas/macro_string_function_feature.test
================================================
%let a=%bquote(' ");
%let b=%nrbquote(' ");
%let c=%nrquote(%' %");
%let d=%nrstr(%' %");
%let e=%quote(%' %");
%let f=%str(%' %");
%let char1 = %bquote(%substr(&infile,1,1));
----------------------------------------------------
[
["macro-keyword", "%let"],
" a",
["operator", "="],
["macro-string-functions", [
["function", "%bquote"],
["punctuation", "("],
"' \"",
["punctuation", ")"]
]],
["punctuation", ";"],
["macro-keyword", "%let"],
" b",
["operator", "="],
["macro-string-functions", [
["function", "%nrbquote"],
["punctuation", "("],
"' \"",
["punctuation", ")"]
]],
["punctuation", ";"],
["macro-keyword", "%let"],
" c",
["operator", "="],
["macro-string-functions", [
["function", "%nrquote"],
["punctuation", "("],
["escaped-char", "%'"],
["escaped-char", "%\""],
["punctuation", ")"]
]],
["punctuation", ";"],
["macro-keyword", "%let"],
" d",
["operator", "="],
["macro-string-functions", [
["function", "%nrstr"],
["punctuation", "("],
["escaped-char", "%'"],
["escaped-char", "%\""],
["punctuation", ")"]
]],
["punctuation", ";"],
["macro-keyword", "%let"],
" e",
["operator", "="],
["macro-string-functions", [
["function", "%quote"],
["punctuation", "("],
["escaped-char", "%'"],
["escaped-char", "%\""],
["punctuation", ")"]
]],
["punctuation", ";"],
["macro-keyword", "%let"],
" f",
["operator", "="],
["macro-string-functions", [
["function", "%str"],
["punctuation", "("],
["escaped-char", "%'"],
["escaped-char", "%\""],
["punctuation", ")"]
]],
["punctuation", ";"],
["macro-keyword", "%let"],
" char1 ",
["operator", "="],
["function", "%bquote"],
["punctuation", "("],
["macro-keyword", "%substr"],
["punctuation", "("],
["macro-variable", "&infile"],
["punctuation", ","],
["number", "1"],
["punctuation", ","],
["number", "1"],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for all macro string functions.
================================================
FILE: tests/languages/sas/macrodefinition_feature.test
================================================
%macro prnt(var,sum);
proc print data=srhigh;
var &var;
sum ∑
run;
%mend prnt;
%macro printz/parmbuff;
%let num=1;
%let dsname=%scan(&syspbuff,&num);
%do %while(&dsname ne);
proc print data=&dsname;
run;
%let num=%eval(&num+1);
%let dsname=%scan(&syspbuff,&num);
%end;
%mend printz;
----------------------------------------------------
[
["macro-declaration", [
["keyword", "%macro"],
" prnt(var,sum)"
]],
["punctuation", ";"],
["step", "proc print"],
["keyword", "data"],
["operator", "="],
"srhigh",
["punctuation", ";"],
["keyword", "var"],
["macro-variable", "&var"],
["punctuation", ";"],
["keyword", "sum"],
["macro-variable", "&sum"],
["punctuation", ";"],
["step", "run"],
["punctuation", ";"],
["macro-end", [
["keyword", "%mend"],
" prnt"
]],
["punctuation", ";"],
["macro-declaration", [
["keyword", "%macro"],
" printz/parmbuff"
]],
["punctuation", ";"],
["macro-keyword", "%let"],
" num",
["operator", "="],
["number", "1"],
["punctuation", ";"],
["macro-keyword", "%let"],
" dsname",
["operator", "="],
["macro-keyword", "%scan"],
["punctuation", "("],
["macro-variable", "&syspbuff"],
["punctuation", ","],
["macro-variable", "&num"],
["punctuation", ")"],
["punctuation", ";"],
["macro-keyword", "%do"],
["macro-keyword", "%while"],
["punctuation", "("],
["macro-variable", "&dsname"],
["operator-keyword", "ne"],
["punctuation", ")"],
["punctuation", ";"],
["step", "proc print"],
["keyword", "data"],
["operator", "="],
["macro-variable", "&dsname"],
["punctuation", ";"],
["step", "run"],
["punctuation", ";"],
["macro-keyword", "%let"],
" num",
["operator", "="],
["macro-keyword", "%eval"],
["punctuation", "("],
["macro-variable", "&num"],
["operator", "+"],
["number", "1"],
["punctuation", ")"],
["punctuation", ";"],
["macro-keyword", "%let"],
" dsname",
["operator", "="],
["macro-keyword", "%scan"],
["punctuation", "("],
["macro-variable", "&syspbuff"],
["punctuation", ","],
["macro-variable", "&num"],
["punctuation", ")"],
["punctuation", ";"],
["macro-keyword", "%end"],
["punctuation", ";"],
["macro-end", [
["keyword", "%mend"],
" printz"
]],
["punctuation", ";"]
]
----------------------------------------------------
Check that macro definition correctly recognizes %macro and %mend.
================================================
FILE: tests/languages/sas/macrokeyword_feature.test
================================================
%ABORT %BY %CMS %COPY %DISPLAY %DO %ELSE %END %EVAL %GLOBAL %GO %GOTO %IF %INC %INCLUDE
%INDEX %INPUT %KTRIM %LENGTH %LET %LIST %LOCAL %PUT %QKTRIM %QSCAN
%QSUBSTR %QSYSFUNC %QUPCASE %RETURN %RUN %SCAN %SUBSTR %SUPERQ %SYMDEL %SYMGLOBL
%SYMLOCAL %SYMEXIST %SYSCALL %SYSEVALF %SYSEXEC %SYSFUNC %SYSGET %SYSRPUT %THEN %TO %TSO
%UNQUOTE %UNTIL %UPCASE %WHILE %WINDOW
----------------------------------------------------
[
["macro-keyword", "%ABORT"], ["macro-keyword", "%BY"],
["macro-keyword", "%CMS"], ["macro-keyword", "%COPY"], ["macro-keyword", "%DISPLAY"],
["macro-keyword", "%DO"], ["macro-keyword", "%ELSE"], ["macro-keyword", "%END"],
["macro-keyword", "%EVAL"], ["macro-keyword", "%GLOBAL"], ["macro-keyword", "%GO"],
["macro-keyword", "%GOTO"], ["macro-keyword", "%IF"], ["macro-keyword", "%INC"],
["macro-keyword", "%INCLUDE"], ["macro-keyword", "%INDEX"],
["macro-keyword", "%INPUT"], ["macro-keyword", "%KTRIM"],
["macro-keyword", "%LENGTH"], ["macro-keyword", "%LET"], ["macro-keyword", "%LIST"],
["macro-keyword", "%LOCAL"],
["macro-keyword", "%PUT"], ["macro-keyword", "%QKTRIM"],
["macro-keyword", "%QSCAN"], ["macro-keyword", "%QSUBSTR"],
["macro-keyword", "%QSYSFUNC"],
["macro-keyword", "%QUPCASE"], ["macro-keyword", "%RETURN"],
["macro-keyword", "%RUN"], ["macro-keyword", "%SCAN"],
["macro-keyword", "%SUBSTR"], ["macro-keyword", "%SUPERQ"],
["macro-keyword", "%SYMDEL"], ["macro-keyword", "%SYMGLOBL"],
["macro-keyword", "%SYMLOCAL"], ["macro-keyword", "%SYMEXIST"],
["macro-keyword", "%SYSCALL"], ["macro-keyword", "%SYSEVALF"],
["macro-keyword", "%SYSEXEC"], ["macro-keyword", "%SYSFUNC"],
["macro-keyword", "%SYSGET"], ["macro-keyword", "%SYSRPUT"],
["macro-keyword", "%THEN"], ["macro-keyword", "%TO"], ["macro-keyword", "%TSO"],
["macro-keyword", "%UNQUOTE"], ["macro-keyword", "%UNTIL"],
["macro-keyword", "%UPCASE"], ["macro-keyword", "%WHILE"],
["macro-keyword", "%WINDOW"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/sas/number_feature.test
================================================
42
3.14159
3.2e10
0.4e-8
1.4E+2
BadFacex
0c1x
0b0ax
"3132,3334"x
'3132,3334'x
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "3.2e10"],
["number", "0.4e-8"],
["number", "1.4E+2"],
"\r\nBadFacex\r\n",
["number", "0c1x"],
["number", "0b0ax"],
["numeric-constant", "\"3132,3334\"x"],
["numeric-constant", "'3132,3334'x"]
]
----------------------------------------------------
Checks for decimal and hexadecimal numbers.
================================================
FILE: tests/languages/sas/operator_feature.test
================================================
* **
| ||
! !!
¦ ¦¦
< <> <=
> >< >=
~ ~=
¬ ¬=
^ ^=
= / +
- &
eq ne gt lt
ge le in not
----------------------------------------------------
[
["operator", "*"], ["operator", "**"],
["operator", "|"], ["operator", "||"],
["operator", "!"], ["operator", "!!"],
["operator", "¦"], ["operator", "¦¦"],
["operator", "<"], ["operator", "<>"], ["operator", "<="],
["operator", ">"], ["operator", "><"], ["operator", ">="],
["operator", "~"], ["operator", "~="],
["operator", "¬"], ["operator", "¬="],
["operator", "^"], ["operator", "^="],
["operator", "="], ["operator", "/"], ["operator", "+"],
["operator", "-"], ["operator", "&"],
["operator-keyword", "eq"], ["operator-keyword", "ne"], ["operator-keyword", "gt"], ["operator-keyword", "lt"],
["operator-keyword", "ge"], ["operator-keyword", "le"], ["operator-keyword", "in"], ["operator-keyword", "not"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/sas/options_feature.test
================================================
options nodate linesize=72;
options validmemname=extend validvarname=any;
options insert=(fmtsearch="c:/myformats");
----------------------------------------------------
[
["keyword", "options"],
[
"options-args",
[
["arg","nodate"],
["arg", "linesize"],
["operator", "="],
["number", "72"]
]
],
["punctuation", ";"],
["keyword", "options"],
[
"options-args",
[
["arg", "validmemname"],
["operator", "="],
["arg-value", "extend"],
["arg", "validvarname"],
["operator", "="],
["arg-value", "any"]
]
],
["punctuation", ";"],
["keyword", "options"],
[
"options-args",
[
["arg", "insert"],
["operator", "="],
["punctuation", "("],
["arg", "fmtsearch"],
["operator", "="],
["string", "\"c:/myformats\""],
["punctuation", ")"]
]
],
["punctuation", ";"]
]
----------------------------------------------------
Checks that options captures "options" and correctly tags following text.
================================================
FILE: tests/languages/sas/proccas_feature.test
================================================
proc cas;
session casauto;
builtins.actionSetInfo result=results;
print results.setinfo[,{'actionset', 'label'}];
run;
quit;
proc cas;
/* Testing a comment */
session casauto;
output log;
table.loadTable / path="iris.sashdat";
simple.summary result=iris / table={name="iris"};
tableIris=findtable(iris);
saveresult tableIris csv="sum.csv";
run;
quit;
proc cas;
action table.fileinfo / path="%.csv";
run;
quit;
----------------------------------------------------
[
["step", "proc cas"],
["punctuation", ";"],
["proc-cas",
[
["keyword", "session"],
" casauto",
["punctuation", ";"],
["cas-actions", [
["keyword", "builtins.actionSetInfo"],
["argument", "result"],
["operator", "="],
["arg-value", "results"]
]
],
["punctuation", ";"],
["keyword", "print"],
" results",
["punctuation", "."],
"setinfo",
["punctuation", "["],
["punctuation", ","],
["punctuation", "{"],
["string", "'actionset'"],
["punctuation", ","],
["string", "'label'"],
["punctuation", "}"],
["punctuation", "]"],
["punctuation", ";"],
["step", "run"],
["punctuation", ";"]
]
],
["step", "quit"],
["punctuation", ";"],
["step", "proc cas"],
["punctuation", ";"],
["proc-cas",
[
["comment", "/* Testing a comment */"],
["keyword", "session"],
" casauto",
["punctuation", ";"],
["statement", [
["arg", "output"],
["arg", "log"]
]],
["punctuation", ";"],
["cas-actions", [
["keyword", "table.loadTable"],
" / ",
["argument", "path"],
["operator", "="],
["string", "\"iris.sashdat\""]
]
],
["punctuation", ";"],
["cas-actions", [
["keyword", "simple.summary"],
["argument", "result"],
["operator", "="],
["arg-value", "iris"],
" / ",
["argument", "table"],
["operator", "="],
["punctuation", "{"],
["argument", "name"],
["operator", "="],
["string", "\"iris\""],
["punctuation", "}"]
]
],
["punctuation", ";"],
"\r\n tableIris=",
["function", "findtable"],
["punctuation", "("],
"iris",
["punctuation", ")"],
["punctuation", ";"],
["statement-var", [
[ "statement", [
["keyword", "saveresult"],
" tableIris"
]
],
["arg", "csv"],
["operator", "="],
["string", "\"sum.csv\""]
]],
["punctuation", ";"],
["step", "run"],
["punctuation", ";"]
]
],
["step", "quit"],
["punctuation", ";"],
["step", "proc cas"],
["punctuation", ";"],
["proc-cas",
[
["cas-actions",
[
["action", "action"],
["keyword", "table.fileinfo"],
" / ",
["argument", "path"],
["operator", "="],
["string", "\"%.csv\""]
]
],
["punctuation", ";"],
["step", "run"],
["punctuation", ";"]
]
],
["step", "quit"],
["punctuation", ";"]
]
================================================
FILE: tests/languages/sas/step_feature.test
================================================
data carsurvey;
proc format;
proc sort data=allacty;
run;
quit;
----------------------------------------------------
[
["step", "data"],
" carsurvey",
["punctuation", ";"],
["step", "proc format"],
["punctuation", ";"],
["step", "proc sort"],
["proc-args",[
["arg", "data"],
["operator", "="],
["arg-value", "allacty"],
["punctuation", ";"]
]],
["step", "run"],
["punctuation", ";"],
["step", "quit"],
["punctuation", ";"]
]
----------------------------------------------------
Checks that options captures "options" and correctly tags following text.
================================================
FILE: tests/languages/sas/string_feature.test
================================================
""
"fo""o"
"foo
bar"
''
'fo''o'
'foo
bar'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\"\"o\""],
["string", "\"foo\r\nbar\""],
["string", "''"],
["string", "'fo''o'"],
["string", "'foo\r\nbar'"]
]
----------------------------------------------------
Checks for single-quoted and double-quoted strings.
================================================
FILE: tests/languages/sass/atrule-line_feature.test
================================================
@mixin foobar
@media (min-width: 600px)
@include foobar
=foobar
+foobar
----------------------------------------------------
[
["atrule-line", [
["atrule", "@mixin"],
" foobar"
]],
["atrule-line", [
["atrule", "@media"],
" (min-width: 600px)"
]],
["atrule-line", [
["atrule", "@include"],
" foobar"
]],
["atrule-line", [
["atrule", "="],
"foobar"
]],
["atrule-line", [
["atrule", "+"],
"foobar"
]]
]
----------------------------------------------------
Checks for at-rules.
================================================
FILE: tests/languages/sass/comment_feature.test
================================================
//
// foobar
/*
/* foo
bar
/* foo
bar
baz
----------------------------------------------------
[
["comment", "//"],
["comment", "// foobar"],
["comment", "/*"],
["comment", "/* foo\r\n\tbar"],
["comment", "/* foo\r\n\t bar\r\n\t baz"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/sass/property-line_feature.test
================================================
foo: bar
color: $color !important
-moz-border-radius: 10px
transition-timing-function: ease-in-out
:color #{$color}
:font-size 0.5em + 3em
----------------------------------------------------
[
["property-line", [
["property", "foo"],
["punctuation", ":"],
" bar"
]],
["property-line", [
["property", "color"],
["punctuation", ":"],
["variable", "$color"],
["important", "!important"]
]],
["property-line", [
["property", "-moz-border-radius"],
["punctuation", ":"],
" 10px"
]],
["property-line", [
["property", "transition-timing-function"],
["punctuation", ":"],
" ease-in-out"
]],
["property-line", [
["punctuation", ":"],
["property", "color"],
["variable", "#{$color}"]
]],
["property-line", [
["punctuation", ":"],
["property", "font-size"],
" 0.5em ", ["operator", "+"], " 3em"
]]
]
----------------------------------------------------
Checks for properties.
================================================
FILE: tests/languages/sass/selector_feature.test
================================================
div, span
.foo .bar + div
#foobar .baz:first-child
div,
.bar
#foo,
.bar,
.baz
----------------------------------------------------
[
["selector", "div, span"],
["selector", ".foo .bar + div"],
["selector", "#foobar .baz:first-child"],
["selector", "div,\r\n .bar"],
["selector", "#foo,\r\n\t\t.bar,\r\n\t\t.baz"]
]
----------------------------------------------------
Checks for selectors.
================================================
FILE: tests/languages/sass/variable-line_feature.test
================================================
$width: 5em
$foo: $bar + $baz
$foo: $bar - $baz
$bar: #{$baz}
----------------------------------------------------
[
["variable-line", [
["variable", "$width"],
["punctuation", ":"],
" 5em"
]],
["variable-line", [
["variable", "$foo"],
["punctuation", ":"],
["variable", "$bar"],
["operator", "+"],
["variable", "$baz"]
]],
["variable-line", [
["variable", "$foo"],
["punctuation", ":"],
["variable", "$bar"],
["operator", "-"],
["variable", "$baz"]
]],
["variable-line", [
["variable", "$bar"],
["punctuation", ":"],
["variable", "#{$baz}"]
]]
]
----------------------------------------------------
Checks for variable declarations.
================================================
FILE: tests/languages/scala/builtin_feature.test
================================================
String Int Long Short
Byte Boolean Double
Float Char Any AnyRef
AnyVal Unit Nothing
----------------------------------------------------
[
["builtin", "String"], ["builtin", "Int"], ["builtin", "Long"], ["builtin", "Short"],
["builtin", "Byte"], ["builtin", "Boolean"], ["builtin", "Double"],
["builtin", "Float"], ["builtin", "Char"], ["builtin", "Any"], ["builtin", "AnyRef"],
["builtin", "AnyVal"], ["builtin", "Unit"], ["builtin", "Nothing"]
]
----------------------------------------------------
Checks for builtins.
================================================
FILE: tests/languages/scala/char_feature.test
================================================
'a'
'\u0041'
'\n'
'\t'
----------------------------------------------------
[
["char", "'a'"],
["char", "'\\u0041'"],
["char", "'\\n'"],
["char", "'\\t'"]
]
================================================
FILE: tests/languages/scala/keyword_feature.test
================================================
<- =>
abstract case catch
class def derives do
else enum extends extension
final finally
for forSome given if
implicit import;
infix inline lazy
match new null object
opaque open
override package private
protected return sealed
self super this throw
trait transparent try
type using val
var while with yield
----------------------------------------------------
[
["keyword", "<-"], ["keyword", "=>"],
["keyword", "abstract"],
["keyword", "case"],
["keyword", "catch"],
["keyword", "class"],
["keyword", "def"],
["keyword", "derives"],
["keyword", "do"],
["keyword", "else"],
["keyword", "enum"],
["keyword", "extends"],
["keyword", "extension"],
["keyword", "final"],
["keyword", "finally"],
["keyword", "for"],
["keyword", "forSome"],
["keyword", "given"],
["keyword", "if"],
["keyword", "implicit"],
["keyword", "import"],
["punctuation", ";"],
["keyword", "infix"],
["keyword", "inline"],
["keyword", "lazy"],
["keyword", "match"],
["keyword", "new"],
["keyword", "null"],
["keyword", "object"],
["keyword", "opaque"],
["keyword", "open"],
["namespace", ["override"]],
["keyword", "package"],
["keyword", "private"],
["keyword", "protected"],
["keyword", "return"],
["keyword", "sealed"],
["keyword", "self"],
["keyword", "super"],
["keyword", "this"],
["keyword", "throw"],
["keyword", "trait"],
["keyword", "transparent"],
["keyword", "try"],
["keyword", "type"],
["keyword", "using"],
["keyword", "val"],
["keyword", "var"],
["keyword", "while"],
["keyword", "with"],
["keyword", "yield"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/scala/number_feature.test
================================================
0xBadFace
0xf7.fb
42
3.14159
3e4
0.1E8
42d
0777L
1e30f
----------------------------------------------------
[
["number", "0xBadFace"],
["number", "0xf7.fb"],
["number", "42"],
["number", "3.14159"],
["number", "3e4"],
["number", "0.1E8"],
["number", "42d"],
["number", "0777L"],
["number", "1e30f"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/scala/string_feature.test
================================================
""
"fo\"obar"
"""fo"o
bar"""
"""fo"o
// comment
bar"""
"""{"name":"James"}"""
"foo /* comment */ bar"
s"Hello, $name"
s"1 + 1 = ${1 + 1}"
s"New offers starting at $$14.99"
f"$name%s is $height%2.2f meters tall"
json"{ name: $name, id: $id }"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["triple-quoted-string", "\"\"\"fo\"o\r\nbar\"\"\""],
["triple-quoted-string", "\"\"\"fo\"o\r\n// comment\r\nbar\"\"\""],
["triple-quoted-string", "\"\"\"{\"name\":\"James\"}\"\"\""],
["string", "\"foo /* comment */ bar\""],
["string-interpolation", [
["id", "s"],
["string", "\"Hello, "],
["interpolation", [
["punctuation", "$"],
["expression", ["name"]]
]],
["string", "\""]
]],
["string-interpolation", [
["id", "s"],
["string", "\"1 + 1 = "],
["interpolation", [
["punctuation", "${"],
["expression", [
["number", "1"],
["operator", "+"],
["number", "1"]
]],
["punctuation", "}"]
]],
["string", "\""]
]],
["string-interpolation", [
["id", "s"],
["string", "\"New offers starting at "],
["escape", "$$"],
["string", "14.99\""]
]],
["string-interpolation", [
["id", "f"],
["string", "\""],
["interpolation", [
["punctuation", "$"],
["expression", ["name"]]
]],
["string", "%s is "],
["interpolation", [
["punctuation", "$"],
["expression", ["height"]]
]],
["string", "%2.2f meters tall\""]
]],
["string-interpolation", [
["id", "json"],
["string", "\"{ name: "],
["interpolation", [
["punctuation", "$"],
["expression", ["name"]]
]],
["string", ", id: "],
["interpolation", [
["punctuation", "$"],
["expression", ["id"]]
]],
["string", " }\""]
]]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/scala/symbol_feature.test
================================================
'foo
'foo_42
'foo_bar
----------------------------------------------------
[
["symbol", "'foo"],
["symbol", "'foo_42"],
["symbol", "'foo_bar"]
]
----------------------------------------------------
Checks for symbols.
================================================
FILE: tests/languages/scheme/boolean_feature.test
================================================
#t
#f
#true
#false
----------------------------------------------------
[
["boolean", "#t"],
["boolean", "#f"],
["boolean", "#true"],
["boolean", "#false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/scheme/builtin_feature.test
================================================
(abs
(and
(append
(apply
(assoc
(assq
(assv
(binary-port?
(boolean=?
(boolean?
(bytevector
(bytevector-append
(bytevector-copy
(bytevector-copy!
(bytevector-length
(bytevector-u8-ref
(bytevector-u8-set!
(bytevector?
(caar
(cadr
(call-with-current-continuation
(call-with-port
(call-with-values
(call/cc
(car
(cdar
(cddr
(cdr
(ceiling
(char->integer
(char-ready?
(char<=?
(char
(char=?
(char>=?
(char>?
(char?
(close-input-port
(close-output-port
(close-port
(complex?
(cons
(current-error-port
(current-input-port
(current-output-port
(denominator
(dynamic-wind
(eof-object
(eof-object?
(eq?
(equal?
(eqv?
(error
(error-object-irritants
(error-object-message
(error-object?
(eval
(even?
(exact
(exact-integer-sqrt
(exact-integer?
(exact?
(expt
(features
(file-error?
(floor
(floor-quotient
(floor-remainder
(floor/
(flush-output-port
(for-each
(gcd
(get-output-bytevector
(get-output-string
(inexact
(inexact?
(input-port-open?
(input-port?
(integer->char
(integer?
(lcm
(length
(list
(list->string
(list->vector
(list-copy
(list-ref
(list-set!
(list-tail
(list?
(make-bytevector
(make-list
(make-parameter
(make-string
(make-vector
(map
(max
(member
(memq
(memv
(min
(modulo
(negative?
(newline
(not
(null?
(number->string
(number?
(numerator
(odd?
(open-input-bytevector
(open-input-string
(open-output-bytevector
(open-output-string
(or
(output-port-open?
(output-port?
(pair?
(peek-char
(peek-u8
(port?
(positive?
(procedure?
(quotient
(raise
(raise-continuable
(rational?
(rationalize
(read-bytevector
(read-bytevector!
(read-char
(read-error?
(read-line
(read-string
(read-u8
(real?
(remainder
(reverse
(round
(set-car!
(set-cdr!
(square
(string
(string->list
(string->number
(string->symbol
(string->utf8
(string->vector
(string-append
(string-copy
(string-copy!
(string-fill!
(string-for-each
(string-length
(string-map
(string-ref
(string-set!
(string<=?
(string
(string=?
(string>=?
(string>?
(string?
(substring
(symbol->string
(symbol=?
(symbol?
(syntax-error
(textual-port?
(truncate
(truncate-quotient
(truncate-remainder
(truncate/
(u8-ready?
(utf8->string
(values
(vector
(vector->list
(vector->string
(vector-append
(vector-copy
(vector-copy!
(vector-fill!
(vector-for-each
(vector-length
(vector-map
(vector-ref
(vector-set!
(vector?
(with-exception-handler
(write-bytevector
(write-char
(write-string
(write-u8
(zero?
; with brackets
[map
[max
----------------------------------------------------
[
["punctuation", "("], ["builtin", "abs"],
["punctuation", "("], ["builtin", "and"],
["punctuation", "("], ["builtin", "append"],
["punctuation", "("], ["builtin", "apply"],
["punctuation", "("], ["builtin", "assoc"],
["punctuation", "("], ["builtin", "assq"],
["punctuation", "("], ["builtin", "assv"],
["punctuation", "("], ["builtin", "binary-port?"],
["punctuation", "("], ["builtin", "boolean=?"],
["punctuation", "("], ["builtin", "boolean?"],
["punctuation", "("], ["builtin", "bytevector"],
["punctuation", "("], ["builtin", "bytevector-append"],
["punctuation", "("], ["builtin", "bytevector-copy"],
["punctuation", "("], ["builtin", "bytevector-copy!"],
["punctuation", "("], ["builtin", "bytevector-length"],
["punctuation", "("], ["builtin", "bytevector-u8-ref"],
["punctuation", "("], ["builtin", "bytevector-u8-set!"],
["punctuation", "("], ["builtin", "bytevector?"],
["punctuation", "("], ["builtin", "caar"],
["punctuation", "("], ["builtin", "cadr"],
["punctuation", "("], ["builtin", "call-with-current-continuation"],
["punctuation", "("], ["builtin", "call-with-port"],
["punctuation", "("], ["builtin", "call-with-values"],
["punctuation", "("], ["builtin", "call/cc"],
["punctuation", "("], ["builtin", "car"],
["punctuation", "("], ["builtin", "cdar"],
["punctuation", "("], ["builtin", "cddr"],
["punctuation", "("], ["builtin", "cdr"],
["punctuation", "("], ["builtin", "ceiling"],
["punctuation", "("], ["builtin", "char->integer"],
["punctuation", "("], ["builtin", "char-ready?"],
["punctuation", "("], ["builtin", "char<=?"],
["punctuation", "("], ["builtin", "char"],
["punctuation", "("], ["builtin", "char=?"],
["punctuation", "("], ["builtin", "char>=?"],
["punctuation", "("], ["builtin", "char>?"],
["punctuation", "("], ["builtin", "char?"],
["punctuation", "("], ["builtin", "close-input-port"],
["punctuation", "("], ["builtin", "close-output-port"],
["punctuation", "("], ["builtin", "close-port"],
["punctuation", "("], ["builtin", "complex?"],
["punctuation", "("], ["builtin", "cons"],
["punctuation", "("], ["builtin", "current-error-port"],
["punctuation", "("], ["builtin", "current-input-port"],
["punctuation", "("], ["builtin", "current-output-port"],
["punctuation", "("], ["builtin", "denominator"],
["punctuation", "("], ["builtin", "dynamic-wind"],
["punctuation", "("], ["builtin", "eof-object"],
["punctuation", "("], ["builtin", "eof-object?"],
["punctuation", "("], ["builtin", "eq?"],
["punctuation", "("], ["builtin", "equal?"],
["punctuation", "("], ["builtin", "eqv?"],
["punctuation", "("], ["builtin", "error"],
["punctuation", "("], ["builtin", "error-object-irritants"],
["punctuation", "("], ["builtin", "error-object-message"],
["punctuation", "("], ["builtin", "error-object?"],
["punctuation", "("], ["builtin", "eval"],
["punctuation", "("], ["builtin", "even?"],
["punctuation", "("], ["builtin", "exact"],
["punctuation", "("], ["builtin", "exact-integer-sqrt"],
["punctuation", "("], ["builtin", "exact-integer?"],
["punctuation", "("], ["builtin", "exact?"],
["punctuation", "("], ["builtin", "expt"],
["punctuation", "("], ["builtin", "features"],
["punctuation", "("], ["builtin", "file-error?"],
["punctuation", "("], ["builtin", "floor"],
["punctuation", "("], ["builtin", "floor-quotient"],
["punctuation", "("], ["builtin", "floor-remainder"],
["punctuation", "("], ["builtin", "floor/"],
["punctuation", "("], ["builtin", "flush-output-port"],
["punctuation", "("], ["builtin", "for-each"],
["punctuation", "("], ["builtin", "gcd"],
["punctuation", "("], ["builtin", "get-output-bytevector"],
["punctuation", "("], ["builtin", "get-output-string"],
["punctuation", "("], ["builtin", "inexact"],
["punctuation", "("], ["builtin", "inexact?"],
["punctuation", "("], ["builtin", "input-port-open?"],
["punctuation", "("], ["builtin", "input-port?"],
["punctuation", "("], ["builtin", "integer->char"],
["punctuation", "("], ["builtin", "integer?"],
["punctuation", "("], ["builtin", "lcm"],
["punctuation", "("], ["builtin", "length"],
["punctuation", "("], ["builtin", "list"],
["punctuation", "("], ["builtin", "list->string"],
["punctuation", "("], ["builtin", "list->vector"],
["punctuation", "("], ["builtin", "list-copy"],
["punctuation", "("], ["builtin", "list-ref"],
["punctuation", "("], ["builtin", "list-set!"],
["punctuation", "("], ["builtin", "list-tail"],
["punctuation", "("], ["builtin", "list?"],
["punctuation", "("], ["builtin", "make-bytevector"],
["punctuation", "("], ["builtin", "make-list"],
["punctuation", "("], ["builtin", "make-parameter"],
["punctuation", "("], ["builtin", "make-string"],
["punctuation", "("], ["builtin", "make-vector"],
["punctuation", "("], ["builtin", "map"],
["punctuation", "("], ["builtin", "max"],
["punctuation", "("], ["builtin", "member"],
["punctuation", "("], ["builtin", "memq"],
["punctuation", "("], ["builtin", "memv"],
["punctuation", "("], ["builtin", "min"],
["punctuation", "("], ["builtin", "modulo"],
["punctuation", "("], ["builtin", "negative?"],
["punctuation", "("], ["builtin", "newline"],
["punctuation", "("], ["builtin", "not"],
["punctuation", "("], ["builtin", "null?"],
["punctuation", "("], ["builtin", "number->string"],
["punctuation", "("], ["builtin", "number?"],
["punctuation", "("], ["builtin", "numerator"],
["punctuation", "("], ["builtin", "odd?"],
["punctuation", "("], ["builtin", "open-input-bytevector"],
["punctuation", "("], ["builtin", "open-input-string"],
["punctuation", "("], ["builtin", "open-output-bytevector"],
["punctuation", "("], ["builtin", "open-output-string"],
["punctuation", "("], ["builtin", "or"],
["punctuation", "("], ["builtin", "output-port-open?"],
["punctuation", "("], ["builtin", "output-port?"],
["punctuation", "("], ["builtin", "pair?"],
["punctuation", "("], ["builtin", "peek-char"],
["punctuation", "("], ["builtin", "peek-u8"],
["punctuation", "("], ["builtin", "port?"],
["punctuation", "("], ["builtin", "positive?"],
["punctuation", "("], ["builtin", "procedure?"],
["punctuation", "("], ["builtin", "quotient"],
["punctuation", "("], ["builtin", "raise"],
["punctuation", "("], ["builtin", "raise-continuable"],
["punctuation", "("], ["builtin", "rational?"],
["punctuation", "("], ["builtin", "rationalize"],
["punctuation", "("], ["builtin", "read-bytevector"],
["punctuation", "("], ["builtin", "read-bytevector!"],
["punctuation", "("], ["builtin", "read-char"],
["punctuation", "("], ["builtin", "read-error?"],
["punctuation", "("], ["builtin", "read-line"],
["punctuation", "("], ["builtin", "read-string"],
["punctuation", "("], ["builtin", "read-u8"],
["punctuation", "("], ["builtin", "real?"],
["punctuation", "("], ["builtin", "remainder"],
["punctuation", "("], ["builtin", "reverse"],
["punctuation", "("], ["builtin", "round"],
["punctuation", "("], ["builtin", "set-car!"],
["punctuation", "("], ["builtin", "set-cdr!"],
["punctuation", "("], ["builtin", "square"],
["punctuation", "("], ["builtin", "string"],
["punctuation", "("], ["builtin", "string->list"],
["punctuation", "("], ["builtin", "string->number"],
["punctuation", "("], ["builtin", "string->symbol"],
["punctuation", "("], ["builtin", "string->utf8"],
["punctuation", "("], ["builtin", "string->vector"],
["punctuation", "("], ["builtin", "string-append"],
["punctuation", "("], ["builtin", "string-copy"],
["punctuation", "("], ["builtin", "string-copy!"],
["punctuation", "("], ["builtin", "string-fill!"],
["punctuation", "("], ["builtin", "string-for-each"],
["punctuation", "("], ["builtin", "string-length"],
["punctuation", "("], ["builtin", "string-map"],
["punctuation", "("], ["builtin", "string-ref"],
["punctuation", "("], ["builtin", "string-set!"],
["punctuation", "("], ["builtin", "string<=?"],
["punctuation", "("], ["builtin", "string"],
["punctuation", "("], ["builtin", "string=?"],
["punctuation", "("], ["builtin", "string>=?"],
["punctuation", "("], ["builtin", "string>?"],
["punctuation", "("], ["builtin", "string?"],
["punctuation", "("], ["builtin", "substring"],
["punctuation", "("], ["builtin", "symbol->string"],
["punctuation", "("], ["builtin", "symbol=?"],
["punctuation", "("], ["builtin", "symbol?"],
["punctuation", "("], ["builtin", "syntax-error"],
["punctuation", "("], ["builtin", "textual-port?"],
["punctuation", "("], ["builtin", "truncate"],
["punctuation", "("], ["builtin", "truncate-quotient"],
["punctuation", "("], ["builtin", "truncate-remainder"],
["punctuation", "("], ["builtin", "truncate/"],
["punctuation", "("], ["builtin", "u8-ready?"],
["punctuation", "("], ["builtin", "utf8->string"],
["punctuation", "("], ["builtin", "values"],
["punctuation", "("], ["builtin", "vector"],
["punctuation", "("], ["builtin", "vector->list"],
["punctuation", "("], ["builtin", "vector->string"],
["punctuation", "("], ["builtin", "vector-append"],
["punctuation", "("], ["builtin", "vector-copy"],
["punctuation", "("], ["builtin", "vector-copy!"],
["punctuation", "("], ["builtin", "vector-fill!"],
["punctuation", "("], ["builtin", "vector-for-each"],
["punctuation", "("], ["builtin", "vector-length"],
["punctuation", "("], ["builtin", "vector-map"],
["punctuation", "("], ["builtin", "vector-ref"],
["punctuation", "("], ["builtin", "vector-set!"],
["punctuation", "("], ["builtin", "vector?"],
["punctuation", "("], ["builtin", "with-exception-handler"],
["punctuation", "("], ["builtin", "write-bytevector"],
["punctuation", "("], ["builtin", "write-char"],
["punctuation", "("], ["builtin", "write-string"],
["punctuation", "("], ["builtin", "write-u8"],
["punctuation", "("], ["builtin", "zero?"],
["comment", "; with brackets"],
["punctuation", "["], ["builtin", "map"],
["punctuation", "["], ["builtin", "max"]
]
----------------------------------------------------
Checks for builtins.
================================================
FILE: tests/languages/scheme/char_feature.test
================================================
#\a ; lowercase letter
#\A ; uppercase letter
#\( ; left parenthesis
#\space ; the space character
#\newline ; the newline character
#\c-a ; Control-a
#\meta-b ; Meta-b
#\c-s-m-h-a ; Control-Meta-Super-Hyper-A
#\; #\' #\"
#\u0041
#\x10FFFF
#\λ
#\)
#\💩
----------------------------------------------------
[
["char", "#\\a"], ["comment", "; lowercase letter"],
["char", "#\\A"], ["comment", "; uppercase letter"],
["char", "#\\("], ["comment", "; left parenthesis"],
["char", "#\\space"], ["comment", "; the space character"],
["char", "#\\newline"], ["comment", "; the newline character"],
["char", "#\\c-a"], ["comment", "; Control-a"],
["char", "#\\meta-b"], ["comment", "; Meta-b"],
["char", "#\\c-s-m-h-a"], ["comment", "; Control-Meta-Super-Hyper-A"],
["char", "#\\;"], ["char", "#\\'"], ["char", "#\\\""],
["char", "#\\u0041"],
["char", "#\\x10FFFF"],
["char", "#\\λ"],
["char", "#\\)"],
["char", "#\\💩"]
]
----------------------------------------------------
Checks for character literals.
================================================
FILE: tests/languages/scheme/comment_feature.test
================================================
;
; foobar
#;(foo bar)
#; (foo)
#;[foo bar]
#; [foo]
#|
comment
#| nested comment |#
|#
----------------------------------------------------
[
["comment", ";"],
["comment", "; foobar"],
["comment", "#;(foo bar)"],
["comment", "#; (foo)"],
["comment", "#;[foo bar]"],
["comment", "#; [foo]"],
["comment", "#|\r\n comment\r\n #| nested comment |#\r\n|#"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/scheme/function_feature.test
================================================
(fl= 1 2)
(flmin 2 3)
(inexact->exact 3)
(!fact)
(** 10)
(**
(defined foo)
(|some name| foo)
[fl= 1 2]
[flmin 2 3]
[inexact->exact 3]
[!fact]
[** 10]
[**
[defined foo]
[|some name| foo]
----------------------------------------------------
[
["punctuation", "("],
["function", "fl="],
["number", "1"],
["number", "2"],
["punctuation", ")"],
["punctuation", "("],
["function", "flmin"],
["number", "2"],
["number", "3"],
["punctuation", ")"],
["punctuation", "("],
["function", "inexact->exact"],
["number", "3"],
["punctuation", ")"],
["punctuation", "("],
["function", "!fact"],
["punctuation", ")"],
["punctuation", "("],
["function", "**"],
["number", "10"],
["punctuation", ")"],
["punctuation", "("],
["function", "**"],
["punctuation", "("],
["function", "defined"],
" foo",
["punctuation", ")"],
["punctuation", "("],
["function", "|some name|"],
" foo",
["punctuation", ")"],
["punctuation", "["],
["function", "fl="],
["number", "1"],
["number", "2"],
["punctuation", "]"],
["punctuation", "["],
["function", "flmin"],
["number", "2"],
["number", "3"],
["punctuation", "]"],
["punctuation", "["],
["function", "inexact->exact"],
["number", "3"],
["punctuation", "]"],
["punctuation", "["],
["function", "!fact"],
["punctuation", "]"],
["punctuation", "["],
["function", "**"],
["number", "10"],
["punctuation", "]"],
["punctuation", "["],
["function", "**"],
["punctuation", "["],
["function", "defined"],
" foo",
["punctuation", "]"],
["punctuation", "["],
["function", "|some name|"],
" foo",
["punctuation", "]"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/scheme/identifier_feature.test
================================================
|\x9;\x9;|
----------------------------------------------------
[
["identifier", "|\\x9;\\x9;|"]
]
================================================
FILE: tests/languages/scheme/issue1331.test
================================================
(pair? '(1 2))
----------------------------------------------------
[
["punctuation", "("], ["builtin", "pair?"],
["punctuation", "'"], ["punctuation", "("], ["number", "1"], ["number", "2"], ["punctuation", ")"], ["punctuation", ")"]
]
----------------------------------------------------
Tests that first number of a list is not highlighted as a function. See #1331
================================================
FILE: tests/languages/scheme/issue2609.test
================================================
'(foo bar baz)
`(foo bar baz)
#(foo bar baz)
'#(foo bar baz)
----------------------------------------------------
[
["punctuation", "'"],
["punctuation", "("],
"foo bar baz",
["punctuation", ")"],
"\r\n`",
["punctuation", "("],
"foo bar baz",
["punctuation", ")"],
"\r\n#",
["punctuation", "("],
"foo bar baz",
["punctuation", ")"],
["punctuation", "'"],
"#",
["punctuation", "("],
"foo bar baz",
["punctuation", ")"]
]
----------------------------------------------------
None of the "foo"s are functions, so they shouldn't be highlighted as such. See #2609 for more details.
================================================
FILE: tests/languages/scheme/issue2811.test
================================================
(let ([x 10]
[y 20])
(+ x y))
----------------------------------------------------
[
["punctuation", "("],
["keyword", "let"],
["punctuation", "("],
["punctuation", "["],
["function", "x"],
["number", "10"],
["punctuation", "]"],
["punctuation", "["],
["function", "y"],
["number", "20"],
["punctuation", "]"],
["punctuation", ")"],
["punctuation", "("],
["operator", "+"],
" x y",
["punctuation", ")"],
["punctuation", ")"]
]
================================================
FILE: tests/languages/scheme/keyword_feature.test
================================================
(begin)
(case)
(case-lambda)
(cond)
(cond-expand)
(define-library)
(define-macro)
(define-record-type)
(define-syntax)
(define-values)
(define)
(defmacro)
(delay-force)
(delay)
(do)
(else)
(export)
(except)
(guard)
(if)
(import)
(include)
(include-ci)
(include-library-declarations)
(lambda)
(let-syntax)
(let-values)
(let)
(let*-values)
(let*)
(letrec-syntax)
(letrec-values)
(letrec)
(letrec*)
(only)
(parameterize)
(prefix)
(quasi-quote)
(quasiquote)
(quote)
(rename)
(set!)
(syntax-case)
(syntax-rules)
(unless)
(unquote)
(unquote-splicing)
(when)
; with brackets
[if]
[when]
----------------------------------------------------
[
["punctuation", "("],
["keyword", "begin"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "case"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "case-lambda"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "cond"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "cond-expand"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "define-library"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "define-macro"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "define-record-type"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "define-syntax"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "define-values"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "define"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "defmacro"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "delay-force"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "delay"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "do"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "else"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "export"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "except"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "guard"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "if"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "import"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "include"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "include-ci"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "include-library-declarations"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "lambda"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "let-syntax"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "let-values"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "let"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "let*-values"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "let*"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "letrec-syntax"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "letrec-values"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "letrec"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "letrec*"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "only"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "parameterize"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "prefix"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "quasi-quote"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "quasiquote"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "quote"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "rename"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "set!"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "syntax-case"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "syntax-rules"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "unless"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "unquote"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "unquote-splicing"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "when"],
["punctuation", ")"],
["comment", "; with brackets"],
["punctuation", "["], ["keyword", "if"], ["punctuation", "]"],
["punctuation", "["], ["keyword", "when"], ["punctuation", "]"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/scheme/lambda_parameter_feature.test
================================================
(lambda x x)
(lambda |some name| |some name|)
(lambda (x) x)
(lambda (foo bar) (concat foo bar))
(lambda [foo bar] (concat foo bar))
----------------------------------------------------
[
["punctuation", "("],
["keyword", "lambda"],
["lambda-parameter", "x"],
" x",
["punctuation", ")"],
["punctuation", "("],
["keyword", "lambda"],
["lambda-parameter", "|some name|"],
["identifier", "|some name|"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "lambda"],
["punctuation", "("],
["lambda-parameter", "x"],
["punctuation", ")"],
" x",
["punctuation", ")"],
["punctuation", "("],
["keyword", "lambda"],
["punctuation", "("],
["lambda-parameter", "foo bar"],
["punctuation", ")"],
["punctuation", "("],
["function", "concat"],
" foo bar",
["punctuation", ")"],
["punctuation", ")"],
["punctuation", "("],
["keyword", "lambda"],
["punctuation", "["],
["lambda-parameter", "foo bar"],
["punctuation", "]"],
["punctuation", "("],
["function", "concat"],
" foo bar",
["punctuation", ")"],
["punctuation", ")"]
]
----------------------------------------------------
Checks for lambda parameters.
================================================
FILE: tests/languages/scheme/number_feature.test
================================================
123
(foo 42 +42 -42)
(foo 1e3 +1e3 -1e3)
(foo 1e+3 1e-3 3.14159 3.14159e-1)
(foo 8/3)
(foo 3+4i 2.5+0.0i 2.5+0.0i -2.5e4+0.0e4i 3+0i -2e-5i)
(list +10i -10i 10+10i 10.10+10.10i 10-10i 10+10e+10i)
(list #d123 #e#d123e-4 #d#i12 #i-1.234i)
(list #xBAD #b1110011 #o777)
(list #i#x10 #i#x10+10i #b10+10i)
[list 123]
10+i
10+.1i
10+1.i
10.0E2
10.0D2
10.0L2
10.0S2
10.0F2
10.0e2
10.0d2
10.0l2
10.0s2
10.0f2
; not a number but a symbol
(define 1+2 10)
(list 10.0P2 10.0g2 10.0w2)
----------------------------------------------------
[
["number", "123"],
["punctuation", "("],
["function", "foo"],
["number", "42"],
["number", "+42"],
["number", "-42"],
["punctuation", ")"],
["punctuation", "("],
["function", "foo"],
["number", "1e3"],
["number", "+1e3"],
["number", "-1e3"],
["punctuation", ")"],
["punctuation", "("],
["function", "foo"],
["number", "1e+3"],
["number", "1e-3"],
["number", "3.14159"],
["number", "3.14159e-1"],
["punctuation", ")"],
["punctuation", "("],
["function", "foo"],
["number", "8/3"],
["punctuation", ")"],
["punctuation", "("],
["function", "foo"],
["number", "3+4i"],
["number", "2.5+0.0i"],
["number", "2.5+0.0i"],
["number", "-2.5e4+0.0e4i"],
["number", "3+0i"],
["number", "-2e-5i"],
["punctuation", ")"],
["punctuation", "("],
["builtin", "list"],
["number", "+10i"],
["number", "-10i"],
["number", "10+10i"],
["number", "10.10+10.10i"],
["number", "10-10i"],
["number", "10+10e+10i"],
["punctuation", ")"],
["punctuation", "("],
["builtin", "list"],
["number", "#d123"],
["number", "#e#d123e-4"],
["number", "#d#i12"],
["number", "#i-1.234i"],
["punctuation", ")"],
["punctuation", "("],
["builtin", "list"],
["number", "#xBAD"],
["number", "#b1110011"],
["number", "#o777"],
["punctuation", ")"],
["punctuation", "("],
["builtin", "list"],
["number", "#i#x10"],
["number", "#i#x10+10i"],
["number", "#b10+10i"],
["punctuation", ")"],
["punctuation", "["], ["builtin", "list"], ["number", "123"], ["punctuation", "]"],
["number", "10+i"],
["number", "10+.1i"],
["number", "10+1.i"],
["number", "10.0E2"],
["number", "10.0D2"],
["number", "10.0L2"],
["number", "10.0S2"],
["number", "10.0F2"],
["number", "10.0e2"],
["number", "10.0d2"],
["number", "10.0l2"],
["number", "10.0s2"],
["number", "10.0f2"],
["comment", "; not a number but a symbol"],
["punctuation", "("],
["keyword", "define"],
" 1+2 ",
["number", "10"],
["punctuation", ")"],
["punctuation", "("],
["builtin", "list"],
" 10.0P2 10.0g2 10.0w2",
["punctuation", ")"]
]
----------------------------------------------------
Checks for numbers, rational numbers, and complex numbers.
================================================
FILE: tests/languages/scheme/operator_feature.test
================================================
(+
(-
(*
(/
(%
(<
(<=
(>
(>=
(=
(=>
; with brackets
[=
[=>
----------------------------------------------------
[
["punctuation", "("], ["operator", "+"],
["punctuation", "("], ["operator", "-"],
["punctuation", "("], ["operator", "*"],
["punctuation", "("], ["operator", "/"],
["punctuation", "("], ["operator", "%"],
["punctuation", "("], ["operator", "<"],
["punctuation", "("], ["operator", "<="],
["punctuation", "("], ["operator", ">"],
["punctuation", "("], ["operator", ">="],
["punctuation", "("], ["operator", "="],
["punctuation", "("], ["operator", "=>"],
["comment", "; with brackets"],
["punctuation", "["], ["operator", "="],
["punctuation", "["], ["operator", "=>"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/scheme/string_feature.test
================================================
""
"fo\"obar"
"
multi
line
"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "\"\r\nmulti\r\nline\r\n\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/scheme/symbol_feature.test
================================================
'turkey
(define a 'foo)
----------------------------------------------------
[
["symbol", "'turkey"],
["punctuation", "("], ["keyword", "define"], " a ", ["symbol","'foo"], ["punctuation",")"]
]
----------------------------------------------------
Checks for symbols.
================================================
FILE: tests/languages/scss/atrule_feature.test
================================================
@media (min-width: 600px) {}
----------------------------------------------------
[
["atrule", [
["rule", "@media"],
["punctuation", "("],
["property", ["min-width"]],
["punctuation", ":"],
" 600px",
["punctuation", ")"]
]],
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for at-rules.
================================================
FILE: tests/languages/scss/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/scss/comment_feature.test
================================================
//
// foobar
/**/
/* foo
bar */
----------------------------------------------------
[
["comment", "//"],
["comment", "// foobar"],
["comment", "/**/"],
["comment", "/* foo\r\nbar */"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/scss/keyword_feature.test
================================================
@if @else if @else
@for @each @while
@import @extend @use @forward
@debug @warn @mixin
@include @function
@return @content
@for $i from 1 through 3
----------------------------------------------------
[
["keyword", "@if"], ["keyword", "@else if"], ["keyword", "@else"],
["keyword", "@for"], ["keyword", "@each"], ["keyword", "@while"],
["keyword", "@import"], ["keyword", "@extend"], ["keyword", "@use"], ["keyword", "@forward"],
["keyword", "@debug"], ["keyword", "@warn"], ["keyword", "@mixin"],
["keyword", "@include"], ["keyword", "@function"],
["keyword", "@return"], ["keyword", "@content"],
["keyword", "@for"],
["variable", "$i"],
["keyword", "from"],
" 1 ",
["keyword", "through"],
" 3"
]
----------------------------------------------------
================================================
FILE: tests/languages/scss/module-modifier_feature.test
================================================
@use "foo" as bar;
@use "foo" with ($color: blue);
@forward "foo" show bar;
@forward "foo" hide baz;
----------------------------------------------------
[
["keyword", "@use"], ["string", "\"foo\""], ["module-modifier", "as"], " bar", ["punctuation", ";"],
["keyword", "@use"], ["string", "\"foo\""], ["module-modifier", "with"], ["punctuation", "("], ["property", [["variable", "$color"]]], ["punctuation", ":"], " blue", ["punctuation", ")"], ["punctuation", ";"],
["keyword", "@forward"], ["string", "\"foo\""], ["module-modifier", "show"], " bar", ["punctuation", ";"],
["keyword", "@forward"], ["string", "\"foo\""], ["module-modifier", "hide"], " baz", ["punctuation", ";"]
]
----------------------------------------------------
Checks for Sass module modifiers
================================================
FILE: tests/languages/scss/null_feature.test
================================================
null
----------------------------------------------------
[
["null", "null"]
]
----------------------------------------------------
Checks for null.
================================================
FILE: tests/languages/scss/operator_feature.test
================================================
4 - 2;
4 + 2;
4 * 2;
4 / 2;
4 % 2;
4 == 2;
4 != 2;
4 < 2;
4 <= 2;
4 > 2;
4 >= 2;
true and false
false or true
not true
----------------------------------------------------
[
"4 ", ["operator", "-"], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", "+"], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", "*"], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", "/"], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", "%"], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", "=="], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", "!="], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", "<"], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", "<="], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", ">"], " 2", ["punctuation", ";"],
"\r\n4 ", ["operator", ">="], " 2", ["punctuation", ";"],
["boolean", "true"], ["operator", "and"], ["boolean", "false"],
["boolean", "false"], ["operator", "or"], ["boolean", "true"],
["operator", "not"], ["boolean", "true"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/scss/placeholder_feature.test
================================================
%foobar
%foo-bar
%foo_bar
----------------------------------------------------
[
["placeholder", "%foobar"],
["placeholder", "%foo-bar"],
["placeholder", "%foo_bar"]
]
----------------------------------------------------
Checks for placeholders.
================================================
FILE: tests/languages/scss/property_feature.test
================================================
$bg: background;
$color: color;
div {
$bg: none;
background-#{$color}: blue;
#{$bg}-repeat: no-repeat;
}
----------------------------------------------------
[
["property", [["variable", "$bg"]]], ["punctuation", ":"], " background", ["punctuation", ";"],
["property", [["variable", "$color"]]], ["punctuation", ":"], " color", ["punctuation", ";"],
["selector", ["div "]], ["punctuation", "{"],
["property", [["variable", "$bg"]]], ["punctuation", ":"], " none", ["punctuation", ";"],
["property", ["background-", ["variable", "#{$color}"]]], ["punctuation", ":"], " blue", ["punctuation", ";"],
["property", [["variable", "#{$bg}"], "-repeat"]], ["punctuation", ":"], " no-repeat", ["punctuation", ";"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for properties.
================================================
FILE: tests/languages/scss/selector_feature.test
================================================
a {}
p, div {}
#foobar .foo {}
&:hover {}
&-sidebar {}
#context a%extreme {}
#{$selector}:before {}
----------------------------------------------------
[
["selector", ["a "]], ["punctuation", "{"], ["punctuation", "}"],
["selector", ["p, div "]], ["punctuation", "{"], ["punctuation", "}"],
["selector", ["#foobar .foo "]], ["punctuation", "{"], ["punctuation", "}"],
["selector", [["parent", "&"], ":hover "]], ["punctuation", "{"], ["punctuation", "}"],
["selector", [["parent", "&"], "-sidebar "]], ["punctuation", "{"], ["punctuation", "}"],
["selector", ["#context a", ["placeholder", "%extreme"]]], ["punctuation", "{"], ["punctuation", "}"],
["selector", [["variable", "#{$selector}"], ":before "]], ["punctuation", "{"], ["punctuation", "}"]
]
----------------------------------------------------
Checks for selectors.
================================================
FILE: tests/languages/scss/statement_feature.test
================================================
$foo: "bar" !default;
@extend .baz !optional;
----------------------------------------------------
[
["property", [["variable", "$foo"]]],
["punctuation", ":"],
["string", "\"bar\""],
["statement", "!default"],
["punctuation", ";"],
["keyword", "@extend"],
" .baz ",
["statement", "!optional"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for statements.
================================================
FILE: tests/languages/scss/url_feature.test
================================================
url('foo.png')
font-url('foo.ttf')
----------------------------------------------------
[
["url", "url"],
["punctuation", "("],
["string", "'foo.png'"],
["punctuation", ")"],
["url", "font-url"],
["punctuation", "("],
["string", "'foo.ttf'"],
["punctuation", ")"]
]
----------------------------------------------------
Checks for URLs.
================================================
FILE: tests/languages/scss/variable_feature.test
================================================
$foo
$foo-bar
$foo_bar
#{$foo}
#{$foo-bar}
#{$foo_bar}
----------------------------------------------------
[
["variable", "$foo"],
["variable", "$foo-bar"],
["variable", "$foo_bar"],
["variable", "#{$foo}"],
["variable", "#{$foo-bar}"],
["variable", "#{$foo_bar}"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/scss+haml/scss_inclusion.test
================================================
:scss
#main {
width: $width;
}
~
:scss
#main {
width: $width;
}
----------------------------------------------------
[
["filter-scss", [
["filter-name", ":scss"],
["text", [
["selector", ["#main "]],
["punctuation", "{"],
["property", ["width"]],
["punctuation", ":"],
["variable", "$width"],
["punctuation", ";"],
["punctuation", "}"]
]]
]],
["punctuation", "~"],
["filter-scss", [
["filter-name", ":scss"],
["text", [
["selector", ["#main "]],
["punctuation", "{"],
["property", ["width"]],
["punctuation", ":"],
["variable", "$width"],
["punctuation", ";"],
["punctuation", "}"]
]]
]]
]
----------------------------------------------------
Checks for CSS filter in Haml. The tilde serves only as a separator.
================================================
FILE: tests/languages/scss+pug/scss_inclusion.test
================================================
:sass
@extend .foo;
----------------------------------------------------
[
["filter-sass", [
["filter-name", ":sass"],
["text", [
["keyword", "@extend"],
" .foo",
["punctuation", ";"]
]]
]]
]
----------------------------------------------------
Checks for sass filter (Scss) in pug.
================================================
FILE: tests/languages/shell-session/command_feature.test
================================================
$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
$ git push
Everything up-to-date
# echo "root"
root
----------------------------------------------------
[
["command", [
["shell-symbol", "$"],
["bash", [
["function", "git"],
" checkout master"
]]
]],
["output", "Switched to branch 'master'\r\nYour branch is up-to-date with 'origin/master'.\r\n"],
["command", [
["shell-symbol", "$"],
["bash", [
["function", "git"],
" push"
]]
]],
["output", "Everything up-to-date\r\n"],
["command", [
["shell-symbol", "#"],
["bash", [
["builtin", "echo"],
["string", [
"\"root\""
]]
]]
]],
["output", "root"]
]
----------------------------------------------------
Checks for commands.
================================================
FILE: tests/languages/shell-session/command_string_feature.test
================================================
$ echo 'Foo
> Bar'
$ echo "Foo
> Bar"
$ echo <<- STRING_END
foo
bar
STRING_END
$ echo <<- "STRING_END"
foo
bar
STRING_END
$ echo \'a # '
$ cat << "EOF" > /etc/ipsec.secrets
: RSA vpn-server-a.key
# : RSA vpn-server-b.key
EOF
$ LC_ALL=C tr -cd 'a-zA-Z0-9_-;:!?.@\\*/#%$' < /dev/random | head -c 8
y_#!$U48
----------------------------------------------------
[
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["string", "'Foo\r\n> Bar'"]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["string", ["\"Foo\r\n> Bar\""]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["operator", ["<<-"]],
["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["operator", ["<<-"]],
["string", ["\"STRING_END\"\r\nfoo\r\nbar\r\nSTRING_END"]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["punctuation", "\\"],
"'a ",
["comment", "# '"]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["function", "cat"],
["operator", ["<<"]],
["string", [
"\"EOF\"",
["bash", [
["operator", [">"]],
" /etc/ipsec.secrets"
]],
"\r\n: RSA vpn-server-a.key\r\n# : RSA vpn-server-b.key\r\nEOF"
]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["assign-left", [
["environment", "LC_ALL"]
]],
["operator", ["="]],
"C ",
["function", "tr"],
["parameter", "-cd"],
["string", "'a-zA-Z0-9_-;:!?.@\\\\*/#%$'"],
["operator", ["<"]],
" /dev/random ",
["operator", ["|"]],
["function", "head"],
["parameter", "-c"],
["number", "8"]
]]
]],
["output", "y_#!$U48"]
]
----------------------------------------------------
Checks for multi-line strings inside commands.
================================================
FILE: tests/languages/shell-session/info_feature.test
================================================
foo@bar:/var/local$ cd ~
foo@bar:~$ sudo -i
[sudo] password for foo:
root@bar:~# echo "hello!"
hello!
foo@bar$ zsh
foo@bar% exit
----------------------------------------------------
[
["command", [
["info", [
["user", "foo@bar"],
["punctuation", ":"],
["path", "/var/local"]
]],
["shell-symbol", "$"],
["bash", [
["builtin", "cd"],
" ~"
]]
]],
["command", [
["info", [
["user", "foo@bar"],
["punctuation", ":"],
["path", "~"]
]],
["shell-symbol", "$"],
["bash", [
["function", "sudo"],
["parameter", "-i"]
]]
]],
["output", "[sudo] password for foo:\r\n"],
["command", [
["info", [
["user", "root@bar"],
["punctuation", ":"],
["path", "~"]
]],
["shell-symbol", "#"],
["bash", [
["builtin", "echo"],
["string", ["\"hello!\""]]
]]
]],
["output", "hello!\r\n\r\n"],
["command", [
["info", [
["user", "foo@bar"]
]],
["shell-symbol", "$"],
["bash", [
["function", "zsh"]
]]
]],
["command", [
["info", [
["user", "foo@bar"]
]],
["shell-symbol", "%"],
["bash", [
["builtin", "exit"]
]]
]]
]
----------------------------------------------------
Checks for the info bash outputs.
================================================
FILE: tests/languages/shell-session/issue2644.test
================================================
$ export BORG_PASSCOMMAND="security find-generic-password -a $USER -s borg-passphrase -w"
$ export BORG_RSH="ssh -i ~/.ssh/borg"
$ borg init --encryption=keyfile-blake2 "borg@1.2.3.4:backup"
By default repositories initialized with this version will produce security
errors if written to with an older version (up to and including Borg 1.0.8).
If you want to use these older versions, you can disable the check by running:
borg upgrade --disable-tam ssh://borg@1.2.3.4/./backup
See https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability for details about the security implications.
IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!
Use "borg key export" to export the key, optionally in printable format.
Write down the passphrase. Store both at safe place(s).
---
----------------------------------------------------
[
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "export"],
["assign-left", ["BORG_PASSCOMMAND"]],
["operator", ["="]],
["string", [
"\"security find-generic-password -a ",
["environment", "$USER"],
" -s borg-passphrase -w\""
]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
["builtin", "export"],
["assign-left", ["BORG_RSH"]],
["operator", ["="]],
["string", ["\"ssh -i ~/.ssh/borg\""]]
]]
]],
["command", [
["shell-symbol", "$"],
["bash", [
"borg init ",
["parameter", "--encryption"],
["operator", ["="]],
"keyfile-blake2 ",
["string", ["\"borg@1.2.3.4:backup\""]]
]]
]],
["output", "By default repositories initialized with this version will produce security\r\nerrors if written to with an older version (up to and including Borg 1.0.8).\r\n\r\nIf you want to use these older versions, you can disable the check by running:\r\nborg upgrade --disable-tam ssh://borg@1.2.3.4/./backup\r\n\r\nSee https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability for details about the security implications.\r\n\r\nIMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!\r\nUse \"borg key export\" to export the key, optionally in printable format.\r\nWrite down the passphrase. Store both at safe place(s).\r\n\r\n---"]
]
================================================
FILE: tests/languages/shell-session/issue2685.test
================================================
/home/user$ echo "Hello World"
Hello World
/home/user$ exit
----------------------------------------------------
[
["command", [
["info", [
["path", "/home/user"]
]],
["shell-symbol", "$"],
["bash", [
["builtin", "echo"],
["string", ["\"Hello World\""]]
]]
]],
["output", "Hello World\r\n"],
["command", [
["info", [
["path", "/home/user"]
]],
["shell-symbol", "$"],
["bash", [
["builtin", "exit"]
]]
]]
]
================================================
FILE: tests/languages/shell-session/issue2871.test
================================================
fyu@home $ sudo ls -l ~/.config 's' && \
echo 'hello'
drwxr-xr-x - franklinyu 26 Sep 2020 asciinema
drwxr-xr-x - franklinyu 26 Jan 2020 'bash'
hello
----------------------------------------------------
[
["command", [
["info", [
["user", "fyu@home "]
]],
["shell-symbol", "$"],
["bash", [
["function", "sudo"],
["function", "ls"],
["parameter", "-l"],
" ~/.config ",
["string", "'s'"],
["operator", ["&&"]],
["punctuation", "\\"],
["builtin", "echo"],
["string", "'hello'"]
]]
]],
["output", "drwxr-xr-x - franklinyu 26 Sep 2020 asciinema\r\ndrwxr-xr-x - franklinyu 26 Jan 2020 'bash'\r\nhello"]
]
================================================
FILE: tests/languages/shell-session/issue3047_1.test
================================================
$ diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 500.1 GB disk0s2
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +500.1 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD - Data 340.9 GB disk1s1
2: APFS Volume Preboot 85.9 MB disk1s2
3: APFS Volume Recovery 529.0 MB disk1s3
4: APFS Volume VM 3.2 GB disk1s4
5: APFS Volume Macintosh HD 11.3 GB disk1s5
/dev/disk2 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.9 GB disk2
1: Windows_FAT_32 boot 268.4 MB disk2s1
2: Linux 15.7 GB disk2s2
$ sudo diskutil unmount /dev/diskn
disk2 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead
$ sudo diskutil unmountDisk /dev/diskn (if previous step fails)
Unmount of all volumes on disk2 was successful
$ sudo dd bs=1m if=$HOME/Downloads/tails-amd64-4.18.img of=/dev/rdiskn
1131+0 records in
1131+0 records out
1185939456 bytes transferred in 44.708618 secs (26525970 bytes/sec)
$ sudo diskutil unmountDisk /dev/diskn
Unmount of all volumes on disk2 was successful
----------------------------------------------------
[
["command", [
["shell-symbol", "$"],
["bash", ["diskutil list"]]
]],
["output", "/dev/disk0 (internal, physical):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: GUID_partition_scheme *500.3 GB disk0\r\n 1: EFI EFI 209.7 MB disk0s1\r\n 2: Apple_APFS Container disk1 500.1 GB disk0s2\r\n\r\n/dev/disk1 (synthesized):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: APFS Container Scheme - +500.1 GB disk1\r\n Physical Store disk0s2\r\n 1: APFS Volume Macintosh HD - Data 340.9 GB disk1s1\r\n 2: APFS Volume Preboot 85.9 MB disk1s2\r\n 3: APFS Volume Recovery 529.0 MB disk1s3\r\n 4: APFS Volume VM 3.2 GB disk1s4\r\n 5: APFS Volume Macintosh HD 11.3 GB disk1s5\r\n\r\n/dev/disk2 (internal, physical):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: FDisk_partition_scheme *15.9 GB disk2\r\n 1: Windows_FAT_32 boot 268.4 MB disk2s1\r\n 2: Linux 15.7 GB disk2s2\r\n\r\n"],
["command", [
["shell-symbol", "$"],
["bash", [
["function", "sudo"],
" diskutil unmount /dev/diskn"
]]
]],
["output", "disk2 was already unmounted or it has a partitioning scheme so use \"diskutil unmountDisk\" instead\r\n\r\n"],
["command", [
["shell-symbol", "$"],
["bash", [
["function", "sudo"],
" diskutil unmountDisk /dev/diskn ",
["punctuation", "("],
"if previous step fails",
["punctuation", ")"]
]]
]],
["output", "Unmount of all volumes on disk2 was successful\r\n\r\n"],
["command", [
["shell-symbol", "$"],
["bash", [
["function", "sudo"],
["function", "dd"],
["assign-left", ["bs"]],
["operator", ["="]],
"1m ",
["assign-left", ["if"]],
["operator", ["="]],
["environment", "$HOME"],
"/Downloads/tails-amd64-4.18.img ",
["assign-left", ["of"]],
["operator", ["="]],
"/dev/rdiskn"
]]
]],
["output", "1131+0 records in\r\n1131+0 records out\r\n1185939456 bytes transferred in 44.708618 secs (26525970 bytes/sec)\r\n\r\n"],
["command", [
["shell-symbol", "$"],
["bash", [
["function", "sudo"],
" diskutil unmountDisk /dev/diskn"
]]
]],
["output", "Unmount of all volumes on disk2 was successful"]
]
================================================
FILE: tests/languages/shell-session/issue3047_2.test
================================================
$ gpg --card-status
Reader ...........: Yubico YubiKey CCID
Application ID ...: D*******************************
Application type .: OpenPGP
Version ..........: 0.0
Manufacturer .....: Yubico
Serial number ....: 1*******
Name of cardholder: John Doe
Language prefs ...: en
Salutation .......:
URL of public key : [not set]
Login data .......: john@example.net
Signature PIN ....: not forced
Key attributes ...: ed25519 cv25519 ed25519
Max. PIN lengths .: 127 127 127
PIN retry counter : 3 0 3
Signature counter : 0
KDF setting ......: off
UIF setting ......: Sign=on Decrypt=on Auth=on
Signature key ....: ACE1 3F15 90C1 A8C9 D942 51E3 02ED C61B 6543 509B
created ....: 2021-07-21 18:44:34
Encryption key....: 0524 00F4 8E1D 085A F3E1 61EC D463 4E0D 6E2D D8BF
created ....: 2021-07-21 18:44:52
Authentication key: A27B 582F 1F62 03BA 549B 3D44 1E7B 69B2 38FF A21B
created ....: 2021-07-21 18:45:13
General key info..: sub ed25519/0x02EDC61B6543509B 2021-07-21 John Doe
sec# ed25519/0xC2709D13BAB4763C created: 2021-07-21 expires: never
ssb> ed25519/0x02EDC61B6543509B created: 2021-07-21 expires: 2022-07-21
card-no: 0006 1*******
ssb> cv25519/0xD4634E0D6E2DD8BF created: 2021-07-21 expires: 2022-07-21
card-no: 0006 1*******
ssb> ed25519/0x1E7B69B238FFA21B created: 2021-07-21 expires: 2022-07-21
card-no: 0006 1*******
----------------------------------------------------
[
["command", [
["shell-symbol", "$"],
["bash", ["gpg --card-status"]]
]],
["output", "Reader ...........: Yubico YubiKey CCID\r\nApplication ID ...: D*******************************\r\nApplication type .: OpenPGP\r\nVersion ..........: 0.0\r\nManufacturer .....: Yubico\r\nSerial number ....: 1*******\r\nName of cardholder: John Doe\r\nLanguage prefs ...: en\r\nSalutation .......:\r\nURL of public key : [not set]\r\nLogin data .......: john@example.net\r\nSignature PIN ....: not forced\r\nKey attributes ...: ed25519 cv25519 ed25519\r\nMax. PIN lengths .: 127 127 127\r\nPIN retry counter : 3 0 3\r\nSignature counter : 0\r\nKDF setting ......: off\r\nUIF setting ......: Sign=on Decrypt=on Auth=on\r\nSignature key ....: ACE1 3F15 90C1 A8C9 D942 51E3 02ED C61B 6543 509B\r\n created ....: 2021-07-21 18:44:34\r\nEncryption key....: 0524 00F4 8E1D 085A F3E1 61EC D463 4E0D 6E2D D8BF\r\n created ....: 2021-07-21 18:44:52\r\nAuthentication key: A27B 582F 1F62 03BA 549B 3D44 1E7B 69B2 38FF A21B\r\n created ....: 2021-07-21 18:45:13\r\nGeneral key info..: sub ed25519/0x02EDC61B6543509B 2021-07-21 John Doe \r\nsec# ed25519/0xC2709D13BAB4763C created: 2021-07-21 expires: never\r\nssb> ed25519/0x02EDC61B6543509B created: 2021-07-21 expires: 2022-07-21\r\n card-no: 0006 1*******\r\nssb> cv25519/0xD4634E0D6E2DD8BF created: 2021-07-21 expires: 2022-07-21\r\n card-no: 0006 1*******\r\nssb> ed25519/0x1E7B69B238FFA21B created: 2021-07-21 expires: 2022-07-21\r\n card-no: 0006 1*******"]
]
================================================
FILE: tests/languages/smali/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/smali/builtin_feature.test
================================================
new-array v0, v0, [I
.method static constructor ()V
.field mWifiOnUid:I
.field public static mWifiRunning:Z = false
.field public static final PI:D = 3.141592653589793
.field static final LOG_TAG:Ljava/lang/String; = "CDMA"
----------------------------------------------------
[
"new-array ",
["register", "v0"],
["punctuation", ","],
["register", "v0"],
["punctuation", ","],
["operator", "["],
["builtin", "I"],
["keyword", ".method"],
["keyword", "static"],
["keyword", "constructor"],
["function", ""],
["punctuation", "("],
["punctuation", ")"],
["builtin", "V"],
["keyword", ".field"],
["field", "mWifiOnUid"],
["punctuation", ":"],
["builtin", "I"],
["keyword", ".field"],
["keyword", "public"],
["keyword", "static"],
["field", "mWifiRunning"],
["punctuation", ":"],
["builtin", "Z"],
["operator", "="],
["boolean", "false"],
["keyword", ".field"],
["keyword", "public"],
["keyword", "static"],
["keyword", "final"],
["field", "PI"],
["punctuation", ":"],
["builtin", "D"],
["operator", "="],
["number", "3.141592653589793"],
["keyword", ".field"],
["keyword", "static"],
["keyword", "final"],
["field", "LOG_TAG"],
["punctuation", ":"],
["class-name", [
["builtin", "L"],
["namespace", [
"java",
["punctuation", "/"],
"lang",
["punctuation", "/"]
]],
["class-name", "String"]
]],
["punctuation", ";"],
["operator", "="],
["string", "\"CDMA\""]
]
================================================
FILE: tests/languages/smali/class-name_feature.test
================================================
LMain;
Ljava/lang/String;
Lfoo/bar/Foo$Bar;
LFoo$Bar;
Ljava/lang/String;
LI;
LV;
LI/I/I;
L`single`;
L`java`/lang/String;
L`java`/`lang`/`String`;
Lspace/test/`20 a0 1680 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 200a 202f 205f 3000 `;
----------------------------------------------------
[
["class-name", [
["builtin", "L"],
["class-name", "Main"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["namespace", [
"java",
["punctuation", "/"],
"lang",
["punctuation", "/"]
]],
["class-name", "String"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["namespace", [
"foo",
["punctuation", "/"],
"bar",
["punctuation", "/"]
]],
["class-name", "Foo$Bar"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["class-name", "Foo$Bar"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["namespace", [
"java",
["punctuation", "/"],
"lang",
["punctuation", "/"]
]],
["class-name", "String"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["class-name", "I"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["class-name", "V"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["namespace", [
"I",
["punctuation", "/"],
"I",
["punctuation", "/"]
]],
["class-name", "I"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["class-name", "`single`"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["namespace", [
"`java`",
["punctuation", "/"],
"lang",
["punctuation", "/"]
]],
["class-name", "String"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["namespace", [
"`java`",
["punctuation", "/"],
"`lang`",
["punctuation", "/"]
]],
["class-name", "`String`"]
]],
["punctuation", ";"],
["class-name", [
["builtin", "L"],
["namespace", [
"space",
["punctuation", "/"],
"test",
["punctuation", "/"]
]],
["class-name", "`20 a0 1680 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 200a 202f 205f 3000 `"]
]],
["punctuation", ";"]
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/smali/comment_feature.test
================================================
# comment
----------------------------------------------------
[
["comment", "# comment"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/smali/field_feature.test
================================================
foo:
$VALUES:
12:
----------------------------------------------------
[
["field", "foo"],
["punctuation", ":"],
["field", "$VALUES"],
["punctuation", ":"],
["field", "12"],
["punctuation", ":"]
]
----------------------------------------------------
Checks for fields.
================================================
FILE: tests/languages/smali/function_feature.test
================================================
foo()V
(Ljava/lang/String;I)V
()V
# a complex method
method(I[[IILjava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
----------------------------------------------------
[
["function", "foo"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "V"],
["function", ""],
["punctuation", "("],
["class-name", [
["builtin", "L"],
["namespace", [
"java",
["punctuation", "/"],
"lang",
["punctuation", "/"]
]],
["class-name", "String"]
]],
["punctuation", ";"],
["builtin", "I"],
["punctuation", ")"],
["builtin", "V"],
["function", ""],
["punctuation", "("],
["punctuation", ")"],
["builtin", "V"],
["comment", "# a complex method"],
["function", "method"],
["punctuation", "("],
["builtin", "I"],
["operator", "["],
["operator", "["],
["builtin", "II"],
["class-name", [
["builtin", "L"],
["namespace", [
"java",
["punctuation", "/"],
"lang",
["punctuation", "/"]
]],
["class-name", "String"]
]],
["punctuation", ";"],
["operator", "["],
["class-name", [
["builtin", "L"],
["namespace", [
"java",
["punctuation", "/"],
"lang",
["punctuation", "/"]
]],
["class-name", "Object"]
]],
["punctuation", ";"],
["punctuation", ")"],
["class-name", [
["builtin", "L"],
["namespace", [
"java",
["punctuation", "/"],
"lang",
["punctuation", "/"]
]],
["class-name", "String"]
]],
["punctuation", ";"]
]
----------------------------------------------------
Checks for functions/methods.
================================================
FILE: tests/languages/smali/keyword_feature.test
================================================
abstract
annotation
bridge
constructor
enum
final
interface
private
protected
public
runtime
static
synthetic
system
transient
.something
.end something
----------------------------------------------------
[
["keyword", "abstract"],
["keyword", "annotation"],
["keyword", "bridge"],
["keyword", "constructor"],
["keyword", "enum"],
["keyword", "final"],
["keyword", "interface"],
["keyword", "private"],
["keyword", "protected"],
["keyword", "public"],
["keyword", "runtime"],
["keyword", "static"],
["keyword", "synthetic"],
["keyword", "system"],
["keyword", "transient"],
["keyword", ".something"],
["keyword", ".end"],
["keyword", "something"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/smali/label_feature.test
================================================
.line 989
:cond_2b
goto :goto_1f
----------------------------------------------------
[
["keyword", ".line"], ["number", "989"],
["punctuation", ":"], ["label", "cond_2b"],
"\r\n\r\ngoto ", ["punctuation", ":"], ["label", "goto_1f"]
]
================================================
FILE: tests/languages/smali/number_feature.test
================================================
123
-123
123t
123s
123l
123T
123S
123L
123f
123.0f
123.0
-1234e-9
.2e-2
-.2e-2
-1234.D
.2f
0xFF
0xFFt
0x0FFs
0x0FFl
0x123ABCp-1D
0x12AB.12ABp10d
infinity
infinityd
infinityf
infinityD
infinityF
INFINITY
INFINITYd
INFINITYf
INFINITYD
INFINITYF
NaN
NaNd
NaNf
NaND
NaNF
----------------------------------------------------
[
["number", "123"],
["number", "-123"],
["number", "123t"],
["number", "123s"],
["number", "123l"],
["number", "123T"],
["number", "123S"],
["number", "123L"],
["number", "123f"],
["number", "123.0f"],
["number", "123.0"],
["number", "-1234e-9"],
["number", ".2e-2"],
["number", "-.2e-2"],
["number", "-1234.D"],
["number", ".2f"],
["number", "0xFF"],
["number", "0xFFt"],
["number", "0x0FFs"],
["number", "0x0FFl"],
["number", "0x123ABCp-1D"],
["number", "0x12AB.12ABp10d"],
["number", "infinity"],
["number", "infinityd"],
["number", "infinityf"],
["number", "infinityD"],
["number", "infinityF"],
["number", "INFINITY"],
["number", "INFINITYd"],
["number", "INFINITYf"],
["number", "INFINITYD"],
["number", "INFINITYF"],
["number", "NaN"],
["number", "NaNd"],
["number", "NaNf"],
["number", "NaND"],
["number", "NaNF"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/smali/register_feature.test
================================================
move v1, p1
move v2, p2
move-object v4, p3
move v5, p4
----------------------------------------------------
[
"move ", ["register", "v1"], ["punctuation", ","], ["register", "p1"],
"\r\n\r\nmove ",
["register", "v2"],
["punctuation", ","],
["register", "p2"],
"\r\n\r\nmove-object ",
["register", "v4"],
["punctuation", ","],
["register", "p3"],
"\r\n\r\nmove ",
["register", "v5"],
["punctuation", ","],
["register", "p4"]
]
================================================
FILE: tests/languages/smali/string_feature.test
================================================
""
"foo"
'c'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\""],
["string", "'c'"]
]
----------------------------------------------------
Checks for strings and chars.
================================================
FILE: tests/languages/smalltalk/block-arguments_feature.test
================================================
[ :i |
]
[ :a :b |
]
----------------------------------------------------
[
["punctuation", "["],
["block-arguments", [
["variable", ":i"],
["punctuation", "|"]
]],
["punctuation", "]"],
["punctuation", "["],
["block-arguments", [
["variable", ":a"],
["variable", ":b"],
["punctuation", "|"]
]],
["punctuation", "]"]
]
----------------------------------------------------
Checks for block arguments.
================================================
FILE: tests/languages/smalltalk/boolean_feature.test
================================================
true false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
================================================
FILE: tests/languages/smalltalk/char_feature.test
================================================
$a
$4
$.
$^
----------------------------------------------------
[
["char", "$a"],
["char", "$4"],
["char", "$."],
["char", "$^"]
]
----------------------------------------------------
Checks for characters.
================================================
FILE: tests/languages/smalltalk/comment_feature.test
================================================
"foobar"
"foo""bar
baz"
""
----------------------------------------------------
[
["comment", "\"foobar\""],
["comment", "\"foo\"\"bar\r\nbaz\""],
["comment", "\"\""]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/smalltalk/keyword_feature.test
================================================
nil
self super new
----------------------------------------------------
[
["keyword", "nil"],
["keyword", "self"], ["keyword", "super"], ["keyword", "new"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/smalltalk/number_feature.test
================================================
42
3.14159
3e8
0.2e-4
2r10001111
2r10.1111e4
16rBADFACE
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "3e8"],
["number", "0.2e-4"],
["number", "2r10001111"],
["number", "2r10.1111e4"],
["number", "16rBADFACE"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/smalltalk/operator_feature.test
================================================
:=
= ==
~= ~~
< <=
> >> >=
/ //
\\
! ^ +
- * &
| , @
----------------------------------------------------
[
["operator", ":="],
["operator", "="], ["operator", "=="],
["operator", "~="], ["operator", "~~"],
["operator", "<"], ["operator", "<="],
["operator", ">"], ["operator", ">>"], ["operator", ">="],
["operator", "/"], ["operator", "//"],
["operator", "\\\\"],
["operator", "!"], ["operator", "^"], ["operator", "+"],
["operator", "-"], ["operator", "*"], ["operator", "&"],
["operator", "|"], ["operator", ","], ["operator", "@"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/smalltalk/string_char_feature.test
================================================
$'
'foobar'
----------------------------------------------------
[
["char", "$'"],
["string", "'foobar'"]
]
----------------------------------------------------
Checks a single-quote-character doesn't confuse string parsing.
================================================
FILE: tests/languages/smalltalk/string_feature.test
================================================
'foobar'
'foo''bar
baz'
''
----------------------------------------------------
[
["string", "'foobar'"],
["string", "'foo''bar\r\nbaz'"],
["string", "''"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/smalltalk/symbol_feature.test
================================================
#foo
#Foo42
#-
#+
#**
#(
----------------------------------------------------
[
["symbol", "#foo"],
["symbol", "#Foo42"],
["symbol", "#-"],
["symbol", "#+"],
["symbol", "#**"],
["symbol", "#"], ["punctuation", "("]
]
----------------------------------------------------
Checks for symbols.
================================================
FILE: tests/languages/smalltalk/temporary-variables_feature.test
================================================
| foo |
| x y myVar z cnt |
----------------------------------------------------
[
["temporary-variables", [
["punctuation", "|"],
["variable", "foo"],
["punctuation", "|"]
]],
["temporary-variables", [
["punctuation", "|"],
["variable", "x"],
["variable", "y"],
["variable", "myVar"],
["variable", "z"],
["variable", "cnt"],
["punctuation", "|"]
]]
]
----------------------------------------------------
Checks for temporary variables.
================================================
FILE: tests/languages/smarty/attr-name_feature.test
================================================
{assign var=foo value="bar"}
{foo bar = 40}
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["keyword", "assign"],
["attr-name", "var"],
["operator", "="],
["variable", "foo"],
["attr-name", "value"],
["operator", "="],
["string", ["\"bar\""]],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "foo"],
["attr-name", "bar"],
["operator", "="],
["number", "40"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for attributes.
================================================
FILE: tests/languages/smarty/booelan_feature.test
================================================
{if false}
{if off}
{if on}
{if no}
{if true}
{if yes}
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["boolean", "false"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["boolean", "off"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["boolean", "on"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["boolean", "no"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["boolean", "true"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["boolean", "yes"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/smarty/comment_feature.test
================================================
{**}
{* foo
bar *}
{* you cannot nest comments *}
{* {* foo *} *}
----------------------------------------------------
[
["smarty-comment", "{**}"],
["smarty-comment", "{* foo\r\nbar *}"],
["smarty-comment", "{* you cannot nest comments *}"],
["smarty-comment", "{* {* foo *}"], " *}"
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/smarty/function_feature.test
================================================
{if count($foo)}
{$foo|@count}
{$bar|lower}
{/if}
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["function", "count"],
["punctuation", "("],
["variable", "$foo"],
["punctuation", ")"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["operator", "|"],
["function", "@count"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$bar"],
["operator", "|"],
["function", "lower"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{/"],
["keyword", "if"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for tags, filters and functions.
================================================
FILE: tests/languages/smarty/keyword_feature.test
================================================
{if count($foo)}
{/if}
{* PHP function *}
{time()}
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["function", "count"],
["punctuation", "("],
["variable", "$foo"],
["punctuation", ")"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{/"],
["keyword", "if"],
["delimiter", "}"]
]],
["smarty-comment", "{* PHP function *}"],
["smarty", [
["delimiter", "{"],
["function", "time"],
["punctuation", "("],
["punctuation", ")"],
["delimiter", "}"]
]]
]
================================================
FILE: tests/languages/smarty/number_feature.test
================================================
{0xBadFace}
{42}
{3.14159}
{4e7}
{5.4E-3}
{2.0e+10}
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["number", "0xBadFace"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["number", "42"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["number", "3.14159"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["number", "4e7"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["number", "5.4E-3"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["number", "2.0e+10"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/smarty/operator_feature.test
================================================
{if $a + $b - $c == $d}
{if $e * $f / $g % $h === $i}
{if $j < $k and $l > $m eq $n <= $o and $p >= $q}
{if !$r != $s && $t || $u}
{if $v is not even by 3 or $v is even}
{if $w is div by 2 or $w is not div by 3}
{if $x is not odd or $x is odd by 4}
{if $y ne $z or $a neq $b}
{if $c gt $d or $e lt $f}
{if $g gte $h or $i ge $j or $k lte $l or $m le $n}
{if not $o and $p mod 4}
{foo bar=baz}
{$foo|upper}
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["variable", "$a"],
["operator", "+"],
["variable", "$b"],
["operator", "-"],
["variable", "$c"],
["operator", "=="],
["variable", "$d"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["variable", "$e"],
["operator", "*"],
["variable", "$f"],
["operator", "/"],
["variable", "$g"],
["operator", "%"],
["variable", "$h"],
["operator", "==="],
["variable", "$i"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["variable", "$j"],
["operator", "<"],
["variable", "$k"],
["operator", "and"],
["variable", "$l"],
["operator", ">"],
["variable", "$m"],
["operator", "eq"],
["variable", "$n"],
["operator", "<="],
["variable", "$o"],
["operator", "and"],
["variable", "$p"],
["operator", ">="],
["variable", "$q"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["operator", "!"],
["variable", "$r"],
["operator", "!="],
["variable", "$s"],
["operator", "&&"],
["variable", "$t"],
["operator", "||"],
["variable", "$u"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["variable", "$v"],
["operator", "is not even by"],
["number", "3"],
["operator", "or"],
["variable", "$v"],
["operator", "is even"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["variable", "$w"],
["operator", "is div by"],
["number", "2"],
["operator", "or"],
["variable", "$w"],
["operator", "is not div by"],
["number", "3"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["variable", "$x"],
["operator", "is not odd"],
["operator", "or"],
["variable", "$x"],
["operator", "is odd by"],
["number", "4"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["variable", "$y"],
["operator", "ne"],
["variable", "$z"],
["operator", "or"],
["variable", "$a"],
["operator", "neq"],
["variable", "$b"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["variable", "$c"],
["operator", "gt"],
["variable", "$d"],
["operator", "or"],
["variable", "$e"],
["operator", "lt"],
["variable", "$f"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["variable", "$g"],
["operator", "gte"],
["variable", "$h"],
["operator", "or"],
["variable", "$i"],
["operator", "ge"],
["variable", "$j"],
["operator", "or"],
["variable", "$k"],
["operator", "lte"],
["variable", "$l"],
["operator", "or"],
["variable", "$m"],
["operator", "le"],
["variable", "$n"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "if"],
["operator", "not"],
["variable", "$o"],
["operator", "and"],
["variable", "$p"],
["operator", "mod"],
["number", "4"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "foo"],
["attr-name", "bar"],
["operator", "="],
["variable", "baz"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["operator", "|"],
["function", "upper"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/smarty/php_feature.test
================================================
{php}
// including a php script directly from the template.
include('/path/to/display_weather.php');
{/php}
{* this template includes a {php} block that assign's the variable $varX *}
{php}
global $foo, $bar;
if($foo == $bar){
echo 'This will be sent to browser';
}
// assign a variable to Smarty
$this->assign('varX','Toffee');
{/php}
{* output the variable *}
{$varX} is my fav ice cream :-)
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["keyword", "php"],
["delimiter", "}"]
]],
["embedded-php", "\r\n // including a php script directly from the template.\r\n include('/path/to/display_weather.php');\r\n"],
["smarty", [
["delimiter", "{/"],
["keyword", "php"],
["delimiter", "}"]
]],
["smarty-comment", "{* this template includes a {php} block that assign's the variable $varX *}"],
["smarty", [
["delimiter", "{"],
["keyword", "php"],
["delimiter", "}"]
]],
["embedded-php", "\r\n global $foo, $bar;\r\n if($foo == $bar){\r\n echo 'This will be sent to browser';\r\n }\r\n // assign a variable to Smarty\r\n $this->assign('varX','Toffee');\r\n"],
["smarty", [
["delimiter", "{/"],
["keyword", "php"],
["delimiter", "}"]
]],
["smarty-comment", "{* output the variable *}"],
["tag", [
["punctuation", "<"],
["tag", ["strong"]],
["punctuation", ">"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$varX"],
["delimiter", "}"]
]],
["tag", [
["punctuation", ""],
["tag", ["strong"]],
["punctuation", ">"]
]],
" is my fav ice cream :-)"
]
================================================
FILE: tests/languages/smarty/punctuation_feature.test
================================================
{foo
( ) [ ] { }
. : ,
`
->
}
----------------------------------------------------
[
["smarty", [
["delimiter", "{"], ["keyword", "foo"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "."],
["punctuation", ":"],
["punctuation", ","],
["punctuation", "`"],
["punctuation", "->"],
["delimiter", "}"]
]]
]
================================================
FILE: tests/languages/smarty/smarty_in_markup_feature.test
================================================
{$foo}
___SMARTY1___{$foo}
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["delimiter", "}"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["delimiter", "}"]
]],
["punctuation", "\""]
]],
["punctuation", ">"]
]],
"\r\n___SMARTY1___",
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for Smarty inside Markup.
================================================
FILE: tests/languages/smarty/string_feature.test
================================================
{""}
{"fo\"obar"}
{''}
{'fo\'obar'}
{$foo="this is message {counter}"}
{func var="test $foo test"} // sees $foo
{func var="test $foo_bar test"} // sees $foo_bar
{func var="test `$foo[0]` test"} // sees $foo[0]
{func var="test `$foo[bar]` test"} // sees $foo[bar]
{func var="test $foo.bar test"} // sees $foo (not $foo.bar)
{func var="test `$foo.bar` test"} // sees $foo.bar
{func var="test `$foo.bar` test"|escape} // modifiers outside quotes!
{func var="test {$foo|escape} test"} // modifiers inside quotes!
{func var="test {time()} test"} // PHP function result
{func var="test {counter} test"} // plugin result
{* will replace $tpl_name with value *}
{include file="subdir/$tpl_name.tpl"}
{* does NOT replace $tpl_name *}
{include file='subdir/$tpl_name.tpl'} // vars require double quotes!
{* must have backticks as it contains a dot "." *}
{cycle values="one,two,`$smarty.config.myval`"}
{* must have backticks as it contains a dot "." *}
{include file="`$module.contact`.tpl"}
{* can use variable with dot syntax *}
{include file="`$module.$view`.tpl"}
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["string", ["\"\""]],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["string", ["\"fo\\\"obar\""]],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["string", "''"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["string", "'fo\\'obar'"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["operator", "="],
["string", [
"\"this is message ",
["interpolation", [
["interpolation-punctuation", "{"],
["expression", ["counter"]],
["interpolation-punctuation", "}"]
]],
"\""
]],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["variable", "$foo"],
" test\""
]],
["delimiter", "}"]
]],
" // sees $foo\r\n",
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["variable", "$foo_bar"],
" test\""
]],
["delimiter", "}"]
]],
" // sees $foo_bar\r\n",
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["interpolation", [
["interpolation-punctuation", "`"],
["expression", [
["variable", "$foo"],
["punctuation", "["],
["number", "0"],
["punctuation", "]"]
]],
["interpolation-punctuation", "`"]
]],
" test\""
]],
["delimiter", "}"]
]],
" // sees $foo[0]\r\n",
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["interpolation", [
["interpolation-punctuation", "`"],
["expression", [
["variable", "$foo"],
["punctuation", "["],
["variable", "bar"],
["punctuation", "]"]
]],
["interpolation-punctuation", "`"]
]],
" test\""
]],
["delimiter", "}"]
]],
" // sees $foo[bar]\r\n",
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["variable", "$foo"],
".bar test\""
]],
["delimiter", "}"]
]],
" // sees $foo (not $foo.bar)\r\n",
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["interpolation", [
["interpolation-punctuation", "`"],
["expression", [
["variable", "$foo"],
["punctuation", "."],
["variable", "bar"]
]],
["interpolation-punctuation", "`"]
]],
" test\""
]],
["delimiter", "}"]
]],
" // sees $foo.bar\r\n",
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["interpolation", [
["interpolation-punctuation", "`"],
["expression", [
["variable", "$foo"],
["punctuation", "."],
["variable", "bar"]
]],
["interpolation-punctuation", "`"]
]],
" test\""
]],
["operator", "|"],
["function", "escape"],
["delimiter", "}"]
]],
" // modifiers outside quotes!\r\n",
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["interpolation", [
["interpolation-punctuation", "{"],
["expression", [
["variable", "$foo"],
["operator", "|"],
["function", "escape"]
]],
["interpolation-punctuation", "}"]
]],
" test\""
]],
["delimiter", "}"]
]],
" // modifiers inside quotes!\r\n",
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["interpolation", [
["interpolation-punctuation", "{"],
["expression", [
["function", "time"],
["punctuation", "("],
["punctuation", ")"]
]],
["interpolation-punctuation", "}"]
]],
" test\""
]],
["delimiter", "}"]
]],
" // PHP function result\r\n",
["smarty", [
["delimiter", "{"],
["keyword", "func"],
["attr-name", "var"],
["operator", "="],
["string", [
"\"test ",
["interpolation", [
["interpolation-punctuation", "{"],
["expression", ["counter"]],
["interpolation-punctuation", "}"]
]],
" test\""
]],
["delimiter", "}"]
]],
" // plugin result\r\n\r\n",
["smarty-comment", "{* will replace $tpl_name with value *}"],
["smarty", [
["delimiter", "{"],
["keyword", "include"],
["attr-name", "file"],
["operator", "="],
["string", [
"\"subdir/",
["variable", "$tpl_name"],
".tpl\""
]],
["delimiter", "}"]
]],
["smarty-comment", "{* does NOT replace $tpl_name *}"],
["smarty", [
["delimiter", "{"],
["keyword", "include"],
["attr-name", "file"],
["operator", "="],
["string", "'subdir/$tpl_name.tpl'"],
["delimiter", "}"]
]],
" // vars require double quotes!\r\n\r\n",
["smarty-comment", "{* must have backticks as it contains a dot \".\" *}"],
["smarty", [
["delimiter", "{"],
["keyword", "cycle"],
["attr-name", "values"],
["operator", "="],
["string", [
"\"one,two,",
["interpolation", [
["interpolation-punctuation", "`"],
["expression", [
["variable", "$smarty"],
["punctuation", "."],
["variable", "config"],
["punctuation", "."],
["variable", "myval"]
]],
["interpolation-punctuation", "`"]
]],
"\""
]],
["delimiter", "}"]
]],
["smarty-comment", "{* must have backticks as it contains a dot \".\" *}"],
["smarty", [
["delimiter", "{"],
["keyword", "include"],
["attr-name", "file"],
["operator", "="],
["string", [
"\"",
["interpolation", [
["interpolation-punctuation", "`"],
["expression", [
["variable", "$module"],
["punctuation", "."],
["variable", "contact"]
]],
["interpolation-punctuation", "`"]
]],
".tpl\""
]],
["delimiter", "}"]
]],
["smarty-comment", "{* can use variable with dot syntax *}"],
["smarty", [
["delimiter", "{"],
["keyword", "include"],
["attr-name", "file"],
["operator", "="],
["string", [
"\"",
["interpolation", [
["interpolation-punctuation", "`"],
["expression", [
["variable", "$module"],
["punctuation", "."],
["variable", "$view"]
]],
["interpolation-punctuation", "`"]
]],
".tpl\""
]],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/smarty/variable_feature.test
================================================
{$foo}
{$foo_bar42}
{#pageTitle#}
{$foo.bar.baz}
{$foo->bar->baz}
{$foo[row]}
{$foo[$x+$x]}
{$foo.a.$b.c}
{$foo.a.{$b+4}.c}
{$foo.a.{$b.c}}
{$foo={counter}+3}
{$foo->bar($baz,2,$bar)}
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo_bar42"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "#pageTitle#"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["punctuation", "."],
["variable", "bar"],
["punctuation", "."],
["variable", "baz"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["punctuation", "->"],
["variable", "bar"],
["punctuation", "->"],
["variable", "baz"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["punctuation", "["],
["variable", "row"],
["punctuation", "]"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["punctuation", "["],
["variable", "$x"],
["operator", "+"],
["variable", "$x"],
["punctuation", "]"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["punctuation", "."],
["variable", "a"],
["punctuation", "."],
["variable", "$b"],
["punctuation", "."],
["variable", "c"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["punctuation", "."],
["variable", "a"],
["punctuation", "."],
["punctuation", "{"],
["variable", "$b"],
["operator", "+"],
["number", "4"],
["punctuation", "}"],
["punctuation", "."],
["variable", "c"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["punctuation", "."],
["variable", "a"],
["punctuation", "."],
["punctuation", "{"],
["variable", "$b"],
["punctuation", "."],
["variable", "c"],
["punctuation", "}"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["operator", "="],
["punctuation", "{"],
"counter",
["punctuation", "}"],
["operator", "+"],
["number", "3"],
["delimiter", "}"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$foo"],
["punctuation", "->"],
["function", "bar"],
["punctuation", "("],
["variable", "$baz"],
["punctuation", ","],
["number", "2"],
["punctuation", ","],
["variable", "$bar"],
["punctuation", ")"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/smarty!+php/inclusion.test
================================================
{php}
// including a php script directly from the template.
include('/path/to/display_weather.php');
{/php}
{* this template includes a {php} block that assign's the variable $varX *}
{php}
global $foo, $bar;
if($foo == $bar){
echo 'This will be sent to browser';
}
// assign a variable to Smarty
$this->assign('varX','Toffee');
{/php}
{* output the variable *}
{$varX} is my fav ice cream :-)
----------------------------------------------------
[
["smarty", [
["delimiter", "{"],
["keyword", "php"],
["delimiter", "}"]
]],
["embedded-php", [
["comment", "// including a php script directly from the template."],
["keyword", "include"],
["punctuation", "("],
["string", "'/path/to/display_weather.php'"],
["punctuation", ")"],
["punctuation", ";"]
]],
["smarty", [
["delimiter", "{/"],
["keyword", "php"],
["delimiter", "}"]
]],
["smarty-comment", "{* this template includes a {php} block that assign's the variable $varX *}"],
["smarty", [
["delimiter", "{"],
["keyword", "php"],
["delimiter", "}"]
]],
["embedded-php", [
["keyword", "global"],
["variable", "$foo"],
["punctuation", ","],
["variable", "$bar"],
["punctuation", ";"],
["keyword", "if"],
["punctuation", "("],
["variable", "$foo"],
["operator", "=="],
["variable", "$bar"],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "echo"],
["string", "'This will be sent to browser'"],
["punctuation", ";"],
["punctuation", "}"],
["comment", "// assign a variable to Smarty"],
["variable", "$this"],
["operator", "->"],
["function", ["assign"]],
["punctuation", "("],
["string", "'varX'"],
["punctuation", ","],
["string", "'Toffee'"],
["punctuation", ")"],
["punctuation", ";"]
]],
["smarty", [
["delimiter", "{/"],
["keyword", "php"],
["delimiter", "}"]
]],
["smarty-comment", "{* output the variable *}"],
["tag", [
["punctuation", "<"],
["tag", ["strong"]],
["punctuation", ">"]
]],
["smarty", [
["delimiter", "{"],
["variable", "$varX"],
["delimiter", "}"]
]],
["tag", [
["punctuation", ""],
["tag", ["strong"]],
["punctuation", ">"]
]],
" is my fav ice cream :-)"
]
================================================
FILE: tests/languages/sml/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
================================================
FILE: tests/languages/sml/classname_feature.test
================================================
val FOO: (string list) * 'a * 'a -> (svalue,'a) token
val FOO: (string) * 'a * 'a -> (svalue,'a) token
val FOO: (int) * 'a * 'a -> (svalue,'a) token
val FOO: (string list) * 'a * 'a -> (svalue,'a) token
val FOO: 'a * 'a -> (svalue,'a) token
datatype spec_ast = SPEC of {head : string list,
decls : decl_ast list,
rules : rule_ast list,
tail : string list}
type out_state = {
tout : real,
dtout : real,
dtime : real,
strm : TextIO.outstream
}
val outState = ref (NONE : out_state option)
val systemLines: string -> string list
val systemCleanLines: string -> string list
val systemStanzas: string -> string list list
----------------------------------------------------
[
["keyword", "val"],
" FOO",
["punctuation", ":"],
["class-name", [
["punctuation", "("],
"string list",
["punctuation", ")"],
["operator", "*"],
["variable", "'a"],
["operator", "*"],
["variable", "'a"],
["operator", "->"],
["punctuation", "("],
"svalue",
["punctuation", ","],
["variable", "'a"],
["punctuation", ")"],
" token"
]],
["keyword", "val"],
" FOO",
["punctuation", ":"],
["class-name", [
["punctuation", "("],
"string",
["punctuation", ")"],
["operator", "*"],
["variable", "'a"],
["operator", "*"],
["variable", "'a"],
["operator", "->"],
["punctuation", "("],
"svalue",
["punctuation", ","],
["variable", "'a"],
["punctuation", ")"],
" token"
]],
["keyword", "val"],
" FOO",
["punctuation", ":"],
["class-name", [
["punctuation", "("],
"int",
["punctuation", ")"],
["operator", "*"],
["variable", "'a"],
["operator", "*"],
["variable", "'a"],
["operator", "->"],
["punctuation", "("],
"svalue",
["punctuation", ","],
["variable", "'a"],
["punctuation", ")"],
" token"
]],
["keyword", "val"],
" FOO",
["punctuation", ":"],
["class-name", [
["punctuation", "("],
"string list",
["punctuation", ")"],
["operator", "*"],
["variable", "'a"],
["operator", "*"],
["variable", "'a"],
["operator", "->"],
["punctuation", "("],
"svalue",
["punctuation", ","],
["variable", "'a"],
["punctuation", ")"],
" token"
]],
["keyword", "val"],
" FOO",
["punctuation", ":"],
["class-name", [
["variable", "'a"],
["operator", "*"],
["variable", "'a"],
["operator", "->"],
["punctuation", "("],
"svalue",
["punctuation", ","],
["variable", "'a"],
["punctuation", ")"],
" token"
]],
["keyword", "datatype"],
["class-name", "spec_ast"],
["operator", "="],
" SPEC ",
["keyword", "of"],
["punctuation", "{"],
"head ",
["punctuation", ":"],
["class-name", ["string list"]],
["punctuation", ","],
"\r\n decls ",
["punctuation", ":"],
["class-name", ["decl_ast list"]],
["punctuation", ","],
"\r\n rules ",
["punctuation", ":"],
["class-name", ["rule_ast list"]],
["punctuation", ","],
"\r\n tail ",
["punctuation", ":"],
["class-name", ["string list"]],
["punctuation", "}"],
["keyword", "type"],
["class-name", "out_state"],
["operator", "="],
["punctuation", "{"],
"\r\ntout ",
["punctuation", ":"],
["class-name", ["real"]],
["punctuation", ","],
"\r\ndtout ",
["punctuation", ":"],
["class-name", ["real"]],
["punctuation", ","],
"\r\ndtime ",
["punctuation", ":"],
["class-name", ["real"]],
["punctuation", ","],
"\r\nstrm ",
["punctuation", ":"],
["class-name", [
"TextIO",
["punctuation", "."],
"outstream"
]],
["punctuation", "}"],
["keyword", "val"],
" outState ",
["operator", "="],
" ref ",
["punctuation", "("],
"NONE ",
["punctuation", ":"],
["class-name", ["out_state option"]],
["punctuation", ")"],
["keyword", "val"],
" systemLines",
["punctuation", ":"],
["class-name", [
"string ",
["operator", "->"],
" string list"
]],
["keyword", "val"],
" systemCleanLines",
["punctuation", ":"],
["class-name", [
"string ",
["operator", "->"],
" string list"
]],
["keyword", "val"],
" systemStanzas",
["punctuation", ":"],
["class-name", [
"string ",
["operator", "->"],
" string list list"
]]
]
================================================
FILE: tests/languages/sml/comment_feature.test
================================================
(* comment *)
(*
(* nested comment *)
*)
----------------------------------------------------
[
["comment", "(* comment *)"],
["comment", "(*\r\n (* nested comment *)\r\n*)"]
]
================================================
FILE: tests/languages/sml/function_feature.test
================================================
fun foo x = x * 2
----------------------------------------------------
[
["keyword", "fun"],
["function", "foo"],
" x ",
["operator", "="],
" x ",
["operator", "*"],
["number", "2"]
]
================================================
FILE: tests/languages/sml/keyword_feature.test
================================================
abstype
and
andalso
as
case
datatype;
do
else
end
eqtype
exception;
fn
fun;
functor;
handle
if
in
include
infix
infixr
let
local
nonfix
of
op
open
orelse
raise
rec
sharing
sig
signature;
struct
structure;
then
type;
val
where
while
with
withtype
----------------------------------------------------
[
["keyword", "abstype"],
["keyword", "and"],
["keyword", "andalso"],
["keyword", "as"],
["keyword", "case"],
["keyword", "datatype"],
["punctuation", ";"],
["keyword", "do"],
["keyword", "else"],
["keyword", "end"],
["keyword", "eqtype"],
["keyword", "exception"],
["punctuation", ";"],
["keyword", "fn"],
["keyword", "fun"],
["punctuation", ";"],
["keyword", "functor"],
["punctuation", ";"],
["keyword", "handle"],
["keyword", "if"],
["keyword", "in"],
["keyword", "include"],
["keyword", "infix"],
["keyword", "infixr"],
["keyword", "let"],
["keyword", "local"],
["keyword", "nonfix"],
["keyword", "of"],
["keyword", "op"],
["keyword", "open"],
["keyword", "orelse"],
["keyword", "raise"],
["keyword", "rec"],
["keyword", "sharing"],
["keyword", "sig"],
["keyword", "signature"],
["punctuation", ";"],
["keyword", "struct"],
["keyword", "structure"],
["punctuation", ";"],
["keyword", "then"],
["keyword", "type"],
["punctuation", ";"],
["keyword", "val"],
["keyword", "where"],
["keyword", "while"],
["keyword", "with"],
["keyword", "withtype"]
]
================================================
FILE: tests/languages/sml/number_feature.test
================================================
123
~123
123.456
~123.456
123e~3
0xFF
~0xFF
----------------------------------------------------
[
["number", "123"],
["number", "~123"],
["number", "123.456"],
["number", "~123.456"],
["number", "123e~3"],
["number", "0xFF"],
["number", "~0xFF"]
]
================================================
FILE: tests/languages/sml/operator_feature.test
================================================
...
:: :> :=
= <> < <= > >=
=> ->
! + - * / ^ # | @ ~
----------------------------------------------------
[
["operator", "..."],
["operator", "::"],
["operator", ":>"],
["operator", ":="],
["operator", "="],
["operator", "<"],
["operator", ">"],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "=>"],
["operator", "->"],
["operator", "!"],
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "^"],
["operator", "#"],
["operator", "|"],
["operator", "@"],
["operator", "~"]
]
================================================
FILE: tests/languages/sml/string_feature.test
================================================
""
"foo"
"\tfoo
bar"
#"f"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\""],
["string", "\"\\tfoo\r\nbar\""],
["string", "#\"f\""]
]
================================================
FILE: tests/languages/sml/word_feature.test
================================================
0w123
----------------------------------------------------
[
["word", "0w123"]
]
================================================
FILE: tests/languages/solidity/builtin_feature.test
================================================
address
bool
string
byte
bytes
int
uint
bytes1 bytes2 bytes3 bytes4 bytes5 bytes6 bytes7 bytes8 bytes9 bytes10 bytes11 bytes12 bytes13 bytes14 bytes15 bytes16 bytes17 bytes18 bytes19 bytes20 bytes21 bytes22 bytes23 bytes24 bytes25 bytes26 bytes27 bytes28 bytes29 bytes30 bytes31 bytes32
int8 int16 int24 int32 int40 int48 int56 int64 int72 int80 int88 int96 int104 int112 int120 int128 int136 int144 int152 int160 int168 int176 int184 int192 int200 int208 int216 int224 int232 int240 int248 int256
uint8 uint16 uint24 uint32 uint40 uint48 uint56 uint64 uint72 uint80 uint88 uint96 uint104 uint112 uint120 uint128 uint136 uint144 uint152 uint160 uint168 uint176 uint184 uint192 uint200 uint208 uint216 uint224 uint232 uint240 uint248 uint256
----------------------------------------------------
[
["builtin", "address"],
["builtin", "bool"],
["builtin", "string"],
["builtin", "byte"],
["builtin", "bytes"],
["builtin", "int"],
["builtin", "uint"],
["builtin", "bytes1"],
["builtin", "bytes2"],
["builtin", "bytes3"],
["builtin", "bytes4"],
["builtin", "bytes5"],
["builtin", "bytes6"],
["builtin", "bytes7"],
["builtin", "bytes8"],
["builtin", "bytes9"],
["builtin", "bytes10"],
["builtin", "bytes11"],
["builtin", "bytes12"],
["builtin", "bytes13"],
["builtin", "bytes14"],
["builtin", "bytes15"],
["builtin", "bytes16"],
["builtin", "bytes17"],
["builtin", "bytes18"],
["builtin", "bytes19"],
["builtin", "bytes20"],
["builtin", "bytes21"],
["builtin", "bytes22"],
["builtin", "bytes23"],
["builtin", "bytes24"],
["builtin", "bytes25"],
["builtin", "bytes26"],
["builtin", "bytes27"],
["builtin", "bytes28"],
["builtin", "bytes29"],
["builtin", "bytes30"],
["builtin", "bytes31"],
["builtin", "bytes32"],
["builtin", "int8"],
["builtin", "int16"],
["builtin", "int24"],
["builtin", "int32"],
["builtin", "int40"],
["builtin", "int48"],
["builtin", "int56"],
["builtin", "int64"],
["builtin", "int72"],
["builtin", "int80"],
["builtin", "int88"],
["builtin", "int96"],
["builtin", "int104"],
["builtin", "int112"],
["builtin", "int120"],
["builtin", "int128"],
["builtin", "int136"],
["builtin", "int144"],
["builtin", "int152"],
["builtin", "int160"],
["builtin", "int168"],
["builtin", "int176"],
["builtin", "int184"],
["builtin", "int192"],
["builtin", "int200"],
["builtin", "int208"],
["builtin", "int216"],
["builtin", "int224"],
["builtin", "int232"],
["builtin", "int240"],
["builtin", "int248"],
["builtin", "int256"],
["builtin", "uint8"],
["builtin", "uint16"],
["builtin", "uint24"],
["builtin", "uint32"],
["builtin", "uint40"],
["builtin", "uint48"],
["builtin", "uint56"],
["builtin", "uint64"],
["builtin", "uint72"],
["builtin", "uint80"],
["builtin", "uint88"],
["builtin", "uint96"],
["builtin", "uint104"],
["builtin", "uint112"],
["builtin", "uint120"],
["builtin", "uint128"],
["builtin", "uint136"],
["builtin", "uint144"],
["builtin", "uint152"],
["builtin", "uint160"],
["builtin", "uint168"],
["builtin", "uint176"],
["builtin", "uint184"],
["builtin", "uint192"],
["builtin", "uint200"],
["builtin", "uint208"],
["builtin", "uint216"],
["builtin", "uint224"],
["builtin", "uint232"],
["builtin", "uint240"],
["builtin", "uint248"],
["builtin", "uint256"]
]
----------------------------------------------------
Checks for builtin types.
================================================
FILE: tests/languages/solidity/class-name_feature.test
================================================
contract Foo {}
contract Foo is Bar {}
enum Foo { X, Y, Z }
interface Foo {}
library Foo {}
new Foo();
struct Foo {}
using Foo for bar;
----------------------------------------------------
[
["keyword", "contract"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "contract"],
["class-name", "Foo"],
["keyword", "is"],
" Bar ",
["punctuation", "{"],
["punctuation", "}"],
["keyword", "enum"],
["class-name", "Foo"],
["punctuation", "{"],
" X",
["punctuation", ","],
" Y",
["punctuation", ","],
" Z ",
["punctuation", "}"],
["keyword", "interface"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "library"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "new"],
["class-name", "Foo"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "struct"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "using"],
["class-name", "Foo"],
["keyword", "for"],
" bar",
["punctuation", ";"]
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/solidity/comment_feature.test
================================================
// foo
/*
bar
*/
----------------------------------------------------
[
["comment", "// foo"],
["comment", "/*\r\nbar\r\n*/"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/solidity/keyword_feature.test
================================================
_
anonymous
as
assembly
assert
break
calldata
case
constant
constructor
continue
contract;
default
delete
do
else
emit
enum;
event
external
for
from
function
if
import
indexed
inherited
interface;
internal
is
let
library;
mapping
memory
modifier
new;
payable
pragma
private
public
pure
require
return
returns
revert
selfdestruct
solidity
storage
struct;
suicide
switch
this
throw
using;
view
while
----------------------------------------------------
[
["keyword", "_"],
["keyword", "anonymous"],
["keyword", "as"],
["keyword", "assembly"],
["keyword", "assert"],
["keyword", "break"],
["keyword", "calldata"],
["keyword", "case"],
["keyword", "constant"],
["keyword", "constructor"],
["keyword", "continue"],
["keyword", "contract"],
["punctuation", ";"],
["keyword", "default"],
["keyword", "delete"],
["keyword", "do"],
["keyword", "else"],
["keyword", "emit"],
["keyword", "enum"],
["punctuation", ";"],
["keyword", "event"],
["keyword", "external"],
["keyword", "for"],
["keyword", "from"],
["keyword", "function"],
["keyword", "if"],
["keyword", "import"],
["keyword", "indexed"],
["keyword", "inherited"],
["keyword", "interface"],
["punctuation", ";"],
["keyword", "internal"],
["keyword", "is"],
["keyword", "let"],
["keyword", "library"],
["punctuation", ";"],
["keyword", "mapping"],
["keyword", "memory"],
["keyword", "modifier"],
["keyword", "new"],
["punctuation", ";"],
["keyword", "payable"],
["keyword", "pragma"],
["keyword", "private"],
["keyword", "public"],
["keyword", "pure"],
["keyword", "require"],
["keyword", "return"],
["keyword", "returns"],
["keyword", "revert"],
["keyword", "selfdestruct"],
["keyword", "solidity"],
["keyword", "storage"],
["keyword", "struct"],
["punctuation", ";"],
["keyword", "suicide"],
["keyword", "switch"],
["keyword", "this"],
["keyword", "throw"],
["keyword", "using"],
["punctuation", ";"],
["keyword", "view"],
["keyword", "while"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/solidity/operator_feature.test
================================================
+ - * / %
+= -= *= /= %=
^ & | ~
^= &= |=
>> << >>= <<=
&& || !
=
>= <= > < != ==
=> -> := =:
?
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "%="],
["operator", "^"],
["operator", "&"],
["operator", "|"],
["operator", "~"],
["operator", "^="],
["operator", "&="],
["operator", "|="],
["operator", ">>"],
["operator", "<<"],
["operator", ">>="],
["operator", "<<="],
["operator", "&&"],
["operator", "||"],
["operator", "!"],
["operator", "="],
["operator", ">="],
["operator", "<="],
["operator", ">"],
["operator", "<"],
["operator", "!="],
["operator", "=="],
["operator", "=>"],
["operator", "->"],
["operator", ":="],
["operator", "=:"],
["operator", "?"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/solidity/punctuation_feature.test
================================================
() [] {}
. : , ;
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "."],
["punctuation", ":"],
["punctuation", ","],
["punctuation", ";"]
]
----------------------------------------------------
Checks for punctuation.
================================================
FILE: tests/languages/solidity/string_feature.test
================================================
"foo\"\'"
'bar\'\"'
"\n\"\'\\abc\
def"
----------------------------------------------------
[
["string", "\"foo\\\"\\'\""],
["string", "'bar\\'\\\"'"],
["string", "\"\\n\\\"\\'\\\\abc\\\r\ndef\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/solidity/version_feature.test
================================================
pragma solidity >=0.4.0 <0.7.0;
pragma solidity ^0.5.0;
----------------------------------------------------
[
["keyword", "pragma"],
["keyword", "solidity"],
["operator", ">="],
["version", "0.4.0"],
["operator", "<"],
["version", "0.7.0"],
["punctuation", ";"],
["keyword", "pragma"],
["keyword", "solidity"],
["operator", "^"],
["version", "0.5.0"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for version literals.
================================================
FILE: tests/languages/solution-file/boolean_feature.test
================================================
TRUE
FALSE
----------------------------------------------------
[
["boolean", "TRUE"],
["boolean", "FALSE"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/solution-file/comment_feature.test
================================================
# comment
----------------------------------------------------
[
["comment", "# comment"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/solution-file/guid_feature.test
================================================
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Project1", "Project1.vbproj", "{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}"
{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Foo = Bar
EndProject
Foo = {F184B08F-C81C-45F6-A57F-5ABD9991F28F}
----------------------------------------------------
[
["object", "Project"],
["punctuation", "("],
["string", [
"\"",
["guid", [
["punctuation", "{"],
"F184B08F-C81C-45F6-A57F-5ABD9991F28F",
["punctuation", "}"]
]],
"\""
]],
["punctuation", ")"],
["operator", "="],
["string", [
"\"Project1\""
]],
["punctuation", ","],
["string", [
"\"Project1.vbproj\""
]],
["punctuation", ","],
["string", [
"\"",
["guid", [
["punctuation", "{"],
"8CDD8387-B905-44A8-B5D5-07BB50E05BEA",
["punctuation", "}"]
]],
"\""
]],
["property", [
["guid", [
["punctuation", "{"],
"8CDD8387-B905-44A8-B5D5-07BB50E05BEA",
["punctuation", "}"]
]],
".Foo"
]],
["operator", "="],
" Bar\r\n",
["object", "EndProject"],
["property", [
"Foo"
]],
["operator", "="],
["guid", [
["punctuation", "{"],
"F184B08F-C81C-45F6-A57F-5ABD9991F28F",
["punctuation", "}"]
]]
]
----------------------------------------------------
Checks for global unique identifiers.
================================================
FILE: tests/languages/solution-file/object_feature.test
================================================
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Project1", "Project1.vbproj", "{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}"
EndProject
Global
GlobalSection(ProjectConfiguration) = postSolution
{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Debug.ActiveCfg = Debug|x86
{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Debug.Build.0 = Debug|x86
{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Release.ActiveCfg = Release|x86
{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Release.Build.0 = Release|x86
EndGlobalSection
EndGlobal
----------------------------------------------------
[
["object", "Project"],
["punctuation", "("],
["string", [
"\"",
["guid", [
["punctuation", "{"],
"F184B08F-C81C-45F6-A57F-5ABD9991F28F",
["punctuation", "}"]
]],
"\""
]],
["punctuation", ")"],
["operator", "="],
["string", [
"\"Project1\""
]],
["punctuation", ","],
["string", [
"\"Project1.vbproj\""
]],
["punctuation", ","],
["string", [
"\"",
["guid", [
["punctuation", "{"],
"8CDD8387-B905-44A8-B5D5-07BB50E05BEA",
["punctuation", "}"]
]],
"\""
]],
["object", "EndProject"],
["object", "Global"],
["object", "GlobalSection"],
["punctuation", "("],
"ProjectConfiguration",
["punctuation", ")"],
["operator", "="],
" postSolution\r\n\t\t",
["property", [
["guid", [
["punctuation", "{"],
"8CDD8387-B905-44A8-B5D5-07BB50E05BEA",
["punctuation", "}"]
]],
".Debug.ActiveCfg"
]],
["operator", "="],
" Debug|x86\r\n\t\t",
["property", [
["guid", [
["punctuation", "{"],
"8CDD8387-B905-44A8-B5D5-07BB50E05BEA",
["punctuation", "}"]
]],
".Debug.Build.0"
]],
["operator", "="],
" Debug|x86\r\n\t\t",
["property", [
["guid", [
["punctuation", "{"],
"8CDD8387-B905-44A8-B5D5-07BB50E05BEA",
["punctuation", "}"]
]],
".Release.ActiveCfg"
]],
["operator", "="],
" Release|x86\r\n\t\t",
["property", [
["guid", [
["punctuation", "{"],
"8CDD8387-B905-44A8-B5D5-07BB50E05BEA",
["punctuation", "}"]
]],
".Release.Build.0"
]],
["operator", "="],
" Release|x86\r\n\t",
["object", "EndGlobalSection"],
["object", "EndGlobal"]
]
----------------------------------------------------
Checks for objects.
================================================
FILE: tests/languages/solution-file/property_feature.test
================================================
README.md = README.md
Debug|Any CPU = Debug|Any CPU
{D86DD040-BA41-47FA-91D3-EF62F23AF867}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
----------------------------------------------------
[
["property", [
"README.md"
]],
["operator", "="],
" README.md\r\n",
["property", [
"Debug|Any CPU"
]],
["operator", "="],
" Debug|Any CPU\r\n",
["property", [
["guid", [
["punctuation", "{"],
"D86DD040-BA41-47FA-91D3-EF62F23AF867",
["punctuation", "}"]
]],
".Debug|Any CPU.ActiveCfg"
]],
["operator", "="],
" Debug|Any CPU"
]
----------------------------------------------------
Checks for properties.
================================================
FILE: tests/languages/solution-file/string_feature.test
================================================
"foo"
'bar'
----------------------------------------------------
[
["string", [
"\"foo\""
]],
["string", [
"'bar'"
]]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/soy/boolean_feature.test
================================================
{param visible: true /}
{param visible:false/}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "visible"],
["punctuation", ":"],
["boolean", "true"],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "visible"],
["punctuation", ":"],
["boolean", "false"],
["delimiter", "/}"]
]]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/soy/command-arg.test
================================================
{alias long.namespace.root.projectx.foomodule.utils as fooUtils}
{call myfeature.myTemplate /}
{delcall aaa.bbb.myButton /}
{delpackage MyExperiment}
{deltemplate aaa.bbb.myButton}
{namespace ns}
{template .example}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "alias"],
["command-arg", [
"long",
["punctuation", "."], "namespace",
["punctuation", "."], "root",
["punctuation", "."], "projectx",
["punctuation", "."], "foomodule",
["punctuation", "."], "utils"
]],
["keyword", "as"],
" fooUtils",
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "call"],
["command-arg", [
"myfeature",
["punctuation", "."], "myTemplate"
]],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "delcall"],
["command-arg", [
"aaa",
["punctuation", "."], "bbb",
["punctuation", "."], "myButton"
]],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "delpackage"],
["command-arg", [
"MyExperiment"
]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "deltemplate"],
["command-arg", [
"aaa",
["punctuation", "."], "bbb",
["punctuation", "."], "myButton"
]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "namespace"],
["command-arg", [
"ns"
]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "template"],
["command-arg", [
["punctuation", "."], "example"
]],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for command argument.
================================================
FILE: tests/languages/soy/comment_feature.test
================================================
/**/
/* Foo "bar" */
/* Foo //bar
baz */
//
// Foo /* bar */
//
/*
*/
----------------------------------------------------
[
["soy", [["comment", "/**/"]]],
["soy", [["comment", "/* Foo \"bar\" */"]]],
["soy", [["comment", "/* Foo //bar\r\nbaz */"]]],
["soy", [["comment", "//"]]],
["soy", [["comment", "// Foo /* bar */"]]],
["soy", [["comment", "//
"]]],
["soy", [["comment", "/*
\r\n
*/"]]]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/soy/function_feature.test
================================================
{if not isLast($additionalName)}
{if length($items) > 5}
{$x|noAutoescape}
{elseif round($pi) == 3}
{for $i in range($numLines)}
{$foo|changeNewLineToBr|bidiSpanWrap}
{$bar | truncate : 4 , false}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "if"],
["operator", "not"],
["function", "isLast"],
["punctuation", "("],
["variable", ["$additionalName"]],
["punctuation", ")"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "if"],
["function", "length"],
["punctuation", "("],
["variable", ["$items"]],
["punctuation", ")"],
["operator", ">"],
["number", "5"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["variable", ["$x"]],
["punctuation", "|"],
["function", "noAutoescape"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "elseif"],
["function", "round"],
["punctuation", "("],
["variable", ["$pi"]],
["punctuation", ")"],
["operator", "=="],
["number", "3"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "for"],
["variable", ["$i"]],
["keyword", "in"],
["function", "range"],
["punctuation", "("],
["variable", ["$numLines"]],
["punctuation", ")"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["variable", ["$foo"]],
["punctuation", "|"],
["function", "changeNewLineToBr"],
["punctuation", "|"],
["function", "bidiSpanWrap"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["variable", ["$bar"]],
["punctuation", "|"],
["function", "truncate"],
["punctuation", ":"],
["number", "4"],
["punctuation", ","],
["boolean", "false"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for functions and print directives.
================================================
FILE: tests/languages/soy/keyword_feature.test
================================================
{\n}
{\r}
{\t}
{alias foo as bar}
{call}
{case}
{css}
{default}
{delcall}
{delpackage}
{deltemplate}
{else}
{elseif}
{fallbackmsg}
{for}
{foreach $i in $foo}
{if}
{ifempty}
{lb}
{let}
{literal}{/literal}
{msg}
{namespace}
{nil}
{param}
{@param}
{@param?}
{rb}
{sp}
{switch}
{template}
{xid}
{@param foo: any}
{@param foo: attributes}
{@param foo: bool}
{@param foo: css}
{@param foo: float}
{@param foo: int}
{@param foo: js}
{@param foo: html}
{@param foo: list
}
{@param foo: map}
{@param foo: null}
{@param foo: number}
{@param foo: string}
{@param foo: uri}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "\\n"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "\\r"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "\\t"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "alias"],
["command-arg", ["foo"]],
["keyword", "as"],
" bar",
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "call"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "case"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "css"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "default"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "delcall"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "delpackage"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "deltemplate"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "else"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "elseif"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "fallbackmsg"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "for"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "foreach"],
["variable", ["$i"]],
["keyword", "in"],
["variable", ["$foo"]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "if"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "ifempty"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "lb"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "literal"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{/"],
["keyword", "literal"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "msg"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "namespace"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "nil"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "param"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param?"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "rb"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "sp"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "switch"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "template"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "xid"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "any"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "attributes"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "bool"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "css"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "float"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "int"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "js"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "html"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "list"], ["operator", "<"], ["keyword", "int"], ["operator", ">"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "map"], ["operator", "<"], ["keyword", "int"], ["punctuation", ","], ["keyword", "string"], ["operator", ">"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "null"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "number"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "string"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "foo"],
["punctuation", ":"],
["keyword", "uri"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/soy/literal_feature.test
================================================
{literal}{$noHighlight}{/literal}
{$highlight}{literal}
{if $bar}{$bar}{/if}
{/literal}
{literal}/* even comments */{/literal}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "literal"],
["delimiter", "}"]
]],
"{$noHighlight}",
["soy", [
["delimiter", "{/"],
["keyword", "literal"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["variable", ["$highlight"]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "literal"],
["delimiter", "}"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"{$foo}",
["punctuation", "\""]
]],
["punctuation", ">"]
]],
"\r\n{if $bar}{$bar}{/if}",
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["soy", [
["delimiter", "{/"],
["keyword", "literal"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "literal"],
["delimiter", "}"]
]],
"/* even comments */",
["soy", [
["delimiter", "{/"],
["keyword", "literal"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for {literal} command.
================================================
FILE: tests/languages/soy/number_feature.test
================================================
{param foo: 42}
{param foo: 3.14159}
{param foo: 0.0}
{param foo: 7e+8}
{param foo: 2.5E-14}
{param foo: 0x42BADFACE}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "foo"],
["punctuation", ":"],
["number", "42"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "foo"],
["punctuation", ":"],
["number", "3.14159"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "foo"],
["punctuation", ":"],
["number", "0.0"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "foo"],
["punctuation", ":"],
["number", "7e+8"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "foo"],
["punctuation", ":"],
["number", "2.5E-14"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "foo"],
["punctuation", ":"],
["number", "0x42BADFACE"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for decimal and hexadecimal numbers.
================================================
FILE: tests/languages/soy/operator_feature.test
================================================
{let $foo: $a ? 0 : 1 /}
{let $foo: $a ?: 1 /}
{let $foo: 1 < 2 and 2 <= 3 /}
{let $foo: 1 > 2 or 2 >= 3 /}
{let $foo: 1 == 1 and 1 != 2 /}
{let $foo: ((1 + 2) / 3 * 4) % 5 - 6 /}
{let $foo: not $bar /}
{let $foo kind="text"}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$foo"]],
["punctuation", ":"],
["variable", ["$a"]],
["operator", "?"],
["number", "0"],
["punctuation", ":"],
["number", "1"],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$foo"]],
["punctuation", ":"],
["variable", ["$a"]],
["operator", "?:"],
["number", "1"],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$foo"]],
["punctuation", ":"],
["number", "1"],
["operator", "<"],
["number", "2"],
["operator", "and"],
["number", "2"],
["operator", "<="],
["number", "3"],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$foo"]],
["punctuation", ":"],
["number", "1"],
["operator", ">"],
["number", "2"],
["operator", "or"],
["number", "2"],
["operator", ">="],
["number", "3"],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$foo"]],
["punctuation", ":"],
["number", "1"],
["operator", "=="],
["number", "1"],
["operator", "and"],
["number", "1"],
["operator", "!="],
["number", "2"],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$foo"]],
["punctuation", ":"],
["punctuation", "("],
["punctuation", "("],
["number", "1"],
["operator", "+"],
["number", "2"],
["punctuation", ")"],
["operator", "/"],
["number", "3"],
["operator", "*"],
["number", "4"],
["punctuation", ")"],
["operator", "%"],
["number", "5"],
["operator", "-"],
["number", "6"],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$foo"]],
["punctuation", ":"],
["operator", "not"],
["variable", ["$bar"]],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$foo"]],
["property", "kind"],
["operator", "="],
["string", "\"text\""],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/soy/parameter_feature.test
================================================
{param visible: true /}
{param content kind="html"}
{$message}
{/param}
{@param name: string}
{@param? height: int}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "visible"],
["punctuation", ":"],
["boolean", "true"],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "content"],
["property", "kind"],
["operator", "="],
["string", "\"html\""],
["delimiter", "}"]
]],
["tag", [
["punctuation", "<"],
["tag", ["b"]],
["punctuation", ">"]
]],
["soy", [
["delimiter", "{"],
["variable", ["$message"]],
["delimiter", "}"]
]],
["tag", [
["punctuation", ""],
["tag", ["b"]],
["punctuation", ">"]
]],
["soy", [
["delimiter", "{/"],
["keyword", "param"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param"],
["parameter", "name"],
["punctuation", ":"],
["keyword", "string"],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "@param?"],
["parameter", "height"],
["punctuation", ":"],
["keyword", "int"],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for parameters name.
================================================
FILE: tests/languages/soy/property_feature.test
================================================
{msg meaning="noun" desc="The word 'Archive' used as a noun, i.e. an information store."}
{param content kind="html"}
{let $message kind="text"}
{template .googleUri autoescape="strict" kind="uri"}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "msg"],
["property", "meaning"],
["operator", "="],
["string", "\"noun\""],
["property", "desc"],
["operator", "="],
["string", "\"The word 'Archive' used as a noun, i.e. an information store.\""],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "param"],
["parameter", "content"],
["property", "kind"],
["operator", "="],
["string", "\"html\""],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$message"]],
["property", "kind"],
["operator", "="],
["string", "\"text\""],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "template"],
["command-arg", [["punctuation", "."], "googleUri"]],
["property", "autoescape"],
["operator", "="],
["string", "\"strict\""],
["property", "kind"],
["operator", "="],
["string", "\"uri\""],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for command properties.
================================================
FILE: tests/languages/soy/soy_in_markup_feature.test
================================================
{$msg}
___SOY1___{$foo}
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["soy", [
["delimiter", "{"],
["variable", ["$msg"]],
["delimiter", "}"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["soy", [
["delimiter", "{"],
["variable", ["$msg"]],
["delimiter", "}"]
]],
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", [
"h",
["soy", [
["delimiter", "{"],
["variable", ["$headingLevel"]],
["delimiter", "}"]
]]
]],
["punctuation", ">"]
]],
"\r\n___SOY1___",
["soy", [
["delimiter", "{"],
["variable", ["$foo"]],
["delimiter", "}"]
]]
]
----------------------------------------------------
Checks for Soy inside Markup.
================================================
FILE: tests/languages/soy/string_feature.test
================================================
{msg desc=""}
{msg desc="Foo \"bar\" 'baz'"}
{$foo['bar\'baz\"\"\'']}
{{msg desc="Example: The set of prime numbers is {2, 3, 5, 7, 11, 13, ...}."}}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["keyword", "msg"],
["property", "desc"],
["operator", "="],
["string", "\"\""],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "msg"],
["property", "desc"],
["operator", "="],
["string", "\"Foo \\\"bar\\\" 'baz'\""],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["variable", [
"$foo",
["punctuation", "["],
["string", "'bar\\'baz\\\"\\\"\\''"],
["punctuation", "]"]
]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{{"],
["keyword", "msg"],
["property", "desc"],
["operator", "="],
["string", "\"Example: The set of prime numbers is {2, 3, 5, 7, 11, 13, ...}.\""],
["delimiter", "}}"]
]]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/soy/variable_feature.test
================================================
{$name}
{$folders.0.name}
{$folders[0].name}
{$folders[0]['name']}
{$aaa?.bbb.ccc?[0]}
{let $category: $categoryList[0] /}
{let $isEnabled: $isAaa and not $isBbb and $ccc == $ddd + $eee /}
----------------------------------------------------
[
["soy", [
["delimiter", "{"],
["variable", ["$name"]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["variable", [
"$folders",
["punctuation", "."], ["number", "0"],
["punctuation", "."], "name"
]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["variable", [
"$folders",
["punctuation", "["], ["number", "0"], ["punctuation", "]"],
["punctuation", "."], "name"
]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["variable", [
"$folders",
["punctuation", "["], ["number", "0"], ["punctuation", "]"],
["punctuation", "["], ["string", "'name'"], ["punctuation", "]"]
]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["variable", [
"$aaa", ["punctuation", "?"],
["punctuation", "."], "bbb",
["punctuation", "."], "ccc", ["punctuation", "?"],
["punctuation", "["], ["number", "0"], ["punctuation", "]"]
]],
["delimiter", "}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$category"]],
["punctuation", ":"],
["variable", [
"$categoryList",
["punctuation", "["], ["number", "0"], ["punctuation", "]"]
]],
["delimiter", "/}"]
]],
["soy", [
["delimiter", "{"],
["keyword", "let"],
["variable", ["$isEnabled"]],
["punctuation", ":"],
["variable", ["$isAaa"]],
["operator", "and"],
["operator", "not"],
["variable", ["$isBbb"]],
["operator", "and"],
["variable", ["$ccc"]],
["operator", "=="],
["variable", ["$ddd"]],
["operator", "+"],
["variable", ["$eee"]],
["delimiter", "/}"]
]]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/sparql/boolean_feature.test
================================================
true
FALSE
----------------------------------------------------
[
["boolean", "true"],
["boolean", "FALSE"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/sparql/comment_feature.test
================================================
#
# foo
----------------------------------------------------
[
["comment", "#"],
["comment", "# foo"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/sparql/function_feature.test
================================================
foo:bar
foo:
:bar
foo:ba1
foo:1ba
foo:bar:bar
foo:bar%20bar
foo:bar.bar
foo-2:
foo.-:
----------------------------------------------------
[
["function", [
["prefix", [
"foo",
["punctuation", ":"]
]],
["local-name", "bar"]
]],
["function", [
["prefix", [
"foo",
["punctuation", ":"]
]]
]],
["function", [
["prefix", [
["punctuation", ":"]
]],
["local-name", "bar"]
]],
["function", [
["prefix", [
"foo",
["punctuation", ":"]
]],
["local-name", "ba1"]
]],
["function", [
["prefix", [
"foo",
["punctuation", ":"]
]],
["local-name", "1ba"]
]],
["function", [
["prefix", [
"foo",
["punctuation", ":"]
]],
["local-name", "bar:bar"]
]],
["function", [
["prefix", [
"foo",
["punctuation", ":"]
]],
["local-name", "bar%20bar"]
]],
["function", [
["prefix", [
"foo",
["punctuation", ":"]
]],
["local-name", "bar.bar"]
]],
["function", [
["prefix", [
"foo-2",
["punctuation", ":"]
]]
]],
["function", [
["prefix", [
"foo.-",
["punctuation", ":"]
]]
]]
]
----------------------------------------------------
Checks for PrefixedName.
================================================
FILE: tests/languages/sparql/keyword_feature.test
================================================
A
ADD
ALL
AS
ASC
ASK
BNODE
BY
CLEAR
CONSTRUCT
COPY
CREATE
DATA
DEFAULT
DELETE
DESC
DESCRIBE
DISTINCT
DROP
EXISTS
FILTER
FROM
GROUP
HAVING
INSERT
INTO
LIMIT
LOAD
MINUS
MOVE
NAMED
NOT
NOW
OFFSET
OPTIONAL
ORDER
RAND
REDUCED
SELECT
SEPARATOR
SERVICE
SILENT
STRUUID
UNION
USING
UUID
VALUES
WHERE
ABS(
AVG(
BIND(
BOUND(
CEIL(
COALESCE(
CONCAT(
CONTAINS(
COUNT(
DATATYPE(
DAY(
ENCODE_FOR_URI(
FLOOR(
GROUP_CONCAT(
HOURS(
IF(
IRI(
isBLANK(
isIRI(
isLITERAL(
isNUMERIC(
isURI(
LANG(
LANGMATCHES(
LCASE(
MAX(
MD5(
MIN(
MINUTES(
MONTH(
ROUND(
REGEX(
REPLACE(
sameTerm(
SAMPLE(
SECONDS(
SHA1(
SHA256(
SHA384(
SHA512(
STR(
STRAFTER(
STRBEFORE(
STRDT(
STRENDS(
STRLANG(
STRLEN(
STRSTARTS(
SUBSTR(
SUM(
TIMEZONE(
TZ(
UCASE(
URI(
YEAR(
GRAPH
BASE
PREFIX
----------------------------------------------------
[
["keyword", "A"],
["keyword", "ADD"],
["keyword", "ALL"],
["keyword", "AS"],
["keyword", "ASC"],
["keyword", "ASK"],
["keyword", "BNODE"],
["keyword", "BY"],
["keyword", "CLEAR"],
["keyword", "CONSTRUCT"],
["keyword", "COPY"],
["keyword", "CREATE"],
["keyword", "DATA"],
["keyword", "DEFAULT"],
["keyword", "DELETE"],
["keyword", "DESC"],
["keyword", "DESCRIBE"],
["keyword", "DISTINCT"],
["keyword", "DROP"],
["keyword", "EXISTS"],
["keyword", "FILTER"],
["keyword", "FROM"],
["keyword", "GROUP"],
["keyword", "HAVING"],
["keyword", "INSERT"],
["keyword", "INTO"],
["keyword", "LIMIT"],
["keyword", "LOAD"],
["keyword", "MINUS"],
["keyword", "MOVE"],
["keyword", "NAMED"],
["keyword", "NOT"],
["keyword", "NOW"],
["keyword", "OFFSET"],
["keyword", "OPTIONAL"],
["keyword", "ORDER"],
["keyword", "RAND"],
["keyword", "REDUCED"],
["keyword", "SELECT"],
["keyword", "SEPARATOR"],
["keyword", "SERVICE"],
["keyword", "SILENT"],
["keyword", "STRUUID"],
["keyword", "UNION"],
["keyword", "USING"],
["keyword", "UUID"],
["keyword", "VALUES"],
["keyword", "WHERE"],
["keyword", "ABS"], ["punctuation", "("],
["keyword", "AVG"], ["punctuation", "("],
["keyword", "BIND"], ["punctuation", "("],
["keyword", "BOUND"], ["punctuation", "("],
["keyword", "CEIL"], ["punctuation", "("],
["keyword", "COALESCE"], ["punctuation", "("],
["keyword", "CONCAT"], ["punctuation", "("],
["keyword", "CONTAINS"], ["punctuation", "("],
["keyword", "COUNT"], ["punctuation", "("],
["keyword", "DATATYPE"], ["punctuation", "("],
["keyword", "DAY"], ["punctuation", "("],
["keyword", "ENCODE_FOR_URI"], ["punctuation", "("],
["keyword", "FLOOR"], ["punctuation", "("],
["keyword", "GROUP_CONCAT"], ["punctuation", "("],
["keyword", "HOURS"], ["punctuation", "("],
["keyword", "IF"], ["punctuation", "("],
["keyword", "IRI"], ["punctuation", "("],
["keyword", "isBLANK"], ["punctuation", "("],
["keyword", "isIRI"], ["punctuation", "("],
["keyword", "isLITERAL"], ["punctuation", "("],
["keyword", "isNUMERIC"], ["punctuation", "("],
["keyword", "isURI"], ["punctuation", "("],
["keyword", "LANG"], ["punctuation", "("],
["keyword", "LANGMATCHES"], ["punctuation", "("],
["keyword", "LCASE"], ["punctuation", "("],
["keyword", "MAX"], ["punctuation", "("],
["keyword", "MD5"], ["punctuation", "("],
["keyword", "MIN"], ["punctuation", "("],
["keyword", "MINUTES"], ["punctuation", "("],
["keyword", "MONTH"], ["punctuation", "("],
["keyword", "ROUND"], ["punctuation", "("],
["keyword", "REGEX"], ["punctuation", "("],
["keyword", "REPLACE"], ["punctuation", "("],
["keyword", "sameTerm"], ["punctuation", "("],
["keyword", "SAMPLE"], ["punctuation", "("],
["keyword", "SECONDS"], ["punctuation", "("],
["keyword", "SHA1"], ["punctuation", "("],
["keyword", "SHA256"], ["punctuation", "("],
["keyword", "SHA384"], ["punctuation", "("],
["keyword", "SHA512"], ["punctuation", "("],
["keyword", "STR"], ["punctuation", "("],
["keyword", "STRAFTER"], ["punctuation", "("],
["keyword", "STRBEFORE"], ["punctuation", "("],
["keyword", "STRDT"], ["punctuation", "("],
["keyword", "STRENDS"], ["punctuation", "("],
["keyword", "STRLANG"], ["punctuation", "("],
["keyword", "STRLEN"], ["punctuation", "("],
["keyword", "STRSTARTS"], ["punctuation", "("],
["keyword", "SUBSTR"], ["punctuation", "("],
["keyword", "SUM"], ["punctuation", "("],
["keyword", "TIMEZONE"], ["punctuation", "("],
["keyword", "TZ"], ["punctuation", "("],
["keyword", "UCASE"], ["punctuation", "("],
["keyword", "URI"], ["punctuation", "("],
["keyword", "YEAR"], ["punctuation", "("],
["keyword", "GRAPH"],
["keyword", "BASE"],
["keyword", "PREFIX"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/sparql/number_feature.test
================================================
42
+42
-42
42.42
-42.42
+42.42
42.42e42
-42.42e+42
+42.42e-42
0.42e42
0.42e+42
0.42e-42
----------------------------------------------------
[
["number", "42"],
["number", "+42"],
["number", "-42"],
["number", "42.42"],
["number", "-42.42"],
["number", "+42.42"],
["number", "42.42e42"],
["number", "-42.42e+42"],
["number", "+42.42e-42"],
["number", "0.42e42"],
["number", "0.42e+42"],
["number", "0.42e-42"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/sparql/string_feature.test
================================================
""
''
''''''
""""""
'foo bar'
"Foo bar"
"""foo
"bar"
foobar"""
'''
foobar
"bar"
'foo'
foobar
'''
----------------------------------------------------
[
["string", "\"\""],
["string", "''"],
["multiline-string", [
"''''''"
]],
["multiline-string", [
"\"\"\"\"\"\""
]],
["string", "'foo bar'"],
["string", "\"Foo bar\""],
["multiline-string", [
"\"\"\"foo\r\n\"bar\"\r\nfoobar\"\"\""
]],
["multiline-string", [
"'''\r\nfoobar\r\n\"bar\"\r\n'foo'\r\nfoobar\r\n'''"
]]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/sparql/tag_feature.test
================================================
@ne
@ned-nl
@ne-nl
@ne-01
@ne-JA
@ne-NE01
----------------------------------------------------
[
["tag", [
["punctuation", "@"],
"ne"
]],
["tag", [
["punctuation", "@"],
"ned-nl"
]],
["tag", [
["punctuation", "@"],
"ne-nl"
]],
["tag", [
["punctuation", "@"],
"ne"
]],
["number", "-01"],
["tag", [
["punctuation", "@"],
"ne-JA"
]],
["tag", [
["punctuation", "@"],
"ne-NE01"
]]
]
----------------------------------------------------
Checks for languagetags.
================================================
FILE: tests/languages/sparql/url_feature.test
================================================
----------------------------------------------------
[
["url", [
["punctuation", "<"],
"http://foo.com/blah_blah",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://foo.com/blah_blah/",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://foo.com/blah_blah_(wikipedia)",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://foo.com/blah_blah_(wikipedia)_(again)",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://www.example.com/wpstyle/?p=364",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"https://www.example.com/foo/?bar=baz&inga=42&quux",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://✪df.ws/123",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://userid:password@example.com:8080",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://userid:password@example.com:8080/",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://userid@example.com",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://userid@example.com/",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://userid@example.com:8080",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://userid@example.com:8080/",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://userid:password@example.com",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://userid:password@example.com/",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://142.42.1.1/",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://142.42.1.1:8080/",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://➡.ws/䨹",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://⌘.ws",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://⌘.ws/",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://foo.com/blah_(wikipedia)#cite-1",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://foo.com/blah_(wikipedia)_blah#cite-1",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://foo.com/unicode_(✪)_in_parens",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://foo.com/(something)?after=parens",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://☺.damowmow.com/",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://code.google.com/events/#&product=browser",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://j.mp",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"ftp://foo.bar/baz",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://foo.bar/?q=Test%20URL-encoded%20stuff",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://مثال.إختبار",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://例子.测试",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://उदाहरण.परीक्षा",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://1337.net",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://a.b-c.de",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://223.255.255.254",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"https://foo_bar.example.com/",
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for IRI's.
================================================
FILE: tests/languages/sparql/variable_feature.test
================================================
?name
$name
?name0
$name0
----------------------------------------------------
[
["variable", "?name"],
["variable", "$name"],
["variable", "?name0"],
["variable", "$name0"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/splunk-spl/boolean_feature.test
================================================
T F
true false
----------------------------------------------------
[
["boolean", "T"], ["boolean", "F"],
["boolean", "true"], ["boolean", "false"]
]
================================================
FILE: tests/languages/splunk-spl/comment_feature.test
================================================
`comment("This is a comment")`
`comment("This is too
but on more than one line")`
`comment("| stats sum(b) BY index")`
----------------------------------------------------
[
["comment", "`comment(\"This is a comment\")`"],
["comment", "`comment(\"This is too\r\nbut on more than one line\")`"],
["comment", "`comment(\"| stats sum(b) BY index\")`"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/splunk-spl/date_feature.test
================================================
1/1/1970
12/31/1999:23:59:59
----------------------------------------------------
[
["date", "1/1/1970"],
["date", "12/31/1999:23:59:59"]
]
----------------------------------------------------
Checks for dates.
================================================
FILE: tests/languages/splunk-spl/keyword_feature.test
================================================
abstract
accum
addcoltotals
addinfo
addtotals
analyzefields
anomalies
anomalousvalue
anomalydetection
append
appendcols
appendcsv
appendlookup
appendpipe
arules
associate
audit
autoregress
bin
bucket
bucketdir
chart
cluster
cofilter
collect
concurrency
contingency
convert
correlate
datamodel
dbinspect
dedup
delete
delta
diff
erex
eval
eventcount
eventstats
extract
fieldformat
fields
fieldsummary
filldown
fillnull
findtypes
folderize
foreach
format
from
gauge
gentimes
geom
geomfilter
geostats
head
highlight
history
iconify
input
inputcsv
inputlookup
iplocation
join
kmeans
kv
kvform
loadjob
localize
localop
lookup
makecontinuous
makemv
makeresults
map
mcollect
metadata
metasearch
meventcollect
mstats
multikv
multisearch
mvcombine
mvexpand
nomv
outlier
outputcsv
outputlookup
outputtext
overlap
pivot
predict
rangemap
rare
regex
relevancy
reltime
rename
replace
rest
return
reverse
rex
rtorder
run
savedsearch
script
scrub
search
searchtxn
selfjoin
sendemail
set
setfields
sichart
sirare
sistats
sitimechart
sitop
sort
spath
stats
strcat
streamstats
table
tags
tail
timechart
timewrap
top
transaction
transpose
trendline
tscollect
tstats
typeahead
typelearner
typer
union
uniq
untable
where
x11
xmlkv
xmlunescape
xpath
xyseries
----------------------------------------------------
[
["keyword", "abstract"],
["keyword", "accum"],
["keyword", "addcoltotals"],
["keyword", "addinfo"],
["keyword", "addtotals"],
["keyword", "analyzefields"],
["keyword", "anomalies"],
["keyword", "anomalousvalue"],
["keyword", "anomalydetection"],
["keyword", "append"],
["keyword", "appendcols"],
["keyword", "appendcsv"],
["keyword", "appendlookup"],
["keyword", "appendpipe"],
["keyword", "arules"],
["keyword", "associate"],
["keyword", "audit"],
["keyword", "autoregress"],
["keyword", "bin"],
["keyword", "bucket"],
["keyword", "bucketdir"],
["keyword", "chart"],
["keyword", "cluster"],
["keyword", "cofilter"],
["keyword", "collect"],
["keyword", "concurrency"],
["keyword", "contingency"],
["keyword", "convert"],
["keyword", "correlate"],
["keyword", "datamodel"],
["keyword", "dbinspect"],
["keyword", "dedup"],
["keyword", "delete"],
["keyword", "delta"],
["keyword", "diff"],
["keyword", "erex"],
["keyword", "eval"],
["keyword", "eventcount"],
["keyword", "eventstats"],
["keyword", "extract"],
["keyword", "fieldformat"],
["keyword", "fields"],
["keyword", "fieldsummary"],
["keyword", "filldown"],
["keyword", "fillnull"],
["keyword", "findtypes"],
["keyword", "folderize"],
["keyword", "foreach"],
["keyword", "format"],
["keyword", "from"],
["keyword", "gauge"],
["keyword", "gentimes"],
["keyword", "geom"],
["keyword", "geomfilter"],
["keyword", "geostats"],
["keyword", "head"],
["keyword", "highlight"],
["keyword", "history"],
["keyword", "iconify"],
["keyword", "input"],
["keyword", "inputcsv"],
["keyword", "inputlookup"],
["keyword", "iplocation"],
["keyword", "join"],
["keyword", "kmeans"],
["keyword", "kv"],
["keyword", "kvform"],
["keyword", "loadjob"],
["keyword", "localize"],
["keyword", "localop"],
["keyword", "lookup"],
["keyword", "makecontinuous"],
["keyword", "makemv"],
["keyword", "makeresults"],
["keyword", "map"],
["keyword", "mcollect"],
["keyword", "metadata"],
["keyword", "metasearch"],
["keyword", "meventcollect"],
["keyword", "mstats"],
["keyword", "multikv"],
["keyword", "multisearch"],
["keyword", "mvcombine"],
["keyword", "mvexpand"],
["keyword", "nomv"],
["keyword", "outlier"],
["keyword", "outputcsv"],
["keyword", "outputlookup"],
["keyword", "outputtext"],
["keyword", "overlap"],
["keyword", "pivot"],
["keyword", "predict"],
["keyword", "rangemap"],
["keyword", "rare"],
["keyword", "regex"],
["keyword", "relevancy"],
["keyword", "reltime"],
["keyword", "rename"],
["keyword", "replace"],
["keyword", "rest"],
["keyword", "return"],
["keyword", "reverse"],
["keyword", "rex"],
["keyword", "rtorder"],
["keyword", "run"],
["keyword", "savedsearch"],
["keyword", "script"],
["keyword", "scrub"],
["keyword", "search"],
["keyword", "searchtxn"],
["keyword", "selfjoin"],
["keyword", "sendemail"],
["keyword", "set"],
["keyword", "setfields"],
["keyword", "sichart"],
["keyword", "sirare"],
["keyword", "sistats"],
["keyword", "sitimechart"],
["keyword", "sitop"],
["keyword", "sort"],
["keyword", "spath"],
["keyword", "stats"],
["keyword", "strcat"],
["keyword", "streamstats"],
["keyword", "table"],
["keyword", "tags"],
["keyword", "tail"],
["keyword", "timechart"],
["keyword", "timewrap"],
["keyword", "top"],
["keyword", "transaction"],
["keyword", "transpose"],
["keyword", "trendline"],
["keyword", "tscollect"],
["keyword", "tstats"],
["keyword", "typeahead"],
["keyword", "typelearner"],
["keyword", "typer"],
["keyword", "union"],
["keyword", "uniq"],
["keyword", "untable"],
["keyword", "where"],
["keyword", "x11"],
["keyword", "xmlkv"],
["keyword", "xmlunescape"],
["keyword", "xpath"],
["keyword", "xyseries"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/splunk-spl/number_feature.test
================================================
123
123.456
----------------------------------------------------
[
["number", "123"],
["number", "123.456"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/splunk-spl/operator_feature.test
================================================
=
== >= <= > <
+ - * / %
|
and not or xor AND NOT OR XOR
as by AS BY
----------------------------------------------------
[
["operator", "="],
["operator", "=="],
["operator", ">="],
["operator", "<="],
["operator", ">"],
["operator", "<"],
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "|"],
["operator-word", "and"],
["operator-word", "not"],
["operator-word", "or"],
["operator-word", "xor"],
["operator-word", "AND"],
["operator-word", "NOT"],
["operator-word", "OR"],
["operator-word", "XOR"],
["operator-word", "as"],
["operator-word", "by"],
["operator-word", "AS"],
["operator-word", "BY"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/splunk-spl/property_feature.test
================================================
host="mailsecure_log"
----------------------------------------------------
[
["property", "host"],
["operator", "="],
["string", "\"mailsecure_log\""]
]
================================================
FILE: tests/languages/splunk-spl/punctuation_feature.test
================================================
( ) [ ] ,
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ","]
]
================================================
FILE: tests/languages/splunk-spl/string_feature.test
================================================
"foo"
"\"foo\""
----------------------------------------------------
[
["string", "\"foo\""],
["string", "\"\\\"foo\\\"\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/sqf/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/sqf/comment_feature.test
================================================
// comment
/*
comment
*/
----------------------------------------------------
[
["comment", "// comment"],
["comment", "/*\r\n comment\r\n */"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/sqf/constant_feature.test
================================================
// examples of direct input keycodes
DIK_0
DIK_1
DIK_APPS
DIK_BACKSLASH
DIK_CAPITAL
----------------------------------------------------
[
["comment", "// examples of direct input keycodes"],
["constant", "DIK_0"],
["constant", "DIK_1"],
["constant", "DIK_APPS"],
["constant", "DIK_BACKSLASH"],
["constant", "DIK_CAPITAL"]
]
----------------------------------------------------
Checks for constants.
================================================
FILE: tests/languages/sqf/function_feature.test
================================================
abs
accTime
acos
action
actionIDs
actionKeys
actionKeysImages
actionKeysNames
actionKeysNamesArray
actionName
actionParams
activateAddons
activatedAddons
activateKey
add3DENConnection
add3DENEventHandler
add3DENLayer
addAction
addBackpack
addBackpackCargo
addBackpackCargoGlobal
addBackpackGlobal
addCamShake
addCuratorAddons
addCuratorCameraArea
addCuratorEditableObjects
addCuratorEditingArea
addCuratorPoints
addEditorObject
addEventHandler
addForce
addForceGeneratorRTD
addGoggles
addGroupIcon
addHandgunItem
addHeadgear
addItem
addItemCargo
addItemCargoGlobal
addItemPool
addItemToBackpack
addItemToUniform
addItemToVest
addLiveStats
addMagazine
addMagazineAmmoCargo
addMagazineCargo
addMagazineCargoGlobal
addMagazineGlobal
addMagazinePool
addMagazines
addMagazineTurret
addMenu
addMenuItem
addMissionEventHandler
addMPEventHandler
addMusicEventHandler
addOwnedMine
addPlayerScores
addPrimaryWeaponItem
addPublicVariableEventHandler
addRating
addResources
addScore
addScoreSide
addSecondaryWeaponItem
addSwitchableUnit
addTeamMember
addToRemainsCollector
addTorque
addUniform
addVehicle
addVest
addWaypoint
addWeapon
addWeaponCargo
addWeaponCargoGlobal
addWeaponGlobal
addWeaponItem
addWeaponPool
addWeaponTurret
admin
agent
agents
AGLToASL
aimedAtTarget
aimPos
airDensityCurveRTD
airDensityRTD
airplaneThrottle
airportSide
AISFinishHeal
alive
all3DENEntities
allAirports
allControls
allCurators
allCutLayers
allDead
allDeadMen
allDisplays
allGroups
allMapMarkers
allMines
allMissionObjects
allow3DMode
allowCrewInImmobile
allowCuratorLogicIgnoreAreas
allowDamage
allowDammage
allowFileOperations
allowFleeing
allowGetIn
allowSprint
allPlayers
allSimpleObjects
allSites
allTurrets
allUnits
allUnitsUAV
allVariables
ammo
ammoOnPylon
animate
animateBay
animateDoor
animatePylon
animateSource
animationNames
animationPhase
animationSourcePhase
animationState
append
apply
armoryPoints
arrayIntersect
asin
ASLToAGL
ASLToATL
assert
assignAsCargo
assignAsCargoIndex
assignAsCommander
assignAsDriver
assignAsGunner
assignAsTurret
assignCurator
assignedCargo
assignedCommander
assignedDriver
assignedGunner
assignedItems
assignedTarget
assignedTeam
assignedVehicle
assignedVehicleRole
assignItem
assignTeam
assignToAirport
atan
atan2
atg
ATLToASL
attachedObject
attachedObjects
attachedTo
attachObject
attachTo
attackEnabled
backpack
backpackCargo
backpackContainer
backpackItems
backpackMagazines
backpackSpaceFor
behaviour
benchmark
binocular
blufor
boundingBox
boundingBoxReal
boundingCenter
briefingName
buildingExit
buildingPos
buldozer_EnableRoadDiag
buldozer_IsEnabledRoadDiag
buldozer_LoadNewRoads
buldozer_reloadOperMap
buttonAction
buttonSetAction
cadetMode
callExtension
camCommand
camCommit
camCommitPrepared
camCommitted
camConstuctionSetParams
camCreate
camDestroy
cameraEffect
cameraEffectEnableHUD
cameraInterest
cameraOn
cameraView
campaignConfigFile
camPreload
camPreloaded
camPrepareBank
camPrepareDir
camPrepareDive
camPrepareFocus
camPrepareFov
camPrepareFovRange
camPreparePos
camPrepareRelPos
camPrepareTarget
camSetBank
camSetDir
camSetDive
camSetFocus
camSetFov
camSetFovRange
camSetPos
camSetRelPos
camSetTarget
camTarget
camUseNVG
canAdd
canAddItemToBackpack
canAddItemToUniform
canAddItemToVest
cancelSimpleTaskDestination
canFire
canMove
canSlingLoad
canStand
canSuspend
canTriggerDynamicSimulation
canUnloadInCombat
canVehicleCargo
captive
captiveNum
cbChecked
cbSetChecked
ceil
channelEnabled
cheatsEnabled
checkAIFeature
checkVisibility
civilian
className
clear3DENAttribute
clear3DENInventory
clearAllItemsFromBackpack
clearBackpackCargo
clearBackpackCargoGlobal
clearForcesRTD
clearGroupIcons
clearItemCargo
clearItemCargoGlobal
clearItemPool
clearMagazineCargo
clearMagazineCargoGlobal
clearMagazinePool
clearOverlay
clearRadio
clearVehicleInit
clearWeaponCargo
clearWeaponCargoGlobal
clearWeaponPool
clientOwner
closeDialog
closeDisplay
closeOverlay
collapseObjectTree
collect3DENHistory
collectiveRTD
combatMode
commandArtilleryFire
commandChat
commander
commandFire
commandFollow
commandFSM
commandGetOut
commandingMenu
commandMove
commandRadio
commandStop
commandSuppressiveFire
commandTarget
commandWatch
comment
commitOverlay
compile
compileFinal
completedFSM
composeText
configClasses
configFile
configHierarchy
configName
configNull
configProperties
configSourceAddonList
configSourceMod
configSourceModList
confirmSensorTarget
connectTerminalToUAV
controlNull
controlsGroupCtrl
copyFromClipboard
copyToClipboard
copyWaypoints
cos
count
countEnemy
countFriendly
countSide
countType
countUnknown
create3DENComposition
create3DENEntity
createAgent
createCenter
createDialog
createDiaryLink
createDiaryRecord
createDiarySubject
createDisplay
createGearDialog
createGroup
createGuardedPoint
createLocation
createMarker
createMarkerLocal
createMenu
createMine
createMissionDisplay
createMPCampaignDisplay
createSimpleObject
createSimpleTask
createSite
createSoundSource
createTask
createTeam
createTrigger
createUnit
createVehicle
createVehicleCrew
createVehicleLocal
crew
ctAddHeader
ctAddRow
ctClear
ctCurSel
ctData
ctFindHeaderRows
ctFindRowHeader
ctHeaderControls
ctHeaderCount
ctRemoveHeaders
ctRemoveRows
ctrlActivate
ctrlAddEventHandler
ctrlAngle
ctrlAutoScrollDelay
ctrlAutoScrollRewind
ctrlAutoScrollSpeed
ctrlChecked
ctrlClassName
ctrlCommit
ctrlCommitted
ctrlCreate
ctrlDelete
ctrlEnable
ctrlEnabled
ctrlFade
ctrlHTMLLoaded
ctrlIDC
ctrlIDD
ctrlMapAnimAdd
ctrlMapAnimClear
ctrlMapAnimCommit
ctrlMapAnimDone
ctrlMapCursor
ctrlMapMouseOver
ctrlMapScale
ctrlMapScreenToWorld
ctrlMapWorldToScreen
ctrlModel
ctrlModelDirAndUp
ctrlModelScale
ctrlParent
ctrlParentControlsGroup
ctrlPosition
ctrlRemoveAllEventHandlers
ctrlRemoveEventHandler
ctrlScale
ctrlSetActiveColor
ctrlSetAngle
ctrlSetAutoScrollDelay
ctrlSetAutoScrollRewind
ctrlSetAutoScrollSpeed
ctrlSetBackgroundColor
ctrlSetChecked
ctrlSetDisabledColor
ctrlSetEventHandler
ctrlSetFade
ctrlSetFocus
ctrlSetFont
ctrlSetFontH1
ctrlSetFontH1B
ctrlSetFontH2
ctrlSetFontH2B
ctrlSetFontH3
ctrlSetFontH3B
ctrlSetFontH4
ctrlSetFontH4B
ctrlSetFontH5
ctrlSetFontH5B
ctrlSetFontH6
ctrlSetFontH6B
ctrlSetFontHeight
ctrlSetFontHeightH1
ctrlSetFontHeightH2
ctrlSetFontHeightH3
ctrlSetFontHeightH4
ctrlSetFontHeightH5
ctrlSetFontHeightH6
ctrlSetFontHeightSecondary
ctrlSetFontP
ctrlSetFontPB
ctrlSetFontSecondary
ctrlSetForegroundColor
ctrlSetModel
ctrlSetModelDirAndUp
ctrlSetModelScale
ctrlSetPixelPrecision
ctrlSetPosition
ctrlSetScale
ctrlSetStructuredText
ctrlSetText
ctrlSetTextColor
ctrlSetTextColorSecondary
ctrlSetTextSecondary
ctrlSetTooltip
ctrlSetTooltipColorBox
ctrlSetTooltipColorShade
ctrlSetTooltipColorText
ctrlShow
ctrlShown
ctrlText
ctrlTextHeight
ctrlTextSecondary
ctrlTextWidth
ctrlType
ctrlVisible
ctRowControls
ctRowCount
ctSetCurSel
ctSetData
ctSetHeaderTemplate
ctSetRowTemplate
ctSetValue
ctValue
curatorAddons
curatorCamera
curatorCameraArea
curatorCameraAreaCeiling
curatorCoef
curatorEditableObjects
curatorEditingArea
curatorEditingAreaType
curatorMouseOver
curatorPoints
curatorRegisteredObjects
curatorSelected
curatorWaypointCost
current3DENOperation
currentChannel
currentCommand
currentMagazine
currentMagazineDetail
currentMagazineDetailTurret
currentMagazineTurret
currentMuzzle
currentNamespace
currentTask
currentTasks
currentThrowable
currentVisionMode
currentWaypoint
currentWeapon
currentWeaponMode
currentWeaponTurret
currentZeroing
cursorObject
cursorTarget
customChat
customRadio
cutFadeOut
cutObj
cutRsc
cutText
damage
date
dateToNumber
daytime
deActivateKey
debriefingText
debugFSM
debugLog
deg
delete3DENEntities
deleteAt
deleteCenter
deleteCollection
deleteEditorObject
deleteGroup
deleteGroupWhenEmpty
deleteIdentity
deleteLocation
deleteMarker
deleteMarkerLocal
deleteRange
deleteResources
deleteSite
deleteStatus
deleteTeam
deleteVehicle
deleteVehicleCrew
deleteWaypoint
detach
detectedMines
diag_activeMissionFSMs
diag_activeScripts
diag_activeSQFScripts
diag_activeSQSScripts
diag_captureFrame
diag_captureFrameToFile
diag_captureSlowFrame
diag_codePerformance
diag_drawMode
diag_dynamicSimulationEnd
diag_enable
diag_enabled
diag_fps
diag_fpsMin
diag_frameNo
diag_lightNewLoad
diag_list
diag_log
diag_logSlowFrame
diag_mergeConfigFile
diag_recordTurretLimits
diag_setLightNew
diag_tickTime
diag_toggle
dialog
diarySubjectExists
didJIP
didJIPOwner
difficulty
difficultyEnabled
difficultyEnabledRTD
difficultyOption
direction
directSay
disableAI
disableCollisionWith
disableConversation
disableDebriefingStats
disableMapIndicators
disableNVGEquipment
disableRemoteSensors
disableSerialization
disableTIEquipment
disableUAVConnectability
disableUserInput
displayAddEventHandler
displayCtrl
displayNull
displayParent
displayRemoveAllEventHandlers
displayRemoveEventHandler
displaySetEventHandler
dissolveTeam
distance
distance2D
distanceSqr
distributionRegion
do3DENAction
doArtilleryFire
doFire
doFollow
doFSM
doGetOut
doMove
doorPhase
doStop
doSuppressiveFire
doTarget
doWatch
drawArrow
drawEllipse
drawIcon
drawIcon3D
drawLine
drawLine3D
drawLink
drawLocation
drawPolygon
drawRectangle
drawTriangle
driver
drop
dynamicSimulationDistance
dynamicSimulationDistanceCoef
dynamicSimulationEnabled
dynamicSimulationSystemEnabled
east
edit3DENMissionAttributes
editObject
editorSetEventHandler
effectiveCommander
emptyPositions
enableAI
enableAIFeature
enableAimPrecision
enableAttack
enableAudioFeature
enableAutoStartUpRTD
enableAutoTrimRTD
enableCamShake
enableCaustics
enableChannel
enableCollisionWith
enableCopilot
enableDebriefingStats
enableDiagLegend
enableDynamicSimulation
enableDynamicSimulationSystem
enableEndDialog
enableEngineArtillery
enableEnvironment
enableFatigue
enableGunLights
enableInfoPanelComponent
enableIRLasers
enableMimics
enablePersonTurret
enableRadio
enableReload
enableRopeAttach
enableSatNormalOnDetail
enableSaving
enableSentences
enableSimulation
enableSimulationGlobal
enableStamina
enableStressDamage
enableTeamSwitch
enableTraffic
enableUAVConnectability
enableUAVWaypoints
enableVehicleCargo
enableVehicleSensor
enableWeaponDisassembly
endl
endLoadingScreen
endMission
engineOn
enginesIsOnRTD
enginesPowerRTD
enginesRpmRTD
enginesTorqueRTD
entities
environmentEnabled
estimatedEndServerTime
estimatedTimeLeft
evalObjectArgument
everyBackpack
everyContainer
exec
execEditorScript
exp
expectedDestination
exportJIPMessages
eyeDirection
eyePos
face
faction
fadeMusic
fadeRadio
fadeSound
fadeSpeech
failMission
fillWeaponsFromPool
find
findCover
findDisplay
findEditorObject
findEmptyPosition
findEmptyPositionReady
findIf
findNearestEnemy
finishMissionInit
finite
fire
fireAtTarget
firstBackpack
flag
flagAnimationPhase
flagOwner
flagSide
flagTexture
fleeing
floor
flyInHeight
flyInHeightASL
fog
fogForecast
fogParams
forceAddUniform
forceAtPositionRTD
forcedMap
forceEnd
forceFlagTexture
forceFollowRoad
forceGeneratorRTD
forceMap
forceRespawn
forceSpeed
forceWalk
forceWeaponFire
forceWeatherChange
forgetTarget
format
formation
formationDirection
formationLeader
formationMembers
formationPosition
formationTask
formatText
formLeader
freeLook
fromEditor
fuel
fullCrew
gearIDCAmmoCount
gearSlotAmmoCount
gearSlotData
get3DENActionState
get3DENAttribute
get3DENCamera
get3DENConnections
get3DENEntity
get3DENEntityID
get3DENGrid
get3DENIconsVisible
get3DENLayerEntities
get3DENLinesVisible
get3DENMissionAttribute
get3DENMouseOver
get3DENSelected
getAimingCoef
getAllEnvSoundControllers
getAllHitPointsDamage
getAllOwnedMines
getAllSoundControllers
getAmmoCargo
getAnimAimPrecision
getAnimSpeedCoef
getArray
getArtilleryAmmo
getArtilleryComputerSettings
getArtilleryETA
getAssignedCuratorLogic
getAssignedCuratorUnit
getBackpackCargo
getBleedingRemaining
getBurningValue
getCameraViewDirection
getCargoIndex
getCenterOfMass
getClientState
getClientStateNumber
getCompatiblePylonMagazines
getConnectedUAV
getContainerMaxLoad
getCursorObjectParams
getCustomAimCoef
getDammage
getDescription
getDir
getDirVisual
getDLCAssetsUsage
getDLCAssetsUsageByName
getDLCs
getDLCUsageTime
getEditorCamera
getEditorMode
getEditorObjectScope
getElevationOffset
getEngineTargetRpmRTD
getEnvSoundController
getFatigue
getFieldManualStartPage
getForcedFlagTexture
getFriend
getFSMVariable
getFuelCargo
getGroupIcon
getGroupIconParams
getGroupIcons
getHideFrom
getHit
getHitIndex
getHitPointDamage
getItemCargo
getMagazineCargo
getMarkerColor
getMarkerPos
getMarkerSize
getMarkerType
getMass
getMissionConfig
getMissionConfigValue
getMissionDLCs
getMissionLayerEntities
getMissionLayers
getModelInfo
getMousePosition
getMusicPlayedTime
getNumber
getObjectArgument
getObjectChildren
getObjectDLC
getObjectMaterials
getObjectProxy
getObjectTextures
getObjectType
getObjectViewDistance
getOxygenRemaining
getPersonUsedDLCs
getPilotCameraDirection
getPilotCameraPosition
getPilotCameraRotation
getPilotCameraTarget
getPlateNumber
getPlayerChannel
getPlayerScores
getPlayerUID
getPlayerUIDOld
getPos
getPosASL
getPosASLVisual
getPosASLW
getPosATL
getPosATLVisual
getPosVisual
getPosWorld
getPylonMagazines
getRelDir
getRelPos
getRemoteSensorsDisabled
getRepairCargo
getResolution
getRotorBrakeRTD
getShadowDistance
getShotParents
getSlingLoad
getSoundController
getSoundControllerResult
getSpeed
getStamina
getStatValue
getSuppression
getTerrainGrid
getTerrainHeightASL
getText
getTotalDLCUsageTime
getTrimOffsetRTD
getUnitLoadout
getUnitTrait
getUserMFDText
getUserMFDValue
getVariable
getVehicleCargo
getWeaponCargo
getWeaponSway
getWingsOrientationRTD
getWingsPositionRTD
getWPPos
glanceAt
globalChat
globalRadio
goggles
group
groupChat
groupFromNetId
groupIconSelectable
groupIconsVisible
groupId
groupOwner
groupRadio
groupSelectedUnits
groupSelectUnit
grpNull
gunner
gusts
halt
handgunItems
handgunMagazine
handgunWeapon
handsHit
hasInterface
hasPilotCamera
hasWeapon
hcAllGroups
hcGroupParams
hcLeader
hcRemoveAllGroups
hcRemoveGroup
hcSelected
hcSelectGroup
hcSetGroup
hcShowBar
hcShownBar
headgear
hideBody
hideObject
hideObjectGlobal
hideSelection
hint
hintC
hintCadet
hintSilent
hmd
hostMission
htmlLoad
HUDMovementLevels
humidity
image
importAllGroups
importance
in
inArea
inAreaArray
incapacitatedState
independent
inflame
inflamed
infoPanel
infoPanelComponentEnabled
infoPanelComponents
infoPanels
inGameUISetEventHandler
inheritsFrom
initAmbientLife
inPolygon
inputAction
inRangeOfArtillery
insertEditorObject
intersect
is3DEN
is3DENMultiplayer
isAbleToBreathe
isAgent
isAimPrecisionEnabled
isArray
isAutoHoverOn
isAutonomous
isAutoStartUpEnabledRTD
isAutotest
isAutoTrimOnRTD
isBleeding
isBurning
isClass
isCollisionLightOn
isCopilotEnabled
isDamageAllowed
isDedicated
isDLCAvailable
isEngineOn
isEqualTo
isEqualType
isEqualTypeAll
isEqualTypeAny
isEqualTypeArray
isEqualTypeParams
isFilePatchingEnabled
isFlashlightOn
isFlatEmpty
isForcedWalk
isFormationLeader
isGroupDeletedWhenEmpty
isHidden
isInRemainsCollector
isInstructorFigureEnabled
isIRLaserOn
isKeyActive
isKindOf
isLaserOn
isLightOn
isLocalized
isManualFire
isMarkedForCollection
isMultiplayer
isMultiplayerSolo
isNil
isNull
isNumber
isObjectHidden
isObjectRTD
isOnRoad
isPipEnabled
isPlayer
isRealTime
isRemoteExecuted
isRemoteExecutedJIP
isServer
isShowing3DIcons
isSimpleObject
isSprintAllowed
isStaminaEnabled
isSteamMission
isStreamFriendlyUIEnabled
isStressDamageEnabled
isText
isTouchingGround
isTurnedOut
isTutHintsEnabled
isUAVConnectable
isUAVConnected
isUIContext
isUniformAllowed
isVehicleCargo
isVehicleRadarOn
isVehicleSensorEnabled
isWalking
isWeaponDeployed
isWeaponRested
itemCargo
items
itemsWithMagazines
join
joinAs
joinAsSilent
joinSilent
joinString
kbAddDatabase
kbAddDatabaseTargets
kbAddTopic
kbHasTopic
kbReact
kbRemoveTopic
kbTell
kbWasSaid
keyImage
keyName
knowsAbout
land
landAt
landResult
language
laserTarget
lbAdd
lbClear
lbColor
lbColorRight
lbCurSel
lbData
lbDelete
lbIsSelected
lbPicture
lbPictureRight
lbSelection
lbSetColor
lbSetColorRight
lbSetCurSel
lbSetData
lbSetPicture
lbSetPictureColor
lbSetPictureColorDisabled
lbSetPictureColorSelected
lbSetPictureRight
lbSetPictureRightColor
lbSetPictureRightColorDisabled
lbSetPictureRightColorSelected
lbSetSelectColor
lbSetSelectColorRight
lbSetSelected
lbSetText
lbSetTextRight
lbSetTooltip
lbSetValue
lbSize
lbSort
lbSortByValue
lbText
lbTextRight
lbValue
leader
leaderboardDeInit
leaderboardGetRows
leaderboardInit
leaderboardRequestRowsFriends
leaderboardRequestRowsGlobal
leaderboardRequestRowsGlobalAroundUser
leaderboardsRequestUploadScore
leaderboardsRequestUploadScoreKeepBest
leaderboardState
leaveVehicle
libraryCredits
libraryDisclaimers
lifeState
lightAttachObject
lightDetachObject
lightIsOn
lightnings
limitSpeed
linearConversion
lineBreak
lineIntersects
lineIntersectsObjs
lineIntersectsSurfaces
lineIntersectsWith
linkItem
list
listObjects
listRemoteTargets
listVehicleSensors
ln
lnbAddArray
lnbAddColumn
lnbAddRow
lnbClear
lnbColor
lnbColorRight
lnbCurSelRow
lnbData
lnbDeleteColumn
lnbDeleteRow
lnbGetColumnsPosition
lnbPicture
lnbPictureRight
lnbSetColor
lnbSetColorRight
lnbSetColumnsPos
lnbSetCurSelRow
lnbSetData
lnbSetPicture
lnbSetPictureColor
lnbSetPictureColorRight
lnbSetPictureColorSelected
lnbSetPictureColorSelectedRight
lnbSetPictureRight
lnbSetText
lnbSetTextRight
lnbSetValue
lnbSize
lnbSort
lnbSortByValue
lnbText
lnbTextRight
lnbValue
load
loadAbs
loadBackpack
loadFile
loadGame
loadIdentity
loadMagazine
loadOverlay
loadStatus
loadUniform
loadVest
local
localize
locationNull
locationPosition
lock
lockCameraTo
lockCargo
lockDriver
locked
lockedCargo
lockedDriver
lockedTurret
lockIdentity
lockTurret
lockWP
log
logEntities
logNetwork
logNetworkTerminate
lookAt
lookAtPos
magazineCargo
magazines
magazinesAllTurrets
magazinesAmmo
magazinesAmmoCargo
magazinesAmmoFull
magazinesDetail
magazinesDetailBackpack
magazinesDetailUniform
magazinesDetailVest
magazinesTurret
magazineTurretAmmo
mapAnimAdd
mapAnimClear
mapAnimCommit
mapAnimDone
mapCenterOnCamera
mapGridPosition
markAsFinishedOnSteam
markerAlpha
markerBrush
markerColor
markerDir
markerPos
markerShape
markerSize
markerText
markerType
max
members
menuAction
menuAdd
menuChecked
menuClear
menuCollapse
menuData
menuDelete
menuEnable
menuEnabled
menuExpand
menuHover
menuPicture
menuSetAction
menuSetCheck
menuSetData
menuSetPicture
menuSetValue
menuShortcut
menuShortcutText
menuSize
menuSort
menuText
menuURL
menuValue
min
mineActive
mineDetectedBy
missionConfigFile
missionDifficulty
missionName
missionNamespace
missionStart
missionVersion
modelToWorld
modelToWorldVisual
modelToWorldVisualWorld
modelToWorldWorld
modParams
moonIntensity
moonPhase
morale
move
move3DENCamera
moveInAny
moveInCargo
moveInCommander
moveInDriver
moveInGunner
moveInTurret
moveObjectToEnd
moveOut
moveTime
moveTo
moveToCompleted
moveToFailed
musicVolume
name
nameSound
nearEntities
nearestBuilding
nearestLocation
nearestLocations
nearestLocationWithDubbing
nearestObject
nearestObjects
nearestTerrainObjects
nearObjects
nearObjectsReady
nearRoads
nearSupplies
nearTargets
needReload
netId
netObjNull
newOverlay
nextMenuItemIndex
nextWeatherChange
nMenuItems
numberOfEnginesRTD
numberToDate
objectCurators
objectFromNetId
objectParent
objNull
objStatus
onBriefingGear
onBriefingGroup
onBriefingNotes
onBriefingPlan
onBriefingTeamSwitch
onCommandModeChanged
onDoubleClick
onEachFrame
onGroupIconClick
onGroupIconOverEnter
onGroupIconOverLeave
onHCGroupSelectionChanged
onMapSingleClick
onPlayerConnected
onPlayerDisconnected
onPreloadFinished
onPreloadStarted
onShowNewObject
onTeamSwitch
openCuratorInterface
openDLCPage
openDSInterface
openMap
openSteamApp
openYoutubeVideo
opfor
orderGetIn
overcast
overcastForecast
owner
param
params
parseNumber
parseSimpleArray
parseText
parsingNamespace
particlesQuality
pi
pickWeaponPool
pitch
pixelGrid
pixelGridBase
pixelGridNoUIScale
pixelH
pixelW
playableSlotsNumber
playableUnits
playAction
playActionNow
player
playerRespawnTime
playerSide
playersNumber
playGesture
playMission
playMove
playMoveNow
playMusic
playScriptedMission
playSound
playSound3D
position
positionCameraToWorld
posScreenToWorld
posWorldToScreen
ppEffectAdjust
ppEffectCommit
ppEffectCommitted
ppEffectCreate
ppEffectDestroy
ppEffectEnable
ppEffectEnabled
ppEffectForceInNVG
precision
preloadCamera
preloadObject
preloadSound
preloadTitleObj
preloadTitleRsc
primaryWeapon
primaryWeaponItems
primaryWeaponMagazine
priority
processDiaryLink
processInitCommands
productVersion
profileName
profileNamespace
profileNameSteam
progressLoadingScreen
progressPosition
progressSetPosition
publicVariable
publicVariableClient
publicVariableServer
pushBack
pushBackUnique
putWeaponPool
queryItemsPool
queryMagazinePool
queryWeaponPool
rad
radioChannelAdd
radioChannelCreate
radioChannelRemove
radioChannelSetCallSign
radioChannelSetLabel
radioVolume
rain
rainbow
random
rank
rankId
rating
rectangular
registeredTasks
registerTask
reload
reloadEnabled
remoteControl
remoteExec
remoteExecCall
remoteExecutedOwner
remove3DENConnection
remove3DENEventHandler
remove3DENLayer
removeAction
removeAll3DENEventHandlers
removeAllActions
removeAllAssignedItems
removeAllContainers
removeAllCuratorAddons
removeAllCuratorCameraAreas
removeAllCuratorEditingAreas
removeAllEventHandlers
removeAllHandgunItems
removeAllItems
removeAllItemsWithMagazines
removeAllMissionEventHandlers
removeAllMPEventHandlers
removeAllMusicEventHandlers
removeAllOwnedMines
removeAllPrimaryWeaponItems
removeAllWeapons
removeBackpack
removeBackpackGlobal
removeCuratorAddons
removeCuratorCameraArea
removeCuratorEditableObjects
removeCuratorEditingArea
removeDrawIcon
removeDrawLinks
removeEventHandler
removeFromRemainsCollector
removeGoggles
removeGroupIcon
removeHandgunItem
removeHeadgear
removeItem
removeItemFromBackpack
removeItemFromUniform
removeItemFromVest
removeItems
removeMagazine
removeMagazineGlobal
removeMagazines
removeMagazinesTurret
removeMagazineTurret
removeMenuItem
removeMissionEventHandler
removeMPEventHandler
removeMusicEventHandler
removeOwnedMine
removePrimaryWeaponItem
removeSecondaryWeaponItem
removeSimpleTask
removeSwitchableUnit
removeTeamMember
removeUniform
removeVest
removeWeapon
removeWeaponAttachmentCargo
removeWeaponCargo
removeWeaponGlobal
removeWeaponTurret
reportRemoteTarget
requiredVersion
resetCamShake
resetSubgroupDirection
resistance
resize
resources
respawnVehicle
restartEditorCamera
reveal
revealMine
reverse
reversedMouseY
roadAt
roadsConnectedTo
roleDescription
ropeAttachedObjects
ropeAttachedTo
ropeAttachEnabled
ropeAttachTo
ropeCreate
ropeCut
ropeDestroy
ropeDetach
ropeEndPosition
ropeLength
ropes
ropeUnwind
ropeUnwound
rotorsForcesRTD
rotorsRpmRTD
round
runInitScript
safeZoneH
safeZoneW
safeZoneWAbs
safeZoneX
safeZoneXAbs
safeZoneY
save3DENInventory
saveGame
saveIdentity
saveJoysticks
saveOverlay
saveProfileNamespace
saveStatus
saveVar
savingEnabled
say
say2D
say3D
score
scoreSide
screenshot
screenToWorld
scriptDone
scriptName
scriptNull
scudState
secondaryWeapon
secondaryWeaponItems
secondaryWeaponMagazine
select
selectBestPlaces
selectDiarySubject
selectedEditorObjects
selectEditorObject
selectionNames
selectionPosition
selectLeader
selectMax
selectMin
selectNoPlayer
selectPlayer
selectRandom
selectRandomWeighted
selectWeapon
selectWeaponTurret
sendAUMessage
sendSimpleCommand
sendTask
sendTaskResult
sendUDPMessage
serverCommand
serverCommandAvailable
serverCommandExecutable
serverName
serverTime
set
set3DENAttribute
set3DENAttributes
set3DENGrid
set3DENIconsVisible
set3DENLayer
set3DENLinesVisible
set3DENLogicType
set3DENMissionAttribute
set3DENMissionAttributes
set3DENModelsVisible
set3DENObjectType
set3DENSelected
setAccTime
setActualCollectiveRTD
setAirplaneThrottle
setAirportSide
setAmmo
setAmmoCargo
setAmmoOnPylon
setAnimSpeedCoef
setAperture
setApertureNew
setArmoryPoints
setAttributes
setAutonomous
setBehaviour
setBleedingRemaining
setBrakesRTD
setCameraInterest
setCamShakeDefParams
setCamShakeParams
setCamUseTI
setCaptive
setCenterOfMass
setCollisionLight
setCombatMode
setCompassOscillation
setConvoySeparation
setCuratorCameraAreaCeiling
setCuratorCoef
setCuratorEditingAreaType
setCuratorWaypointCost
setCurrentChannel
setCurrentTask
setCurrentWaypoint
setCustomAimCoef
setCustomWeightRTD
setDamage
setDammage
setDate
setDebriefingText
setDefaultCamera
setDestination
setDetailMapBlendPars
setDir
setDirection
setDrawIcon
setDriveOnPath
setDropInterval
setDynamicSimulationDistance
setDynamicSimulationDistanceCoef
setEditorMode
setEditorObjectScope
setEffectCondition
setEngineRpmRTD
setFace
setFaceAnimation
setFatigue
setFeatureType
setFlagAnimationPhase
setFlagOwner
setFlagSide
setFlagTexture
setFog
setForceGeneratorRTD
setFormation
setFormationTask
setFormDir
setFriend
setFromEditor
setFSMVariable
setFuel
setFuelCargo
setGroupIcon
setGroupIconParams
setGroupIconsSelectable
setGroupIconsVisible
setGroupId
setGroupIdGlobal
setGroupOwner
setGusts
setHideBehind
setHit
setHitIndex
setHitPointDamage
setHorizonParallaxCoef
setHUDMovementLevels
setIdentity
setImportance
setInfoPanel
setLeader
setLightAmbient
setLightAttenuation
setLightBrightness
setLightColor
setLightDayLight
setLightFlareMaxDistance
setLightFlareSize
setLightIntensity
setLightnings
setLightUseFlare
setLocalWindParams
setMagazineTurretAmmo
setMarkerAlpha
setMarkerAlphaLocal
setMarkerBrush
setMarkerBrushLocal
setMarkerColor
setMarkerColorLocal
setMarkerDir
setMarkerDirLocal
setMarkerPos
setMarkerPosLocal
setMarkerShape
setMarkerShapeLocal
setMarkerSize
setMarkerSizeLocal
setMarkerText
setMarkerTextLocal
setMarkerType
setMarkerTypeLocal
setMass
setMimic
setMousePosition
setMusicEffect
setMusicEventHandler
setName
setNameSound
setObjectArguments
setObjectMaterial
setObjectMaterialGlobal
setObjectProxy
setObjectTexture
setObjectTextureGlobal
setObjectViewDistance
setOvercast
setOwner
setOxygenRemaining
setParticleCircle
setParticleClass
setParticleFire
setParticleParams
setParticleRandom
setPilotCameraDirection
setPilotCameraRotation
setPilotCameraTarget
setPilotLight
setPiPEffect
setPitch
setPlateNumber
setPlayable
setPlayerRespawnTime
setPos
setPosASL
setPosASL2
setPosASLW
setPosATL
setPosition
setPosWorld
setPylonLoadOut
setPylonsPriority
setRadioMsg
setRain
setRainbow
setRandomLip
setRank
setRectangular
setRepairCargo
setRotorBrakeRTD
setShadowDistance
setShotParents
setSide
setSimpleTaskAlwaysVisible
setSimpleTaskCustomData
setSimpleTaskDescription
setSimpleTaskDestination
setSimpleTaskTarget
setSimpleTaskType
setSimulWeatherLayers
setSize
setSkill
setSlingLoad
setSoundEffect
setSpeaker
setSpeech
setSpeedMode
setStamina
setStaminaScheme
setStatValue
setSuppression
setSystemOfUnits
setTargetAge
setTaskMarkerOffset
setTaskResult
setTaskState
setTerrainGrid
setText
setTimeMultiplier
setTitleEffect
setToneMapping
setToneMappingParams
setTrafficDensity
setTrafficDistance
setTrafficGap
setTrafficSpeed
setTriggerActivation
setTriggerArea
setTriggerStatements
setTriggerText
setTriggerTimeout
setTriggerType
setType
setUnconscious
setUnitAbility
setUnitLoadout
setUnitPos
setUnitPosWeak
setUnitRank
setUnitRecoilCoefficient
setUnitTrait
setUnloadInCombat
setUserActionText
setUserMFDText
setUserMFDValue
setVariable
setVectorDir
setVectorDirAndUp
setVectorUp
setVehicleAmmo
setVehicleAmmoDef
setVehicleArmor
setVehicleCargo
setVehicleId
setVehicleInit
setVehicleLock
setVehiclePosition
setVehicleRadar
setVehicleReceiveRemoteTargets
setVehicleReportOwnPosition
setVehicleReportRemoteTargets
setVehicleTIPars
setVehicleVarName
setVelocity
setVelocityModelSpace
setVelocityTransformation
setViewDistance
setVisibleIfTreeCollapsed
setWantedRpmRTD
setWaves
setWaypointBehaviour
setWaypointCombatMode
setWaypointCompletionRadius
setWaypointDescription
setWaypointForceBehaviour
setWaypointFormation
setWaypointHousePosition
setWaypointLoiterRadius
setWaypointLoiterType
setWaypointName
setWaypointPosition
setWaypointScript
setWaypointSpeed
setWaypointStatements
setWaypointTimeout
setWaypointType
setWaypointVisible
setWeaponReloadingTime
setWind
setWindDir
setWindForce
setWindStr
setWingForceScaleRTD
setWPPos
show3DIcons
showChat
showCinemaBorder
showCommandingMenu
showCompass
showCuratorCompass
showGPS
showHUD
showLegend
showMap
shownArtilleryComputer
shownChat
shownCompass
shownCuratorCompass
showNewEditorObject
shownGPS
shownHUD
shownMap
shownPad
shownRadio
shownScoretable
shownUAVFeed
shownWarrant
shownWatch
showPad
showRadio
showScoretable
showSubtitles
showUAVFeed
showWarrant
showWatch
showWaypoint
showWaypoints
side
sideAmbientLife
sideChat
sideEmpty
sideEnemy
sideFriendly
sideLogic
sideRadio
sideUnknown
simpleTasks
simulationEnabled
simulCloudDensity
simulCloudOcclusion
simulInClouds
simulWeatherSync
sin
size
sizeOf
skill
skillFinal
skipTime
sleep
sliderPosition
sliderRange
sliderSetPosition
sliderSetRange
sliderSetSpeed
sliderSpeed
slingLoadAssistantShown
soldierMagazines
someAmmo
sort
soundVolume
speaker
speed
speedMode
splitString
sqrt
squadParams
stance
startLoadingScreen
stop
stopEngineRTD
stopped
str
sunOrMoon
supportInfo
suppressFor
surfaceIsWater
surfaceNormal
surfaceType
swimInDepth
switchableUnits
switchAction
switchCamera
switchGesture
switchLight
switchMove
synchronizedObjects
synchronizedTriggers
synchronizedWaypoints
synchronizeObjectsAdd
synchronizeObjectsRemove
synchronizeTrigger
synchronizeWaypoint
systemChat
systemOfUnits
tan
targetKnowledge
targets
targetsAggregate
targetsQuery
taskAlwaysVisible
taskChildren
taskCompleted
taskCustomData
taskDescription
taskDestination
taskHint
taskMarkerOffset
taskNull
taskParent
taskResult
taskState
taskType
teamMember
teamMemberNull
teamName
teams
teamSwitch
teamSwitchEnabled
teamType
terminate
terrainIntersect
terrainIntersectASL
terrainIntersectAtASL
text
textLog
textLogFormat
tg
time
timeMultiplier
titleCut
titleFadeOut
titleObj
titleRsc
titleText
toArray
toFixed
toLower
toString
toUpper
triggerActivated
triggerActivation
triggerArea
triggerAttachedVehicle
triggerAttachObject
triggerAttachVehicle
triggerDynamicSimulation
triggerStatements
triggerText
triggerTimeout
triggerTimeoutCurrent
triggerType
turretLocal
turretOwner
turretUnit
tvAdd
tvClear
tvCollapse
tvCollapseAll
tvCount
tvCurSel
tvData
tvDelete
tvExpand
tvExpandAll
tvPicture
tvPictureRight
tvSetColor
tvSetCurSel
tvSetData
tvSetPicture
tvSetPictureColor
tvSetPictureColorDisabled
tvSetPictureColorSelected
tvSetPictureRight
tvSetPictureRightColor
tvSetPictureRightColorDisabled
tvSetPictureRightColorSelected
tvSetSelectColor
tvSetText
tvSetTooltip
tvSetValue
tvSort
tvSortByValue
tvText
tvTooltip
tvValue
type
typeName
typeOf
UAVControl
uiNamespace
uiSleep
unassignCurator
unassignItem
unassignTeam
unassignVehicle
underwater
uniform
uniformContainer
uniformItems
uniformMagazines
unitAddons
unitAimPosition
unitAimPositionVisual
unitBackpack
unitIsUAV
unitPos
unitReady
unitRecoilCoefficient
units
unitsBelowHeight
unlinkItem
unlockAchievement
unregisterTask
updateDrawIcon
updateMenuItem
updateObjectTree
useAIOperMapObstructionTest
useAISteeringComponent
useAudioTimeForMoves
userInputDisabled
vectorAdd
vectorCos
vectorCrossProduct
vectorDiff
vectorDir
vectorDirVisual
vectorDistance
vectorDistanceSqr
vectorDotProduct
vectorFromTo
vectorMagnitude
vectorMagnitudeSqr
vectorModelToWorld
vectorModelToWorldVisual
vectorMultiply
vectorNormalized
vectorUp
vectorUpVisual
vectorWorldToModel
vectorWorldToModelVisual
vehicle
vehicleCargoEnabled
vehicleChat
vehicleRadio
vehicleReceiveRemoteTargets
vehicleReportOwnPosition
vehicleReportRemoteTargets
vehicles
vehicleVarName
velocity
velocityModelSpace
verifySignature
vest
vestContainer
vestItems
vestMagazines
viewDistance
visibleCompass
visibleGPS
visibleMap
visiblePosition
visiblePositionASL
visibleScoretable
visibleWatch
waitUntil
waves
waypointAttachedObject
waypointAttachedVehicle
waypointAttachObject
waypointAttachVehicle
waypointBehaviour
waypointCombatMode
waypointCompletionRadius
waypointDescription
waypointForceBehaviour
waypointFormation
waypointHousePosition
waypointLoiterRadius
waypointLoiterType
waypointName
waypointPosition
waypoints
waypointScript
waypointsEnabledUAV
waypointShow
waypointSpeed
waypointStatements
waypointTimeout
waypointTimeoutCurrent
waypointType
waypointVisible
weaponAccessories
weaponAccessoriesCargo
weaponCargo
weaponDirection
weaponInertia
weaponLowered
weapons
weaponsItems
weaponsItemsCargo
weaponState
weaponsTurret
weightRTD
west
WFSideText
wind
windDir
windRTD
windStr
wingsForcesRTD
worldName
worldSize
worldToModel
worldToModelVisual
worldToScreen
----------------------------------------------------
[
["function", "abs"],
["function", "accTime"],
["function", "acos"],
["function", "action"],
["function", "actionIDs"],
["function", "actionKeys"],
["function", "actionKeysImages"],
["function", "actionKeysNames"],
["function", "actionKeysNamesArray"],
["function", "actionName"],
["function", "actionParams"],
["function", "activateAddons"],
["function", "activatedAddons"],
["function", "activateKey"],
["function", "add3DENConnection"],
["function", "add3DENEventHandler"],
["function", "add3DENLayer"],
["function", "addAction"],
["function", "addBackpack"],
["function", "addBackpackCargo"],
["function", "addBackpackCargoGlobal"],
["function", "addBackpackGlobal"],
["function", "addCamShake"],
["function", "addCuratorAddons"],
["function", "addCuratorCameraArea"],
["function", "addCuratorEditableObjects"],
["function", "addCuratorEditingArea"],
["function", "addCuratorPoints"],
["function", "addEditorObject"],
["function", "addEventHandler"],
["function", "addForce"],
["function", "addForceGeneratorRTD"],
["function", "addGoggles"],
["function", "addGroupIcon"],
["function", "addHandgunItem"],
["function", "addHeadgear"],
["function", "addItem"],
["function", "addItemCargo"],
["function", "addItemCargoGlobal"],
["function", "addItemPool"],
["function", "addItemToBackpack"],
["function", "addItemToUniform"],
["function", "addItemToVest"],
["function", "addLiveStats"],
["function", "addMagazine"],
["function", "addMagazineAmmoCargo"],
["function", "addMagazineCargo"],
["function", "addMagazineCargoGlobal"],
["function", "addMagazineGlobal"],
["function", "addMagazinePool"],
["function", "addMagazines"],
["function", "addMagazineTurret"],
["function", "addMenu"],
["function", "addMenuItem"],
["function", "addMissionEventHandler"],
["function", "addMPEventHandler"],
["function", "addMusicEventHandler"],
["function", "addOwnedMine"],
["function", "addPlayerScores"],
["function", "addPrimaryWeaponItem"],
["function", "addPublicVariableEventHandler"],
["function", "addRating"],
["function", "addResources"],
["function", "addScore"],
["function", "addScoreSide"],
["function", "addSecondaryWeaponItem"],
["function", "addSwitchableUnit"],
["function", "addTeamMember"],
["function", "addToRemainsCollector"],
["function", "addTorque"],
["function", "addUniform"],
["function", "addVehicle"],
["function", "addVest"],
["function", "addWaypoint"],
["function", "addWeapon"],
["function", "addWeaponCargo"],
["function", "addWeaponCargoGlobal"],
["function", "addWeaponGlobal"],
["function", "addWeaponItem"],
["function", "addWeaponPool"],
["function", "addWeaponTurret"],
["function", "admin"],
["function", "agent"],
["function", "agents"],
["function", "AGLToASL"],
["function", "aimedAtTarget"],
["function", "aimPos"],
["function", "airDensityCurveRTD"],
["function", "airDensityRTD"],
["function", "airplaneThrottle"],
["function", "airportSide"],
["function", "AISFinishHeal"],
["function", "alive"],
["function", "all3DENEntities"],
["function", "allAirports"],
["function", "allControls"],
["function", "allCurators"],
["function", "allCutLayers"],
["function", "allDead"],
["function", "allDeadMen"],
["function", "allDisplays"],
["function", "allGroups"],
["function", "allMapMarkers"],
["function", "allMines"],
["function", "allMissionObjects"],
["function", "allow3DMode"],
["function", "allowCrewInImmobile"],
["function", "allowCuratorLogicIgnoreAreas"],
["function", "allowDamage"],
["function", "allowDammage"],
["function", "allowFileOperations"],
["function", "allowFleeing"],
["function", "allowGetIn"],
["function", "allowSprint"],
["function", "allPlayers"],
["function", "allSimpleObjects"],
["function", "allSites"],
["function", "allTurrets"],
["function", "allUnits"],
["function", "allUnitsUAV"],
["function", "allVariables"],
["function", "ammo"],
["function", "ammoOnPylon"],
["function", "animate"],
["function", "animateBay"],
["function", "animateDoor"],
["function", "animatePylon"],
["function", "animateSource"],
["function", "animationNames"],
["function", "animationPhase"],
["function", "animationSourcePhase"],
["function", "animationState"],
["function", "append"],
["function", "apply"],
["function", "armoryPoints"],
["function", "arrayIntersect"],
["function", "asin"],
["function", "ASLToAGL"],
["function", "ASLToATL"],
["function", "assert"],
["function", "assignAsCargo"],
["function", "assignAsCargoIndex"],
["function", "assignAsCommander"],
["function", "assignAsDriver"],
["function", "assignAsGunner"],
["function", "assignAsTurret"],
["function", "assignCurator"],
["function", "assignedCargo"],
["function", "assignedCommander"],
["function", "assignedDriver"],
["function", "assignedGunner"],
["function", "assignedItems"],
["function", "assignedTarget"],
["function", "assignedTeam"],
["function", "assignedVehicle"],
["function", "assignedVehicleRole"],
["function", "assignItem"],
["function", "assignTeam"],
["function", "assignToAirport"],
["function", "atan"],
["function", "atan2"],
["function", "atg"],
["function", "ATLToASL"],
["function", "attachedObject"],
["function", "attachedObjects"],
["function", "attachedTo"],
["function", "attachObject"],
["function", "attachTo"],
["function", "attackEnabled"],
["function", "backpack"],
["function", "backpackCargo"],
["function", "backpackContainer"],
["function", "backpackItems"],
["function", "backpackMagazines"],
["function", "backpackSpaceFor"],
["function", "behaviour"],
["function", "benchmark"],
["function", "binocular"],
["function", "blufor"],
["function", "boundingBox"],
["function", "boundingBoxReal"],
["function", "boundingCenter"],
["function", "briefingName"],
["function", "buildingExit"],
["function", "buildingPos"],
["function", "buldozer_EnableRoadDiag"],
["function", "buldozer_IsEnabledRoadDiag"],
["function", "buldozer_LoadNewRoads"],
["function", "buldozer_reloadOperMap"],
["function", "buttonAction"],
["function", "buttonSetAction"],
["function", "cadetMode"],
["function", "callExtension"],
["function", "camCommand"],
["function", "camCommit"],
["function", "camCommitPrepared"],
["function", "camCommitted"],
["function", "camConstuctionSetParams"],
["function", "camCreate"],
["function", "camDestroy"],
["function", "cameraEffect"],
["function", "cameraEffectEnableHUD"],
["function", "cameraInterest"],
["function", "cameraOn"],
["function", "cameraView"],
["function", "campaignConfigFile"],
["function", "camPreload"],
["function", "camPreloaded"],
["function", "camPrepareBank"],
["function", "camPrepareDir"],
["function", "camPrepareDive"],
["function", "camPrepareFocus"],
["function", "camPrepareFov"],
["function", "camPrepareFovRange"],
["function", "camPreparePos"],
["function", "camPrepareRelPos"],
["function", "camPrepareTarget"],
["function", "camSetBank"],
["function", "camSetDir"],
["function", "camSetDive"],
["function", "camSetFocus"],
["function", "camSetFov"],
["function", "camSetFovRange"],
["function", "camSetPos"],
["function", "camSetRelPos"],
["function", "camSetTarget"],
["function", "camTarget"],
["function", "camUseNVG"],
["function", "canAdd"],
["function", "canAddItemToBackpack"],
["function", "canAddItemToUniform"],
["function", "canAddItemToVest"],
["function", "cancelSimpleTaskDestination"],
["function", "canFire"],
["function", "canMove"],
["function", "canSlingLoad"],
["function", "canStand"],
["function", "canSuspend"],
["function", "canTriggerDynamicSimulation"],
["function", "canUnloadInCombat"],
["function", "canVehicleCargo"],
["function", "captive"],
["function", "captiveNum"],
["function", "cbChecked"],
["function", "cbSetChecked"],
["function", "ceil"],
["function", "channelEnabled"],
["function", "cheatsEnabled"],
["function", "checkAIFeature"],
["function", "checkVisibility"],
["function", "civilian"],
["function", "className"],
["function", "clear3DENAttribute"],
["function", "clear3DENInventory"],
["function", "clearAllItemsFromBackpack"],
["function", "clearBackpackCargo"],
["function", "clearBackpackCargoGlobal"],
["function", "clearForcesRTD"],
["function", "clearGroupIcons"],
["function", "clearItemCargo"],
["function", "clearItemCargoGlobal"],
["function", "clearItemPool"],
["function", "clearMagazineCargo"],
["function", "clearMagazineCargoGlobal"],
["function", "clearMagazinePool"],
["function", "clearOverlay"],
["function", "clearRadio"],
["function", "clearVehicleInit"],
["function", "clearWeaponCargo"],
["function", "clearWeaponCargoGlobal"],
["function", "clearWeaponPool"],
["function", "clientOwner"],
["function", "closeDialog"],
["function", "closeDisplay"],
["function", "closeOverlay"],
["function", "collapseObjectTree"],
["function", "collect3DENHistory"],
["function", "collectiveRTD"],
["function", "combatMode"],
["function", "commandArtilleryFire"],
["function", "commandChat"],
["function", "commander"],
["function", "commandFire"],
["function", "commandFollow"],
["function", "commandFSM"],
["function", "commandGetOut"],
["function", "commandingMenu"],
["function", "commandMove"],
["function", "commandRadio"],
["function", "commandStop"],
["function", "commandSuppressiveFire"],
["function", "commandTarget"],
["function", "commandWatch"],
["function", "comment"],
["function", "commitOverlay"],
["function", "compile"],
["function", "compileFinal"],
["function", "completedFSM"],
["function", "composeText"],
["function", "configClasses"],
["function", "configFile"],
["function", "configHierarchy"],
["function", "configName"],
["function", "configNull"],
["function", "configProperties"],
["function", "configSourceAddonList"],
["function", "configSourceMod"],
["function", "configSourceModList"],
["function", "confirmSensorTarget"],
["function", "connectTerminalToUAV"],
["function", "controlNull"],
["function", "controlsGroupCtrl"],
["function", "copyFromClipboard"],
["function", "copyToClipboard"],
["function", "copyWaypoints"],
["function", "cos"],
["function", "count"],
["function", "countEnemy"],
["function", "countFriendly"],
["function", "countSide"],
["function", "countType"],
["function", "countUnknown"],
["function", "create3DENComposition"],
["function", "create3DENEntity"],
["function", "createAgent"],
["function", "createCenter"],
["function", "createDialog"],
["function", "createDiaryLink"],
["function", "createDiaryRecord"],
["function", "createDiarySubject"],
["function", "createDisplay"],
["function", "createGearDialog"],
["function", "createGroup"],
["function", "createGuardedPoint"],
["function", "createLocation"],
["function", "createMarker"],
["function", "createMarkerLocal"],
["function", "createMenu"],
["function", "createMine"],
["function", "createMissionDisplay"],
["function", "createMPCampaignDisplay"],
["function", "createSimpleObject"],
["function", "createSimpleTask"],
["function", "createSite"],
["function", "createSoundSource"],
["function", "createTask"],
["function", "createTeam"],
["function", "createTrigger"],
["function", "createUnit"],
["function", "createVehicle"],
["function", "createVehicleCrew"],
["function", "createVehicleLocal"],
["function", "crew"],
["function", "ctAddHeader"],
["function", "ctAddRow"],
["function", "ctClear"],
["function", "ctCurSel"],
["function", "ctData"],
["function", "ctFindHeaderRows"],
["function", "ctFindRowHeader"],
["function", "ctHeaderControls"],
["function", "ctHeaderCount"],
["function", "ctRemoveHeaders"],
["function", "ctRemoveRows"],
["function", "ctrlActivate"],
["function", "ctrlAddEventHandler"],
["function", "ctrlAngle"],
["function", "ctrlAutoScrollDelay"],
["function", "ctrlAutoScrollRewind"],
["function", "ctrlAutoScrollSpeed"],
["function", "ctrlChecked"],
["function", "ctrlClassName"],
["function", "ctrlCommit"],
["function", "ctrlCommitted"],
["function", "ctrlCreate"],
["function", "ctrlDelete"],
["function", "ctrlEnable"],
["function", "ctrlEnabled"],
["function", "ctrlFade"],
["function", "ctrlHTMLLoaded"],
["function", "ctrlIDC"],
["function", "ctrlIDD"],
["function", "ctrlMapAnimAdd"],
["function", "ctrlMapAnimClear"],
["function", "ctrlMapAnimCommit"],
["function", "ctrlMapAnimDone"],
["function", "ctrlMapCursor"],
["function", "ctrlMapMouseOver"],
["function", "ctrlMapScale"],
["function", "ctrlMapScreenToWorld"],
["function", "ctrlMapWorldToScreen"],
["function", "ctrlModel"],
["function", "ctrlModelDirAndUp"],
["function", "ctrlModelScale"],
["function", "ctrlParent"],
["function", "ctrlParentControlsGroup"],
["function", "ctrlPosition"],
["function", "ctrlRemoveAllEventHandlers"],
["function", "ctrlRemoveEventHandler"],
["function", "ctrlScale"],
["function", "ctrlSetActiveColor"],
["function", "ctrlSetAngle"],
["function", "ctrlSetAutoScrollDelay"],
["function", "ctrlSetAutoScrollRewind"],
["function", "ctrlSetAutoScrollSpeed"],
["function", "ctrlSetBackgroundColor"],
["function", "ctrlSetChecked"],
["function", "ctrlSetDisabledColor"],
["function", "ctrlSetEventHandler"],
["function", "ctrlSetFade"],
["function", "ctrlSetFocus"],
["function", "ctrlSetFont"],
["function", "ctrlSetFontH1"],
["function", "ctrlSetFontH1B"],
["function", "ctrlSetFontH2"],
["function", "ctrlSetFontH2B"],
["function", "ctrlSetFontH3"],
["function", "ctrlSetFontH3B"],
["function", "ctrlSetFontH4"],
["function", "ctrlSetFontH4B"],
["function", "ctrlSetFontH5"],
["function", "ctrlSetFontH5B"],
["function", "ctrlSetFontH6"],
["function", "ctrlSetFontH6B"],
["function", "ctrlSetFontHeight"],
["function", "ctrlSetFontHeightH1"],
["function", "ctrlSetFontHeightH2"],
["function", "ctrlSetFontHeightH3"],
["function", "ctrlSetFontHeightH4"],
["function", "ctrlSetFontHeightH5"],
["function", "ctrlSetFontHeightH6"],
["function", "ctrlSetFontHeightSecondary"],
["function", "ctrlSetFontP"],
["function", "ctrlSetFontPB"],
["function", "ctrlSetFontSecondary"],
["function", "ctrlSetForegroundColor"],
["function", "ctrlSetModel"],
["function", "ctrlSetModelDirAndUp"],
["function", "ctrlSetModelScale"],
["function", "ctrlSetPixelPrecision"],
["function", "ctrlSetPosition"],
["function", "ctrlSetScale"],
["function", "ctrlSetStructuredText"],
["function", "ctrlSetText"],
["function", "ctrlSetTextColor"],
["function", "ctrlSetTextColorSecondary"],
["function", "ctrlSetTextSecondary"],
["function", "ctrlSetTooltip"],
["function", "ctrlSetTooltipColorBox"],
["function", "ctrlSetTooltipColorShade"],
["function", "ctrlSetTooltipColorText"],
["function", "ctrlShow"],
["function", "ctrlShown"],
["function", "ctrlText"],
["function", "ctrlTextHeight"],
["function", "ctrlTextSecondary"],
["function", "ctrlTextWidth"],
["function", "ctrlType"],
["function", "ctrlVisible"],
["function", "ctRowControls"],
["function", "ctRowCount"],
["function", "ctSetCurSel"],
["function", "ctSetData"],
["function", "ctSetHeaderTemplate"],
["function", "ctSetRowTemplate"],
["function", "ctSetValue"],
["function", "ctValue"],
["function", "curatorAddons"],
["function", "curatorCamera"],
["function", "curatorCameraArea"],
["function", "curatorCameraAreaCeiling"],
["function", "curatorCoef"],
["function", "curatorEditableObjects"],
["function", "curatorEditingArea"],
["function", "curatorEditingAreaType"],
["function", "curatorMouseOver"],
["function", "curatorPoints"],
["function", "curatorRegisteredObjects"],
["function", "curatorSelected"],
["function", "curatorWaypointCost"],
["function", "current3DENOperation"],
["function", "currentChannel"],
["function", "currentCommand"],
["function", "currentMagazine"],
["function", "currentMagazineDetail"],
["function", "currentMagazineDetailTurret"],
["function", "currentMagazineTurret"],
["function", "currentMuzzle"],
["function", "currentNamespace"],
["function", "currentTask"],
["function", "currentTasks"],
["function", "currentThrowable"],
["function", "currentVisionMode"],
["function", "currentWaypoint"],
["function", "currentWeapon"],
["function", "currentWeaponMode"],
["function", "currentWeaponTurret"],
["function", "currentZeroing"],
["function", "cursorObject"],
["function", "cursorTarget"],
["function", "customChat"],
["function", "customRadio"],
["function", "cutFadeOut"],
["function", "cutObj"],
["function", "cutRsc"],
["function", "cutText"],
["function", "damage"],
["function", "date"],
["function", "dateToNumber"],
["function", "daytime"],
["function", "deActivateKey"],
["function", "debriefingText"],
["function", "debugFSM"],
["function", "debugLog"],
["function", "deg"],
["function", "delete3DENEntities"],
["function", "deleteAt"],
["function", "deleteCenter"],
["function", "deleteCollection"],
["function", "deleteEditorObject"],
["function", "deleteGroup"],
["function", "deleteGroupWhenEmpty"],
["function", "deleteIdentity"],
["function", "deleteLocation"],
["function", "deleteMarker"],
["function", "deleteMarkerLocal"],
["function", "deleteRange"],
["function", "deleteResources"],
["function", "deleteSite"],
["function", "deleteStatus"],
["function", "deleteTeam"],
["function", "deleteVehicle"],
["function", "deleteVehicleCrew"],
["function", "deleteWaypoint"],
["function", "detach"],
["function", "detectedMines"],
["function", "diag_activeMissionFSMs"],
["function", "diag_activeScripts"],
["function", "diag_activeSQFScripts"],
["function", "diag_activeSQSScripts"],
["function", "diag_captureFrame"],
["function", "diag_captureFrameToFile"],
["function", "diag_captureSlowFrame"],
["function", "diag_codePerformance"],
["function", "diag_drawMode"],
["function", "diag_dynamicSimulationEnd"],
["function", "diag_enable"],
["function", "diag_enabled"],
["function", "diag_fps"],
["function", "diag_fpsMin"],
["function", "diag_frameNo"],
["function", "diag_lightNewLoad"],
["function", "diag_list"],
["function", "diag_log"],
["function", "diag_logSlowFrame"],
["function", "diag_mergeConfigFile"],
["function", "diag_recordTurretLimits"],
["function", "diag_setLightNew"],
["function", "diag_tickTime"],
["function", "diag_toggle"],
["function", "dialog"],
["function", "diarySubjectExists"],
["function", "didJIP"],
["function", "didJIPOwner"],
["function", "difficulty"],
["function", "difficultyEnabled"],
["function", "difficultyEnabledRTD"],
["function", "difficultyOption"],
["function", "direction"],
["function", "directSay"],
["function", "disableAI"],
["function", "disableCollisionWith"],
["function", "disableConversation"],
["function", "disableDebriefingStats"],
["function", "disableMapIndicators"],
["function", "disableNVGEquipment"],
["function", "disableRemoteSensors"],
["function", "disableSerialization"],
["function", "disableTIEquipment"],
["function", "disableUAVConnectability"],
["function", "disableUserInput"],
["function", "displayAddEventHandler"],
["function", "displayCtrl"],
["function", "displayNull"],
["function", "displayParent"],
["function", "displayRemoveAllEventHandlers"],
["function", "displayRemoveEventHandler"],
["function", "displaySetEventHandler"],
["function", "dissolveTeam"],
["function", "distance"],
["function", "distance2D"],
["function", "distanceSqr"],
["function", "distributionRegion"],
["function", "do3DENAction"],
["function", "doArtilleryFire"],
["function", "doFire"],
["function", "doFollow"],
["function", "doFSM"],
["function", "doGetOut"],
["function", "doMove"],
["function", "doorPhase"],
["function", "doStop"],
["function", "doSuppressiveFire"],
["function", "doTarget"],
["function", "doWatch"],
["function", "drawArrow"],
["function", "drawEllipse"],
["function", "drawIcon"],
["function", "drawIcon3D"],
["function", "drawLine"],
["function", "drawLine3D"],
["function", "drawLink"],
["function", "drawLocation"],
["function", "drawPolygon"],
["function", "drawRectangle"],
["function", "drawTriangle"],
["function", "driver"],
["function", "drop"],
["function", "dynamicSimulationDistance"],
["function", "dynamicSimulationDistanceCoef"],
["function", "dynamicSimulationEnabled"],
["function", "dynamicSimulationSystemEnabled"],
["function", "east"],
["function", "edit3DENMissionAttributes"],
["function", "editObject"],
["function", "editorSetEventHandler"],
["function", "effectiveCommander"],
["function", "emptyPositions"],
["function", "enableAI"],
["function", "enableAIFeature"],
["function", "enableAimPrecision"],
["function", "enableAttack"],
["function", "enableAudioFeature"],
["function", "enableAutoStartUpRTD"],
["function", "enableAutoTrimRTD"],
["function", "enableCamShake"],
["function", "enableCaustics"],
["function", "enableChannel"],
["function", "enableCollisionWith"],
["function", "enableCopilot"],
["function", "enableDebriefingStats"],
["function", "enableDiagLegend"],
["function", "enableDynamicSimulation"],
["function", "enableDynamicSimulationSystem"],
["function", "enableEndDialog"],
["function", "enableEngineArtillery"],
["function", "enableEnvironment"],
["function", "enableFatigue"],
["function", "enableGunLights"],
["function", "enableInfoPanelComponent"],
["function", "enableIRLasers"],
["function", "enableMimics"],
["function", "enablePersonTurret"],
["function", "enableRadio"],
["function", "enableReload"],
["function", "enableRopeAttach"],
["function", "enableSatNormalOnDetail"],
["function", "enableSaving"],
["function", "enableSentences"],
["function", "enableSimulation"],
["function", "enableSimulationGlobal"],
["function", "enableStamina"],
["function", "enableStressDamage"],
["function", "enableTeamSwitch"],
["function", "enableTraffic"],
["function", "enableUAVConnectability"],
["function", "enableUAVWaypoints"],
["function", "enableVehicleCargo"],
["function", "enableVehicleSensor"],
["function", "enableWeaponDisassembly"],
["function", "endl"],
["function", "endLoadingScreen"],
["function", "endMission"],
["function", "engineOn"],
["function", "enginesIsOnRTD"],
["function", "enginesPowerRTD"],
["function", "enginesRpmRTD"],
["function", "enginesTorqueRTD"],
["function", "entities"],
["function", "environmentEnabled"],
["function", "estimatedEndServerTime"],
["function", "estimatedTimeLeft"],
["function", "evalObjectArgument"],
["function", "everyBackpack"],
["function", "everyContainer"],
["function", "exec"],
["function", "execEditorScript"],
["function", "exp"],
["function", "expectedDestination"],
["function", "exportJIPMessages"],
["function", "eyeDirection"],
["function", "eyePos"],
["function", "face"],
["function", "faction"],
["function", "fadeMusic"],
["function", "fadeRadio"],
["function", "fadeSound"],
["function", "fadeSpeech"],
["function", "failMission"],
["function", "fillWeaponsFromPool"],
["function", "find"],
["function", "findCover"],
["function", "findDisplay"],
["function", "findEditorObject"],
["function", "findEmptyPosition"],
["function", "findEmptyPositionReady"],
["function", "findIf"],
["function", "findNearestEnemy"],
["function", "finishMissionInit"],
["function", "finite"],
["function", "fire"],
["function", "fireAtTarget"],
["function", "firstBackpack"],
["function", "flag"],
["function", "flagAnimationPhase"],
["function", "flagOwner"],
["function", "flagSide"],
["function", "flagTexture"],
["function", "fleeing"],
["function", "floor"],
["function", "flyInHeight"],
["function", "flyInHeightASL"],
["function", "fog"],
["function", "fogForecast"],
["function", "fogParams"],
["function", "forceAddUniform"],
["function", "forceAtPositionRTD"],
["function", "forcedMap"],
["function", "forceEnd"],
["function", "forceFlagTexture"],
["function", "forceFollowRoad"],
["function", "forceGeneratorRTD"],
["function", "forceMap"],
["function", "forceRespawn"],
["function", "forceSpeed"],
["function", "forceWalk"],
["function", "forceWeaponFire"],
["function", "forceWeatherChange"],
["function", "forgetTarget"],
["function", "format"],
["function", "formation"],
["function", "formationDirection"],
["function", "formationLeader"],
["function", "formationMembers"],
["function", "formationPosition"],
["function", "formationTask"],
["function", "formatText"],
["function", "formLeader"],
["function", "freeLook"],
["function", "fromEditor"],
["function", "fuel"],
["function", "fullCrew"],
["function", "gearIDCAmmoCount"],
["function", "gearSlotAmmoCount"],
["function", "gearSlotData"],
["function", "get3DENActionState"],
["function", "get3DENAttribute"],
["function", "get3DENCamera"],
["function", "get3DENConnections"],
["function", "get3DENEntity"],
["function", "get3DENEntityID"],
["function", "get3DENGrid"],
["function", "get3DENIconsVisible"],
["function", "get3DENLayerEntities"],
["function", "get3DENLinesVisible"],
["function", "get3DENMissionAttribute"],
["function", "get3DENMouseOver"],
["function", "get3DENSelected"],
["function", "getAimingCoef"],
["function", "getAllEnvSoundControllers"],
["function", "getAllHitPointsDamage"],
["function", "getAllOwnedMines"],
["function", "getAllSoundControllers"],
["function", "getAmmoCargo"],
["function", "getAnimAimPrecision"],
["function", "getAnimSpeedCoef"],
["function", "getArray"],
["function", "getArtilleryAmmo"],
["function", "getArtilleryComputerSettings"],
["function", "getArtilleryETA"],
["function", "getAssignedCuratorLogic"],
["function", "getAssignedCuratorUnit"],
["function", "getBackpackCargo"],
["function", "getBleedingRemaining"],
["function", "getBurningValue"],
["function", "getCameraViewDirection"],
["function", "getCargoIndex"],
["function", "getCenterOfMass"],
["function", "getClientState"],
["function", "getClientStateNumber"],
["function", "getCompatiblePylonMagazines"],
["function", "getConnectedUAV"],
["function", "getContainerMaxLoad"],
["function", "getCursorObjectParams"],
["function", "getCustomAimCoef"],
["function", "getDammage"],
["function", "getDescription"],
["function", "getDir"],
["function", "getDirVisual"],
["function", "getDLCAssetsUsage"],
["function", "getDLCAssetsUsageByName"],
["function", "getDLCs"],
["function", "getDLCUsageTime"],
["function", "getEditorCamera"],
["function", "getEditorMode"],
["function", "getEditorObjectScope"],
["function", "getElevationOffset"],
["function", "getEngineTargetRpmRTD"],
["function", "getEnvSoundController"],
["function", "getFatigue"],
["function", "getFieldManualStartPage"],
["function", "getForcedFlagTexture"],
["function", "getFriend"],
["function", "getFSMVariable"],
["function", "getFuelCargo"],
["function", "getGroupIcon"],
["function", "getGroupIconParams"],
["function", "getGroupIcons"],
["function", "getHideFrom"],
["function", "getHit"],
["function", "getHitIndex"],
["function", "getHitPointDamage"],
["function", "getItemCargo"],
["function", "getMagazineCargo"],
["function", "getMarkerColor"],
["function", "getMarkerPos"],
["function", "getMarkerSize"],
["function", "getMarkerType"],
["function", "getMass"],
["function", "getMissionConfig"],
["function", "getMissionConfigValue"],
["function", "getMissionDLCs"],
["function", "getMissionLayerEntities"],
["function", "getMissionLayers"],
["function", "getModelInfo"],
["function", "getMousePosition"],
["function", "getMusicPlayedTime"],
["function", "getNumber"],
["function", "getObjectArgument"],
["function", "getObjectChildren"],
["function", "getObjectDLC"],
["function", "getObjectMaterials"],
["function", "getObjectProxy"],
["function", "getObjectTextures"],
["function", "getObjectType"],
["function", "getObjectViewDistance"],
["function", "getOxygenRemaining"],
["function", "getPersonUsedDLCs"],
["function", "getPilotCameraDirection"],
["function", "getPilotCameraPosition"],
["function", "getPilotCameraRotation"],
["function", "getPilotCameraTarget"],
["function", "getPlateNumber"],
["function", "getPlayerChannel"],
["function", "getPlayerScores"],
["function", "getPlayerUID"],
["function", "getPlayerUIDOld"],
["function", "getPos"],
["function", "getPosASL"],
["function", "getPosASLVisual"],
["function", "getPosASLW"],
["function", "getPosATL"],
["function", "getPosATLVisual"],
["function", "getPosVisual"],
["function", "getPosWorld"],
["function", "getPylonMagazines"],
["function", "getRelDir"],
["function", "getRelPos"],
["function", "getRemoteSensorsDisabled"],
["function", "getRepairCargo"],
["function", "getResolution"],
["function", "getRotorBrakeRTD"],
["function", "getShadowDistance"],
["function", "getShotParents"],
["function", "getSlingLoad"],
["function", "getSoundController"],
["function", "getSoundControllerResult"],
["function", "getSpeed"],
["function", "getStamina"],
["function", "getStatValue"],
["function", "getSuppression"],
["function", "getTerrainGrid"],
["function", "getTerrainHeightASL"],
["function", "getText"],
["function", "getTotalDLCUsageTime"],
["function", "getTrimOffsetRTD"],
["function", "getUnitLoadout"],
["function", "getUnitTrait"],
["function", "getUserMFDText"],
["function", "getUserMFDValue"],
["function", "getVariable"],
["function", "getVehicleCargo"],
["function", "getWeaponCargo"],
["function", "getWeaponSway"],
["function", "getWingsOrientationRTD"],
["function", "getWingsPositionRTD"],
["function", "getWPPos"],
["function", "glanceAt"],
["function", "globalChat"],
["function", "globalRadio"],
["function", "goggles"],
["function", "group"],
["function", "groupChat"],
["function", "groupFromNetId"],
["function", "groupIconSelectable"],
["function", "groupIconsVisible"],
["function", "groupId"],
["function", "groupOwner"],
["function", "groupRadio"],
["function", "groupSelectedUnits"],
["function", "groupSelectUnit"],
["function", "grpNull"],
["function", "gunner"],
["function", "gusts"],
["function", "halt"],
["function", "handgunItems"],
["function", "handgunMagazine"],
["function", "handgunWeapon"],
["function", "handsHit"],
["function", "hasInterface"],
["function", "hasPilotCamera"],
["function", "hasWeapon"],
["function", "hcAllGroups"],
["function", "hcGroupParams"],
["function", "hcLeader"],
["function", "hcRemoveAllGroups"],
["function", "hcRemoveGroup"],
["function", "hcSelected"],
["function", "hcSelectGroup"],
["function", "hcSetGroup"],
["function", "hcShowBar"],
["function", "hcShownBar"],
["function", "headgear"],
["function", "hideBody"],
["function", "hideObject"],
["function", "hideObjectGlobal"],
["function", "hideSelection"],
["function", "hint"],
["function", "hintC"],
["function", "hintCadet"],
["function", "hintSilent"],
["function", "hmd"],
["function", "hostMission"],
["function", "htmlLoad"],
["function", "HUDMovementLevels"],
["function", "humidity"],
["function", "image"],
["function", "importAllGroups"],
["function", "importance"],
["function", "in"],
["function", "inArea"],
["function", "inAreaArray"],
["function", "incapacitatedState"],
["function", "independent"],
["function", "inflame"],
["function", "inflamed"],
["function", "infoPanel"],
["function", "infoPanelComponentEnabled"],
["function", "infoPanelComponents"],
["function", "infoPanels"],
["function", "inGameUISetEventHandler"],
["function", "inheritsFrom"],
["function", "initAmbientLife"],
["function", "inPolygon"],
["function", "inputAction"],
["function", "inRangeOfArtillery"],
["function", "insertEditorObject"],
["function", "intersect"],
["function", "is3DEN"],
["function", "is3DENMultiplayer"],
["function", "isAbleToBreathe"],
["function", "isAgent"],
["function", "isAimPrecisionEnabled"],
["function", "isArray"],
["function", "isAutoHoverOn"],
["function", "isAutonomous"],
["function", "isAutoStartUpEnabledRTD"],
["function", "isAutotest"],
["function", "isAutoTrimOnRTD"],
["function", "isBleeding"],
["function", "isBurning"],
["function", "isClass"],
["function", "isCollisionLightOn"],
["function", "isCopilotEnabled"],
["function", "isDamageAllowed"],
["function", "isDedicated"],
["function", "isDLCAvailable"],
["function", "isEngineOn"],
["function", "isEqualTo"],
["function", "isEqualType"],
["function", "isEqualTypeAll"],
["function", "isEqualTypeAny"],
["function", "isEqualTypeArray"],
["function", "isEqualTypeParams"],
["function", "isFilePatchingEnabled"],
["function", "isFlashlightOn"],
["function", "isFlatEmpty"],
["function", "isForcedWalk"],
["function", "isFormationLeader"],
["function", "isGroupDeletedWhenEmpty"],
["function", "isHidden"],
["function", "isInRemainsCollector"],
["function", "isInstructorFigureEnabled"],
["function", "isIRLaserOn"],
["function", "isKeyActive"],
["function", "isKindOf"],
["function", "isLaserOn"],
["function", "isLightOn"],
["function", "isLocalized"],
["function", "isManualFire"],
["function", "isMarkedForCollection"],
["function", "isMultiplayer"],
["function", "isMultiplayerSolo"],
["function", "isNil"],
["function", "isNull"],
["function", "isNumber"],
["function", "isObjectHidden"],
["function", "isObjectRTD"],
["function", "isOnRoad"],
["function", "isPipEnabled"],
["function", "isPlayer"],
["function", "isRealTime"],
["function", "isRemoteExecuted"],
["function", "isRemoteExecutedJIP"],
["function", "isServer"],
["function", "isShowing3DIcons"],
["function", "isSimpleObject"],
["function", "isSprintAllowed"],
["function", "isStaminaEnabled"],
["function", "isSteamMission"],
["function", "isStreamFriendlyUIEnabled"],
["function", "isStressDamageEnabled"],
["function", "isText"],
["function", "isTouchingGround"],
["function", "isTurnedOut"],
["function", "isTutHintsEnabled"],
["function", "isUAVConnectable"],
["function", "isUAVConnected"],
["function", "isUIContext"],
["function", "isUniformAllowed"],
["function", "isVehicleCargo"],
["function", "isVehicleRadarOn"],
["function", "isVehicleSensorEnabled"],
["function", "isWalking"],
["function", "isWeaponDeployed"],
["function", "isWeaponRested"],
["function", "itemCargo"],
["function", "items"],
["function", "itemsWithMagazines"],
["function", "join"],
["function", "joinAs"],
["function", "joinAsSilent"],
["function", "joinSilent"],
["function", "joinString"],
["function", "kbAddDatabase"],
["function", "kbAddDatabaseTargets"],
["function", "kbAddTopic"],
["function", "kbHasTopic"],
["function", "kbReact"],
["function", "kbRemoveTopic"],
["function", "kbTell"],
["function", "kbWasSaid"],
["function", "keyImage"],
["function", "keyName"],
["function", "knowsAbout"],
["function", "land"],
["function", "landAt"],
["function", "landResult"],
["function", "language"],
["function", "laserTarget"],
["function", "lbAdd"],
["function", "lbClear"],
["function", "lbColor"],
["function", "lbColorRight"],
["function", "lbCurSel"],
["function", "lbData"],
["function", "lbDelete"],
["function", "lbIsSelected"],
["function", "lbPicture"],
["function", "lbPictureRight"],
["function", "lbSelection"],
["function", "lbSetColor"],
["function", "lbSetColorRight"],
["function", "lbSetCurSel"],
["function", "lbSetData"],
["function", "lbSetPicture"],
["function", "lbSetPictureColor"],
["function", "lbSetPictureColorDisabled"],
["function", "lbSetPictureColorSelected"],
["function", "lbSetPictureRight"],
["function", "lbSetPictureRightColor"],
["function", "lbSetPictureRightColorDisabled"],
["function", "lbSetPictureRightColorSelected"],
["function", "lbSetSelectColor"],
["function", "lbSetSelectColorRight"],
["function", "lbSetSelected"],
["function", "lbSetText"],
["function", "lbSetTextRight"],
["function", "lbSetTooltip"],
["function", "lbSetValue"],
["function", "lbSize"],
["function", "lbSort"],
["function", "lbSortByValue"],
["function", "lbText"],
["function", "lbTextRight"],
["function", "lbValue"],
["function", "leader"],
["function", "leaderboardDeInit"],
["function", "leaderboardGetRows"],
["function", "leaderboardInit"],
["function", "leaderboardRequestRowsFriends"],
["function", "leaderboardRequestRowsGlobal"],
["function", "leaderboardRequestRowsGlobalAroundUser"],
["function", "leaderboardsRequestUploadScore"],
["function", "leaderboardsRequestUploadScoreKeepBest"],
["function", "leaderboardState"],
["function", "leaveVehicle"],
["function", "libraryCredits"],
["function", "libraryDisclaimers"],
["function", "lifeState"],
["function", "lightAttachObject"],
["function", "lightDetachObject"],
["function", "lightIsOn"],
["function", "lightnings"],
["function", "limitSpeed"],
["function", "linearConversion"],
["function", "lineBreak"],
["function", "lineIntersects"],
["function", "lineIntersectsObjs"],
["function", "lineIntersectsSurfaces"],
["function", "lineIntersectsWith"],
["function", "linkItem"],
["function", "list"],
["function", "listObjects"],
["function", "listRemoteTargets"],
["function", "listVehicleSensors"],
["function", "ln"],
["function", "lnbAddArray"],
["function", "lnbAddColumn"],
["function", "lnbAddRow"],
["function", "lnbClear"],
["function", "lnbColor"],
["function", "lnbColorRight"],
["function", "lnbCurSelRow"],
["function", "lnbData"],
["function", "lnbDeleteColumn"],
["function", "lnbDeleteRow"],
["function", "lnbGetColumnsPosition"],
["function", "lnbPicture"],
["function", "lnbPictureRight"],
["function", "lnbSetColor"],
["function", "lnbSetColorRight"],
["function", "lnbSetColumnsPos"],
["function", "lnbSetCurSelRow"],
["function", "lnbSetData"],
["function", "lnbSetPicture"],
["function", "lnbSetPictureColor"],
["function", "lnbSetPictureColorRight"],
["function", "lnbSetPictureColorSelected"],
["function", "lnbSetPictureColorSelectedRight"],
["function", "lnbSetPictureRight"],
["function", "lnbSetText"],
["function", "lnbSetTextRight"],
["function", "lnbSetValue"],
["function", "lnbSize"],
["function", "lnbSort"],
["function", "lnbSortByValue"],
["function", "lnbText"],
["function", "lnbTextRight"],
["function", "lnbValue"],
["function", "load"],
["function", "loadAbs"],
["function", "loadBackpack"],
["function", "loadFile"],
["function", "loadGame"],
["function", "loadIdentity"],
["function", "loadMagazine"],
["function", "loadOverlay"],
["function", "loadStatus"],
["function", "loadUniform"],
["function", "loadVest"],
["function", "local"],
["function", "localize"],
["function", "locationNull"],
["function", "locationPosition"],
["function", "lock"],
["function", "lockCameraTo"],
["function", "lockCargo"],
["function", "lockDriver"],
["function", "locked"],
["function", "lockedCargo"],
["function", "lockedDriver"],
["function", "lockedTurret"],
["function", "lockIdentity"],
["function", "lockTurret"],
["function", "lockWP"],
["function", "log"],
["function", "logEntities"],
["function", "logNetwork"],
["function", "logNetworkTerminate"],
["function", "lookAt"],
["function", "lookAtPos"],
["function", "magazineCargo"],
["function", "magazines"],
["function", "magazinesAllTurrets"],
["function", "magazinesAmmo"],
["function", "magazinesAmmoCargo"],
["function", "magazinesAmmoFull"],
["function", "magazinesDetail"],
["function", "magazinesDetailBackpack"],
["function", "magazinesDetailUniform"],
["function", "magazinesDetailVest"],
["function", "magazinesTurret"],
["function", "magazineTurretAmmo"],
["function", "mapAnimAdd"],
["function", "mapAnimClear"],
["function", "mapAnimCommit"],
["function", "mapAnimDone"],
["function", "mapCenterOnCamera"],
["function", "mapGridPosition"],
["function", "markAsFinishedOnSteam"],
["function", "markerAlpha"],
["function", "markerBrush"],
["function", "markerColor"],
["function", "markerDir"],
["function", "markerPos"],
["function", "markerShape"],
["function", "markerSize"],
["function", "markerText"],
["function", "markerType"],
["function", "max"],
["function", "members"],
["function", "menuAction"],
["function", "menuAdd"],
["function", "menuChecked"],
["function", "menuClear"],
["function", "menuCollapse"],
["function", "menuData"],
["function", "menuDelete"],
["function", "menuEnable"],
["function", "menuEnabled"],
["function", "menuExpand"],
["function", "menuHover"],
["function", "menuPicture"],
["function", "menuSetAction"],
["function", "menuSetCheck"],
["function", "menuSetData"],
["function", "menuSetPicture"],
["function", "menuSetValue"],
["function", "menuShortcut"],
["function", "menuShortcutText"],
["function", "menuSize"],
["function", "menuSort"],
["function", "menuText"],
["function", "menuURL"],
["function", "menuValue"],
["function", "min"],
["function", "mineActive"],
["function", "mineDetectedBy"],
["function", "missionConfigFile"],
["function", "missionDifficulty"],
["function", "missionName"],
["function", "missionNamespace"],
["function", "missionStart"],
["function", "missionVersion"],
["function", "modelToWorld"],
["function", "modelToWorldVisual"],
["function", "modelToWorldVisualWorld"],
["function", "modelToWorldWorld"],
["function", "modParams"],
["function", "moonIntensity"],
["function", "moonPhase"],
["function", "morale"],
["function", "move"],
["function", "move3DENCamera"],
["function", "moveInAny"],
["function", "moveInCargo"],
["function", "moveInCommander"],
["function", "moveInDriver"],
["function", "moveInGunner"],
["function", "moveInTurret"],
["function", "moveObjectToEnd"],
["function", "moveOut"],
["function", "moveTime"],
["function", "moveTo"],
["function", "moveToCompleted"],
["function", "moveToFailed"],
["function", "musicVolume"],
["function", "name"],
["function", "nameSound"],
["function", "nearEntities"],
["function", "nearestBuilding"],
["function", "nearestLocation"],
["function", "nearestLocations"],
["function", "nearestLocationWithDubbing"],
["function", "nearestObject"],
["function", "nearestObjects"],
["function", "nearestTerrainObjects"],
["function", "nearObjects"],
["function", "nearObjectsReady"],
["function", "nearRoads"],
["function", "nearSupplies"],
["function", "nearTargets"],
["function", "needReload"],
["function", "netId"],
["function", "netObjNull"],
["function", "newOverlay"],
["function", "nextMenuItemIndex"],
["function", "nextWeatherChange"],
["function", "nMenuItems"],
["function", "numberOfEnginesRTD"],
["function", "numberToDate"],
["function", "objectCurators"],
["function", "objectFromNetId"],
["function", "objectParent"],
["function", "objNull"],
["function", "objStatus"],
["function", "onBriefingGear"],
["function", "onBriefingGroup"],
["function", "onBriefingNotes"],
["function", "onBriefingPlan"],
["function", "onBriefingTeamSwitch"],
["function", "onCommandModeChanged"],
["function", "onDoubleClick"],
["function", "onEachFrame"],
["function", "onGroupIconClick"],
["function", "onGroupIconOverEnter"],
["function", "onGroupIconOverLeave"],
["function", "onHCGroupSelectionChanged"],
["function", "onMapSingleClick"],
["function", "onPlayerConnected"],
["function", "onPlayerDisconnected"],
["function", "onPreloadFinished"],
["function", "onPreloadStarted"],
["function", "onShowNewObject"],
["function", "onTeamSwitch"],
["function", "openCuratorInterface"],
["function", "openDLCPage"],
["function", "openDSInterface"],
["function", "openMap"],
["function", "openSteamApp"],
["function", "openYoutubeVideo"],
["function", "opfor"],
["function", "orderGetIn"],
["function", "overcast"],
["function", "overcastForecast"],
["function", "owner"],
["function", "param"],
["function", "params"],
["function", "parseNumber"],
["function", "parseSimpleArray"],
["function", "parseText"],
["function", "parsingNamespace"],
["function", "particlesQuality"],
["function", "pi"],
["function", "pickWeaponPool"],
["function", "pitch"],
["function", "pixelGrid"],
["function", "pixelGridBase"],
["function", "pixelGridNoUIScale"],
["function", "pixelH"],
["function", "pixelW"],
["function", "playableSlotsNumber"],
["function", "playableUnits"],
["function", "playAction"],
["function", "playActionNow"],
["function", "player"],
["function", "playerRespawnTime"],
["function", "playerSide"],
["function", "playersNumber"],
["function", "playGesture"],
["function", "playMission"],
["function", "playMove"],
["function", "playMoveNow"],
["function", "playMusic"],
["function", "playScriptedMission"],
["function", "playSound"],
["function", "playSound3D"],
["function", "position"],
["function", "positionCameraToWorld"],
["function", "posScreenToWorld"],
["function", "posWorldToScreen"],
["function", "ppEffectAdjust"],
["function", "ppEffectCommit"],
["function", "ppEffectCommitted"],
["function", "ppEffectCreate"],
["function", "ppEffectDestroy"],
["function", "ppEffectEnable"],
["function", "ppEffectEnabled"],
["function", "ppEffectForceInNVG"],
["function", "precision"],
["function", "preloadCamera"],
["function", "preloadObject"],
["function", "preloadSound"],
["function", "preloadTitleObj"],
["function", "preloadTitleRsc"],
["function", "primaryWeapon"],
["function", "primaryWeaponItems"],
["function", "primaryWeaponMagazine"],
["function", "priority"],
["function", "processDiaryLink"],
["function", "processInitCommands"],
["function", "productVersion"],
["function", "profileName"],
["function", "profileNamespace"],
["function", "profileNameSteam"],
["function", "progressLoadingScreen"],
["function", "progressPosition"],
["function", "progressSetPosition"],
["function", "publicVariable"],
["function", "publicVariableClient"],
["function", "publicVariableServer"],
["function", "pushBack"],
["function", "pushBackUnique"],
["function", "putWeaponPool"],
["function", "queryItemsPool"],
["function", "queryMagazinePool"],
["function", "queryWeaponPool"],
["function", "rad"],
["function", "radioChannelAdd"],
["function", "radioChannelCreate"],
["function", "radioChannelRemove"],
["function", "radioChannelSetCallSign"],
["function", "radioChannelSetLabel"],
["function", "radioVolume"],
["function", "rain"],
["function", "rainbow"],
["function", "random"],
["function", "rank"],
["function", "rankId"],
["function", "rating"],
["function", "rectangular"],
["function", "registeredTasks"],
["function", "registerTask"],
["function", "reload"],
["function", "reloadEnabled"],
["function", "remoteControl"],
["function", "remoteExec"],
["function", "remoteExecCall"],
["function", "remoteExecutedOwner"],
["function", "remove3DENConnection"],
["function", "remove3DENEventHandler"],
["function", "remove3DENLayer"],
["function", "removeAction"],
["function", "removeAll3DENEventHandlers"],
["function", "removeAllActions"],
["function", "removeAllAssignedItems"],
["function", "removeAllContainers"],
["function", "removeAllCuratorAddons"],
["function", "removeAllCuratorCameraAreas"],
["function", "removeAllCuratorEditingAreas"],
["function", "removeAllEventHandlers"],
["function", "removeAllHandgunItems"],
["function", "removeAllItems"],
["function", "removeAllItemsWithMagazines"],
["function", "removeAllMissionEventHandlers"],
["function", "removeAllMPEventHandlers"],
["function", "removeAllMusicEventHandlers"],
["function", "removeAllOwnedMines"],
["function", "removeAllPrimaryWeaponItems"],
["function", "removeAllWeapons"],
["function", "removeBackpack"],
["function", "removeBackpackGlobal"],
["function", "removeCuratorAddons"],
["function", "removeCuratorCameraArea"],
["function", "removeCuratorEditableObjects"],
["function", "removeCuratorEditingArea"],
["function", "removeDrawIcon"],
["function", "removeDrawLinks"],
["function", "removeEventHandler"],
["function", "removeFromRemainsCollector"],
["function", "removeGoggles"],
["function", "removeGroupIcon"],
["function", "removeHandgunItem"],
["function", "removeHeadgear"],
["function", "removeItem"],
["function", "removeItemFromBackpack"],
["function", "removeItemFromUniform"],
["function", "removeItemFromVest"],
["function", "removeItems"],
["function", "removeMagazine"],
["function", "removeMagazineGlobal"],
["function", "removeMagazines"],
["function", "removeMagazinesTurret"],
["function", "removeMagazineTurret"],
["function", "removeMenuItem"],
["function", "removeMissionEventHandler"],
["function", "removeMPEventHandler"],
["function", "removeMusicEventHandler"],
["function", "removeOwnedMine"],
["function", "removePrimaryWeaponItem"],
["function", "removeSecondaryWeaponItem"],
["function", "removeSimpleTask"],
["function", "removeSwitchableUnit"],
["function", "removeTeamMember"],
["function", "removeUniform"],
["function", "removeVest"],
["function", "removeWeapon"],
["function", "removeWeaponAttachmentCargo"],
["function", "removeWeaponCargo"],
["function", "removeWeaponGlobal"],
["function", "removeWeaponTurret"],
["function", "reportRemoteTarget"],
["function", "requiredVersion"],
["function", "resetCamShake"],
["function", "resetSubgroupDirection"],
["function", "resistance"],
["function", "resize"],
["function", "resources"],
["function", "respawnVehicle"],
["function", "restartEditorCamera"],
["function", "reveal"],
["function", "revealMine"],
["function", "reverse"],
["function", "reversedMouseY"],
["function", "roadAt"],
["function", "roadsConnectedTo"],
["function", "roleDescription"],
["function", "ropeAttachedObjects"],
["function", "ropeAttachedTo"],
["function", "ropeAttachEnabled"],
["function", "ropeAttachTo"],
["function", "ropeCreate"],
["function", "ropeCut"],
["function", "ropeDestroy"],
["function", "ropeDetach"],
["function", "ropeEndPosition"],
["function", "ropeLength"],
["function", "ropes"],
["function", "ropeUnwind"],
["function", "ropeUnwound"],
["function", "rotorsForcesRTD"],
["function", "rotorsRpmRTD"],
["function", "round"],
["function", "runInitScript"],
["function", "safeZoneH"],
["function", "safeZoneW"],
["function", "safeZoneWAbs"],
["function", "safeZoneX"],
["function", "safeZoneXAbs"],
["function", "safeZoneY"],
["function", "save3DENInventory"],
["function", "saveGame"],
["function", "saveIdentity"],
["function", "saveJoysticks"],
["function", "saveOverlay"],
["function", "saveProfileNamespace"],
["function", "saveStatus"],
["function", "saveVar"],
["function", "savingEnabled"],
["function", "say"],
["function", "say2D"],
["function", "say3D"],
["function", "score"],
["function", "scoreSide"],
["function", "screenshot"],
["function", "screenToWorld"],
["function", "scriptDone"],
["function", "scriptName"],
["function", "scriptNull"],
["function", "scudState"],
["function", "secondaryWeapon"],
["function", "secondaryWeaponItems"],
["function", "secondaryWeaponMagazine"],
["function", "select"],
["function", "selectBestPlaces"],
["function", "selectDiarySubject"],
["function", "selectedEditorObjects"],
["function", "selectEditorObject"],
["function", "selectionNames"],
["function", "selectionPosition"],
["function", "selectLeader"],
["function", "selectMax"],
["function", "selectMin"],
["function", "selectNoPlayer"],
["function", "selectPlayer"],
["function", "selectRandom"],
["function", "selectRandomWeighted"],
["function", "selectWeapon"],
["function", "selectWeaponTurret"],
["function", "sendAUMessage"],
["function", "sendSimpleCommand"],
["function", "sendTask"],
["function", "sendTaskResult"],
["function", "sendUDPMessage"],
["function", "serverCommand"],
["function", "serverCommandAvailable"],
["function", "serverCommandExecutable"],
["function", "serverName"],
["function", "serverTime"],
["function", "set"],
["function", "set3DENAttribute"],
["function", "set3DENAttributes"],
["function", "set3DENGrid"],
["function", "set3DENIconsVisible"],
["function", "set3DENLayer"],
["function", "set3DENLinesVisible"],
["function", "set3DENLogicType"],
["function", "set3DENMissionAttribute"],
["function", "set3DENMissionAttributes"],
["function", "set3DENModelsVisible"],
["function", "set3DENObjectType"],
["function", "set3DENSelected"],
["function", "setAccTime"],
["function", "setActualCollectiveRTD"],
["function", "setAirplaneThrottle"],
["function", "setAirportSide"],
["function", "setAmmo"],
["function", "setAmmoCargo"],
["function", "setAmmoOnPylon"],
["function", "setAnimSpeedCoef"],
["function", "setAperture"],
["function", "setApertureNew"],
["function", "setArmoryPoints"],
["function", "setAttributes"],
["function", "setAutonomous"],
["function", "setBehaviour"],
["function", "setBleedingRemaining"],
["function", "setBrakesRTD"],
["function", "setCameraInterest"],
["function", "setCamShakeDefParams"],
["function", "setCamShakeParams"],
["function", "setCamUseTI"],
["function", "setCaptive"],
["function", "setCenterOfMass"],
["function", "setCollisionLight"],
["function", "setCombatMode"],
["function", "setCompassOscillation"],
["function", "setConvoySeparation"],
["function", "setCuratorCameraAreaCeiling"],
["function", "setCuratorCoef"],
["function", "setCuratorEditingAreaType"],
["function", "setCuratorWaypointCost"],
["function", "setCurrentChannel"],
["function", "setCurrentTask"],
["function", "setCurrentWaypoint"],
["function", "setCustomAimCoef"],
["function", "setCustomWeightRTD"],
["function", "setDamage"],
["function", "setDammage"],
["function", "setDate"],
["function", "setDebriefingText"],
["function", "setDefaultCamera"],
["function", "setDestination"],
["function", "setDetailMapBlendPars"],
["function", "setDir"],
["function", "setDirection"],
["function", "setDrawIcon"],
["function", "setDriveOnPath"],
["function", "setDropInterval"],
["function", "setDynamicSimulationDistance"],
["function", "setDynamicSimulationDistanceCoef"],
["function", "setEditorMode"],
["function", "setEditorObjectScope"],
["function", "setEffectCondition"],
["function", "setEngineRpmRTD"],
["function", "setFace"],
["function", "setFaceAnimation"],
["function", "setFatigue"],
["function", "setFeatureType"],
["function", "setFlagAnimationPhase"],
["function", "setFlagOwner"],
["function", "setFlagSide"],
["function", "setFlagTexture"],
["function", "setFog"],
["function", "setForceGeneratorRTD"],
["function", "setFormation"],
["function", "setFormationTask"],
["function", "setFormDir"],
["function", "setFriend"],
["function", "setFromEditor"],
["function", "setFSMVariable"],
["function", "setFuel"],
["function", "setFuelCargo"],
["function", "setGroupIcon"],
["function", "setGroupIconParams"],
["function", "setGroupIconsSelectable"],
["function", "setGroupIconsVisible"],
["function", "setGroupId"],
["function", "setGroupIdGlobal"],
["function", "setGroupOwner"],
["function", "setGusts"],
["function", "setHideBehind"],
["function", "setHit"],
["function", "setHitIndex"],
["function", "setHitPointDamage"],
["function", "setHorizonParallaxCoef"],
["function", "setHUDMovementLevels"],
["function", "setIdentity"],
["function", "setImportance"],
["function", "setInfoPanel"],
["function", "setLeader"],
["function", "setLightAmbient"],
["function", "setLightAttenuation"],
["function", "setLightBrightness"],
["function", "setLightColor"],
["function", "setLightDayLight"],
["function", "setLightFlareMaxDistance"],
["function", "setLightFlareSize"],
["function", "setLightIntensity"],
["function", "setLightnings"],
["function", "setLightUseFlare"],
["function", "setLocalWindParams"],
["function", "setMagazineTurretAmmo"],
["function", "setMarkerAlpha"],
["function", "setMarkerAlphaLocal"],
["function", "setMarkerBrush"],
["function", "setMarkerBrushLocal"],
["function", "setMarkerColor"],
["function", "setMarkerColorLocal"],
["function", "setMarkerDir"],
["function", "setMarkerDirLocal"],
["function", "setMarkerPos"],
["function", "setMarkerPosLocal"],
["function", "setMarkerShape"],
["function", "setMarkerShapeLocal"],
["function", "setMarkerSize"],
["function", "setMarkerSizeLocal"],
["function", "setMarkerText"],
["function", "setMarkerTextLocal"],
["function", "setMarkerType"],
["function", "setMarkerTypeLocal"],
["function", "setMass"],
["function", "setMimic"],
["function", "setMousePosition"],
["function", "setMusicEffect"],
["function", "setMusicEventHandler"],
["function", "setName"],
["function", "setNameSound"],
["function", "setObjectArguments"],
["function", "setObjectMaterial"],
["function", "setObjectMaterialGlobal"],
["function", "setObjectProxy"],
["function", "setObjectTexture"],
["function", "setObjectTextureGlobal"],
["function", "setObjectViewDistance"],
["function", "setOvercast"],
["function", "setOwner"],
["function", "setOxygenRemaining"],
["function", "setParticleCircle"],
["function", "setParticleClass"],
["function", "setParticleFire"],
["function", "setParticleParams"],
["function", "setParticleRandom"],
["function", "setPilotCameraDirection"],
["function", "setPilotCameraRotation"],
["function", "setPilotCameraTarget"],
["function", "setPilotLight"],
["function", "setPiPEffect"],
["function", "setPitch"],
["function", "setPlateNumber"],
["function", "setPlayable"],
["function", "setPlayerRespawnTime"],
["function", "setPos"],
["function", "setPosASL"],
["function", "setPosASL2"],
["function", "setPosASLW"],
["function", "setPosATL"],
["function", "setPosition"],
["function", "setPosWorld"],
["function", "setPylonLoadOut"],
["function", "setPylonsPriority"],
["function", "setRadioMsg"],
["function", "setRain"],
["function", "setRainbow"],
["function", "setRandomLip"],
["function", "setRank"],
["function", "setRectangular"],
["function", "setRepairCargo"],
["function", "setRotorBrakeRTD"],
["function", "setShadowDistance"],
["function", "setShotParents"],
["function", "setSide"],
["function", "setSimpleTaskAlwaysVisible"],
["function", "setSimpleTaskCustomData"],
["function", "setSimpleTaskDescription"],
["function", "setSimpleTaskDestination"],
["function", "setSimpleTaskTarget"],
["function", "setSimpleTaskType"],
["function", "setSimulWeatherLayers"],
["function", "setSize"],
["function", "setSkill"],
["function", "setSlingLoad"],
["function", "setSoundEffect"],
["function", "setSpeaker"],
["function", "setSpeech"],
["function", "setSpeedMode"],
["function", "setStamina"],
["function", "setStaminaScheme"],
["function", "setStatValue"],
["function", "setSuppression"],
["function", "setSystemOfUnits"],
["function", "setTargetAge"],
["function", "setTaskMarkerOffset"],
["function", "setTaskResult"],
["function", "setTaskState"],
["function", "setTerrainGrid"],
["function", "setText"],
["function", "setTimeMultiplier"],
["function", "setTitleEffect"],
["function", "setToneMapping"],
["function", "setToneMappingParams"],
["function", "setTrafficDensity"],
["function", "setTrafficDistance"],
["function", "setTrafficGap"],
["function", "setTrafficSpeed"],
["function", "setTriggerActivation"],
["function", "setTriggerArea"],
["function", "setTriggerStatements"],
["function", "setTriggerText"],
["function", "setTriggerTimeout"],
["function", "setTriggerType"],
["function", "setType"],
["function", "setUnconscious"],
["function", "setUnitAbility"],
["function", "setUnitLoadout"],
["function", "setUnitPos"],
["function", "setUnitPosWeak"],
["function", "setUnitRank"],
["function", "setUnitRecoilCoefficient"],
["function", "setUnitTrait"],
["function", "setUnloadInCombat"],
["function", "setUserActionText"],
["function", "setUserMFDText"],
["function", "setUserMFDValue"],
["function", "setVariable"],
["function", "setVectorDir"],
["function", "setVectorDirAndUp"],
["function", "setVectorUp"],
["function", "setVehicleAmmo"],
["function", "setVehicleAmmoDef"],
["function", "setVehicleArmor"],
["function", "setVehicleCargo"],
["function", "setVehicleId"],
["function", "setVehicleInit"],
["function", "setVehicleLock"],
["function", "setVehiclePosition"],
["function", "setVehicleRadar"],
["function", "setVehicleReceiveRemoteTargets"],
["function", "setVehicleReportOwnPosition"],
["function", "setVehicleReportRemoteTargets"],
["function", "setVehicleTIPars"],
["function", "setVehicleVarName"],
["function", "setVelocity"],
["function", "setVelocityModelSpace"],
["function", "setVelocityTransformation"],
["function", "setViewDistance"],
["function", "setVisibleIfTreeCollapsed"],
["function", "setWantedRpmRTD"],
["function", "setWaves"],
["function", "setWaypointBehaviour"],
["function", "setWaypointCombatMode"],
["function", "setWaypointCompletionRadius"],
["function", "setWaypointDescription"],
["function", "setWaypointForceBehaviour"],
["function", "setWaypointFormation"],
["function", "setWaypointHousePosition"],
["function", "setWaypointLoiterRadius"],
["function", "setWaypointLoiterType"],
["function", "setWaypointName"],
["function", "setWaypointPosition"],
["function", "setWaypointScript"],
["function", "setWaypointSpeed"],
["function", "setWaypointStatements"],
["function", "setWaypointTimeout"],
["function", "setWaypointType"],
["function", "setWaypointVisible"],
["function", "setWeaponReloadingTime"],
["function", "setWind"],
["function", "setWindDir"],
["function", "setWindForce"],
["function", "setWindStr"],
["function", "setWingForceScaleRTD"],
["function", "setWPPos"],
["function", "show3DIcons"],
["function", "showChat"],
["function", "showCinemaBorder"],
["function", "showCommandingMenu"],
["function", "showCompass"],
["function", "showCuratorCompass"],
["function", "showGPS"],
["function", "showHUD"],
["function", "showLegend"],
["function", "showMap"],
["function", "shownArtilleryComputer"],
["function", "shownChat"],
["function", "shownCompass"],
["function", "shownCuratorCompass"],
["function", "showNewEditorObject"],
["function", "shownGPS"],
["function", "shownHUD"],
["function", "shownMap"],
["function", "shownPad"],
["function", "shownRadio"],
["function", "shownScoretable"],
["function", "shownUAVFeed"],
["function", "shownWarrant"],
["function", "shownWatch"],
["function", "showPad"],
["function", "showRadio"],
["function", "showScoretable"],
["function", "showSubtitles"],
["function", "showUAVFeed"],
["function", "showWarrant"],
["function", "showWatch"],
["function", "showWaypoint"],
["function", "showWaypoints"],
["function", "side"],
["function", "sideAmbientLife"],
["function", "sideChat"],
["function", "sideEmpty"],
["function", "sideEnemy"],
["function", "sideFriendly"],
["function", "sideLogic"],
["function", "sideRadio"],
["function", "sideUnknown"],
["function", "simpleTasks"],
["function", "simulationEnabled"],
["function", "simulCloudDensity"],
["function", "simulCloudOcclusion"],
["function", "simulInClouds"],
["function", "simulWeatherSync"],
["function", "sin"],
["function", "size"],
["function", "sizeOf"],
["function", "skill"],
["function", "skillFinal"],
["function", "skipTime"],
["function", "sleep"],
["function", "sliderPosition"],
["function", "sliderRange"],
["function", "sliderSetPosition"],
["function", "sliderSetRange"],
["function", "sliderSetSpeed"],
["function", "sliderSpeed"],
["function", "slingLoadAssistantShown"],
["function", "soldierMagazines"],
["function", "someAmmo"],
["function", "sort"],
["function", "soundVolume"],
["function", "speaker"],
["function", "speed"],
["function", "speedMode"],
["function", "splitString"],
["function", "sqrt"],
["function", "squadParams"],
["function", "stance"],
["function", "startLoadingScreen"],
["function", "stop"],
["function", "stopEngineRTD"],
["function", "stopped"],
["function", "str"],
["function", "sunOrMoon"],
["function", "supportInfo"],
["function", "suppressFor"],
["function", "surfaceIsWater"],
["function", "surfaceNormal"],
["function", "surfaceType"],
["function", "swimInDepth"],
["function", "switchableUnits"],
["function", "switchAction"],
["function", "switchCamera"],
["function", "switchGesture"],
["function", "switchLight"],
["function", "switchMove"],
["function", "synchronizedObjects"],
["function", "synchronizedTriggers"],
["function", "synchronizedWaypoints"],
["function", "synchronizeObjectsAdd"],
["function", "synchronizeObjectsRemove"],
["function", "synchronizeTrigger"],
["function", "synchronizeWaypoint"],
["function", "systemChat"],
["function", "systemOfUnits"],
["function", "tan"],
["function", "targetKnowledge"],
["function", "targets"],
["function", "targetsAggregate"],
["function", "targetsQuery"],
["function", "taskAlwaysVisible"],
["function", "taskChildren"],
["function", "taskCompleted"],
["function", "taskCustomData"],
["function", "taskDescription"],
["function", "taskDestination"],
["function", "taskHint"],
["function", "taskMarkerOffset"],
["function", "taskNull"],
["function", "taskParent"],
["function", "taskResult"],
["function", "taskState"],
["function", "taskType"],
["function", "teamMember"],
["function", "teamMemberNull"],
["function", "teamName"],
["function", "teams"],
["function", "teamSwitch"],
["function", "teamSwitchEnabled"],
["function", "teamType"],
["function", "terminate"],
["function", "terrainIntersect"],
["function", "terrainIntersectASL"],
["function", "terrainIntersectAtASL"],
["function", "text"],
["function", "textLog"],
["function", "textLogFormat"],
["function", "tg"],
["function", "time"],
["function", "timeMultiplier"],
["function", "titleCut"],
["function", "titleFadeOut"],
["function", "titleObj"],
["function", "titleRsc"],
["function", "titleText"],
["function", "toArray"],
["function", "toFixed"],
["function", "toLower"],
["function", "toString"],
["function", "toUpper"],
["function", "triggerActivated"],
["function", "triggerActivation"],
["function", "triggerArea"],
["function", "triggerAttachedVehicle"],
["function", "triggerAttachObject"],
["function", "triggerAttachVehicle"],
["function", "triggerDynamicSimulation"],
["function", "triggerStatements"],
["function", "triggerText"],
["function", "triggerTimeout"],
["function", "triggerTimeoutCurrent"],
["function", "triggerType"],
["function", "turretLocal"],
["function", "turretOwner"],
["function", "turretUnit"],
["function", "tvAdd"],
["function", "tvClear"],
["function", "tvCollapse"],
["function", "tvCollapseAll"],
["function", "tvCount"],
["function", "tvCurSel"],
["function", "tvData"],
["function", "tvDelete"],
["function", "tvExpand"],
["function", "tvExpandAll"],
["function", "tvPicture"],
["function", "tvPictureRight"],
["function", "tvSetColor"],
["function", "tvSetCurSel"],
["function", "tvSetData"],
["function", "tvSetPicture"],
["function", "tvSetPictureColor"],
["function", "tvSetPictureColorDisabled"],
["function", "tvSetPictureColorSelected"],
["function", "tvSetPictureRight"],
["function", "tvSetPictureRightColor"],
["function", "tvSetPictureRightColorDisabled"],
["function", "tvSetPictureRightColorSelected"],
["function", "tvSetSelectColor"],
["function", "tvSetText"],
["function", "tvSetTooltip"],
["function", "tvSetValue"],
["function", "tvSort"],
["function", "tvSortByValue"],
["function", "tvText"],
["function", "tvTooltip"],
["function", "tvValue"],
["function", "type"],
["function", "typeName"],
["function", "typeOf"],
["function", "UAVControl"],
["function", "uiNamespace"],
["function", "uiSleep"],
["function", "unassignCurator"],
["function", "unassignItem"],
["function", "unassignTeam"],
["function", "unassignVehicle"],
["function", "underwater"],
["function", "uniform"],
["function", "uniformContainer"],
["function", "uniformItems"],
["function", "uniformMagazines"],
["function", "unitAddons"],
["function", "unitAimPosition"],
["function", "unitAimPositionVisual"],
["function", "unitBackpack"],
["function", "unitIsUAV"],
["function", "unitPos"],
["function", "unitReady"],
["function", "unitRecoilCoefficient"],
["function", "units"],
["function", "unitsBelowHeight"],
["function", "unlinkItem"],
["function", "unlockAchievement"],
["function", "unregisterTask"],
["function", "updateDrawIcon"],
["function", "updateMenuItem"],
["function", "updateObjectTree"],
["function", "useAIOperMapObstructionTest"],
["function", "useAISteeringComponent"],
["function", "useAudioTimeForMoves"],
["function", "userInputDisabled"],
["function", "vectorAdd"],
["function", "vectorCos"],
["function", "vectorCrossProduct"],
["function", "vectorDiff"],
["function", "vectorDir"],
["function", "vectorDirVisual"],
["function", "vectorDistance"],
["function", "vectorDistanceSqr"],
["function", "vectorDotProduct"],
["function", "vectorFromTo"],
["function", "vectorMagnitude"],
["function", "vectorMagnitudeSqr"],
["function", "vectorModelToWorld"],
["function", "vectorModelToWorldVisual"],
["function", "vectorMultiply"],
["function", "vectorNormalized"],
["function", "vectorUp"],
["function", "vectorUpVisual"],
["function", "vectorWorldToModel"],
["function", "vectorWorldToModelVisual"],
["function", "vehicle"],
["function", "vehicleCargoEnabled"],
["function", "vehicleChat"],
["function", "vehicleRadio"],
["function", "vehicleReceiveRemoteTargets"],
["function", "vehicleReportOwnPosition"],
["function", "vehicleReportRemoteTargets"],
["function", "vehicles"],
["function", "vehicleVarName"],
["function", "velocity"],
["function", "velocityModelSpace"],
["function", "verifySignature"],
["function", "vest"],
["function", "vestContainer"],
["function", "vestItems"],
["function", "vestMagazines"],
["function", "viewDistance"],
["function", "visibleCompass"],
["function", "visibleGPS"],
["function", "visibleMap"],
["function", "visiblePosition"],
["function", "visiblePositionASL"],
["function", "visibleScoretable"],
["function", "visibleWatch"],
["function", "waitUntil"],
["function", "waves"],
["function", "waypointAttachedObject"],
["function", "waypointAttachedVehicle"],
["function", "waypointAttachObject"],
["function", "waypointAttachVehicle"],
["function", "waypointBehaviour"],
["function", "waypointCombatMode"],
["function", "waypointCompletionRadius"],
["function", "waypointDescription"],
["function", "waypointForceBehaviour"],
["function", "waypointFormation"],
["function", "waypointHousePosition"],
["function", "waypointLoiterRadius"],
["function", "waypointLoiterType"],
["function", "waypointName"],
["function", "waypointPosition"],
["function", "waypoints"],
["function", "waypointScript"],
["function", "waypointsEnabledUAV"],
["function", "waypointShow"],
["function", "waypointSpeed"],
["function", "waypointStatements"],
["function", "waypointTimeout"],
["function", "waypointTimeoutCurrent"],
["function", "waypointType"],
["function", "waypointVisible"],
["function", "weaponAccessories"],
["function", "weaponAccessoriesCargo"],
["function", "weaponCargo"],
["function", "weaponDirection"],
["function", "weaponInertia"],
["function", "weaponLowered"],
["function", "weapons"],
["function", "weaponsItems"],
["function", "weaponsItemsCargo"],
["function", "weaponState"],
["function", "weaponsTurret"],
["function", "weightRTD"],
["function", "west"],
["function", "WFSideText"],
["function", "wind"],
["function", "windDir"],
["function", "windRTD"],
["function", "windStr"],
["function", "wingsForcesRTD"],
["function", "worldName"],
["function", "worldSize"],
["function", "worldToModel"],
["function", "worldToModelVisual"],
["function", "worldToScreen"]
]
================================================
FILE: tests/languages/sqf/keyword_feature.test
================================================
breakOut
breakTo
call
case
catch
default
do
echo
else
execVM
execFSM
exitWith
for
forEach
forEachMember
forEachMemberAgent
forEachMemberTeam
from
goto
if
nil
preprocessFile
preprocessFileLineNumbers
private
scopeName
spawn
step
switch
then
throw
to
try
while
with
----------------------------------------------------
[
["keyword", "breakOut"],
["keyword", "breakTo"],
["keyword", "call"],
["keyword", "case"],
["keyword", "catch"],
["keyword", "default"],
["keyword", "do"],
["keyword", "echo"],
["keyword", "else"],
["keyword", "execVM"],
["keyword", "execFSM"],
["keyword", "exitWith"],
["keyword", "for"],
["keyword", "forEach"],
["keyword", "forEachMember"],
["keyword", "forEachMemberAgent"],
["keyword", "forEachMemberTeam"],
["keyword", "from"],
["keyword", "goto"],
["keyword", "if"],
["keyword", "nil"],
["keyword", "preprocessFile"],
["keyword", "preprocessFileLineNumbers"],
["keyword", "private"],
["keyword", "scopeName"],
["keyword", "spawn"],
["keyword", "step"],
["keyword", "switch"],
["keyword", "then"],
["keyword", "throw"],
["keyword", "to"],
["keyword", "try"],
["keyword", "while"],
["keyword", "with"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/sqf/macro_feature.test
================================================
#define FOO 3
#define HINTARG(ARG) hint ("Passed argument: " + str ARG)
#define DRAWBUTTON(NAME)\
__EXEC(idcNav = idcNav + 4)
#undef NAME
#ifdef NAME
#ifndef NAME
#else
#endif
#include "file.hpp"
#include // Brackets are equivalent to quotation marks and may be used in their place.
----------------------------------------------------
[
["macro", [
["directive", "#define"],
" FOO 3"
]],
["macro", [
["directive", "#define"],
" HINTARG(ARG) hint (\"Passed argument: \" + str ARG)"
]],
["macro", [
["directive", "#define"],
" DRAWBUTTON(NAME)\\\r\n\t__EXEC(idcNav = idcNav + 4)"
]],
["macro", [
["directive", "#undef"],
" NAME"
]],
["macro", [
["directive", "#ifdef"],
" NAME"
]],
["macro", [
["directive", "#ifndef"],
" NAME"
]],
["macro", [
["directive", "#else"]
]],
["macro", [
["directive", "#endif"]
]],
["macro", [
["directive", "#include"],
" \"file.hpp\""
]],
["macro", [
["directive", "#include"],
" ",
["comment", "// Brackets are equivalent to quotation marks and may be used in their place."]
]]
]
----------------------------------------------------
Checks for macros.
================================================
FILE: tests/languages/sqf/magic-variable_feature.test
================================================
_exception
_fnc_scriptName
_fnc_scriptNameParent
_forEachIndex
_this
_thisEventHandler
_thisFSM
_thisScript
_x
this
thisList
thisTrigger
----------------------------------------------------
[
["magic-variable", "_exception"],
["magic-variable", "_fnc_scriptName"],
["magic-variable", "_fnc_scriptNameParent"],
["magic-variable", "_forEachIndex"],
["magic-variable", "_this"],
["magic-variable", "_thisEventHandler"],
["magic-variable", "_thisFSM"],
["magic-variable", "_thisScript"],
["magic-variable", "_x"],
["magic-variable", "this"],
["magic-variable", "thisList"],
["magic-variable", "thisTrigger"]
]
----------------------------------------------------
Checks for magic variables.
================================================
FILE: tests/languages/sqf/number_feature.test
================================================
5.197
0.47
16.0
.8314
12345
1.23E4
5e-2
0xa5
$5C
$FFFFFF
0x123ABC
----------------------------------------------------
[
["number", "5.197"],
["number", "0.47"],
["number", "16.0"],
["number", ".8314"],
["number", "12345"],
["number", "1.23E4"],
["number", "5e-2"],
["number", "0xa5"],
["number", "$5C"],
["number", "$FFFFFF"],
["number", "0x123ABC"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/sqf/operator_feature.test
================================================
+ - * / % ^ #
!= == >= <= > <
! && ||
=
>> ##
mod
and or not
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "^"],
["operator", "#"],
["operator", "!="],
["operator", "=="],
["operator", ">="],
["operator", "<="],
["operator", ">"],
["operator", "<"],
["operator", "!"],
["operator", "&&"],
["operator", "||"],
["operator", "="],
["operator", ">>"],
["operator", "##"],
["operator", "mod"],
["operator", "and"],
["operator", "or"],
["operator", "not"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/sqf/string_feature.test
================================================
"foo"
"foo""bar"
"foo
bar"
'foo'
'foo
bar'
----------------------------------------------------
[
["string", "\"foo\""],
["string", "\"foo\"\"bar\""],
["string", "\"foo\r\nbar\""],
["string", "'foo'"],
["string", "'foo\r\nbar'"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/sql/boolean_feature.test
================================================
TRUE
FALSE
NULL
----------------------------------------------------
[
["boolean", "TRUE"],
["boolean", "FALSE"],
["boolean", "NULL"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/sql/comment_feature.test
================================================
/**/
/* foo
bar */
--
-- foo
//
// foo
#
# foo
----------------------------------------------------
[
["comment", "/**/"],
["comment", "/* foo\r\nbar */"],
["comment", "--"],
["comment", "-- foo"],
["comment", "//"],
["comment", "// foo"],
["comment", "#"],
["comment", "# foo"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/sql/function_feature.test
================================================
AVG (
COUNT(
FIRST(
FORMAT(
LAST(
LCASE(
LEN(
MAX(
MID(
MIN(
MOD(
NOW(
ROUND(
SUM(
UCASE(
----------------------------------------------------
[
["function", "AVG"], ["punctuation", "("],
["function", "COUNT"], ["punctuation", "("],
["function", "FIRST"], ["punctuation", "("],
["function", "FORMAT"], ["punctuation", "("],
["function", "LAST"], ["punctuation", "("],
["function", "LCASE"], ["punctuation", "("],
["function", "LEN"], ["punctuation", "("],
["function", "MAX"], ["punctuation", "("],
["function", "MID"], ["punctuation", "("],
["function", "MIN"], ["punctuation", "("],
["function", "MOD"], ["punctuation", "("],
["function", "NOW"], ["punctuation", "("],
["function", "ROUND"], ["punctuation", "("],
["function", "SUM"], ["punctuation", "("],
["function", "UCASE"], ["punctuation", "("]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/sql/identifier_feature.test
================================================
`5Customers`
`tableName~`
` SELECT `
foo.`GROUP`
`a``b`
----------------------------------------------------
[
["identifier", [
["punctuation", "`"],
"5Customers",
["punctuation", "`"]
]],
["identifier", [
["punctuation", "`"],
"tableName~",
["punctuation", "`"]
]],
["identifier", [
["punctuation", "`"],
" SELECT ",
["punctuation", "`"]
]],
"\r\nfoo",
["punctuation", "."],
["identifier", [
["punctuation", "`"],
"GROUP",
["punctuation", "`"]
]],
["identifier", [
["punctuation", "`"],
"a``b",
["punctuation", "`"]
]]
]
================================================
FILE: tests/languages/sql/issue3140.test
================================================
select
`t`.`col1`, `t`.`col2`, `t`.`col3`, `t`.`col4`
from
`test_table` as `t`
----------------------------------------------------
[
["keyword", "select"],
["identifier", [
["punctuation", "`"],
"t",
["punctuation", "`"]
]],
["punctuation", "."],
["identifier", [
["punctuation", "`"],
"col1",
["punctuation", "`"]
]],
["punctuation", ","],
["identifier", [
["punctuation", "`"],
"t",
["punctuation", "`"]
]],
["punctuation", "."],
["identifier", [
["punctuation", "`"],
"col2",
["punctuation", "`"]
]],
["punctuation", ","],
["identifier", [
["punctuation", "`"],
"t",
["punctuation", "`"]
]],
["punctuation", "."],
["identifier", [
["punctuation", "`"],
"col3",
["punctuation", "`"]
]],
["punctuation", ","],
["identifier", [
["punctuation", "`"],
"t",
["punctuation", "`"]
]],
["punctuation", "."],
["identifier", [
["punctuation", "`"],
"col4",
["punctuation", "`"]
]],
["keyword", "from"],
["identifier", [
["punctuation", "`"],
"test_table",
["punctuation", "`"]
]],
["keyword", "as"],
["identifier", [
["punctuation", "`"],
"t",
["punctuation", "`"]
]]
]
================================================
FILE: tests/languages/sql/keyword_feature.test
================================================
ACTION
ADD
AFTER
ALGORITHM
ALL
ALTER
ANALYZE
ANY
APPLY
AS
ASC
AUTHORIZATION
AUTO_INCREMENT
BACKUP
BDB
BEGIN
BERKELEYDB
BIGINT
BINARY
BIT
BLOB
BOOL
BOOLEAN
BREAK
BROWSE
BTREE
BULK
BY
CALL
CASCADE
CASCADED
CASE
CHAIN
CHAR
CHARACTER
CHARSET
CHECK
CHECKPOINT
CLOSE
CLUSTERED
COALESCE
COLLATE
COLUMN
COLUMNS
COMMENT
COMMIT
COMMITTED
COMPUTE
CONNECT
CONSISTENT
CONSTRAINT
CONTAINS
CONTAINSTABLE
CONTINUE
CONVERT
CREATE
CROSS
CURRENT
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_USER
CURSOR
CYCLE
DATA
DATABASE
DATABASES
DATE
DATETIME
DAY
DBCC
DEALLOCATE
DEC
DECIMAL
DECLARE
DEFAULT
DEFINER
DELAYED
DELETE
DELIMITER
DELIMITERS
DENY
DESC
DESCRIBE
DETERMINISTIC
DISABLE
DISCARD
DISK
DISTINCT
DISTINCTROW
DISTRIBUTED
DO
DOUBLE
DROP
DUMMY
DUMP
DUMPFILE
DUPLICATE
ELSE
ELSEIF
ENABLE
ENCLOSED
END
ENGINE
ENUM
ERRLVL
ERRORS
ESCAPE
ESCAPED
EXCEPT
EXEC
EXECUTE
EXISTS
EXIT
EXPLAIN
EXTENDED
FETCH
FIELDS
FILE
FILLFACTOR
FIRST
FIXED
FLOAT
FOLLOWING
FOR
FOR EACH ROW
FORCE
FOREIGN
FREETEXT
FREETEXTTABLE
FROM
FULL
FUNCTION
GEOMETRY
GEOMETRYCOLLECTION
GLOBAL
GOTO
GRANT
GROUP
HANDLER
HASH
HAVING
HOLDLOCK
HOUR
IDENTITY
IDENTITY_INSERT
IDENTITYCOL
IF
IGNORE
IMPORT
INDEX
INFILE
INNER
INNODB
INOUT
INSERT
INT
INTEGER
INTERSECT
INTERVAL
INTO
INVOKER
ISOLATION
ITERATE
JOIN
KEY
KEYS
KILL
LANGUAGE
LAST
LEAVE
LEFT
LEVEL
LIMIT
LINENO
LINES
LINESTRING
LOAD
LOCAL
LOCK
LONGBLOB
LONGTEXT
LOOP
MATCH
MATCHED
MEDIUMBLOB
MEDIUMINT
MEDIUMTEXT
MERGE
MIDDLEINT
MINUTE
MODE
MODIFIES
MODIFY
MONTH
MULTILINESTRING
MULTIPOINT
MULTIPOLYGON
NATIONAL
NATURAL
NCHAR
NEXT
NO
NONCLUSTERED
NULLIF
NUMERIC
OF
OFF
OFFSET
OFFSETS
ON
OPEN
OPENDATASOURCE
OPENQUERY
OPENROWSET
OPTIMIZE
OPTION
OPTIONALLY
ORDER
OUT
OUTER
OUTFILE
OVER
PARTIAL
PARTITION
PERCENT
PIVOT
PLAN
POINT
POLYGON
PRECEDING
PRECISION
PREPARE
PREV
PRIMARY
PRINT
PRIVILEGES
PROC
PROCEDURE
PUBLIC
PURGE
QUICK
RAISERROR
READ
READS
REAL
RECONFIGURE
REFERENCES
RELEASE
RENAME
REPEAT
REPEATABLE
REPLACE
REPLICATION
REQUIRE
RESIGNAL
RESTORE
RESTRICT
RETURN
RETURNS
RETURNING
REVOKE
RIGHT
ROLLBACK
ROUTINE
ROW
ROWCOUNT
ROWGUIDCOL
ROWS
RTREE
RULE
SAVE
SAVEPOINT
SCHEMA
SECOND
SELECT
SERIAL
SERIALIZABLE
SESSION
SESSION_USER
SET
SETUSER
SHARE
SHOW
SHUTDOWN
SIMPLE
SMALLINT
SNAPSHOT
SOME
SONAME
SQL
START
STARTING
STATISTICS
STATUS
STRIPED
SYSTEM_USER
TABLE
TABLES
TABLESPACE
TEMP
TEMPORARY
TEMPTABLE
TERMINATED
TEXT
TEXTSIZE
THEN
TIME
TIMESTAMP
TINYBLOB
TINYINT
TINYTEXT
TO
TOP
TRAN
TRANSACTION
TRANSACTIONS
TRIGGER
TRUNCATE
TSEQUAL
TYPE
TYPES
UNBOUNDED
UNCOMMITTED
UNDEFINED
UNION
UNIQUE
UNLOCK
UNPIVOT
UNSIGNED
UPDATE
UPDATETEXT
USAGE
USE
USER
USING
VALUE
VALUES
VARBINARY
VARCHAR
VARCHARACTER
VARYING
VIEW
WAITFOR
WARNINGS
WHEN
WHERE
WHILE
WITH
WITH ROLLUP
WITHIN
WORK
WRITE
WRITETEXT
YEAR
----------------------------------------------------
[
["keyword", "ACTION"],
["keyword", "ADD"],
["keyword", "AFTER"],
["keyword", "ALGORITHM"],
["keyword", "ALL"],
["keyword", "ALTER"],
["keyword", "ANALYZE"],
["keyword", "ANY"],
["keyword", "APPLY"],
["keyword", "AS"],
["keyword", "ASC"],
["keyword", "AUTHORIZATION"],
["keyword", "AUTO_INCREMENT"],
["keyword", "BACKUP"],
["keyword", "BDB"],
["keyword", "BEGIN"],
["keyword", "BERKELEYDB"],
["keyword", "BIGINT"],
["keyword", "BINARY"],
["keyword", "BIT"],
["keyword", "BLOB"],
["keyword", "BOOL"],
["keyword", "BOOLEAN"],
["keyword", "BREAK"],
["keyword", "BROWSE"],
["keyword", "BTREE"],
["keyword", "BULK"],
["keyword", "BY"],
["keyword", "CALL"],
["keyword", "CASCADE"],
["keyword", "CASCADED"],
["keyword", "CASE"],
["keyword", "CHAIN"],
["keyword", "CHAR"],
["keyword", "CHARACTER"],
["keyword", "CHARSET"],
["keyword", "CHECK"],
["keyword", "CHECKPOINT"],
["keyword", "CLOSE"],
["keyword", "CLUSTERED"],
["keyword", "COALESCE"],
["keyword", "COLLATE"],
["keyword", "COLUMN"],
["keyword", "COLUMNS"],
["keyword", "COMMENT"],
["keyword", "COMMIT"],
["keyword", "COMMITTED"],
["keyword", "COMPUTE"],
["keyword", "CONNECT"],
["keyword", "CONSISTENT"],
["keyword", "CONSTRAINT"],
["keyword", "CONTAINS"],
["keyword", "CONTAINSTABLE"],
["keyword", "CONTINUE"],
["keyword", "CONVERT"],
["keyword", "CREATE"],
["keyword", "CROSS"],
["keyword", "CURRENT"],
["keyword", "CURRENT_DATE"],
["keyword", "CURRENT_TIME"],
["keyword", "CURRENT_TIMESTAMP"],
["keyword", "CURRENT_USER"],
["keyword", "CURSOR"],
["keyword", "CYCLE"],
["keyword", "DATA"],
["keyword", "DATABASE"],
["keyword", "DATABASES"],
["keyword", "DATE"],
["keyword", "DATETIME"],
["keyword", "DAY"],
["keyword", "DBCC"],
["keyword", "DEALLOCATE"],
["keyword", "DEC"],
["keyword", "DECIMAL"],
["keyword", "DECLARE"],
["keyword", "DEFAULT"],
["keyword", "DEFINER"],
["keyword", "DELAYED"],
["keyword", "DELETE"],
["keyword", "DELIMITER"],
["keyword", "DELIMITERS"],
["keyword", "DENY"],
["keyword", "DESC"],
["keyword", "DESCRIBE"],
["keyword", "DETERMINISTIC"],
["keyword", "DISABLE"],
["keyword", "DISCARD"],
["keyword", "DISK"],
["keyword", "DISTINCT"],
["keyword", "DISTINCTROW"],
["keyword", "DISTRIBUTED"],
["keyword", "DO"],
["keyword", "DOUBLE"],
["keyword", "DROP"],
["keyword", "DUMMY"],
["keyword", "DUMP"],
["keyword", "DUMPFILE"],
["keyword", "DUPLICATE"],
["keyword", "ELSE"],
["keyword", "ELSEIF"],
["keyword", "ENABLE"],
["keyword", "ENCLOSED"],
["keyword", "END"],
["keyword", "ENGINE"],
["keyword", "ENUM"],
["keyword", "ERRLVL"],
["keyword", "ERRORS"],
["keyword", "ESCAPE"],
["keyword", "ESCAPED"],
["keyword", "EXCEPT"],
["keyword", "EXEC"],
["keyword", "EXECUTE"],
["keyword", "EXISTS"],
["keyword", "EXIT"],
["keyword", "EXPLAIN"],
["keyword", "EXTENDED"],
["keyword", "FETCH"],
["keyword", "FIELDS"],
["keyword", "FILE"],
["keyword", "FILLFACTOR"],
["keyword", "FIRST"],
["keyword", "FIXED"],
["keyword", "FLOAT"],
["keyword", "FOLLOWING"],
["keyword", "FOR"],
["keyword", "FOR EACH ROW"],
["keyword", "FORCE"],
["keyword", "FOREIGN"],
["keyword", "FREETEXT"],
["keyword", "FREETEXTTABLE"],
["keyword", "FROM"],
["keyword", "FULL"],
["keyword", "FUNCTION"],
["keyword", "GEOMETRY"],
["keyword", "GEOMETRYCOLLECTION"],
["keyword", "GLOBAL"],
["keyword", "GOTO"],
["keyword", "GRANT"],
["keyword", "GROUP"],
["keyword", "HANDLER"],
["keyword", "HASH"],
["keyword", "HAVING"],
["keyword", "HOLDLOCK"],
["keyword", "HOUR"],
["keyword", "IDENTITY"],
["keyword", "IDENTITY_INSERT"],
["keyword", "IDENTITYCOL"],
["keyword", "IF"],
["keyword", "IGNORE"],
["keyword", "IMPORT"],
["keyword", "INDEX"],
["keyword", "INFILE"],
["keyword", "INNER"],
["keyword", "INNODB"],
["keyword", "INOUT"],
["keyword", "INSERT"],
["keyword", "INT"],
["keyword", "INTEGER"],
["keyword", "INTERSECT"],
["keyword", "INTERVAL"],
["keyword", "INTO"],
["keyword", "INVOKER"],
["keyword", "ISOLATION"],
["keyword", "ITERATE"],
["keyword", "JOIN"],
["keyword", "KEY"],
["keyword", "KEYS"],
["keyword", "KILL"],
["keyword", "LANGUAGE"],
["keyword", "LAST"],
["keyword", "LEAVE"],
["keyword", "LEFT"],
["keyword", "LEVEL"],
["keyword", "LIMIT"],
["keyword", "LINENO"],
["keyword", "LINES"],
["keyword", "LINESTRING"],
["keyword", "LOAD"],
["keyword", "LOCAL"],
["keyword", "LOCK"],
["keyword", "LONGBLOB"],
["keyword", "LONGTEXT"],
["keyword", "LOOP"],
["keyword", "MATCH"],
["keyword", "MATCHED"],
["keyword", "MEDIUMBLOB"],
["keyword", "MEDIUMINT"],
["keyword", "MEDIUMTEXT"],
["keyword", "MERGE"],
["keyword", "MIDDLEINT"],
["keyword", "MINUTE"],
["keyword", "MODE"],
["keyword", "MODIFIES"],
["keyword", "MODIFY"],
["keyword", "MONTH"],
["keyword", "MULTILINESTRING"],
["keyword", "MULTIPOINT"],
["keyword", "MULTIPOLYGON"],
["keyword", "NATIONAL"],
["keyword", "NATURAL"],
["keyword", "NCHAR"],
["keyword", "NEXT"],
["keyword", "NO"],
["keyword", "NONCLUSTERED"],
["keyword", "NULLIF"],
["keyword", "NUMERIC"],
["keyword", "OF"],
["keyword", "OFF"],
["keyword", "OFFSET"],
["keyword", "OFFSETS"],
["keyword", "ON"],
["keyword", "OPEN"],
["keyword", "OPENDATASOURCE"],
["keyword", "OPENQUERY"],
["keyword", "OPENROWSET"],
["keyword", "OPTIMIZE"],
["keyword", "OPTION"],
["keyword", "OPTIONALLY"],
["keyword", "ORDER"],
["keyword", "OUT"],
["keyword", "OUTER"],
["keyword", "OUTFILE"],
["keyword", "OVER"],
["keyword", "PARTIAL"],
["keyword", "PARTITION"],
["keyword", "PERCENT"],
["keyword", "PIVOT"],
["keyword", "PLAN"],
["keyword", "POINT"],
["keyword", "POLYGON"],
["keyword", "PRECEDING"],
["keyword", "PRECISION"],
["keyword", "PREPARE"],
["keyword", "PREV"],
["keyword", "PRIMARY"],
["keyword", "PRINT"],
["keyword", "PRIVILEGES"],
["keyword", "PROC"],
["keyword", "PROCEDURE"],
["keyword", "PUBLIC"],
["keyword", "PURGE"],
["keyword", "QUICK"],
["keyword", "RAISERROR"],
["keyword", "READ"],
["keyword", "READS"],
["keyword", "REAL"],
["keyword", "RECONFIGURE"],
["keyword", "REFERENCES"],
["keyword", "RELEASE"],
["keyword", "RENAME"],
["keyword", "REPEAT"],
["keyword", "REPEATABLE"],
["keyword", "REPLACE"],
["keyword", "REPLICATION"],
["keyword", "REQUIRE"],
["keyword", "RESIGNAL"],
["keyword", "RESTORE"],
["keyword", "RESTRICT"],
["keyword", "RETURN"],
["keyword", "RETURNS"],
["keyword", "RETURNING"],
["keyword", "REVOKE"],
["keyword", "RIGHT"],
["keyword", "ROLLBACK"],
["keyword", "ROUTINE"],
["keyword", "ROW"],
["keyword", "ROWCOUNT"],
["keyword", "ROWGUIDCOL"],
["keyword", "ROWS"],
["keyword", "RTREE"],
["keyword", "RULE"],
["keyword", "SAVE"],
["keyword", "SAVEPOINT"],
["keyword", "SCHEMA"],
["keyword", "SECOND"],
["keyword", "SELECT"],
["keyword", "SERIAL"],
["keyword", "SERIALIZABLE"],
["keyword", "SESSION"],
["keyword", "SESSION_USER"],
["keyword", "SET"],
["keyword", "SETUSER"],
["keyword", "SHARE"],
["keyword", "SHOW"],
["keyword", "SHUTDOWN"],
["keyword", "SIMPLE"],
["keyword", "SMALLINT"],
["keyword", "SNAPSHOT"],
["keyword", "SOME"],
["keyword", "SONAME"],
["keyword", "SQL"],
["keyword", "START"],
["keyword", "STARTING"],
["keyword", "STATISTICS"],
["keyword", "STATUS"],
["keyword", "STRIPED"],
["keyword", "SYSTEM_USER"],
["keyword", "TABLE"],
["keyword", "TABLES"],
["keyword", "TABLESPACE"],
["keyword", "TEMP"],
["keyword", "TEMPORARY"],
["keyword", "TEMPTABLE"],
["keyword", "TERMINATED"],
["keyword", "TEXT"],
["keyword", "TEXTSIZE"],
["keyword", "THEN"],
["keyword", "TIME"],
["keyword", "TIMESTAMP"],
["keyword", "TINYBLOB"],
["keyword", "TINYINT"],
["keyword", "TINYTEXT"],
["keyword", "TO"],
["keyword", "TOP"],
["keyword", "TRAN"],
["keyword", "TRANSACTION"],
["keyword", "TRANSACTIONS"],
["keyword", "TRIGGER"],
["keyword", "TRUNCATE"],
["keyword", "TSEQUAL"],
["keyword", "TYPE"],
["keyword", "TYPES"],
["keyword", "UNBOUNDED"],
["keyword", "UNCOMMITTED"],
["keyword", "UNDEFINED"],
["keyword", "UNION"],
["keyword", "UNIQUE"],
["keyword", "UNLOCK"],
["keyword", "UNPIVOT"],
["keyword", "UNSIGNED"],
["keyword", "UPDATE"],
["keyword", "UPDATETEXT"],
["keyword", "USAGE"],
["keyword", "USE"],
["keyword", "USER"],
["keyword", "USING"],
["keyword", "VALUE"],
["keyword", "VALUES"],
["keyword", "VARBINARY"],
["keyword", "VARCHAR"],
["keyword", "VARCHARACTER"],
["keyword", "VARYING"],
["keyword", "VIEW"],
["keyword", "WAITFOR"],
["keyword", "WARNINGS"],
["keyword", "WHEN"],
["keyword", "WHERE"],
["keyword", "WHILE"],
["keyword", "WITH"],
["keyword", "WITH ROLLUP"],
["keyword", "WITHIN"],
["keyword", "WORK"],
["keyword", "WRITE"],
["keyword", "WRITETEXT"],
["keyword", "YEAR"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/sql/number_feature.test
================================================
42
0.154
0xBadFace
----------------------------------------------------
[
["number", "42"],
["number", "0.154"],
["number", "0xBadFace"]
]
----------------------------------------------------
Checks for decimal and hexadecimal numbers.
================================================
FILE: tests/languages/sql/operator_feature.test
================================================
+ - * /
= % ^ ~
| ||
& &&
! !=
< <= << <> <=>
> >= >>
AND
BETWEEN
IN
ILIKE
LIKE
NOT
OR
IS
DIV
REGEXP
RLIKE
SOUNDS LIKE
XOR
----------------------------------------------------
[
["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"],
["operator", "="], ["operator", "%"], ["operator", "^"], ["operator", "~"],
["operator", "|"], ["operator", "||"],
["operator", "&"], ["operator", "&&"],
["operator", "!"], ["operator", "!="],
["operator", "<"], ["operator", "<="], ["operator", "<<"], ["operator", "<>"], ["operator", "<=>"],
["operator", ">"], ["operator", ">="], ["operator", ">>"],
["operator", "AND"],
["operator", "BETWEEN"],
["operator", "IN"],
["operator", "ILIKE"],
["operator", "LIKE"],
["operator", "NOT"],
["operator", "OR"],
["operator", "IS"],
["operator", "DIV"],
["operator", "REGEXP"],
["operator", "RLIKE"],
["operator", "SOUNDS LIKE"],
["operator", "XOR"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/sql/string_feature.test
================================================
""
"fo\"obar"
"foo
bar"
''
'fo\'obar'
'foo
bar'
'foo''s bar'
"foo's ""bar"""
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "\"foo\r\nbar\""],
["string", "''"],
["string", "'fo\\'obar'"],
["string", "'foo\r\nbar'"],
["string", "'foo''s bar'"],
["string", "\"foo's \"\"bar\"\"\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/sql/variable_feature.test
================================================
@foo
@foo_bar_42
@"fo\"o-b
ar"
@'fo\'o-b
ar'
@`fo\`o-b
ar`
@'foo'
@'bar'
----------------------------------------------------
[
["variable", "@foo"],
["variable", "@foo_bar_42"],
["variable", "@\"fo\\\"o-b\r\nar\""],
["variable", "@'fo\\'o-b\r\nar'"],
["variable", "@`fo\\`o-b\r\nar`"],
["variable", "@'foo'"],
["variable", "@'bar'"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/sql+sas/sql_inclusion.test
================================================
proc sql;
select *
from proclib.paylist;
proc print;
proc sql outobs=10;
title 'Proclib.Payroll';
select * from proclib.payroll;
title;
quit;
proc sql;
select BookingDate,
ReleaseDate,
ReleaseCode
from SASclass.Bookings;
quit;
proc sql;
select BookingDate,
ReleaseDate,
ReleaseCode
from SASclass.Bookings;
quit;
libname proclib 'SAS-library';
proc sql;
create view proclib.jobs(pw-red) as
select Jobcode,
count(jobcode) as number label='Number',
avg(int(today()-birth/365.25)) as avgage
format=2. label='Average Salary'
from Payroll
group by Jobcode
having avage ge 30;
title1 'Current Summary Information for Each Job category';
title2 'Average Age Greater Than or Equal to 30';
select * form proclib.jobs(pw=red);
title
proc sql;
connect to oracle as ora2 (user=user-id password=password);
select * from connection to ora2 (select lname, fname, state from staff);
disconnect from ora2;
quit;
----------------------------------------------------
[
["step", "proc sql"],
["punctuation", ";"],
["proc-sql", [
["sql", [
["keyword", "select"],
["operator", "*"],
["keyword", "from"],
" proclib",
["punctuation", "."],
"paylist",
["punctuation", ";"]
]]
]],
["step", "proc print"],
["punctuation", ";"],
["step", "proc sql"],
["proc-args", [
["arg", "outobs"],
["operator", "="],
["number", "10"],
["punctuation", ";"]
]],
["proc-sql", [
["global-statements", "title"],
["string", "'Proclib.Payroll'"],
["punctuation", ";"],
["sql", [
["keyword", "select"],
["operator", "*"],
["keyword", "from"],
" proclib",
["punctuation", "."],
"payroll",
["punctuation", ";"]
]],
["global-statements", "title"],
["punctuation", ";"]
]],
["step", "quit"],
["punctuation", ";"],
["step", "proc sql"],
["punctuation", ";"],
["proc-sql", [
["sql", [
["keyword", "select"],
" BookingDate",
["punctuation", ","],
"\r\n\tReleaseDate",
["punctuation", ","],
"\r\n\tReleaseCode\r\n\t",
["keyword", "from"],
" SASclass",
["punctuation", "."],
"Bookings",
["punctuation", ";"]
]]
]],
["step", "quit"],
["punctuation", ";"],
["step", "proc sql"],
["punctuation", ";"],
["proc-sql", [
["sql", [
["keyword", "select"],
" BookingDate",
["punctuation", ","],
"\r\n\tReleaseDate",
["punctuation", ","],
"\r\n\tReleaseCode\r\n\t",
["keyword", "from"],
" SASclass",
["punctuation", "."],
"Bookings",
["punctuation", ";"]
]]
]],
["step", "quit"],
["punctuation", ";"],
["keyword", "libname"],
" proclib ",
["string", "'SAS-library'"],
["punctuation", ";"],
["step", "proc sql"],
["punctuation", ";"],
["proc-sql", [
["sql", [
["keyword", "create"],
["keyword", "view"],
" proclib",
["punctuation", "."],
"jobs",
["punctuation", "("],
"pw",
["operator", "-"],
"red",
["punctuation", ")"],
["keyword", "as"],
["keyword", "select"],
" Jobcode",
["punctuation", ","],
["function", "count"],
["punctuation", "("],
"jobcode",
["punctuation", ")"],
["keyword", "as"],
" number label",
["operator", "="],
["string", "'Number'"],
["punctuation", ","],
["function", "avg"],
["punctuation", "("],
["keyword", "int"],
["punctuation", "("],
"today",
["punctuation", "("],
["punctuation", ")"],
["operator", "-"],
"birth",
["operator", "/"],
["number", "365.25"],
["punctuation", ")"],
["punctuation", ")"],
["keyword", "as"],
" avgage\r\n\t\t\tformat",
["operator", "="],
["number", "2."],
" label",
["operator", "="],
["string", "'Average Salary'"],
["keyword", "from"],
" Payroll\r\n\t",
["keyword", "group"],
["keyword", "by"],
" Jobcode\r\n\t",
["keyword", "having"],
" avage ge ",
["number", "30"],
["punctuation", ";"]
]],
["global-statements", "title1"],
["string", "'Current Summary Information for Each Job category'"],
["punctuation", ";"],
["global-statements", "title2"],
["string", "'Average Age Greater Than or Equal to 30'"],
["punctuation", ";"],
["sql", [
["keyword", "select"],
["operator", "*"],
" form proclib",
["punctuation", "."],
"jobs",
["punctuation", "("],
"pw",
["operator", "="],
"red",
["punctuation", ")"],
["punctuation", ";"]
]],
["global-statements", "title"]
]],
["step", "proc sql"],
["punctuation", ";"],
["proc-sql", [
"\r\n\tconnect to oracle as ora2 ",
["punctuation", "("],
"user=user-id password=password",
["punctuation", ")"],
["punctuation", ";"],
["sql", [
["keyword", "select"],
["operator", "*"],
["keyword", "from"],
" connection ",
["keyword", "to"],
" ora2 ",
["punctuation", "("],
["keyword", "select"],
" lname",
["punctuation", ","],
" fname",
["punctuation", ","],
" state ",
["keyword", "from"],
" staff",
["punctuation", ")"],
["punctuation", ";"]
]],
["sql-statements", "disconnect from"],
" ora2",
["punctuation", ";"]
]],
["step", "quit"],
["punctuation", ";"]
]
----------------------------------------------------
Checks that SQL captures SAS language elements and leverages
SQL language support for nested SQL.
================================================
FILE: tests/languages/squirrel/attribute_feature.test
================================================
class Foo test = "I'm a class level attribute" />{
test = "freakin attribute" /> //attributes of PrintTesty
function PrintTesty()
{
foreach(i,val in testy)
{
::print("idx = "+i+" = "+val+" \n");
}
}
flippy = 10 , second = [1,2,3] /> //attributes of testy
testy = null;
}
----------------------------------------------------
[
["keyword", "class"],
["class-name", ["Foo"]],
["attribute-punctuation", ""],
" test ",
["operator", "="],
["string", "\"I'm a class level attribute\""],
["attribute-punctuation", "/>"],
["punctuation", "{"],
["attribute-punctuation", ""],
" test ",
["operator", "="],
["string", "\"freakin attribute\""],
["attribute-punctuation", "/>"],
["comment", "//attributes of PrintTesty"],
["keyword", "function"],
["function", "PrintTesty"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "foreach"],
["punctuation", "("],
"i",
["punctuation", ","],
"val ",
["keyword", "in"],
" testy",
["punctuation", ")"],
["punctuation", "{"],
["operator", "::"],
["function", "print"],
["punctuation", "("],
["string", "\"idx = \""],
["operator", "+"],
"i",
["operator", "+"],
["string", "\" = \""],
["operator", "+"],
"val",
["operator", "+"],
["string", "\" \\n\""],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", "}"],
["attribute-punctuation", ""],
" flippy ",
["operator", "="],
["number", "10"],
["punctuation", ","],
" second ",
["operator", "="],
["punctuation", "["],
["number", "1"],
["punctuation", ","],
["number", "2"],
["punctuation", ","],
["number", "3"],
["punctuation", "]"],
["attribute-punctuation", "/>"],
["comment", "//attributes of testy"],
"\r\n testy ",
["operator", "="],
["keyword", "null"],
["punctuation", ";"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/squirrel/boolean_feature.test
================================================
false
true
----------------------------------------------------
[
["boolean", "false"],
["boolean", "true"]
]
================================================
FILE: tests/languages/squirrel/char_feature.test
================================================
'w'
'\''
'\x41' '\u0041' '\U00000041'
----------------------------------------------------
[
["char", "'w'"],
["char", "'\\''"],
["char", "'\\x41'"], ["char", "'\\u0041'"], ["char", "'\\U00000041'"]
]
================================================
FILE: tests/languages/squirrel/class-name_feature.test
================================================
class Foo {}
class FakeNamespace.Utils.SuperClass {}
class SuperFoo extends Foo {}
log(b instanceof Kid);
enum Stuff {}
----------------------------------------------------
[
["keyword", "class"],
["class-name", ["Foo"]],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "class"],
["class-name", [
"FakeNamespace",
["punctuation", "."],
"Utils",
["punctuation", "."],
"SuperClass"
]],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "class"],
["class-name", ["SuperFoo"]],
["keyword", "extends"],
["class-name", ["Foo"]],
["punctuation", "{"],
["punctuation", "}"],
["function", "log"],
["punctuation", "("],
"b ",
["keyword", "instanceof"],
["class-name", ["Kid"]],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "enum"],
["class-name", ["Stuff"]],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/squirrel/comment_feature.test
================================================
/*
this is
a multiline comment.
this lines will be ignored by the compiler
*/
//this is a single line comment. this line will be ignored by the compiler
# this is also a single line comment.
----------------------------------------------------
[
["comment", "/*\r\nthis is\r\na multiline comment.\r\nthis lines will be ignored by the compiler\r\n*/"],
["comment", "//this is a single line comment. this line will be ignored by the compiler"],
["comment", "# this is also a single line comment."]
]
================================================
FILE: tests/languages/squirrel/function_feature.test
================================================
function abc(a,b,c) {}
function(a,b,c) {}
local myexp = @(a,b) a + b;
----------------------------------------------------
[
["keyword", "function"],
["function", "abc"],
["punctuation", "("],
"a",
["punctuation", ","],
"b",
["punctuation", ","],
"c",
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "function"],
["punctuation", "("],
"a",
["punctuation", ","],
"b",
["punctuation", ","],
"c",
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "local"],
" myexp ",
["operator", "="],
["lambda", "@"],
["punctuation", "("],
"a",
["punctuation", ","],
"b",
["punctuation", ")"],
" a ",
["operator", "+"],
" b",
["punctuation", ";"]
]
================================================
FILE: tests/languages/squirrel/keyword_feature.test
================================================
base;
break;
case;
catch;
class;
clone;
const;
constructor;
continue;
default;
delete;
else;
enum;
extends;
for;
foreach;
function;
if;
in;
instanceof;
local;
null;
resume;
return;
static;
switch;
this;
throw;
try;
typeof;
while;
yield;
__LINE__
__FILE__
----------------------------------------------------
[
["keyword", "base"], ["punctuation", ";"],
["keyword", "break"], ["punctuation", ";"],
["keyword", "case"], ["punctuation", ";"],
["keyword", "catch"], ["punctuation", ";"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "clone"], ["punctuation", ";"],
["keyword", "const"], ["punctuation", ";"],
["keyword", "constructor"], ["punctuation", ";"],
["keyword", "continue"], ["punctuation", ";"],
["keyword", "default"], ["punctuation", ";"],
["keyword", "delete"], ["punctuation", ";"],
["keyword", "else"], ["punctuation", ";"],
["keyword", "enum"], ["punctuation", ";"],
["keyword", "extends"], ["punctuation", ";"],
["keyword", "for"], ["punctuation", ";"],
["keyword", "foreach"], ["punctuation", ";"],
["keyword", "function"], ["punctuation", ";"],
["keyword", "if"], ["punctuation", ";"],
["keyword", "in"], ["punctuation", ";"],
["keyword", "instanceof"], ["punctuation", ";"],
["keyword", "local"], ["punctuation", ";"],
["keyword", "null"], ["punctuation", ";"],
["keyword", "resume"], ["punctuation", ";"],
["keyword", "return"], ["punctuation", ";"],
["keyword", "static"], ["punctuation", ";"],
["keyword", "switch"], ["punctuation", ";"],
["keyword", "this"], ["punctuation", ";"],
["keyword", "throw"], ["punctuation", ";"],
["keyword", "try"], ["punctuation", ";"],
["keyword", "typeof"], ["punctuation", ";"],
["keyword", "while"], ["punctuation", ";"],
["keyword", "yield"], ["punctuation", ";"],
["keyword", "__LINE__"],
["keyword", "__FILE__"]
]
================================================
FILE: tests/languages/squirrel/number_feature.test
================================================
0
34
0xFF00A120
0753
1.52
0.234
1.e2
1.e-2
----------------------------------------------------
[
["number", "0"],
["number", "34"],
["number", "0xFF00A120"],
["number", "0753"],
["number", "1.52"],
["number", "0.234"],
["number", "1.e2"],
["number", "1.e-2"]
]
================================================
FILE: tests/languages/squirrel/operator_feature.test
================================================
! != || == && >= <= > <=>
+ - / * %
+= -= /= *= %=
++ --
<- =
& ^ | ~
>> << >>>
: ::
----------------------------------------------------
[
["operator", "!"],
["operator", "!="],
["operator", "||"],
["operator", "=="],
["operator", "&&"],
["operator", ">="],
["operator", "<="],
["operator", ">"],
["operator", "<=>"],
["operator", "+"],
["operator", "-"],
["operator", "/"],
["operator", "*"],
["operator", "%"],
["operator", "+="],
["operator", "-="],
["operator", "/="],
["operator", "*="],
["operator", "%="],
["operator", "++"],
["operator", "--"],
["operator", "<-"], ["operator", "="],
["operator", "&"], ["operator", "^"], ["operator", "|"], ["operator", "~"],
["operator", ">>"], ["operator", "<<"], ["operator", ">>>"],
["operator", ":"], ["operator", "::"]
]
================================================
FILE: tests/languages/squirrel/punctuation_feature.test
================================================
{ } [ ] ( )
, ; .
----------------------------------------------------
[
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ","],
["punctuation", ";"],
["punctuation", "."]
]
================================================
FILE: tests/languages/squirrel/string_feature.test
================================================
""
"I'm a string"
"I'm a wonderful string\n"
@""
@"I'm a verbatim string"
@" I'm a
multiline verbatim string
"
@"
this is a multiline string
it will ""embed"" all the new line
characters
"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"I'm a string\""],
["string", "\"I'm a wonderful string\\n\""],
["string", "@\"\""],
["string", "@\"I'm a verbatim string\""],
["string", "@\" I'm a\r\nmultiline verbatim string\r\n\""],
["string", "@\"\r\n this is a multiline string\r\n it will \"\"embed\"\" all the new line\r\n characters\r\n\""]
]
================================================
FILE: tests/languages/stan/comment_feature.test
================================================
# comment
// comment
/*
comment
*/
----------------------------------------------------
[
["comment", "# comment"],
["comment", "// comment"],
["comment", "/*\r\ncomment\r\n*/"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/stan/constraint_feature.test
================================================
real b;
real theta;
int T;
matrix[3, 4] B;
row_vector[10] u;
row_vector[3] u;
real phi;
real x;
----------------------------------------------------
[
["keyword", "real"],
["constraint", [
["punctuation", "<"],
["property", "lower"],
["operator", "="],
["expression", [
"a"
]],
["punctuation", ">"]
]],
" b",
["punctuation", ";"],
["keyword", "real"],
["constraint", [
["punctuation", "<"],
["property", "lower"],
["operator", "="],
["expression", [
"a"
]],
["punctuation", ","],
["property", "upper"],
["operator", "="],
["expression", [
"b"
]],
["punctuation", ">"]
]],
" theta",
["punctuation", ";"],
["keyword", "int"],
["constraint", [
["punctuation", "<"],
["property", "lower"],
["operator", "="],
["expression", [
["number", "1"]
]],
["punctuation", ">"]
]],
" T",
["punctuation", ";"],
["keyword", "matrix"],
["constraint", [
["punctuation", "<"],
["property", "multiplier"],
["operator", "="],
["expression", [
["number", "5"]
]],
["punctuation", ">"]
]],
["punctuation", "["],
["number", "3"],
["punctuation", ","],
["number", "4"],
["punctuation", "]"],
" B",
["punctuation", ";"],
["keyword", "row_vector"],
["constraint", [
["punctuation", "<"],
["property", "lower"],
["operator", "="],
["expression", [
["operator", "-"],
["number", "1"]
]],
["punctuation", ","],
["property", "upper"],
["operator", "="],
["expression", [
["number", "1"]
]],
["punctuation", ">"]
]],
["punctuation", "["],
["number", "10"],
["punctuation", "]"],
" u",
["punctuation", ";"],
["keyword", "row_vector"],
["constraint", [
["punctuation", "<"],
["property", "offset"],
["operator", "="],
["expression", [
["operator", "-"],
["number", "42"]
]],
["punctuation", ","],
["property", "multiplier"],
["operator", "="],
["expression", [
["number", "3"]
]],
["punctuation", ">"]
]],
["punctuation", "["],
["number", "3"],
["punctuation", "]"],
" u",
["punctuation", ";"],
["keyword", "real"],
["constraint", [
["punctuation", "<"],
["property", "lower"],
["operator", "="],
["expression", [
["function", "min"],
["punctuation", "("],
"y",
["punctuation", ")"]
]],
["punctuation", ","],
["property", "upper"],
["operator", "="],
["expression", [
["function", "max"],
["punctuation", "("],
"y",
["punctuation", ")"]
]],
["punctuation", ">"]
]],
" phi",
["punctuation", ";"],
["keyword", "real"],
["constraint", [
["punctuation", "<"],
["property", "offset"],
["operator", "="],
["expression", [
"mu"
]],
["punctuation", ","],
["property", "multiplier"],
["operator", "="],
["expression", [
"sigma"
]],
["punctuation", ">"]
]],
" x",
["punctuation", ";"]
]
----------------------------------------------------
Checks for type constraints.
================================================
FILE: tests/languages/stan/directive_feature.test
================================================
#include my-std-normal.stan // definition of standard normal
#include my-std-normal.stan
----------------------------------------------------
[
["directive", "#include my-std-normal.stan "],
["comment", "// definition of standard normal"],
["directive", "#include my-std-normal.stan"]
]
----------------------------------------------------
Checks for include directives.
================================================
FILE: tests/languages/stan/function-arg_feature.test
================================================
y = algebra_solver(system, y_guess, theta, x_r, x_i);
----------------------------------------------------
[
"y ",
["operator", "="],
["keyword", "algebra_solver"],
["punctuation", "("],
["function-arg", "system"],
["punctuation", ","],
" y_guess",
["punctuation", ","],
" theta",
["punctuation", ","],
" x_r",
["punctuation", ","],
" x_i",
["punctuation", ")"],
["punctuation", ";"]
]
================================================
FILE: tests/languages/stan/keyword_feature.test
================================================
array
break
cholesky_factor_corr
cholesky_factor_cov
complex
continue
corr_matrix
cov_matrix
data
else
for
functions
generated
if
in
increment_log_prob
int
matrix
model
ordered
parameters
positive_ordered
print
quantities
real
reject
return
row_vector
simplex
target
transformed
unit_vector
vector
void
while
algebra_solver
algebra_solver_newton
integrate_1d
integrate_ode
integrate_ode_bdf
integrate_ode_rk45
map_rect
ode_adams
ode_adams_tol
ode_adjoint_tol_ctl
ode_bdf
ode_bdf_tol
ode_ckrk
ode_ckrk_tol
ode_rk45
ode_rk45_tol
reduce_sum
reduce_sum_static
----------------------------------------------------
[
["keyword", "array"],
["keyword", "break"],
["keyword", "cholesky_factor_corr"],
["keyword", "cholesky_factor_cov"],
["keyword", "complex"],
["keyword", "continue"],
["keyword", "corr_matrix"],
["keyword", "cov_matrix"],
["keyword", "data"],
["keyword", "else"],
["keyword", "for"],
["keyword", "functions"],
["keyword", "generated"],
["keyword", "if"],
["keyword", "in"],
["keyword", "increment_log_prob"],
["keyword", "int"],
["keyword", "matrix"],
["keyword", "model"],
["keyword", "ordered"],
["keyword", "parameters"],
["keyword", "positive_ordered"],
["keyword", "print"],
["keyword", "quantities"],
["keyword", "real"],
["keyword", "reject"],
["keyword", "return"],
["keyword", "row_vector"],
["keyword", "simplex"],
["keyword", "target"],
["keyword", "transformed"],
["keyword", "unit_vector"],
["keyword", "vector"],
["keyword", "void"],
["keyword", "while"],
["keyword", "algebra_solver"],
["keyword", "algebra_solver_newton"],
["keyword", "integrate_1d"],
["keyword", "integrate_ode"],
["keyword", "integrate_ode_bdf"],
["keyword", "integrate_ode_rk45"],
["keyword", "map_rect"],
["keyword", "ode_adams"],
["keyword", "ode_adams_tol"],
["keyword", "ode_adjoint_tol_ctl"],
["keyword", "ode_bdf"],
["keyword", "ode_bdf_tol"],
["keyword", "ode_ckrk"],
["keyword", "ode_ckrk_tol"],
["keyword", "ode_rk45"],
["keyword", "ode_rk45_tol"],
["keyword", "reduce_sum"],
["keyword", "reduce_sum_static"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/stan/number_feature.test
================================================
0
1
24567898765
24_56_78_98_765
0.0
1.0
3.14
2.7e3
2E-5
1.23e+3
3.14i
40e-3i
1e10i
0i
1_2.3_4e5_6i
----------------------------------------------------
[
["number", "0"],
["number", "1"],
["number", "24567898765"],
["number", "24_56_78_98_765"],
["number", "0.0"],
["number", "1.0"],
["number", "3.14"],
["number", "2.7e3"],
["number", "2E-5"],
["number", "1.23e+3"],
["number", "3.14i"],
["number", "40e-3i"],
["number", "1e10i"],
["number", "0i"],
["number", "1_2.3_4e5_6i"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/stan/operator_feature.test
================================================
+ - * /
+= -= *= /=
== != < <= > >=
! || &&
<- =
.* .*= ./ ./=
| ' ^ % ~ ? :
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "=="],
["operator", "!="],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "!"],
["operator", "||"],
["operator", "&&"],
["operator", "<-"],
["operator", "="],
["operator", ".*"],
["operator", ".*="],
["operator", "./"],
["operator", "./="],
["operator", "|"],
["operator", "'"],
["operator", "^"],
["operator", "%"],
["operator", "~"],
["operator", "?"],
["operator", ":"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/stan/program-block_feature.html.test
================================================
functions {
// ... function declarations and definitions ...
}
data {
// ... declarations ...
}
transformed data {
// ... declarations ... statements ...
}
parameters {
// ... declarations ...
}
transformed parameters {
// ... declarations ... statements ...
}
model {
// ... declarations ... statements ...
}
generated quantities {
// ... declarations ... statements ...
}
// data-only quantifiers
real foo(data real x) {
return x^2;
}
----------------------------------------------------
functions
{
}
data
{
}
transformed
data
{
}
parameters
{
}
transformed
parameters
{
}
model
{
}
generated
quantities
{
}
real
foo
(
data
real
x
)
{
return
x
^
2
;
}
================================================
FILE: tests/languages/stan/punctuation_feature.test
================================================
( ) [ ] { }
, ;
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", ";"]
]
----------------------------------------------------
Checks for punctuation.
================================================
FILE: tests/languages/stan/string_feature.test
================================================
""
"foo bar"
print("log density before =", target());
print("u[", n, "] = ", u[n]);
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo bar\""],
["keyword", "print"],
["punctuation", "("],
["string", "\"log density before =\""],
["punctuation", ","],
["keyword", "target"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "print"],
["punctuation", "("],
["string", "\"u[\""],
["punctuation", ","],
" n",
["punctuation", ","],
["string", "\"] = \""],
["punctuation", ","],
" u",
["punctuation", "["],
"n",
["punctuation", "]"],
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/stata/boolean_feature.test
================================================
set foo on
set foo off
----------------------------------------------------
[
["command", "set"], " foo ", ["boolean", "on"],
["command", "set"], " foo ", ["boolean", "off"]
]
================================================
FILE: tests/languages/stata/command_feature.test
================================================
quietly regress foo
quietly: regress foo
----------------------------------------------------
[
["keyword", "quietly"], ["command", "regress"], " foo\r\n",
["keyword", "quietly"], ["punctuation", ":"], ["command", "regress"], " foo"
]
================================================
FILE: tests/languages/stata/comment_feature.test
================================================
* comment
// comment
/*
comment
*/
* a sample analysis job
version 17.0
use census
/* obtain the summary statistics */
tabulate region // there are 4 regions in this dataset
summarize marriage
* a sample analysis job
version 17.0
use /* obtain the summary statistics */ census
tabulate region
// there are 4 regions in this dataset
summarize marriage
----------------------------------------------------
[
["comment", "* comment"],
["comment", "// comment"],
["comment", "/*\r\ncomment\r\n*/"],
["comment", "* a sample analysis job"],
["command", "version"],
["number", "17.0"],
["command", "use"],
" census\r\n",
["comment", "/* obtain the summary statistics */"],
["command", "tabulate"],
" region ",
["comment", "// there are 4 regions in this dataset"],
["command", "summarize"],
" marriage\r\n",
["comment", "* a sample analysis job"],
["command", "version"],
["number", "17.0"],
["command", "use"],
["comment", "/* obtain the summary statistics */"],
" census\r\n",
["command", "tabulate"],
" region\r\n",
["comment", "// there are 4 regions in this dataset"],
["command", "summarize"],
" marriage"
]
================================================
FILE: tests/languages/stata/java_inclusion.test
================================================
program java_program
version 17
java: printX();
end
java:
int x = 123;
void printX() {
System.out.println("x: " + x);
}
end
----------------------------------------------------
[
["command", "program"],
" java_program\r\n\t",
["command", "version"],
["number", "17"],
["command", "java"],
["punctuation", ":"],
["java", [
["function", "printX"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"]
]],
["command", "end"],
["command", "java"],
["punctuation", ":"],
["java", [
["keyword", "int"],
" x ",
["operator", "="],
["number", "123"],
["punctuation", ";"],
["keyword", "void"],
["function", "printX"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["class-name", ["System"]],
["punctuation", "."],
"out",
["punctuation", "."],
["function", "println"],
["punctuation", "("],
["string", "\"x: \""],
["operator", "+"],
" x",
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"]
]],
["command", "end"]
]
================================================
FILE: tests/languages/stata/keyword_feature.test
================================================
foo bayes
foo bootstrap
foo by
foo bysort
foo capture
foo clear
foo collect
foo fmm
foo fp
foo frame
foo if
foo in
foo jackknife
foo mfp
foo mi estimate
foo nestreg
foo noisily
foo of
foo permute
foo quietly
foo rolling
foo simulate
foo sort
foo statsby
foo stepwise
foo svy
foo varlist
foo version
foo xi
----------------------------------------------------
[
["command", "foo"], ["keyword", "bayes"],
["command", "foo"], ["keyword", "bootstrap"],
["command", "foo"], ["keyword", "by"],
["command", "foo"], ["keyword", "bysort"],
["command", "foo"], ["keyword", "capture"],
["command", "foo"], ["keyword", "clear"],
["command", "foo"], ["keyword", "collect"],
["command", "foo"], ["keyword", "fmm"],
["command", "foo"], ["keyword", "fp"],
["command", "foo"], ["keyword", "frame"],
["command", "foo"], ["keyword", "if"],
["command", "foo"], ["keyword", "in"],
["command", "foo"], ["keyword", "jackknife"],
["command", "foo"], ["keyword", "mfp"],
["command", "foo"], ["keyword", "mi estimate"],
["command", "foo"], ["keyword", "nestreg"],
["command", "foo"], ["keyword", "noisily"],
["command", "foo"], ["keyword", "of"],
["command", "foo"], ["keyword", "permute"],
["command", "foo"], ["keyword", "quietly"],
["command", "foo"], ["keyword", "rolling"],
["command", "foo"], ["keyword", "simulate"],
["command", "foo"], ["keyword", "sort"],
["command", "foo"], ["keyword", "statsby"],
["command", "foo"], ["keyword", "stepwise"],
["command", "foo"], ["keyword", "svy"],
["command", "foo"], ["keyword", "varlist"],
["command", "foo"], ["keyword", "version"],
["command", "foo"], ["keyword", "xi"]
]
================================================
FILE: tests/languages/stata/mata_inclusion.test
================================================
version 17.0
include limits.matah
mata:
real matrix inpivot(real matrix X)
{
real matrix y1, yz
real scalar n
if (rows(X)>‘MAXDIM’ | cols(X)>‘MAXDIM’) {
errprintf("inpivot: matrix too large\n")
exit(1000)
}
...
}
end
----------------------------------------------------
[
["command", "version"],
["number", "17.0"],
["command", "include"],
" limits.matah\r\n",
["command", "mata"],
["punctuation", ":"],
["mata", [
["type", ["real matrix"]],
["function", "inpivot"],
["punctuation", "("],
["type", ["real matrix"]],
" X",
["punctuation", ")"],
["punctuation", "{"],
["type", ["real matrix"]],
" y1",
["punctuation", ","],
" yz\r\n\t",
["type", ["real scalar"]],
" n\r\n\t",
["keyword", "if"],
["punctuation", "("],
["function", "rows"],
["punctuation", "("],
"X",
["punctuation", ")"],
["operator", ">"],
"‘MAXDIM",
["operator", "’"],
["operator", "|"],
["function", "cols"],
["punctuation", "("],
"X",
["punctuation", ")"],
["operator", ">"],
"‘MAXDIM",
["operator", "’"],
["punctuation", ")"],
["punctuation", "{"],
["function", "errprintf"],
["punctuation", "("],
["string", "\"inpivot: matrix too large\\n\""],
["punctuation", ")"],
["function", "exit"],
["punctuation", "("],
["number", "1000"],
["punctuation", ")"],
["punctuation", "}"],
["operator", ".."],
["punctuation", "."],
["punctuation", "}"]
]],
["command", "end"]
]
================================================
FILE: tests/languages/stata/number_feature.test
================================================
123
123.456
.123
----------------------------------------------------
[
["number", "123"],
["number", "123.456"],
["number", ".123"]
]
================================================
FILE: tests/languages/stata/operator_feature.test
================================================
+ - * / ^
++ --
< <= > >= == != ~=
=
& | ! ~
# ##
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "^"],
["operator", "++"],
["operator", "--"],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "=="],
["operator", "!="],
["operator", "~="],
["operator", "="],
["operator", "&"], ["operator", "|"], ["operator", "!"], ["operator", "~"],
["operator", "#"], ["operator", "##"]
]
================================================
FILE: tests/languages/stata/python_inclusion.test
================================================
version 17.0
local a = 2
local b = 3
python:
from sfi import Scalar
def calcsum(num1, num2):
res = num1 + num2
Scalar.setValue("result", res)
calcsum(‘a’, ‘b’)
end
display result
----------------------------------------------------
[
["command", "version"],
["number", "17.0"],
["command", "local"],
" a ",
["operator", "="],
["number", "2"],
["command", "local"],
" b ",
["operator", "="],
["number", "3"],
["command", "python"],
["punctuation", ":"],
["python", [
["keyword", "from"],
" sfi ",
["keyword", "import"],
" Scalar\r\n",
["keyword", "def"],
["function", "calcsum"],
["punctuation", "("],
"num1",
["punctuation", ","],
" num2",
["punctuation", ")"],
["punctuation", ":"],
"\r\n\tres ",
["operator", "="],
" num1 ",
["operator", "+"],
" num2\r\n\tScalar",
["punctuation", "."],
"setValue",
["punctuation", "("],
["string", "\"result\""],
["punctuation", ","],
" res",
["punctuation", ")"],
"\r\ncalcsum",
["punctuation", "("],
"‘a’",
["punctuation", ","],
" ‘b’",
["punctuation", ")"]
]],
["command", "end"],
["command", "display"],
" result"
]
================================================
FILE: tests/languages/stata/string_feature.test
================================================
""
"foo"
"${datadir}householdmembers"
"‘ins’"
"‘mpg[one]’"
`"ysc(r(0 80)) xtitle("Health Status", size(medlarge))"'
----------------------------------------------------
[
["string-literal", [
["string", "\"\""]
]],
["string-literal", [
["string", "\"foo\""]
]],
["string-literal", [
["string", "\""],
["interpolation", [
["punctuation", "${"],
["expression", [
["command", "datadir"]
]],
["punctuation", "}"]
]],
["string", "householdmembers\""]
]],
["string-literal", [
["string", "\""],
["interpolation", [
["expression", [
["variable", "‘ins’"]
]]
]],
["string", "\""]
]],
["string-literal", [
["string", "\""],
["interpolation", [
["expression", [
["variable", "‘mpg[one]’"]
]]
]],
["string", "\""]
]],
["string-literal", [
["string", "`\"ysc(r(0 80)) xtitle(\"Health Status\", size(medlarge))\"'"]
]]
]
================================================
FILE: tests/languages/stata/variable_feature.test
================================================
$histoption
----------------------------------------------------
[
["variable", "$histoption"]
]
================================================
FILE: tests/languages/stylus/atrule-declaration_feature.test
================================================
@media print
@import "reset.css"
@font-face {
@keyframes {
@media (max-{foo}: bar)
@namespace url(http://www.w3.org/1999/xhtml) // comment
@namespace svg url(http://www.w3.org/2000/svg) // comment
----------------------------------------------------
[
["atrule-declaration", [["atrule", "@media"], " print"]],
["atrule-declaration", [["atrule", "@import"], ["string", "\"reset.css\""]]],
["atrule-declaration", [["atrule", "@font-face"], ["punctuation", "{"]]],
["atrule-declaration", [["atrule", "@keyframes"], ["punctuation", "{"]]],
["atrule-declaration", [
["atrule", "@media"],
["punctuation", "("],
"max-",
["interpolation", [
["delimiter", "{"],
"foo",
["delimiter", "}"]
]],
["punctuation", ":"],
" bar",
["punctuation", ")"]
]],
["atrule-declaration", [
["atrule", "@namespace"],
["url", "url(http://www.w3.org/1999/xhtml)"],
["comment", "// comment"]
]],
["atrule-declaration", [
["atrule", "@namespace"],
" svg ",
["url", "url(http://www.w3.org/2000/svg)"],
["comment", "// comment"]
]]
]
----------------------------------------------------
Checks for at-rules.
================================================
FILE: tests/languages/stylus/boolean_feature.test
================================================
a = true
b = false
----------------------------------------------------
[
["variable-declaration", [
["variable", "a"],
["operator", "="],
["boolean", "true"]
]],
["variable-declaration", [
["variable", "b"],
["operator", "="],
["boolean", "false"]
]]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/stylus/comment_feature.test
================================================
/**/
/* foo
bar */
//
// foobar
----------------------------------------------------
[
["comment", "/**/"],
["comment", "/* foo\r\nbar */"],
["comment", "//"],
["comment", "// foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/stylus/func_feature.test
================================================
border-radius(n)
-webkit-border-radius n
-moz-border-radius n
border-radius n
form input[type=button]
border-radius(5px)
color foo()
----------------------------------------------------
[
["func", [
["function", "border-radius"],
["punctuation", "("],
"n",
["punctuation", ")"]
]],
["property-declaration", [
["property", ["-webkit-border-radius"]],
" n"
]],
["property-declaration", [
["property", ["-moz-border-radius"]],
" n"
]],
["property-declaration", [
["property", ["border-radius"]],
" n"
]],
["selector", ["form input[type=button]"]],
["func", [
["function", "border-radius"],
["punctuation", "("],
["number", "5"],
["unit", "px"],
["punctuation", ")"]
]],
["property-declaration", [
["property", ["color"]],
["func", [
["function", "foo"],
["punctuation", "("],
["punctuation", ")"]
]]
]]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/stylus/hexcode_feature.test
================================================
color: #fff
color: #FA3
color: #f7c111
color: #9F4ABB
----------------------------------------------------
[
["property-declaration", [
["property", ["color"]], ["punctuation", ":"],
["hexcode", "#fff"]
]],
["property-declaration", [
["property", ["color"]], ["punctuation", ":"],
["hexcode", "#FA3"]
]],
["property-declaration", [
["property", ["color"]], ["punctuation", ":"],
["hexcode", "#f7c111"]
]],
["property-declaration", [
["property", ["color"]], ["punctuation", ":"],
["hexcode", "#9F4ABB"]
]]
]
----------------------------------------------------
Checks for hexadecimal values.
================================================
FILE: tests/languages/stylus/important_feature.test
================================================
color: red !important
@extend foo !optional
----------------------------------------------------
[
["property-declaration", [
["property", ["color"]],
["punctuation", ":"],
["color", "red"],
["important", "!important"]
]],
["atrule-declaration", [
["atrule", "@extend"],
" foo ",
["important", "!optional"]
]]
]
----------------------------------------------------
Checks for !important and !optional.
================================================
FILE: tests/languages/stylus/keyword_feature.test
================================================
for i in 1..5
if a == 3
z-index: 1 unless @z-index;
return pair[1] if pair[0] == key for pair in hash
if url == "http://example.com" // comment
----------------------------------------------------
[
["statement", [
["keyword", "for"],
" i ",
["operator", "in"],
["number", "1"],
["operator", ".."],
["number", "5"]
]],
["statement", [
["keyword", "if"],
" a ",
["operator", "=="],
["number", "3"]
]],
["property-declaration", [
["property", ["z-index"]],
["punctuation", ":"],
["number", "1"],
["keyword", "unless"],
["keyword", "@z-index"],
["punctuation", ";"]
]],
["statement", [
["keyword", "return"], " pair",
["punctuation", "["], ["number", "1"], ["punctuation", "]"],
["keyword", "if"], " pair",
["punctuation", "["], ["number", "0"], ["punctuation", "]"],
["operator", "=="], " key ",
["keyword", "for"], " pair ",
["operator", "in"], " hash"
]],
["statement", [
["keyword", "if"],
" url ",
["operator", "=="],
["string", "\"http://example.com\""],
["comment", "// comment"]
]]
]
----------------------------------------------------
Checks for statements and keywords.
================================================
FILE: tests/languages/stylus/number_feature.test
================================================
z-index 42
foo = 3.14159
width: 23%
bar = 1.5%
----------------------------------------------------
[
["property-declaration", [
["property", ["z-index"]],
["number", "42"]
]],
["variable-declaration", [
["variable", "foo"],
["operator", "="],
["number", "3.14159"]
]],
["property-declaration", [
["property", ["width"]],
["punctuation", ":"],
["number", "23"],
["unit", "%"]
]],
["variable-declaration", [
["variable", "bar"],
["operator", "="],
["number", "1.5"],
["unit", "%"]
]]
]
----------------------------------------------------
Checks for numbers and percentages.
================================================
FILE: tests/languages/stylus/operator_feature.test
================================================
a = !b
b = b != a
c = ~b
d = c + b
d += a
e = d - c
e -= b
f = a * b
g = c ** d
g *= f
h = g / f
h /= e
i = h % g
i %= f
j = 1..5
k = 1...5
l = k < j
m = l <= k
n = m > l
o = n >= m
p = o ? n : m
q ?= p
r = q == p
s := r
t = s && r
u = t || s
v = u and t
w = v or u
x = 1 in w
y = true is true
z = true is not false
aa = z isnt y
ab = #fff is a 'rgba'
ac = ab is defined
ad = not ac
----------------------------------------------------
[
["variable-declaration", [
["variable", "a"],
["operator", "="],
["operator", "!"],
"b"
]],
["variable-declaration", [
["variable", "b"],
["operator", "="],
" b ",
["operator", "!="],
" a"
]],
["variable-declaration", [
["variable", "c"],
["operator", "="],
["operator", "~"],
"b"
]],
["variable-declaration", [
["variable", "d"],
["operator", "="],
" c ",
["operator", "+"],
" b"
]],
["variable-declaration", [
["variable", "d"],
["operator", "+="],
" a"
]],
["variable-declaration", [
["variable", "e"],
["operator", "="],
" d ",
["operator", "-"],
" c"
]],
["variable-declaration", [
["variable", "e"],
["operator", "-="],
" b"
]],
["variable-declaration", [
["variable", "f"],
["operator", "="],
" a ",
["operator", "*"],
" b"
]],
["variable-declaration", [
["variable", "g"],
["operator", "="],
" c ",
["operator", "**"],
" d"
]],
["variable-declaration", [
["variable", "g"],
["operator", "*="],
" f"
]],
["variable-declaration", [
["variable", "h"],
["operator", "="],
" g ",
["operator", "/"],
" f"
]],
["variable-declaration", [
["variable", "h"],
["operator", "/="],
" e"
]],
["variable-declaration", [
["variable", "i"],
["operator", "="],
" h ",
["operator", "%"],
" g"
]],
["variable-declaration", [
["variable", "i"],
["operator", "%="],
" f"
]],
["variable-declaration", [
["variable", "j"],
["operator", "="],
["number", "1"],
["operator", ".."],
["number", "5"]
]],
["variable-declaration", [
["variable", "k"],
["operator", "="],
["number", "1"],
["operator", "..."],
["number", "5"]
]],
["variable-declaration", [
["variable", "l"],
["operator", "="],
" k ",
["operator", "<"],
" j"
]],
["variable-declaration", [
["variable", "m"],
["operator", "="],
" l ",
["operator", "<="],
" k"
]],
["variable-declaration", [
["variable", "n"],
["operator", "="],
" m ",
["operator", ">"],
" l"
]],
["variable-declaration", [
["variable", "o"],
["operator", "="],
" n ",
["operator", ">="],
" m"
]],
["variable-declaration", [
["variable", "p"],
["operator", "="],
" o ",
["operator", "?"],
" n ",
["punctuation", ":"],
" m"
]],
["variable-declaration", [
["variable", "q"],
["operator", "?="],
" p"
]],
["variable-declaration", [
["variable", "r"],
["operator", "="],
" q ",
["operator", "=="],
" p"
]],
["variable-declaration", [
["variable", "s"],
["operator", ":="],
" r"
]],
["variable-declaration", [
["variable", "t"],
["operator", "="],
" s ",
["operator", "&&"],
" r"
]],
["variable-declaration", [
["variable", "u"],
["operator", "="],
" t ",
["operator", "||"],
" s"
]],
["variable-declaration", [
["variable", "v"],
["operator", "="],
" u ",
["operator", "and"],
" t"
]],
["variable-declaration", [
["variable", "w"],
["operator", "="],
" v ",
["operator", "or"],
" u"
]],
["variable-declaration", [
["variable", "x"],
["operator", "="],
["number", "1"],
["operator", "in"],
" w"
]],
["variable-declaration", [
["variable", "y"],
["operator", "="],
["boolean", "true"],
["operator", "is"],
["boolean", "true"]
]],
["variable-declaration", [
["variable", "z"],
["operator", "="],
["boolean", "true"],
["operator", "is not"],
["boolean", "false"]
]],
["variable-declaration", [
["variable", "aa"],
["operator", "="],
" z ",
["operator", "isnt"],
" y"
]],
["variable-declaration", [
["variable", "ab"],
["operator", "="],
["hexcode", "#fff"],
["operator", "is a"],
["string", "'rgba'"]
]],
["variable-declaration", [
["variable", "ac"],
["operator", "="],
" ab ",
["operator", "is defined"]
]],
["variable-declaration", [
["variable", "ad"],
["operator", "="],
["operator", "not"],
" ac"
]]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/stylus/property-declaration_feature.test
================================================
div
width 40px
color: red
background: blue;
animation-name test1, animation4
div {
background-{foo}: bar;
}
div
{foo} bar
comment
content 'http://www.example.com' // comment
background url(http://example.com) /* comment */
background /* comment */ url("http://example.com")
content '/* this is string not comment */'
----------------------------------------------------
[
["selector", ["div"]],
["property-declaration", [
["property", ["width"]], ["number", "40"], ["unit", "px"]
]],
["property-declaration", [
["property", ["color"]], ["punctuation", ":"], ["color", "red"]
]],
["property-declaration", [
["property", ["background"]], ["punctuation", ":"], ["color", "blue"], ["punctuation", ";"]
]],
["property-declaration", [
["property", ["animation-name"]], " test1", ["punctuation", ","], " animation4"]],
["selector", ["div ", ["punctuation", "{"]]],
["property-declaration", [
["property", [
"background-",
["interpolation", [
["delimiter", "{"], "foo", ["delimiter", "}"]
]]
]],
["punctuation", ":"],
" bar",
["punctuation", ";"]
]],
["punctuation", "}"],
["selector", ["div"]],
["property-declaration", [
["property", [
["interpolation", [
["delimiter", "{"], "foo", ["delimiter", "}"]
]]
]],
" bar"
]],
["selector", ["comment"]],
["property-declaration", [
["property", ["content"]],
["string", "'http://www.example.com'"],
["comment", "// comment"]
]],
["property-declaration", [
["property", ["background"]],
["url", "url(http://example.com)"],
["comment", "/* comment */"]
]],
["property-declaration", [
["property", ["background"]],
["comment", "/* comment */"],
["url", "url(\"http://example.com\")"]
]],
["property-declaration", [
["property", ["content"]],
["string", "'/* this is string not comment */'"]
]]
]
----------------------------------------------------
Checks for property declarations.
================================================
FILE: tests/languages/stylus/selector_feature.test
================================================
div
span[foo=bar]
color red
div input,
input:nth-child(2n)
color red
#foo
.bar::before
color red
#foo
.bar {
color red
}
{foo} {bar}:hover
color red
div // comment
display inline-block // comment
----------------------------------------------------
[
["selector", ["div\r\nspan[foo=bar]"]],
["property-declaration", [["property", ["color"]], ["color", "red"]]],
["selector", ["div input", ["punctuation", ","], "\r\ninput:nth-child(2n)"]],
["property-declaration", [["property", ["color"]], ["color", "red"]]],
["selector", ["#foo"]],
["selector", [".bar::before"]],
["property-declaration", [["property", ["color"]], ["color", "red"]]],
["selector", ["#foo"]],
["selector", [".bar ", ["punctuation", "{"]]],
["property-declaration", [["property", ["color"]], ["color", "red"]]],
["punctuation", "}"],
["selector", [
["interpolation", [
["delimiter", "{"], "foo", ["delimiter", "}"]
]],
["interpolation", [
["delimiter", "{"], "bar", ["delimiter", "}"]
]],
":hover"
]],
["property-declaration", [["property", ["color"]], ["color", "red"]]],
["selector", ["div ", ["comment", "// comment"]]],
["property-declaration", [["property", ["display"]], " inline-block ", ["comment", "// comment"]]]
]
----------------------------------------------------
Checks for selectors.
================================================
FILE: tests/languages/stylus/string_feature.test
================================================
content: ""
content: "foo"
content: ''
content: 'foo'
----------------------------------------------------
[
["property-declaration", [
["property", ["content"]],
["punctuation", ":"],
["string", "\"\""]
]],
["property-declaration", [
["property", ["content"]],
["punctuation", ":"],
["string", "\"foo\""]
]],
["property-declaration", [
["property", ["content"]],
["punctuation", ":"],
["string", "''"]
]],
["property-declaration", [
["property", ["content"]],
["punctuation", ":"],
["string", "'foo'"]
]]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/stylus/url_feature.test
================================================
background: url('foo.png')
background: url("foo/bar.jpg")
----------------------------------------------------
[
["property-declaration", [
["property", ["background"]],
["punctuation", ":"],
["url", "url('foo.png')"]
]],
["property-declaration", [
["property", ["background"]],
["punctuation", ":"],
["url", "url(\"foo/bar.jpg\")"]
]]
]
----------------------------------------------------
Checks for urls.
================================================
FILE: tests/languages/stylus/variable-declaration_feature.test
================================================
foo = 'bar'
a = 4
bar-baz = 5
a += 8
url = "http://example.com" // comment
----------------------------------------------------
[
["variable-declaration", [
["variable", "foo"],
["operator", "="],
["string", "'bar'"]
]],
["variable-declaration", [
["variable", "a"],
["operator", "="],
["number", "4"]
]],
["variable-declaration", [
["variable", "bar-baz"],
["operator", "="],
["number", "5"]
]],
["variable-declaration", [
["variable", "a"],
["operator", "+="],
["number", "8"]
]],
["variable-declaration", [
["variable", "url"],
["operator", "="],
["string", "\"http://example.com\""],
["comment", "// comment"]
]]
]
----------------------------------------------------
Checks for variable declarations.
================================================
FILE: tests/languages/stylus+pug/stylus_inclusion.test
================================================
:stylus
font-size = 14px
----------------------------------------------------
[
["filter-stylus", [
["filter-name", ":stylus"],
["text", [
["variable-declaration", [
["variable", "font-size"],
["operator", "="],
["number", "14"],
["unit", "px"]
]]
]]
]]
]
----------------------------------------------------
Checks for stylus filter in pug.
================================================
FILE: tests/languages/supercollider/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
================================================
FILE: tests/languages/supercollider/char_feature.test
================================================
$A
$B
$C
$.
$$
$\t // tab (horizontal tab)
$\f // form feed
$\v // vertical tab
$\n // newline (linefeed)
$\r // return
$\\ // backslash`
----------------------------------------------------
[
["char", "$A"],
["char", "$B"],
["char", "$C"],
["char", "$."],
["char", "$$"],
["char", "$\\t"], ["comment", "// tab (horizontal tab)"],
["char", "$\\f"], ["comment", "// form feed"],
["char", "$\\v"], ["comment", "// vertical tab"],
["char", "$\\n"], ["comment", "// newline (linefeed)"],
["char", "$\\r"], ["comment", "// return"],
["char", "$\\\\"], ["comment", "// backslash`"]
]
================================================
FILE: tests/languages/supercollider/class-name_feature.test
================================================
Foo
SynthDef
Set[]
List[]
----------------------------------------------------
[
["class-name", "Foo"],
["class-name", "SynthDef"],
["class-name", "Set"], ["punctuation", "["], ["punctuation", "]"],
["class-name", "List"], ["punctuation", "["], ["punctuation", "]"]
]
================================================
FILE: tests/languages/supercollider/comment_feature.test
================================================
// single line comment
/*
multi
line
comment
*/
/* Unlike C, you can have /* nested */ comments */
----------------------------------------------------
[
["comment", "// single line comment"],
["comment", "/*\r\n multi\r\n line\r\n comment\r\n*/"],
["comment", "/* Unlike C, you can have /* nested */ comments */"]
]
================================================
FILE: tests/languages/supercollider/keyword_feature.test
================================================
_
arg
classvar
const
nil
var
while
----------------------------------------------------
[
["keyword", "_"],
["keyword", "arg"],
["keyword", "classvar"],
["keyword", "const"],
["keyword", "nil"],
["keyword", "var"],
["keyword", "while"]
]
================================================
FILE: tests/languages/supercollider/label_feature.test
================================================
foo(a: 5, bar: 7)
----------------------------------------------------
[
"foo",
["punctuation", "("],
["label", "a"],
["punctuation", ":"],
["number", "5"],
["punctuation", ","],
["label", "bar"],
["punctuation", ":"],
["number", "7"],
["punctuation", ")"]
]
================================================
FILE: tests/languages/supercollider/number_feature.test
================================================
-13
666
2112
96
0xa // 10
-0xd // -13
0x29A // 666
0x840 // 2112
0x60 // 96
0.39
98.6
1.0
-0.5
1.2e4
1E-4
pi
2pi
0.5pi
-0.25pi
inf // and beyond!
-inf
16rF // 15
16ra9 // 169
36rZIGZAG // 2147341480
2r01101011
12r4a.abc // wrong
12r4a.ABC // works
12r4A.ABC // better
2s == 2.1 // scale degree two, sharp
2b == 1.9 // scale degree two, flat
2ss == 2.2 // scale degree two, double sharp
2bb == 1.8 // scale degree two, double flat
2ssss == 2.4
2bbbb == 1.6
-2s == -1.9
-2b == -2.1
-2ss == -1.8
-2bb == -2.2
2b50 == 1.95 // scale degree two, fifty cents flat
2s204 == 2.204 // scale degree two, 204 cents sharp
----------------------------------------------------
[
["operator", "-"], ["number", "13"],
["number", "666"],
["number", "2112"],
["number", "96"],
["number", "0xa"], ["comment", "// 10"],
["operator", "-"], ["number", "0xd"], ["comment", "// -13"],
["number", "0x29A"], ["comment", "// 666"],
["number", "0x840"], ["comment", "// 2112"],
["number", "0x60"], ["comment", "// 96"],
["number", "0.39"],
["number", "98.6"],
["number", "1.0"],
["operator", "-"], ["number", "0.5"],
["number", "1.2e4"],
["number", "1E-4"],
["number", "pi"],
["number", "2pi"],
["number", "0.5pi"],
["operator", "-"], ["number", "0.25pi"],
["number", "inf"], ["comment", "// and beyond!"],
["operator", "-"], ["number", "inf"],
["number", "16rF"], ["comment", "// 15"],
["number", "16ra9"], ["comment", "// 169"],
["number", "36rZIGZAG"], ["comment", "// 2147341480"],
["number", "2r01101011"],
["number", "12r4a.abc"], ["comment", "// wrong"],
["number", "12r4a.ABC"], ["comment", "// works"],
["number", "12r4A.ABC"], ["comment", "// better"],
["number", "2s"],
["operator", "=="],
["number", "2.1"],
["comment", "// scale degree two, sharp"],
["number", "2b"],
["operator", "=="],
["number", "1.9"],
["comment", "// scale degree two, flat"],
["number", "2ss"],
["operator", "=="],
["number", "2.2"],
["comment", "// scale degree two, double sharp"],
["number", "2bb"],
["operator", "=="],
["number", "1.8"],
["comment", "// scale degree two, double flat"],
["number", "2ssss"],
["operator", "=="],
["number", "2.4"],
["number", "2bbbb"],
["operator", "=="],
["number", "1.6"],
["operator", "-"],
["number", "2s"],
["operator", "=="],
["operator", "-"],
["number", "1.9"],
["operator", "-"],
["number", "2b"],
["operator", "=="],
["operator", "-"],
["number", "2.1"],
["operator", "-"],
["number", "2ss"],
["operator", "=="],
["operator", "-"],
["number", "1.8"],
["operator", "-"],
["number", "2bb"],
["operator", "=="],
["operator", "-"],
["number", "2.2"],
["number", "2b50"],
["operator", "=="],
["number", "1.95"],
["comment", "// scale degree two, fifty cents flat"],
["number", "2s204"],
["operator", "=="],
["number", "2.204"],
["comment", "// scale degree two, 204 cents sharp"]
]
================================================
FILE: tests/languages/supercollider/operator_feature.test
================================================
+ - * / % **
& | << >> +>>
< <= > => == != === !==
|==| |!=|
&& ||
++ +++ @ @@ @|@ |@|
& | - --
<< <<* <<< <<<*
? ?? !?
! ->
.. ...
#
=
`
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "**"],
["operator", "&"],
["operator", "|"],
["operator", "<<"],
["operator", ">>"],
["operator", "+>>"],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", "=>"],
["operator", "=="],
["operator", "!="],
["operator", "==="],
["operator", "!=="],
["operator", "|==|"],
["operator", "|!=|"],
["operator", "&&"],
["operator", "||"],
["operator", "++"],
["operator", "+++"],
["operator", "@"],
["operator", "@@"],
["operator", "@|@"],
["operator", "|@|"],
["operator", "&"],
["operator", "|"],
["operator", "-"],
["operator", "--"],
["operator", "<<"],
["operator", "<<*"],
["operator", "<<<"],
["operator", "<<<*"],
["operator", "?"],
["operator", "??"],
["operator", "!?"],
["operator", "!"],
["operator", "->"],
["operator", ""],
["operator", ".."], ["operator", "..."],
["operator", "#"],
["operator", "="],
["operator", "`"]
]
================================================
FILE: tests/languages/supercollider/punctuation_feature.test
================================================
( ) [ ] { }
, ; . :
#[ ] #{ }
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", ";"],
["punctuation", "."],
["punctuation", ":"],
["punctuation", "#["],
["punctuation", "]"],
["punctuation", "#{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/supercollider/string_feature.test
================================================
""
"foo"
"\""
"
f
o
o
"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\""],
["string", "\"\\\"\""],
["string", "\"\r\nf\r\no\r\no\r\n\""]
]
================================================
FILE: tests/languages/supercollider/symbol_feature.test
================================================
\x
\aiff
\Big_Swifty_And_Assoc
'x'
'aiff'
'BigSwiftyAndAssoc'
'nowhere here'
'somewhere there'
'.+o*o+.'
'\'symbol_within_a_symbol\''
----------------------------------------------------
[
["symbol", "\\x"],
["symbol", "\\aiff"],
["symbol", "\\Big_Swifty_And_Assoc"],
["symbol", "'x'"],
["symbol", "'aiff'"],
["symbol", "'BigSwiftyAndAssoc'"],
["symbol", "'nowhere here'"],
["symbol", "'somewhere there'"],
["symbol", "'.+o*o+.'"],
["symbol", "'\\'symbol_within_a_symbol\\''"]
]
================================================
FILE: tests/languages/swift/attribute_feature.test
================================================
@IBOutlet
@IBDesignable
@IBAction
@IBInspectable
@class_protocol
@exported
@globalActor
@MainActor
@noreturn
@NSCopying
@NSManaged
@objc
@propertyWrapper
@UIApplicationMain
@auto_closure
@SomeCustomName
----------------------------------------------------
[
["attribute", "@IBOutlet"],
["attribute", "@IBDesignable"],
["attribute", "@IBAction"],
["attribute", "@IBInspectable"],
["attribute", "@class_protocol"],
["attribute", "@exported"],
["attribute", "@globalActor"],
["attribute", "@MainActor"],
["attribute", "@noreturn"],
["attribute", "@NSCopying"],
["attribute", "@NSManaged"],
["attribute", "@objc"],
["attribute", "@propertyWrapper"],
["attribute", "@UIApplicationMain"],
["attribute", "@auto_closure"],
["attribute", "@SomeCustomName"]
]
================================================
FILE: tests/languages/swift/class-name_feature.test
================================================
struct SomeStructure {}
enum SomeEnumeration {}
class SomeClass: SomeSuperclass {
class var overrideableComputedTypeProperty: Int {
return 107
}
}
----------------------------------------------------
[
["keyword", "struct"],
["class-name", "SomeStructure"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "enum"],
["class-name", "SomeEnumeration"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "class"],
["class-name", "SomeClass"],
["punctuation", ":"],
["class-name", "SomeSuperclass"],
["punctuation", "{"],
["keyword", "class"],
["keyword", "var"],
" overrideableComputedTypeProperty",
["punctuation", ":"],
["class-name", "Int"],
["punctuation", "{"],
["keyword", "return"],
["number", "107"],
["punctuation", "}"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/swift/comment_feature.test
================================================
// foo
/**/
/* foo */
/*
foo
*/
/*
/*
foo
*/
*/
----------------------------------------------------
[
["comment", "// foo"],
["comment", "/**/"],
["comment", "/* foo */"],
["comment", "/*\r\n foo\r\n*/"],
["comment", "/*\r\n/*\r\n foo\r\n*/\r\n*/"]
]
================================================
FILE: tests/languages/swift/constant_feature.test
================================================
nil
AB
FOO_BAR
kAb
kFoo_bar
----------------------------------------------------
[
["nil", "nil"],
["constant", "AB"],
["constant", "FOO_BAR"],
["constant", "kAb"],
["constant", "kFoo_bar"]
]
----------------------------------------------------
Checks for constants.
================================================
FILE: tests/languages/swift/directive_feature.test
================================================
#if os(tvOS)
#if !DEBUG && ENABLE_INTERNAL_TOOLS
#if SWIFTUI_PROFILE
#if compiler(>=5)
#if compiler(>=5) && swift(<5)
#elseif compiler(>=5)
#else
#endif
#sourceLocation(file: "foo", line: 42)
#sourceLocation()
#error("error message")
#warning("warning message")
#available(iOS 13, *)
#selector(SomeClass.doSomething(_:))
#keyPath(SomeClass.someProperty)
----------------------------------------------------
[
["directive", [
["directive-name", "#if"],
" os",
["punctuation", "("],
"tvOS",
["punctuation", ")"]
]],
["directive", [
["directive-name", "#if"],
["operator", "!"],
"DEBUG ",
["operator", "&&"],
" ENABLE_INTERNAL_TOOLS"
]],
["directive", [
["directive-name", "#if"],
" SWIFTUI_PROFILE"
]],
["directive", [
["directive-name", "#if"],
" compiler",
["punctuation", "("],
["operator", ">="],
["number", "5"],
["punctuation", ")"]
]],
["directive", [
["directive-name", "#if"],
" compiler",
["punctuation", "("],
["operator", ">="],
["number", "5"],
["punctuation", ")"],
["operator", "&&"],
" swift",
["punctuation", "("],
["operator", "<"],
["number", "5"],
["punctuation", ")"]
]],
["directive", [
["directive-name", "#elseif"],
" compiler",
["punctuation", "("],
["operator", ">="],
["number", "5"],
["punctuation", ")"]
]],
["directive", [
["directive-name", "#else"]
]],
["directive", [
["directive-name", "#endif"]
]],
["other-directive", "#sourceLocation"],
["punctuation", "("],
"file",
["punctuation", ":"],
["string-literal", [
["string", "\"foo\""]
]],
["punctuation", ","],
" line",
["punctuation", ":"],
["number", "42"],
["punctuation", ")"],
["other-directive", "#sourceLocation"],
["punctuation", "("],
["punctuation", ")"],
["other-directive", "#error"],
["punctuation", "("],
["string-literal", [
["string", "\"error message\""]
]],
["punctuation", ")"],
["other-directive", "#warning"],
["punctuation", "("],
["string-literal", [
["string", "\"warning message\""]
]],
["punctuation", ")"],
["other-directive", "#available"],
["punctuation", "("],
"iOS ",
["number", "13"],
["punctuation", ","],
["operator", "*"],
["punctuation", ")"],
["other-directive", "#selector"],
["punctuation", "("],
["class-name", "SomeClass"],
["punctuation", "."],
["function", "doSomething"],
["punctuation", "("],
["omit", "_"],
["punctuation", ":"],
["punctuation", ")"],
["punctuation", ")"],
["other-directive", "#keyPath"],
["punctuation", "("],
["class-name", "SomeClass"],
["punctuation", "."],
"someProperty",
["punctuation", ")"]
]
================================================
FILE: tests/languages/swift/function_feature.test
================================================
func greetAgain(person: String) -> String {
return "Hello again, " + person + "!"
}
print(greetAgain(person: "Anna"))
func someFunction(someT: T, someU: U) {
// function body goes here
}
// none of the below are functions
subscript(index: Int) -> Int {
get {}
set(newValue) {}
}
----------------------------------------------------
[
["keyword", "func"],
["function-definition", "greetAgain"],
["punctuation", "("],
"person",
["punctuation", ":"],
["class-name", "String"],
["punctuation", ")"],
["operator", "->"],
["class-name", "String"],
["punctuation", "{"],
["keyword", "return"],
["string-literal", [
["string", "\"Hello again, \""]
]],
["operator", "+"],
" person ",
["operator", "+"],
["string-literal", [
["string", "\"!\""]
]],
["punctuation", "}"],
["function", "print"],
["punctuation", "("],
["function", "greetAgain"],
["punctuation", "("],
"person",
["punctuation", ":"],
["string-literal", [
["string", "\"Anna\""]
]],
["punctuation", ")"],
["punctuation", ")"],
["keyword", "func"],
["function-definition", "someFunction"],
["operator", "<"],
["class-name", "T"],
["punctuation", ":"],
["class-name", "SomeClass"],
["punctuation", ","],
["class-name", "U"],
["punctuation", ":"],
["class-name", "SomeProtocol"],
["operator", ">"],
["punctuation", "("],
"someT",
["punctuation", ":"],
["class-name", "T"],
["punctuation", ","],
" someU",
["punctuation", ":"],
["class-name", "U"],
["punctuation", ")"],
["punctuation", "{"],
["comment", "// function body goes here"],
["punctuation", "}"],
["comment", "// none of the below are functions"],
["keyword", "subscript"],
["punctuation", "("],
"index",
["punctuation", ":"],
["class-name", "Int"],
["punctuation", ")"],
["operator", "->"],
["class-name", "Int"],
["punctuation", "{"],
["keyword", "get"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "set"],
["punctuation", "("],
"newValue",
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/swift/keyword_feature.test
================================================
Any
Protocol
Self
Type
actor
as
assignment
associatedtype
associativity
async
await
break;
case
catch
class;
continue;
convenience
default
defer
deinit
didSet
do
dynamic
else
enum
extension
fallthrough
fileprivate
final
for
func;
get
guard
higherThan
if
import
in
indirect
infix
init
inout
internal
is
isolated
lazy
left
let
lowerThan
mutating
none
nonisolated
nonmutating
open
operator
optional
override
postfix
precedencegroup
prefix
private
protocol
public
repeat
required
rethrows
return
right
safe
self
set
some
static
struct
subscript
super
switch
throw
throws
try
typealias
unowned
unsafe
var
weak
where
while
willSet
----------------------------------------------------
[
["keyword", "Any"],
["keyword", "Protocol"],
["keyword", "Self"],
["keyword", "Type"],
["keyword", "actor"],
["keyword", "as"],
["keyword", "assignment"],
["keyword", "associatedtype"],
["keyword", "associativity"],
["keyword", "async"],
["keyword", "await"],
["keyword", "break"], ["punctuation", ";"],
["keyword", "case"],
["keyword", "catch"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "continue"], ["punctuation", ";"],
["keyword", "convenience"],
["keyword", "default"],
["keyword", "defer"],
["keyword", "deinit"],
["keyword", "didSet"],
["keyword", "do"],
["keyword", "dynamic"],
["keyword", "else"],
["keyword", "enum"],
["keyword", "extension"],
["keyword", "fallthrough"],
["keyword", "fileprivate"],
["keyword", "final"],
["keyword", "for"],
["keyword", "func"], ["punctuation", ";"],
["keyword", "get"],
["keyword", "guard"],
["keyword", "higherThan"],
["keyword", "if"],
["keyword", "import"],
["keyword", "in"],
["keyword", "indirect"],
["keyword", "infix"],
["keyword", "init"],
["keyword", "inout"],
["keyword", "internal"],
["keyword", "is"],
["keyword", "isolated"],
["keyword", "lazy"],
["keyword", "left"],
["keyword", "let"],
["keyword", "lowerThan"],
["keyword", "mutating"],
["keyword", "none"],
["keyword", "nonisolated"],
["keyword", "nonmutating"],
["keyword", "open"],
["keyword", "operator"],
["keyword", "optional"],
["keyword", "override"],
["keyword", "postfix"],
["keyword", "precedencegroup"],
["keyword", "prefix"],
["keyword", "private"],
["keyword", "protocol"],
["keyword", "public"],
["keyword", "repeat"],
["keyword", "required"],
["keyword", "rethrows"],
["keyword", "return"],
["keyword", "right"],
["keyword", "safe"],
["keyword", "self"],
["keyword", "set"],
["keyword", "some"],
["keyword", "static"],
["keyword", "struct"],
["keyword", "subscript"],
["keyword", "super"],
["keyword", "switch"],
["keyword", "throw"],
["keyword", "throws"],
["keyword", "try"],
["keyword", "typealias"],
["keyword", "unowned"],
["keyword", "unsafe"],
["keyword", "var"],
["keyword", "weak"],
["keyword", "where"],
["keyword", "while"],
["keyword", "willSet"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/swift/label_feature.test
================================================
gameLoop: while square != finalSquare {
break gameLoop
continue gameLoop
}
----------------------------------------------------
[
["label", "gameLoop"],
["punctuation", ":"],
["keyword", "while"],
" square ",
["operator", "!="],
" finalSquare ",
["punctuation", "{"],
["keyword", "break"],
["label", " gameLoop"],
["keyword", "continue"],
["label", " gameLoop"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/swift/literal_feature.test
================================================
#file
#fileID
#filePath
#line
#column
#function
#dsohandle
#colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
#fileLiteral(resourceName: "foo")
#imageLiteral(resourceName: "foo")
----------------------------------------------------
[
["literal", "#file"],
["literal", "#fileID"],
["literal", "#filePath"],
["literal", "#line"],
["literal", "#column"],
["literal", "#function"],
["literal", "#dsohandle"],
["literal", "#colorLiteral"],
["punctuation", "("],
"red",
["punctuation", ":"],
["number", "1.0"],
["punctuation", ","],
" green",
["punctuation", ":"],
["number", "1.0"],
["punctuation", ","],
" blue",
["punctuation", ":"],
["number", "1.0"],
["punctuation", ","],
" alpha",
["punctuation", ":"],
["number", "1.0"],
["punctuation", ")"],
["literal", "#fileLiteral"],
["punctuation", "("],
"resourceName",
["punctuation", ":"],
["string-literal", [
["string", "\"foo\""]
]],
["punctuation", ")"],
["literal", "#imageLiteral"],
["punctuation", "("],
"resourceName",
["punctuation", ":"],
["string-literal", [
["string", "\"foo\""]
]],
["punctuation", ")"]
]
================================================
FILE: tests/languages/swift/number_feature.test
================================================
42
42_000
3.1415_9
4.2e14
0xBaf_Face
0xFF47.AB_61p2
0b0000_1111
0o147_654
----------------------------------------------------
[
["number", "42"],
["number", "42_000"],
["number", "3.1415_9"],
["number", "4.2e14"],
["number", "0xBaf_Face"],
["number", "0xFF47.AB_61p2"],
["number", "0b0000_1111"],
["number", "0o147_654"]
]
----------------------------------------------------
Checks for decimal, hexadecimal, octal and binary numbers.
================================================
FILE: tests/languages/swift/omit_feature.test
================================================
_
----------------------------------------------------
[
["omit", "_"]
]
================================================
FILE: tests/languages/swift/operator_feature.test
================================================
+ - * / %
+= -= *= /= %=
~ & | ^ << >>
~= &= |= ^= <<= >>=
&+ &- &* &<< &>>
&+= &-= &*= &<<= &>>=
=
== != === !== <= >= < >
! && ||
..< ...
->
??
// custom operators
+++
prefix func +++ (vector: inout Vector2D) -> Vector2D {}
// dot operators (SIMD)
.!= .== .< .> .<= .>=
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "%="],
["operator", "~"],
["operator", "&"],
["operator", "|"],
["operator", "^"],
["operator", "<<"],
["operator", ">>"],
["operator", "~="],
["operator", "&="],
["operator", "|="],
["operator", "^="],
["operator", "<<="],
["operator", ">>="],
["operator", "&+"],
["operator", "&-"],
["operator", "&*"],
["operator", "&<<"],
["operator", "&>>"],
["operator", "&+="],
["operator", "&-="],
["operator", "&*="],
["operator", "&<<="],
["operator", "&>>="],
["operator", "="],
["operator", "=="],
["operator", "!="],
["operator", "==="],
["operator", "!=="],
["operator", "<="],
["operator", ">="],
["operator", "<"],
["operator", ">"],
["operator", "!"],
["operator", "&&"],
["operator", "||"],
["operator", "..<"], ["operator", "..."],
["operator", "->"],
["operator", "??"],
["comment", "// custom operators"],
["operator", "+++"],
["keyword", "prefix"],
["keyword", "func"],
["operator", "+++"],
["punctuation", "("],
"vector",
["punctuation", ":"],
["keyword", "inout"],
["class-name", "Vector2D"],
["punctuation", ")"],
["operator", "->"],
["class-name", "Vector2D"],
["punctuation", "{"],
["punctuation", "}"],
["comment", "// dot operators (SIMD)"],
["operator", ".!="],
["operator", ".=="],
["operator", ".<"],
["operator", ".>"],
["operator", ".<="],
["operator", ".>="]
]
================================================
FILE: tests/languages/swift/punctuation_feature.test
================================================
{ } [ ] ( )
; , . :
\
----------------------------------------------------
[
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", ","],
["punctuation", "."],
["punctuation", ":"],
["punctuation", "\\"]
]
================================================
FILE: tests/languages/swift/short-argument_feature.test
================================================
reversedNames = names.sorted(by: { $0 > $1 } )
----------------------------------------------------
[
"reversedNames ",
["operator", "="],
" names",
["punctuation", "."],
["function", "sorted"],
["punctuation", "("],
"by",
["punctuation", ":"],
["punctuation", "{"],
["short-argument", "$0"],
["operator", ">"],
["short-argument", "$1"],
["punctuation", "}"],
["punctuation", ")"]
]
================================================
FILE: tests/languages/swift/string_feature.test
================================================
""
"fo\"o"
"foo\
bar"
"foo /* not a comment */ bar"
"foo\
/* not a comment */\
bar"
let softWrappedQuotation = """
The White Rabbit put on his spectacles. "Where shall I begin, \
please your Majesty?" he asked.
"Begin at the beginning," the King said gravely, "and go on \
till you come to the end; then stop."
"""
let threeMoreDoubleQuotationMarks = #"""
Here are three more double quotes: """
"""#
#"Write an interpolated string in Swift using \(multiplier)."#
"foo \(42)"
"foo \(f("bar"))"
"\(multiplier) times 2.5 is \(Double(multiplier) * 2.5)"
#"6 times 7 is \#(6 * 7)."#
----------------------------------------------------
[
["string-literal", [
["string", "\"\""]
]],
["string-literal", [
["string", "\"fo\\\"o\""]
]],
["string-literal", [
["string", "\"foo"],
["punctuation", "\\"],
["string", "\r\nbar\""]
]],
["string-literal", [
["string", "\"foo /* not a comment */ bar\""]
]],
["string-literal", [
["string", "\"foo"],
["punctuation", "\\"],
["string", "\r\n/* not a comment */"],
["punctuation", "\\"],
["string", "\r\nbar\""]
]],
["keyword", "let"],
" softWrappedQuotation ",
["operator", "="],
["string-literal", [
["string", "\"\"\"\r\nThe White Rabbit put on his spectacles. \"Where shall I begin, "],
["punctuation", "\\"],
["string", "\r\nplease your Majesty?\" he asked.\r\n\r\n\"Begin at the beginning,\" the King said gravely, \"and go on "],
["punctuation", "\\"],
["string", "\r\ntill you come to the end; then stop.\"\r\n\"\"\""]
]],
["keyword", "let"],
" threeMoreDoubleQuotationMarks ",
["operator", "="],
["string-literal", [
["string", "#\"\"\"\r\nHere are three more double quotes: \"\"\"\r\n\"\"\"#"]
]],
["string-literal", [
["string", "#\"Write an interpolated string in Swift using \\(multiplier).\"#"]
]],
["string-literal", [
["string", "\"foo "],
["interpolation-punctuation", "\\("],
["interpolation", [
["number", "42"]
]],
["interpolation-punctuation", ")"],
["string", "\""]
]],
["string-literal", [
["string", "\"foo "],
["interpolation-punctuation", "\\("],
["interpolation", [
["function", "f"],
["punctuation", "("],
["string-literal", [
["string", "\"bar\""]
]],
["punctuation", ")"]
]],
["interpolation-punctuation", ")"],
["string", "\""]
]],
["string-literal", [
["string", "\""],
["interpolation-punctuation", "\\("],
["interpolation", ["multiplier"]],
["interpolation-punctuation", ")"],
["string", " times 2.5 is "],
["interpolation-punctuation", "\\("],
["interpolation", [
["class-name", "Double"],
["punctuation", "("],
"multiplier",
["punctuation", ")"],
["operator", "*"],
["number", "2.5"]
]],
["interpolation-punctuation", ")"],
["string", "\""]
]],
["string-literal", [
["string", "#\"6 times 7 is "],
["interpolation-punctuation", "\\#("],
["interpolation", [
["number", "6"],
["operator", "*"],
["number", "7"]
]],
["interpolation-punctuation", ")"],
["string", ".\"#"]
]]
]
----------------------------------------------------
Checks for strings and string interpolation.
================================================
FILE: tests/languages/systemd/boolean_feature.test
================================================
foo=on
foo=true
foo=yes
foo=off
foo=false
foo=no
----------------------------------------------------
[
["key", "foo"],
["punctuation", "="],
["value", [
["boolean", "on"]
]],
["key", "foo"],
["punctuation", "="],
["value", [
["boolean", "true"]
]],
["key", "foo"],
["punctuation", "="],
["value", [
["boolean", "yes"]
]],
["key", "foo"],
["punctuation", "="],
["value", [
["boolean", "off"]
]],
["key", "foo"],
["punctuation", "="],
["value", [
["boolean", "false"]
]],
["key", "foo"],
["punctuation", "="],
["value", [
["boolean", "no"]
]]
]
================================================
FILE: tests/languages/systemd/comment_feature.test
================================================
# comment
; comment
----------------------------------------------------
[
["comment", "# comment"],
["comment", "; comment"]
]
================================================
FILE: tests/languages/systemd/key_feature.test
================================================
foo=
foo =
----------------------------------------------------
[
["key", "foo"], ["punctuation", "="],
["key", "foo"], ["punctuation", "="]
]
================================================
FILE: tests/languages/systemd/section_feature.test
================================================
[Section Foo]
----------------------------------------------------
[
["section", [
["punctuation", "["],
["section-name", "Section Foo"],
["punctuation", "]"]
]]
]
================================================
FILE: tests/languages/systemd/value_feature.test
================================================
foo= value 2
foo="something" "some thing" "…"
foo= "something" "some thing" "…"
foo=value 2 \
value 2 continued
foo=value 3\
# this line is ignored
; this line is ignored too
value 3 continued
----------------------------------------------------
[
["key", "foo"], ["punctuation", "="], ["value", ["value 2"]],
["key", "foo"],
["punctuation", "="],
["value", [
["quoted", "\"something\""],
["quoted", "\"some thing\""],
["quoted", "\"…\""]
]],
["key", "foo"],
["punctuation", "="],
["value", [
["quoted", "\"something\""],
["quoted", "\"some thing\""],
["quoted", "\"…\""]
]],
["key", "foo"],
["punctuation", "="],
["value", [
"value 2 ", ["punctuation", "\\"],
"\r\n value 2 continued"
]],
["key", "foo"],
["punctuation", "="],
["value", [
"value 3", ["punctuation", "\\"],
["comment", "# this line is ignored"],
["comment", "; this line is ignored too"],
"\r\n value 3 continued"
]]
]
================================================
FILE: tests/languages/t4-cs/block_class-feature_feature.test
================================================
Foo
<#+
public class Bar {}
#>
----------------------------------------------------
[
"Foo\r\n",
["block", [
["class-feature", [
["delimiter", "<#+"],
["content", [
["keyword", "public"],
["keyword", "class"],
["class-name", ["Bar"]],
["punctuation", "{"],
["punctuation", "}"]
]],
["delimiter", "#>"]
]]
]]
]
----------------------------------------------------
Checks for class feature control blocks.
================================================
FILE: tests/languages/t4-cs/block_directive_feature.test
================================================
<#@ template debug="false" hostspecific="false" language="C#" #>
<#@ assembly name="System" #>
<#@ assembly name="System.Core" #>
<#@ import namespace="System.Linq" #>
<#@ output extension=".cs" #>
<#@ include file="Foo.t4" #>
<#@ CleanupBehavior processor="T4VSHost" CleanupAfterProcessingtemplate="true" #>
----------------------------------------------------
[
["block", [
["directive", [
["delimiter", "<#@"],
["content", [
["keyword", "template"],
["attr-name", "debug"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"false",
["punctuation", "\""]
]],
["attr-name", "hostspecific"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"false",
["punctuation", "\""]
]],
["attr-name", "language"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"C#",
["punctuation", "\""]
]]
]],
["delimiter", "#>"]
]]
]],
["block", [
["directive", [
["delimiter", "<#@"],
["content", [
["keyword", "assembly"],
["attr-name", "name"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"System",
["punctuation", "\""]
]]
]],
["delimiter", "#>"]
]]
]],
["block", [
["directive", [
["delimiter", "<#@"],
["content", [
["keyword", "assembly"],
["attr-name", "name"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"System.Core",
["punctuation", "\""]
]]
]],
["delimiter", "#>"]
]]
]],
["block", [
["directive", [
["delimiter", "<#@"],
["content", [
["keyword", "import"],
["attr-name", "namespace"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"System.Linq",
["punctuation", "\""]
]]
]],
["delimiter", "#>"]
]]
]],
["block", [
["directive", [
["delimiter", "<#@"],
["content", [
["keyword", "output"],
["attr-name", "extension"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
".cs",
["punctuation", "\""]
]]
]],
["delimiter", "#>"]
]]
]],
["block", [
["directive", [
["delimiter", "<#@"],
["content", [
["keyword", "include"],
["attr-name", "file"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"Foo.t4",
["punctuation", "\""]
]]
]],
["delimiter", "#>"]
]]
]],
["block", [
["directive", [
["delimiter", "<#@"],
["content", [
["keyword", "CleanupBehavior"],
["attr-name", "processor"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"T4VSHost",
["punctuation", "\""]
]],
["attr-name", "CleanupAfterProcessingtemplate"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"true",
["punctuation", "\""]
]]
]],
["delimiter", "#>"]
]]
]]
]
----------------------------------------------------
Checks for text template directives.
================================================
FILE: tests/languages/t4-cs/block_expression_feature.test
================================================
var a = <#= name + "abc" #>;
var b = new int[] { <#=
String.Join(", ", number.Select(Transformation))
#> };
----------------------------------------------------
[
"var a = ",
["block", [
["expression", [
["delimiter", "<#="],
["content", [
" name ",
["operator", "+"],
["string", "\"abc\""]
]],
["delimiter", "#>"]
]]
]],
";\r\nvar b = new int[] { ",
["block", [
["expression", [
["delimiter", "<#="],
["content", [
"\r\n\tString",
["punctuation", "."],
["function", "Join"],
["punctuation", "("],
["string", "\", \""],
["punctuation", ","],
" number",
["punctuation", "."],
["function", "Select"],
["punctuation", "("],
"Transformation",
["punctuation", ")"],
["punctuation", ")"]
]],
["delimiter", "#>"]
]]
]],
" };"
]
----------------------------------------------------
Checks for expression control blocks.
================================================
FILE: tests/languages/t4-cs/block_standard_feature.test
================================================
<#
for (var i = 0; i < 10; i++)
{
if (i % 2 == 0)
{
#>
The number <#= i #> is even.
<#
}
}
#>
----------------------------------------------------
[
["block", [
["standard", [
["delimiter", "<#"],
["content", [
["keyword", "for"],
["punctuation", "("],
["class-name", [
["keyword", "var"]
]],
" i ",
["operator", "="],
["number", "0"],
["punctuation", ";"],
" i ",
["operator", "<"],
["number", "10"],
["punctuation", ";"],
" i",
["operator", "++"],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "if"],
["punctuation", "("],
"i ",
["operator", "%"],
["number", "2"],
["operator", "=="],
["number", "0"],
["punctuation", ")"],
["punctuation", "{"]
]],
["delimiter", "#>"]
]]
]],
"\r\nThe number ",
["block", [
["expression", [
["delimiter", "<#="],
["content", [" i "]],
["delimiter", "#>"]
]]
]],
" is even.\r\n",
["block", [
["standard", [
["delimiter", "<#"],
["content", [
["punctuation", "}"],
["punctuation", "}"]
]],
["delimiter", "#>"]
]]
]]
]
----------------------------------------------------
Checks for standard control blocks.
================================================
FILE: tests/languages/t4-vb/block_feature.test
================================================
<#@ template debug="false" hostspecific="false" language="VB" #>
<#+
Public Class Bar
End Class
#>
<#
For i As Integer = 0 To 9
If i Mod 2 = 0 Then
#>
The number <#= i #> is even.
<#
End If
Next i
#>
----------------------------------------------------
[
["block", [
["directive", [
["delimiter", "<#@"],
["content", [
["keyword", "template"],
["attr-name", "debug"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"false",
["punctuation", "\""]
]],
["attr-name", "hostspecific"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"false",
["punctuation", "\""]
]],
["attr-name", "language"],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"VB",
["punctuation", "\""]
]]
]],
["delimiter", "#>"]
]]
]],
["block", [
["class-feature", [
["delimiter", "<#+"],
["content", [
["keyword", "Public"], ["keyword", "Class"], " Bar\r\n",
["keyword", "End"], ["keyword", "Class"]
]],
["delimiter", "#>"]
]]
]],
["block", [
["standard", [
["delimiter", "<#"],
["content", [
["keyword", "For"],
" i ",
["keyword", "As"],
["keyword", "Integer"],
["operator", "="],
["number", "0"],
["keyword", "To"],
["number", "9"],
["keyword", "If"],
" i ",
["keyword", "Mod"],
["number", "2"],
["operator", "="],
["number", "0"],
["keyword", "Then"]
]],
["delimiter", "#>"]
]]
]],
"\r\nThe number ",
["block", [
["expression", [
["delimiter", "<#="],
["content", [" i "]],
["delimiter", "#>"]
]]
]],
" is even.\r\n",
["block", [
["standard", [
["delimiter", "<#"],
["content", [
["keyword", "End"], ["keyword", "If"],
["keyword", "Next"], " i\r\n"
]],
["delimiter", "#>"]
]]
]]
]
----------------------------------------------------
Checks for standard control blocks.
================================================
FILE: tests/languages/tap/bail_out_feature.test
================================================
Bail out! Couldn't connect to database.
bail out! Failed to call API.
----------------------------------------------------
[
["bailout", "Bail out! Couldn't connect to database."],
["bailout", "bail out! Failed to call API."]
]
----------------------------------------------------
Checks bail out
================================================
FILE: tests/languages/tap/directive_feature.test
================================================
ok # SKIP test not written
ok 42 this is the description # TODO write test
----------------------------------------------------
[
["pass", "ok " ],
["directive", "# SKIP test not written"],
["pass", "ok 42 this is the description "],
["directive", "# TODO write test"]
]
----------------------------------------------------
Checks directives
================================================
FILE: tests/languages/tap/pass_fail_feature.test
================================================
not ok
not ok 42 this is the description of the test
ok
ok 42 this is the description of the test
----------------------------------------------------
[
["fail", "not ok" ],
["fail", "not ok 42 this is the description of the test"],
["pass", "ok" ],
["pass", "ok 42 this is the description of the test"]
]
----------------------------------------------------
Checks test pass & fail together correctly
================================================
FILE: tests/languages/tap/plan_feature.test
================================================
1..10
1..10 # directive
----------------------------------------------------
[
["plan", "1..10" ],
["plan", "1..10 # directive" ]
]
----------------------------------------------------
Checks TAP plan
================================================
FILE: tests/languages/tap/pragma_feature.test
================================================
pragma +strict
pragma -strict
----------------------------------------------------
[
["pragma", "pragma +strict"],
["pragma", "pragma -strict"]
]
----------------------------------------------------
Checks pragma
================================================
FILE: tests/languages/tap/subtest_feature.test
================================================
# Subtest
----------------------------------------------------
[
["subtest", "# Subtest"]
]
================================================
FILE: tests/languages/tap/version_feature.test
================================================
TAP version 13
----------------------------------------------------
[
["version", "TAP version 13" ]
]
----------------------------------------------------
Checks TAP version
================================================
FILE: tests/languages/tap/yamlish_feature.test
================================================
ok
---
message: "Failed with error 'hostname peebles.example.com not found'"
severity: fail
data:
got:
hostname: 'peebles.example.com'
address: ~
expected:
hostname: 'peebles.example.com'
address: '85.193.201.85'
...
----------------------------------------------------
[
["pass", "ok"],
["yamlish", [
["punctuation", "---"],
["key", "message"],
["punctuation", ":"],
["string", "\"Failed with error 'hostname peebles.example.com not found'\""],
["key", "severity"],
["punctuation", ":"],
" fail\r\n ",
["key", "data"],
["punctuation", ":"],
["key", "got"],
["punctuation", ":"],
["key", "hostname"],
["punctuation", ":"],
["string", "'peebles.example.com'"],
["key", "address"],
["punctuation", ":"],
["null", "~"],
["key", "expected"],
["punctuation", ":"],
["key", "hostname"],
["punctuation", ":"],
["string", "'peebles.example.com'"],
["key", "address"],
["punctuation", ":"],
["string", "'85.193.201.85'"],
["punctuation", "..."]
]]
]
----------------------------------------------------
Checks yaml embedding
================================================
FILE: tests/languages/tcl/builtin_feature.test
================================================
proc
return
class
error
eval
exit
for
foreach
if elseif else
switch
while
break
continue
----------------------------------------------------
[
["builtin", "proc"],
["builtin", "return"],
["builtin", "class"],
["builtin", "error"],
["builtin", "eval"],
["builtin", "exit"],
["builtin", "for"],
["builtin", "foreach"],
["builtin", "if"], ["builtin", "elseif"], ["builtin", "else"],
["builtin", "switch"],
["builtin", "while"],
["builtin", "break"],
["builtin", "continue"]
]
----------------------------------------------------
Checks for builtins.
================================================
FILE: tests/languages/tcl/comment_feature.test
================================================
#
# foobar
----------------------------------------------------
[
["comment", "#"],
["comment", "# foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/tcl/function_feature.test
================================================
proc foo
proc Foobar
proc foo_bar_42
----------------------------------------------------
[
["builtin", "proc"], ["function", "foo"],
["builtin", "proc"], ["function", "Foobar"],
["builtin", "proc"], ["function", "foo_bar_42"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/tcl/keyword_feature.test
================================================
after
append
apply
array
auto_execok
auto_import
auto_load
auto_mkindex
auto_qualify
auto_reset
automkindex_old
bgerror
binary
catch
cd
chan
clock
close
concat
dde
dict
encoding
eof
exec
expr
fblocked
fconfigure
fcopy
file
fileevent
filename
flush
gets
glob
history
http
incr
info
interp
join
lappend
lassign
lindex
linsert
list
llength
load
lrange
lrepeat
lreplace
lreverse
lsearch
lset
lsort
mathfunc
mathop
memory
msgcat
namespace
open
package
parray
pid
pkg_mkIndex
platform
puts
pwd
re_syntax
read
refchan
regexp
registry
regsub
rename
Safe_Base
scan
seek
set
socket
source
split
string
subst
Tcl
tcl_endOfWord
tcl_findLibrary
tclstartOfNextWord
tclstartOfPreviousWord
tclwordBreakAfter
tclwordBreakBefore
tcltest
tclvars
tell
time
tm
trace
unknown
unload
unset
update
uplevel
vwait
----------------------------------------------------
[
["keyword", "after"],
["keyword", "append"],
["keyword", "apply"],
["keyword", "array"],
["keyword", "auto_execok"],
["keyword", "auto_import"],
["keyword", "auto_load"],
["keyword", "auto_mkindex"],
["keyword", "auto_qualify"],
["keyword", "auto_reset"],
["keyword", "automkindex_old"],
["keyword", "bgerror"],
["keyword", "binary"],
["keyword", "catch"],
["keyword", "cd"],
["keyword", "chan"],
["keyword", "clock"],
["keyword", "close"],
["keyword", "concat"],
["keyword", "dde"],
["keyword", "dict"],
["keyword", "encoding"],
["keyword", "eof"],
["keyword", "exec"],
["keyword", "expr"],
["keyword", "fblocked"],
["keyword", "fconfigure"],
["keyword", "fcopy"],
["keyword", "file"],
["keyword", "fileevent"],
["keyword", "filename"],
["keyword", "flush"],
["keyword", "gets"],
["keyword", "glob"],
["keyword", "history"],
["keyword", "http"],
["keyword", "incr"],
["keyword", "info"],
["keyword", "interp"],
["keyword", "join"],
["keyword", "lappend"],
["keyword", "lassign"],
["keyword", "lindex"],
["keyword", "linsert"],
["keyword", "list"],
["keyword", "llength"],
["keyword", "load"],
["keyword", "lrange"],
["keyword", "lrepeat"],
["keyword", "lreplace"],
["keyword", "lreverse"],
["keyword", "lsearch"],
["keyword", "lset"],
["keyword", "lsort"],
["keyword", "mathfunc"],
["keyword", "mathop"],
["keyword", "memory"],
["keyword", "msgcat"],
["keyword", "namespace"],
["keyword", "open"],
["keyword", "package"],
["keyword", "parray"],
["keyword", "pid"],
["keyword", "pkg_mkIndex"],
["keyword", "platform"],
["keyword", "puts"],
["keyword", "pwd"],
["keyword", "re_syntax"],
["keyword", "read"],
["keyword", "refchan"],
["keyword", "regexp"],
["keyword", "registry"],
["keyword", "regsub"],
["keyword", "rename"],
["keyword", "Safe_Base"],
["keyword", "scan"],
["keyword", "seek"],
["keyword", "set"],
["keyword", "socket"],
["keyword", "source"],
["keyword", "split"],
["keyword", "string"],
["keyword", "subst"],
["keyword", "Tcl"],
["keyword", "tcl_endOfWord"],
["keyword", "tcl_findLibrary"],
["keyword", "tclstartOfNextWord"],
["keyword", "tclstartOfPreviousWord"],
["keyword", "tclwordBreakAfter"],
["keyword", "tclwordBreakBefore"],
["keyword", "tcltest"],
["keyword", "tclvars"],
["keyword", "tell"],
["keyword", "time"],
["keyword", "tm"],
["keyword", "trace"],
["keyword", "unknown"],
["keyword", "unload"],
["keyword", "unset"],
["keyword", "update"],
["keyword", "uplevel"],
["keyword", "vwait"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/tcl/operator_feature.test
================================================
+
-
~
! !=
* **
/
%
< <= <<
> >= >>
==
& &&
| ||
?
^
eq
ne
in
ni
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "~"],
["operator", "!"], ["operator", "!="],
["operator", "*"], ["operator", "**"],
["operator", "/"],
["operator", "%"],
["operator", "<"], ["operator", "<="], ["operator", "<<"],
["operator", ">"], ["operator", ">="], ["operator", ">>"],
["operator", "=="],
["operator", "&"], ["operator", "&&"],
["operator", "|"], ["operator", "||"],
["operator", "?"],
["operator", "^"],
["operator", "eq"],
["operator", "ne"],
["operator", "in"],
["operator", "ni"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/tcl/punctuation_feature.test
================================================
{ } ( ) [ ]
----------------------------------------------------
[
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"]
]
================================================
FILE: tests/languages/tcl/scope_feature.test
================================================
global
upvar
variable
----------------------------------------------------
[
["scope", "global"],
["scope", "upvar"],
["scope", "variable"]
]
----------------------------------------------------
Checks for scopes.
================================================
FILE: tests/languages/tcl/string_feature.test
================================================
""
"fo\"obar"
"fo\"o\
bar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "\"fo\\\"o\\\r\nbar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/tcl/variable_feature.test
================================================
$foo
$Foobar_42
$::foo
$foo::bar42
${foobar}
set foo bar
set Foobar_42 baz
set ::foo bar
set foo::bar42 baz
----------------------------------------------------
[
"$", ["variable", "foo"],
"\r\n$", ["variable", "Foobar_42"],
"\r\n$", ["variable", "::foo"],
"\r\n$", ["variable", "foo::bar42"],
"\r\n\r\n$", ["variable", "{foobar}"],
["keyword", "set"], ["variable", "foo"], " bar\r\n",
["keyword", "set"], ["variable", "Foobar_42"], " baz\r\n",
["keyword", "set"], ["variable", "::foo"], " bar\r\n",
["keyword", "set"], ["variable", "foo::bar42"], " baz"
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/textile/acronym_feature.test
================================================
CSS(Cascading Style Sheet)
HTML(HyperText Markup Language)
----------------------------------------------------
[
["phrase", [
["acronym", ["CSS", ["punctuation", "("], ["comment", "Cascading Style Sheet"], ["punctuation", ")"]]],
["acronym", ["HTML", ["punctuation", "("], ["comment", "HyperText Markup Language"], ["punctuation", ")"]]]
]]
]
----------------------------------------------------
Checks for acronyms.
================================================
FILE: tests/languages/textile/block-tag_feature.test
================================================
h1. Header 1
h2>. Header 2
bq. A block quotation
p<. Foo
p=. Bar
p<>. Baz
p(. Foobar
baz
p))). Foo
h1(foo). Foo
h2[en]. Bar
h3{color: red}. Baz
h4[fr]{text-decoration:underline;}(#bar). Foobar
----------------------------------------------------
[
["phrase", [
["block-tag", [
["tag", "h1"],
["punctuation", "."]
]],
" Header 1"
]],
["phrase", [
["block-tag", [
["tag", "h2"],
["modifier", [
["punctuation", ">"]
]],
["punctuation", "."]
]],
" Header 2"
]],
["phrase", [
["block-tag", [
["tag", "bq"],
["punctuation", "."]
]],
" A block quotation"
]],
["phrase", [
["block-tag", [
["tag", "p"],
["modifier", [
["punctuation", "<"]
]],
["punctuation", "."]
]],
" Foo"
]],
["phrase", [
["block-tag", [
["tag", "p"],
["modifier", [
["punctuation", "="]
]],
["punctuation", "."]
]],
" Bar"
]],
["phrase", [
["block-tag", [
["tag", "p"],
["modifier", [
["punctuation", "<"],
["punctuation", ">"]
]],
["punctuation", "."]
]],
" Baz"
]],
["phrase", [
["block-tag", [
["tag", "p"],
["modifier", [
["punctuation", "("]
]],
["punctuation", "."]
]],
" Foobar\r\nbaz"
]],
["phrase", [
["block-tag", [
["tag", "p"],
["modifier", [
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ")"]
]],
["punctuation", "."]
]],
" Foo"
]],
["phrase", [
["block-tag", [
["tag", "h1"],
["modifier", [
["punctuation", "("],
["class-id", "foo"],
["punctuation", ")"]
]],
["punctuation", "."]
]],
" Foo"
]],
["phrase", [
["block-tag", [
["tag", "h2"],
["modifier", [
["punctuation", "["],
["lang", "en"],
["punctuation", "]"]
]],
["punctuation", "."]
]],
" Bar"
]],
["phrase", [
["block-tag", [
["tag", "h3"],
["modifier", [
["css", "{color: red}"]
]],
["punctuation", "."]
]],
" Baz"
]],
["phrase", [
["block-tag", [
["tag", "h4"],
["modifier", [
["punctuation", "["],
["lang", "fr"],
["punctuation", "]"],
["css", "{text-decoration:underline;}"],
["punctuation", "("],
["class-id", "#bar"],
["punctuation", ")"]
]],
["punctuation", "."]
]],
" Foobar"
]]
]
----------------------------------------------------
Checks for tags at the beginning of a block and alignment modifiers.
================================================
FILE: tests/languages/textile/footnote_feature.test
================================================
Foo[1]
Bar[42]
----------------------------------------------------
[
["phrase", [
"Foo", ["footnote", [["punctuation", "["], "1", ["punctuation", "]"]]],
"\r\nBar", ["footnote", [["punctuation", "["], "42", ["punctuation", "]"]]]
]]
]
----------------------------------------------------
Checks for footnotes.
================================================
FILE: tests/languages/textile/image_feature.test
================================================
!foo.png!
!bar.jpg(Foo bar)!
!foo.png!:http://prismjs.com
!bar.jpg(Foo bar)!:http://www.example.com
!bar.jpg!
!(foo)[en]{border:1px solid #ccc}foo.png!
----------------------------------------------------
[
["phrase", [
["image", [
["punctuation", "!"],
["source", "foo.png"],
["punctuation", "!"]
]],
["image", [
["punctuation", "!"],
["source", "bar.jpg(Foo bar)"],
["punctuation", "!"]
]],
["image", [
["punctuation", "!"],
["source", "foo.png"],
["punctuation", "!"],
["punctuation", ":"],
["url", "http://prismjs.com"]
]],
["image", [
["punctuation", "!"],
["source", "bar.jpg(Foo bar)"],
["punctuation", "!"],
["punctuation", ":"],
["url", "http://www.example.com"]
]]
]],
["phrase", [
["image", [
["punctuation", "!"],
["modifier", [
["punctuation", "<"]
]],
["source", "foo.png"],
["punctuation", "!"]
]],
["image", [
["punctuation", "!"],
["modifier", [
["punctuation", ">"]
]],
["source", "bar.jpg"],
["punctuation", "!"]
]],
["image", [
["punctuation", "!"],
["modifier", [
["punctuation", "("],
["class-id", "foo"],
["punctuation", ")"],
["punctuation", "["],
["lang", "en"],
["punctuation", "]"],
["css", "{border:1px solid #ccc}"]
]],
["source", "foo.png"],
["punctuation", "!"]
]]
]]
]
----------------------------------------------------
Checks for images.
================================================
FILE: tests/languages/textile/inline_feature.test
================================================
*bold*
**bold**
_italic_
__italic__
??cite??
@code@
+inserted+
-deleted-
%span%
^superscript^
~subscript~
*{color:red}bold*
__(foo#bar)[fr]italique__
%{text-decoration:underline}span *[en]bold*%
*_a_ __b__ ??c?? @d@ +e+ -f- %g% ^h^ ~i~*
**_a_ __b__ ??c?? @d@ +e+ -f- %g% ^h^ ~i~**
_*a* **b** ??c?? @d@ +e+ -f- %g% ^h^ ~i~_
__*a* **b** ??c?? @d@ +e+ -f- %g% ^h^ ~i~__
+*a* **b** _c_ __d__ ??e?? @f@ -g- %h% ^i^ ~j~+
-*a* **b** _c_ __d__ ??e?? @f@ +g+ %h% ^i^ ~j~-
%*a* **b** _c_ __d__ ??e?? @f@ +g+ -h- ^i^ ~j~%
not_italic_ _this_either
----------------------------------------------------
[
["phrase", [
["inline", [
["punctuation", "*"],
["bold", ["bold"]],
["punctuation", "*"]
]],
["inline", [
["punctuation", "**"],
["bold", ["bold"]],
["punctuation", "**"]
]],
["inline", [
["punctuation", "_"],
["italic", ["italic"]],
["punctuation", "_"]
]],
["inline", [
["punctuation", "__"],
["italic", ["italic"]],
["punctuation", "__"]
]],
["inline", [
["punctuation", "??"],
["cite", "cite"],
["punctuation", "??"]
]],
["inline", [
["punctuation", "@"],
["code", "code"],
["punctuation", "@"]
]],
["inline", [
["punctuation", "+"],
["inserted", ["inserted"]],
["punctuation", "+"]
]],
["inline", [
["punctuation", "-"],
["deleted", ["deleted"]],
["punctuation", "-"]
]],
["inline", [
["punctuation", "%"],
["span", ["span"]],
["punctuation", "%"]
]],
["inline", [
["punctuation", "^"],
"superscript",
["punctuation", "^"]
]],
["inline", [
["punctuation", "~"],
"subscript",
["punctuation", "~"]
]]
]],
["phrase", [
["inline", [
["punctuation", "*"],
["modifier", [
["css", "{color:red}"]
]],
["bold", ["bold"]],
["punctuation", "*"]
]],
["inline", [
["punctuation", "__"],
["modifier", [
["punctuation", "("],
["class-id", "foo#bar"],
["punctuation", ")"],
["punctuation", "["],
["lang", "fr"],
["punctuation", "]"]
]],
["italic", ["italique"]],
["punctuation", "__"]
]],
["inline", [
["punctuation", "%"],
["modifier", [
["css", "{text-decoration:underline}"]
]],
["span", [
"span ",
["inline", [
["punctuation", "*"],
["modifier", [
["punctuation", "["],
["lang", "en"],
["punctuation", "]"]
]],
["bold", ["bold"]],
["punctuation", "*"]
]]
]],
["punctuation", "%"]
]]
]],
["phrase", [
["inline", [
["punctuation", "*"],
["bold", [
["inline", [
["punctuation", "_"],
["italic", ["a"]],
["punctuation", "_"]
]],
["inline", [
["punctuation", "__"],
["italic", ["b"]],
["punctuation", "__"]
]],
["inline", [
["punctuation", "??"],
["cite", "c"],
["punctuation", "??"]
]],
["inline", [
["punctuation", "@"],
["code", "d"],
["punctuation", "@"]
]],
["inline", [
["punctuation", "+"],
["inserted", ["e"]],
["punctuation", "+"]
]],
["inline", [
["punctuation", "-"],
["deleted", ["f"]],
["punctuation", "-"]
]],
["inline", [
["punctuation", "%"],
["span", ["g"]],
["punctuation", "%"]
]],
["inline", [
["punctuation", "^"],
"h",
["punctuation", "^"]
]],
["inline", [
["punctuation", "~"],
"i",
["punctuation", "~"]
]]
]],
["punctuation", "*"]
]],
["inline", [
["punctuation", "**"],
["bold", [
["inline", [
["punctuation", "_"],
["italic", ["a"]],
["punctuation", "_"]
]],
["inline", [
["punctuation", "__"],
["italic", ["b"]],
["punctuation", "__"]
]],
["inline", [
["punctuation", "??"],
["cite", "c"],
["punctuation", "??"]
]],
["inline", [
["punctuation", "@"],
["code", "d"],
["punctuation", "@"]
]],
["inline", [
["punctuation", "+"],
["inserted", ["e"]],
["punctuation", "+"]
]],
["inline", [
["punctuation", "-"],
["deleted", ["f"]],
["punctuation", "-"]
]],
["inline", [
["punctuation", "%"],
["span", ["g"]],
["punctuation", "%"]
]],
["inline", [
["punctuation", "^"],
"h",
["punctuation", "^"]
]],
["inline", [
["punctuation", "~"],
"i",
["punctuation", "~"]
]]
]],
["punctuation", "**"]
]],
["inline", [
["punctuation", "_"],
["italic", [
["inline", [
["punctuation", "*"],
["bold", ["a"]],
["punctuation", "*"]
]],
["inline", [
["punctuation", "**"],
["bold", ["b"]],
["punctuation", "**"]
]],
["inline", [
["punctuation", "??"],
["cite", "c"],
["punctuation", "??"]
]],
["inline", [
["punctuation", "@"],
["code", "d"],
["punctuation", "@"]
]],
["inline", [
["punctuation", "+"],
["inserted", ["e"]],
["punctuation", "+"]
]],
["inline", [
["punctuation", "-"],
["deleted", ["f"]],
["punctuation", "-"]
]],
["inline", [
["punctuation", "%"],
["span", ["g"]],
["punctuation", "%"]
]],
["inline", [
["punctuation", "^"],
"h",
["punctuation", "^"]
]],
["inline", [
["punctuation", "~"],
"i",
["punctuation", "~"]
]]
]],
["punctuation", "_"]
]],
["inline", [
["punctuation", "__"],
["italic", [
["inline", [
["punctuation", "*"],
["bold", ["a"]],
["punctuation", "*"]
]],
["inline", [
["punctuation", "**"],
["bold", ["b"]],
["punctuation", "**"]
]],
["inline", [
["punctuation", "??"],
["cite", "c"],
["punctuation", "??"]
]],
["inline", [
["punctuation", "@"],
["code", "d"],
["punctuation", "@"]
]],
["inline", [
["punctuation", "+"],
["inserted", ["e"]],
["punctuation", "+"]
]],
["inline", [
["punctuation", "-"],
["deleted", ["f"]],
["punctuation", "-"]
]],
["inline", [
["punctuation", "%"],
["span", ["g"]],
["punctuation", "%"]
]],
["inline", [
["punctuation", "^"],
"h",
["punctuation", "^"]
]],
["inline", [
["punctuation", "~"],
"i",
["punctuation", "~"]
]]
]],
["punctuation", "__"]
]],
["inline", [
["punctuation", "+"],
["inserted", [
["inline", [
["punctuation", "*"],
["bold", ["a"]],
["punctuation", "*"]
]],
["inline", [
["punctuation", "**"],
["bold", ["b"]],
["punctuation", "**"]
]],
["inline", [
["punctuation", "_"],
["italic", ["c"]],
["punctuation", "_"]
]],
["inline", [
["punctuation", "__"],
["italic", ["d"]],
["punctuation", "__"]
]],
["inline", [
["punctuation", "??"],
["cite", "e"],
["punctuation", "??"]
]],
["inline", [
["punctuation", "@"],
["code", "f"],
["punctuation", "@"]
]],
["inline", [
["punctuation", "-"],
["deleted", ["g"]],
["punctuation", "-"]
]],
["inline", [
["punctuation", "%"],
["span", ["h"]],
["punctuation", "%"]
]],
["inline", [
["punctuation", "^"],
"i",
["punctuation", "^"]
]],
["inline", [
["punctuation", "~"],
"j",
["punctuation", "~"]
]]
]],
["punctuation", "+"]
]],
["inline", [
["punctuation", "-"],
["deleted", [
["inline", [
["punctuation", "*"],
["bold", ["a"]],
["punctuation", "*"]
]],
["inline", [
["punctuation", "**"],
["bold", ["b"]],
["punctuation", "**"]
]],
["inline", [
["punctuation", "_"],
["italic", ["c"]],
["punctuation", "_"]
]],
["inline", [
["punctuation", "__"],
["italic", ["d"]],
["punctuation", "__"]
]],
["inline", [
["punctuation", "??"],
["cite", "e"],
["punctuation", "??"]
]],
["inline", [
["punctuation", "@"],
["code", "f"],
["punctuation", "@"]
]],
["inline", [
["punctuation", "+"],
["inserted", ["g"]],
["punctuation", "+"]
]],
["inline", [
["punctuation", "%"],
["span", ["h"]],
["punctuation", "%"]
]],
["inline", [
["punctuation", "^"],
"i",
["punctuation", "^"]
]],
["inline", [
["punctuation", "~"],
"j",
["punctuation", "~"]
]]
]],
["punctuation", "-"]
]],
["inline", [
["punctuation", "%"],
["span", [
["inline", [
["punctuation", "*"],
["bold", ["a"]],
["punctuation", "*"]
]],
["inline", [
["punctuation", "**"],
["bold", ["b"]],
["punctuation", "**"]
]],
["inline", [
["punctuation", "_"],
["italic", ["c"]],
["punctuation", "_"]
]],
["inline", [
["punctuation", "__"],
["italic", ["d"]],
["punctuation", "__"]
]],
["inline", [
["punctuation", "??"],
["cite", "e"],
["punctuation", "??"]
]],
["inline", [
["punctuation", "@"],
["code", "f"],
["punctuation", "@"]
]],
["inline", [
["punctuation", "+"],
["inserted", ["g"]],
["punctuation", "+"]
]],
["inline", [
["punctuation", "-"],
["deleted", ["h"]],
["punctuation", "-"]
]],
["inline", [
["punctuation", "^"],
"i",
["punctuation", "^"]
]],
["inline", [
["punctuation", "~"],
"j",
["punctuation", "~"]
]]
]],
["punctuation", "%"]
]]
]],
["phrase", ["not_italic_ _this_either"]]
]
----------------------------------------------------
Checks for inline styles and nesting.
================================================
FILE: tests/languages/textile/link-ref_feature.test
================================================
[foo]http://prismjs.com
[bar]http://www.example.com
----------------------------------------------------
[
["phrase", [
["link-ref", [
["punctuation", "["],
["string", "foo"],
["punctuation", "]"],
["url", "http://prismjs.com"]
]],
["link-ref", [
["punctuation", "["],
["string", "bar"],
["punctuation", "]"],
["url", "http://www.example.com"]
]]
]]
]
----------------------------------------------------
Checks for links references.
================================================
FILE: tests/languages/textile/link_feature.test
================================================
"Foo bar":http://prismjs.com
"Baz":foo
"Foobar":link-ref
"(foo)[en]{color:blue;}Foo":bar
----------------------------------------------------
[
["phrase", [
["link", [
["punctuation", "\""],
["text", "Foo bar"],
["punctuation", "\""],
["punctuation", ":"],
["url", "http://prismjs.com"]
]],
["link", [
["punctuation", "\""],
["text", "Baz"],
["punctuation", "\""],
["punctuation", ":"],
["url", "foo"]
]],
["link", [
["punctuation", "\""],
["text", "Foobar"],
["punctuation", "\""],
["punctuation", ":"],
["url", "link-ref"]
]],
["link", [
["punctuation", "\""],
["modifier", [
["punctuation", "("],
["class-id", "foo"],
["punctuation", ")"],
["punctuation", "["],
["lang", "en"],
["punctuation", "]"],
["css", "{color:blue;}"]
]],
["text", "Foo"],
["punctuation", "\""],
["punctuation", ":"],
["url", "bar"]
]]
]]
]
----------------------------------------------------
Checks for links.
================================================
FILE: tests/languages/textile/list_feature.test
================================================
# foo
# bar
## baz
#[fr](#foo){background:pink} Foobar
* foo
** bar
*** baz
----------------------------------------------------
[
["phrase", [
["list", [
["punctuation", "#"],
" foo"
]],
["list", [
["punctuation", "#"],
" bar"
]],
["list", [
["punctuation", "##"],
" baz"
]],
["list", [
["punctuation", "#"],
["modifier", [
["punctuation", "["],
["lang", "fr"],
["punctuation", "]"],
["punctuation", "("],
["class-id", "#foo"],
["punctuation", ")"],
["css", "{background:pink}"]
]],
" Foobar"
]]
]],
["phrase", [
["list", [
["punctuation", "*"],
" foo"
]],
["list", [
["punctuation", "**"],
" bar"
]],
["list", [
["punctuation", "***"],
" baz"
]]
]]
]
----------------------------------------------------
Checks for list items.
================================================
FILE: tests/languages/textile/mark_feature.test
================================================
Prism(C)
Foo(TM)
Foobar(R)
----------------------------------------------------
[
["phrase", [
"Prism", ["mark", [["punctuation", "("], "C", ["punctuation", ")"]]],
"\r\nFoo", ["mark", [["punctuation", "("], "TM", ["punctuation", ")"]]],
"\r\nFoobar", ["mark", [["punctuation", "("], "R", ["punctuation", ")"]]]
]]
]
----------------------------------------------------
Checks for marks symbols.
================================================
FILE: tests/languages/textile/table_feature.test
================================================
|_. foo |<_. bar |>_. baz |
|<>. foo |(((. bar |)). baz |
|~. foo |^. bar |=. baz |
|/2. bar |\2. foo
bar
baz |
|\2~>. foobarbaz |
(foo).|(bar).Baz|
(#foo).|(#bar).Baz|
[fr].|[en].Baz|
{color: blue}.|{font-weight:bold}.Baz|
(foo#bar){font-style:italic}[fr].|{background:red;}(bar#baz)[en].Baz|
|*bold*|**bold**|_italic_|__italic__|
|??cite??|@code@|+inserted+|-deleted-|
|%span%|"foo":http://example.com|!foo.jpg!|bar[2]|
|\2.CSS(Cascading Style Sheet)|\2.Foo(TM)|
----------------------------------------------------
[
["phrase", [
["table", [
["punctuation", "|"],
["modifier", [
["punctuation", "_"]
]],
["punctuation", "."],
" foo ",
["punctuation", "|"],
["modifier", [
["punctuation", "<"],
["punctuation", "_"]
]],
["punctuation", "."],
" bar ",
["punctuation", "|"],
["modifier", [
["punctuation", ">"],
["punctuation", "_"]
]],
["punctuation", "."],
" baz ",
["punctuation", "|"],
["punctuation", "|"],
["modifier", [
["punctuation", "<"],
["punctuation", ">"]
]],
["punctuation", "."],
" foo ",
["punctuation", "|"],
["modifier", [
["punctuation", "("],
["punctuation", "("],
["punctuation", "("]
]],
["punctuation", "."],
" bar ",
["punctuation", "|"],
["modifier", [
["punctuation", ")"],
["punctuation", ")"]
]],
["punctuation", "."],
" baz ",
["punctuation", "|"],
["punctuation", "|"],
["modifier", [
["punctuation", "~"]
]],
["punctuation", "."],
" foo ",
["punctuation", "|"],
["modifier", [
["punctuation", "^"]
]],
["punctuation", "."],
" bar ",
["punctuation", "|"],
["modifier", [
["punctuation", "="]
]],
["punctuation", "."],
" baz ",
["punctuation", "|"],
["punctuation", "|"],
["modifier", [
["punctuation", "/2"]
]],
["punctuation", "."],
" bar ",
["punctuation", "|"],
["modifier", [
["punctuation", "\\2"]
]],
["punctuation", "."],
" foo\r\nbar\r\nbaz ",
["punctuation", "|"],
["punctuation", "|"],
["modifier", [
["punctuation", "\\2"],
["punctuation", "~"],
["punctuation", ">"]
]],
["punctuation", "."],
" foobarbaz ",
["punctuation", "|"]
]]
]],
["phrase", [
["table", [
["modifier", [
["punctuation", "("],
["class-id", "foo"],
["punctuation", ")"]
]],
["punctuation", "."],
["punctuation", "|"],
["modifier", [
["punctuation", "("],
["class-id", "bar"],
["punctuation", ")"]
]],
["punctuation", "."],
"Baz",
["punctuation", "|"],
["modifier", [
["punctuation", "("],
["class-id", "#foo"],
["punctuation", ")"]
]],
["punctuation", "."],
["punctuation", "|"],
["modifier", [
["punctuation", "("],
["class-id", "#bar"],
["punctuation", ")"]
]],
["punctuation", "."],
"Baz",
["punctuation", "|"],
["modifier", [
["punctuation", "["],
["lang", "fr"],
["punctuation", "]"]
]],
["punctuation", "."],
["punctuation", "|"],
["modifier", [
["punctuation", "["],
["lang", "en"],
["punctuation", "]"]
]],
["punctuation", "."],
"Baz",
["punctuation", "|"],
["modifier", [
["css", "{color: blue}"]
]],
["punctuation", "."],
["punctuation", "|"],
["modifier", [
["css", "{font-weight:bold}"]
]],
["punctuation", "."],
"Baz",
["punctuation", "|"],
["modifier", [
["punctuation", "("],
["class-id", "foo#bar"],
["punctuation", ")"],
["css", "{font-style:italic}"],
["punctuation", "["],
["lang", "fr"],
["punctuation", "]"]
]],
["punctuation", "."],
["punctuation", "|"],
["modifier", [
["css", "{background:red;}"],
["punctuation", "("],
["class-id", "bar#baz"],
["punctuation", ")"],
["punctuation", "["],
["lang", "en"],
["punctuation", "]"]
]],
["punctuation", "."],
"Baz",
["punctuation", "|"]
]]
]],
["phrase", [
["table", [
["punctuation", "|"],
["inline", [
["punctuation", "*"],
["bold", ["bold"]],
["punctuation", "*"]
]],
["punctuation", "|"],
["inline", [
["punctuation", "**"],
["bold", ["bold"]],
["punctuation", "**"]
]],
["punctuation", "|"],
["inline", [
["punctuation", "_"],
["italic", ["italic"]],
["punctuation", "_"]
]],
["punctuation", "|"],
["inline", [
["punctuation", "__"],
["italic", ["italic"]],
["punctuation", "__"]
]],
["punctuation", "|"],
["punctuation", "|"],
["inline", [
["punctuation", "??"],
["cite", "cite"],
["punctuation", "??"]
]],
["punctuation", "|"],
["inline", [
["punctuation", "@"],
["code", "code"],
["punctuation", "@"]
]],
["punctuation", "|"],
["inline", [
["punctuation", "+"],
["inserted", ["inserted"]],
["punctuation", "+"]
]],
["punctuation", "|"],
["inline", [
["punctuation", "-"],
["deleted", ["deleted"]],
["punctuation", "-"]
]],
["punctuation", "|"],
["punctuation", "|"],
["inline", [
["punctuation", "%"],
["span", ["span"]],
["punctuation", "%"]
]],
["punctuation", "|"],
["link", [
["punctuation", "\""],
["text", "foo"],
["punctuation", "\""],
["punctuation", ":"],
["url", "http://example.com"]
]],
["punctuation", "|"],
["image", [
["punctuation", "!"],
["source", "foo.jpg"],
["punctuation", "!"]
]],
["punctuation", "|"],
"bar",
["footnote", [
["punctuation", "["],
"2",
["punctuation", "]"]
]],
["punctuation", "|"],
["punctuation", "|"],
["modifier", [
["punctuation", "\\2"]
]],
["punctuation", "."],
["acronym", [
"CSS",
["punctuation", "("],
["comment", "Cascading Style Sheet"],
["punctuation", ")"]
]],
["punctuation", "|"],
["modifier", [
["punctuation", "\\2"]
]],
["punctuation", "."],
"Foo",
["mark", [
["punctuation", "("],
"TM",
["punctuation", ")"]
]],
["punctuation", "|"]
]]
]]
]
----------------------------------------------------
Checks for tables with alignment modifiers and spanning.
Also checks for nesting inline styles.
================================================
FILE: tests/languages/textile/tag_feature.test
================================================
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["details"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["details"]],
["punctuation", ">"]
]]
]
================================================
FILE: tests/languages/textile+haml/textile_inclusion.test
================================================
:textile
~
:textile
----------------------------------------------------
[
["filter-textile", [
["filter-name", ":textile"],
["text", [
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]]
]]
]],
["punctuation", "~"],
["filter-textile", [
["filter-name", ":textile"],
["text", [
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]]
]]
]]
]
================================================
FILE: tests/languages/toml/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/toml/comment_feature.test
================================================
# I'm a comment, you're not.
----------------------------------------------------
[
["comment", "# I'm a comment, you're not."]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/toml/date_feature.test
================================================
1979-05-27T07:32:00Z
1979-05-27T00:32:00-07:00
1979-05-27T00:32:00.999999-07:00
1979-05-27 07:32:00Z
1979-05-27T07:32:00
1979-05-27T00:32:00.999999
1979-05-27
07:32:00
00:32:00.999999
----------------------------------------------------
[
["date", "1979-05-27T07:32:00Z"],
["date", "1979-05-27T00:32:00-07:00"],
["date", "1979-05-27T00:32:00.999999-07:00"],
["date", "1979-05-27 07:32:00Z"],
["date", "1979-05-27T07:32:00"],
["date", "1979-05-27T00:32:00.999999"],
["date", "1979-05-27"],
["date", "07:32:00"],
["date", "00:32:00.999999"]
]
----------------------------------------------------
Checks for dates.
================================================
FILE: tests/languages/toml/key_feature.test
================================================
abc = "abc"
"abc" = "abc"
"abc".'a"b"c'.abc = "abc"
a . b . c = "abc"
a = { b = "b", c = "c" }
----------------------------------------------------
[
["key", "abc"],
["punctuation", "="],
["string", "\"abc\""],
["key", "\"abc\""],
["punctuation", "="],
["string", "\"abc\""],
["key", "\"abc\".'a\"b\"c'.abc"],
["punctuation", "="],
["string", "\"abc\""],
["key", "a . b . c"],
["punctuation", "="],
["string", "\"abc\""],
["key", "a"],
["punctuation", "="],
["punctuation", "{"],
["key", "b"],
["punctuation", "="],
["string", "\"b\""],
["punctuation", ","],
["key", "c"],
["punctuation", "="],
["string", "\"c\""],
["punctuation", "}"]
]
----------------------------------------------------
Checks for keys.
================================================
FILE: tests/languages/toml/number_feature.test
================================================
42
0
+0
-0
+99
-17
1_000
5_349_221
0xDEADBEEF
0xdeadbeef
0xdead_beef
0o0123_4567
0o755
0b1101_0110
+1.0
3.1415
-0.01
5e+22
1e6
1e1_000
-2E-2
6.626e-34
9_224_617.445_991_228_313
inf
+inf
-inf
nan
+nan
-nan
----------------------------------------------------
[
["number", "42"],
["number", "0"],
["number", "+0"],
["number", "-0"],
["number", "+99"],
["number", "-17"],
["number", "1_000"],
["number", "5_349_221"],
["number", "0xDEADBEEF"],
["number", "0xdeadbeef"],
["number", "0xdead_beef"],
["number", "0o0123_4567"],
["number", "0o755"],
["number", "0b1101_0110"],
["number", "+1.0"],
["number", "3.1415"],
["number", "-0.01"],
["number", "5e+22"],
["number", "1e6"],
["number", "1e1_000"],
["number", "-2E-2"],
["number", "6.626e-34"],
["number", "9_224_617.445_991_228_313"],
["number", "inf"],
["number", "+inf"],
["number", "-inf"],
["number", "nan"],
["number", "+nan"],
["number", "-nan"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/toml/string_feature.test
================================================
""
"abc"
"\""
''
'#'
'"abc"'
"""
abc
"""
'''
abc
'''
----------------------------------------------------
[
["string", "\"\""],
["string", "\"abc\""],
["string", "\"\\\"\""],
["string", "''"],
["string", "'#'"],
["string", "'\"abc\"'"],
["string", "\"\"\"\r\n\tabc\r\n\t\"\"\""],
["string", "'''\r\n\tabc\r\n\t'''"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/toml/table_feature.test
================================================
[table]
[[array]]
# not a table
foo = [ "bar" ]
----------------------------------------------------
[
["punctuation", "["],
["table", "table"],
["punctuation", "]"],
["punctuation", "["],
["punctuation", "["],
["table", "array"],
["punctuation", "]"],
["punctuation", "]"],
["comment", "# not a table"],
["key", "foo"],
["punctuation", "="],
["punctuation", "["],
["string", "\"bar\""],
["punctuation", "]"]
]
----------------------------------------------------
Checks for tables.
================================================
FILE: tests/languages/treeview/ascii.html.test
================================================
root_folder/
|-- a first folder/
| |-- holidays.mov
| |-- javascript-file.js
| `-- some_picture.jpg
|-- documents/
| |-- spreadsheet.xls
| |-- manual.pdf
| |-- document.docx
| `-- presentation.ppt
| `-- test
|-- empty_folder/
|-- going deeper/
| |-- going deeper/
| | `-- going deeper/
| | `-- going deeper/
| | `-- .secret_file
| |-- style.css
| `-- index.html
|-- music and movies/
| |-- great-song.mp3
| |-- S01E02.new.episode.avi
| |-- S01E02.new.episode.nfo
| `-- track 1.cda
|-- .gitignore
|-- .htaccess
|-- .npmignore
|-- archive 1.zip
|-- archive 2.tar.gz
|-- logo.svg
`-- README.md
----------------------------------------------------
root_folder
/
|--
a first folder
/
|
|--
holidays.mov
|
|--
javascript-file.js
|
`--
some_picture.jpg
|--
documents
/
|
|--
spreadsheet.xls
|
|--
manual.pdf
|
|--
document.docx
|
`--
presentation.ppt
|
`--
test
|--
empty_folder
/
|--
going deeper
/
|
|--
going deeper
/
|
|
`--
going deeper
/
|
|
`--
going deeper
/
|
|
`--
.secret_file
|
|--
style.css
|
`--
index.html
|--
music and movies
/
|
|--
great-song.mp3
|
|--
S01E02.new.episode.avi
|
|--
S01E02.new.episode.nfo
|
`--
track 1.cda
|--
.gitignore
|--
.htaccess
|--
.npmignore
|--
archive 1.zip
|--
archive 2.tar.gz
|--
logo.svg
`--
README.md
================================================
FILE: tests/languages/treeview/box.html.test
================================================
root_folder/
├── a first folder/
| ├── holidays.mov
| ├── javascript-file.js
| └── some_picture.jpg
├── documents/
| ├── spreadsheet.xls
| ├── manual.pdf
| ├── document.docx
| └── presentation.ppt
└── etc.
----------------------------------------------------
root_folder
/
├──
a first folder
/
|
├──
holidays.mov
|
├──
javascript-file.js
|
└──
some_picture.jpg
├──
documents
/
|
├──
spreadsheet.xls
|
├──
manual.pdf
|
├──
document.docx
|
└──
presentation.ppt
└──
etc.
================================================
FILE: tests/languages/treeview/markers_feature.html.test
================================================
directory/
socket file=
executable file*
FIFO|
----------------------------------------------------
directory
/
socket file
=
executable file
*
FIFO
|
================================================
FILE: tests/languages/treeview/symlink_feature.test
================================================
foo -> /bar/baz
----------------------------------------------------
[
["treeview-part", [
["entry-name", [
"foo",
["symlink", " -> "],
"/bar/baz"
]]
]]
]
================================================
FILE: tests/languages/tremor/boolean_feature.test
================================================
true
false
null
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"],
["boolean", "null"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/tremor/comment_feature.test
================================================
#
## foobar
### snot badger
----------------------------------------------------
[
["comment", "#"],
["comment", "## foobar"],
["comment", "### snot badger"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/tremor/extractor_feature.test
================================================
re|^(?Pbat.*)$|
datetime|%Y-%m-%d %H:%M|
----------------------------------------------------
[
["extractor", [
["function", "re"],
["regex", "|^(?Pbat.*)$|"]
]],
["extractor", [
["function", "datetime"],
["value", "|%Y-%m-%d %H:%M|"]
]]
]
================================================
FILE: tests/languages/tremor/function_feature.test
================================================
foo()
----------------------------------------------------
[
["function", "foo"],
["punctuation", "("],
["punctuation", ")"]
]
================================================
FILE: tests/languages/tremor/identifier_feature.test
================================================
foo
foo_bar_42
`foo`
`bar`
----------------------------------------------------
[
"foo\r\nfoo_bar_42\r\n",
["identifier", "`foo`"],
["identifier", "`bar`"]
]
================================================
FILE: tests/languages/tremor/keyword_escape_feature.test
================================================
`args`
`as`
`by`
`case`
`config`
`connect`
`connector`
`const`
`copy`
`create`
`default`
`define`
`deploy`
`drop`
`each`
`emit`
`end`
`erase`
`event`
`flow`
`fn`
`for`
`from`
`group`
`having`
`insert`
`into`
`intrinsic`
`let`
`links`
`match`
`merge`
`mod`
`move`
`of`
`operator`
`patch`
`pipeline`
`recur`
`script`
`select`
`set`
`sliding`
`state`
`stream`
`to`
`tumbling`
`update`
`use`
`when`
`where`
`window`
`with`
----------------------------------------------------
[
["identifier", "`args`"],
["identifier", "`as`"],
["identifier", "`by`"],
["identifier", "`case`"],
["identifier", "`config`"],
["identifier", "`connect`"],
["identifier", "`connector`"],
["identifier", "`const`"],
["identifier", "`copy`"],
["identifier", "`create`"],
["identifier", "`default`"],
["identifier", "`define`"],
["identifier", "`deploy`"],
["identifier", "`drop`"],
["identifier", "`each`"],
["identifier", "`emit`"],
["identifier", "`end`"],
["identifier", "`erase`"],
["identifier", "`event`"],
["identifier", "`flow`"],
["identifier", "`fn`"],
["identifier", "`for`"],
["identifier", "`from`"],
["identifier", "`group`"],
["identifier", "`having`"],
["identifier", "`insert`"],
["identifier", "`into`"],
["identifier", "`intrinsic`"],
["identifier", "`let`"],
["identifier", "`links`"],
["identifier", "`match`"],
["identifier", "`merge`"],
["identifier", "`mod`"],
["identifier", "`move`"],
["identifier", "`of`"],
["identifier", "`operator`"],
["identifier", "`patch`"],
["identifier", "`pipeline`"],
["identifier", "`recur`"],
["identifier", "`script`"],
["identifier", "`select`"],
["identifier", "`set`"],
["identifier", "`sliding`"],
["identifier", "`state`"],
["identifier", "`stream`"],
["identifier", "`to`"],
["identifier", "`tumbling`"],
["identifier", "`update`"],
["identifier", "`use`"],
["identifier", "`when`"],
["identifier", "`where`"],
["identifier", "`window`"],
["identifier", "`with`"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/tremor/keyword_feature.test
================================================
args
as
by
case
config
connect
connector
const
copy
create
default
define
deploy
drop
each
emit
end
erase
event
flow
fn
for
from
group
having
insert
into
intrinsic
let
links
match
merge
mod
move
of
operator
patch
pipeline
recur
script
select
set
sliding
state
stream
to
tumbling
update
use
when
where
window
with
----------------------------------------------------
[
["keyword", "args"],
["keyword", "as"],
["keyword", "by"],
["keyword", "case"],
["keyword", "config"],
["keyword", "connect"],
["keyword", "connector"],
["keyword", "const"],
["keyword", "copy"],
["keyword", "create"],
["keyword", "default"],
["keyword", "define"],
["keyword", "deploy"],
["keyword", "drop"],
["keyword", "each"],
["keyword", "emit"],
["keyword", "end"],
["keyword", "erase"],
["keyword", "event"],
["keyword", "flow"],
["keyword", "fn"],
["keyword", "for"],
["keyword", "from"],
["keyword", "group"],
["keyword", "having"],
["keyword", "insert"],
["keyword", "into"],
["keyword", "intrinsic"],
["keyword", "let"],
["keyword", "links"],
["keyword", "match"],
["keyword", "merge"],
["keyword", "mod"],
["keyword", "move"],
["keyword", "of"],
["keyword", "operator"],
["keyword", "patch"],
["keyword", "pipeline"],
["keyword", "recur"],
["keyword", "script"],
["keyword", "select"],
["keyword", "set"],
["keyword", "sliding"],
["keyword", "state"],
["keyword", "stream"],
["keyword", "to"],
["keyword", "tumbling"],
["keyword", "update"],
["keyword", "use"],
["keyword", "when"],
["keyword", "where"],
["keyword", "window"],
["keyword", "with"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/tremor/modularity_feature.test
================================================
foo
foo::bar
foo::bar::baz
`foo`::bar::`baz`
`foo`
`foo`::`bar`::`baz`
----------------------------------------------------
[
"foo\r\nfoo",
["punctuation", "::"],
"bar\r\nfoo",
["punctuation", "::"],
"bar",
["punctuation", "::"],
"baz\r\n",
["identifier", "`foo`"],
["punctuation", "::"],
"bar",
["punctuation", "::"],
["identifier", "`baz`"],
["identifier", "`foo`"],
["identifier", "`foo`"],
["punctuation", "::"],
["identifier", "`bar`"],
["punctuation", "::"],
["identifier", "`baz`"]
]
----------------------------------------------------
Checks modularity and references for bare/namespaced variables
================================================
FILE: tests/languages/tremor/number_feature.test
================================================
42
0.154
0xBadFace
0b10101010
1_000_000_000
----------------------------------------------------
[
["number", "42"],
["number", "0.154"],
["number", "0xBadFace"],
["number", "0b10101010"],
["number", "1_000_000_000"]
]
----------------------------------------------------
Checks for decimal and hexadecimal numbers.
================================================
FILE: tests/languages/tremor/operator_feature.test
================================================
+ - / * % ~ ^ & |
+= -= /= *= %= ~= ^= &= |=
== != < > <= >=
= =>
! && ||
<< >> >>>
<<= >>= >>>=
not and or xor present absent
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "/"],
["operator", "*"],
["operator", "%"],
["operator", "~"],
["operator", "^"],
["operator", "&"],
["operator", "|"],
["operator", "+="],
["operator", "-="],
["operator", "/="],
["operator", "*="],
["operator", "%="],
["operator", "~="],
["operator", "^="],
["operator", "&="],
["operator", "|="],
["operator", "=="],
["operator", "!="],
["operator", "<"],
["operator", ">"],
["operator", "<="],
["operator", ">="],
["operator", "="],
["operator", "=>"],
["operator", "!"], ["operator", "&&"], ["operator", "||"],
["operator", "<<"], ["operator", ">>"], ["operator", ">>>"],
["operator", "<<="], ["operator", ">>="], ["operator", ">>>="],
["operator", "not"],
["operator", "and"],
["operator", "or"],
["operator", "xor"],
["operator", "present"],
["operator", "absent"]
]
----------------------------------------------------
Checks for operators
================================================
FILE: tests/languages/tremor/punctuation_feature.test
================================================
( ) [ ] { }
, ; . :
%( ) %[ ] %{ }
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", ";"],
["punctuation", "."],
["punctuation", ":"],
["pattern-punctuation", "%"],
["punctuation", "("],
["punctuation", ")"],
["pattern-punctuation", "%"],
["punctuation", "["],
["punctuation", "]"],
["pattern-punctuation", "%"],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/tremor/string_feature.test
================================================
""
"" ""
"""
"""
"fo\"obar"
"foo\
bar"
"""
multiline
"""
"snot#{badger}badger"
"""
I am
a
long
multi-line
string with #{ "#{a+1} interpolation" }
"""
----------------------------------------------------
[
["interpolated-string", [
["string", "\"\""]
]],
["interpolated-string", [
["string", "\"\""]
]],
["interpolated-string", [
["string", "\"\""]
]],
["interpolated-string", [
["string", "\"\"\"\r\n\"\"\""]
]],
["interpolated-string", [
["string", "\"fo\\\"obar\""]
]],
["interpolated-string", [
["string", "\"foo\\\r\nbar\""]
]],
["interpolated-string", [
["string", "\"\"\"\r\nmultiline\r\n\"\"\""]
]],
["interpolated-string", [
["string", "\"snot"],
["interpolation", [
["punctuation", "#{"],
["expression", ["badger"]],
["punctuation", "}"]
]],
["string", "badger\""]
]],
["interpolated-string", [
["string", "\"\"\"\r\n I am\r\n a\r\n long\r\n multi-line\r\n string with "],
["interpolation", [
["punctuation", "#{"],
["expression", [
["interpolated-string", [
["string", "\""],
["interpolation", [
["punctuation", "#{"],
["expression", [
"a",
["operator", "+"],
["number", "1"]
]],
["punctuation", "}"]
]],
["string", " interpolation\""]
]]
]],
["punctuation", "}"]
]],
["string", "\r\n\"\"\""]
]]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/tsx/issue2594.test
================================================
function Add1(a, b) { return a + b
}
type Bar = Foo;
function Add2(a, b) { return a + b
}
function handleSubmit(event: FormEvent) {
event.preventDefault();
}
function handleChange(event: ChangeEvent) {
console.log(event.target.value);
}
function handleClick(event: MouseEvent) {
console.log(event.button);
}
export default function Form() {
return (
);
}
----------------------------------------------------
[
["keyword", "function"],
["function", "Add1"],
["punctuation", "("],
"a",
["punctuation", ","],
" b",
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["plain-text", "a + b"],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["punctuation", "}"],
["keyword", "type"],
["class-name", ["Bar"]],
["operator", "="],
" Foo",
["operator", "<"],
["builtin", "string"],
["operator", ">"],
["punctuation", ";"],
["keyword", "function"],
["function", "Add2"],
["punctuation", "("],
"a",
["punctuation", ","],
" b",
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
["plain-text", "a + b"],
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["punctuation", "}"],
["keyword", "function"],
["function", "handleSubmit"],
["punctuation", "("],
"event",
["operator", ":"],
" FormEvent",
["operator", "<"],
"HTMLFormElement",
["operator", ">"],
["punctuation", ")"],
["punctuation", "{"],
"\r\n event",
["punctuation", "."],
["function", "preventDefault"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"],
["keyword", "function"],
["function", "handleChange"],
["punctuation", "("],
"event",
["operator", ":"],
" ChangeEvent",
["operator", "<"],
"HTMLInputElement",
["operator", ">"],
["punctuation", ")"],
["punctuation", "{"],
["builtin", "console"],
["punctuation", "."],
["function", "log"],
["punctuation", "("],
"event",
["punctuation", "."],
"target",
["punctuation", "."],
"value",
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"],
["keyword", "function"],
["function", "handleClick"],
["punctuation", "("],
"event",
["operator", ":"],
" MouseEvent",
["punctuation", ")"],
["punctuation", "{"],
["builtin", "console"],
["punctuation", "."],
["function", "log"],
["punctuation", "("],
"event",
["punctuation", "."],
"button",
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"],
["keyword", "export"],
["keyword", "default"],
["keyword", "function"],
["function", "Form"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
["punctuation", "("],
["tag", [
["punctuation", "<"],
["tag", ["form"]],
["attr-name", ["onSubmit"]],
["script", [
["script-punctuation", "="],
["punctuation", "{"],
"handleSubmit",
["punctuation", "}"]
]],
["punctuation", ">"]
]],
["plain-text", "\r\n "],
["tag", [
["punctuation", "<"],
["tag", ["input"]],
["attr-name", ["onChange"]],
["script", [
["script-punctuation", "="],
["punctuation", "{"],
"handleChange",
["punctuation", "}"]
]],
["attr-name", ["placeholder"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"Name",
["punctuation", "\""]
]],
["punctuation", "/>"]
]],
["plain-text", "\r\n "],
["tag", [
["punctuation", "<"],
["tag", ["button"]],
["attr-name", ["onClick"]],
["script", [
["script-punctuation", "="],
["punctuation", "{"],
"handleClick",
["punctuation", "}"]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["button"]],
["punctuation", ">"]
]],
["plain-text", "\r\n "],
["tag", [
["punctuation", ""],
["tag", ["form"]],
["punctuation", ">"]
]],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/tsx/issue3089.test
================================================
// react tsx
function log(msg: string): void {
console.log(msg);
}
----------------------------------------------------
[
["comment", "// react tsx"],
["keyword", "function"],
["function", "log"],
["punctuation", "("],
"msg",
["operator", ":"],
["builtin", "string"],
["punctuation", ")"],
["operator", ":"],
["keyword", "void"],
["punctuation", "{"],
["builtin", "console"],
["punctuation", "."],
["function", "log"],
["punctuation", "("],
"msg",
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/tsx/tag_feature.test
================================================
var myDivElement =
;
var myElement = ;
class Test extends Component {
render() {
return Hello world.
;
}
}
----------------------------------------------------
[
["keyword", "var"],
" myDivElement ",
["operator", "="],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["className"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"foo",
["punctuation", "\""]
]],
["punctuation", "/>"]
]],
["punctuation", ";"],
["keyword", "var"],
" myElement ",
["operator", "="],
["tag", [
["punctuation", "<"],
["tag", [
["class-name", "MyComponent"]
]],
["attr-name", ["someProperty"]],
["script", [
["script-punctuation", "="],
["punctuation", "{"],
["boolean", "true"],
["punctuation", "}"]
]],
["punctuation", "/>"]
]],
["punctuation", ";"],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["spread", [
["punctuation", "{"],
["operator", "..."],
"foo",
["punctuation", "}"]
]],
["punctuation", "/>"]
]],
["tag", [
["punctuation", "<"],
["tag", [
["class-name", "Tree.TreeNode.Item"]
]],
["attr-name", ["leaf"]],
["script", [
["script-punctuation", "="],
["punctuation", "{"],
["boolean", "true"],
["punctuation", "}"]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", [
["class-name", "Tree.TreeNode.Item"]
]],
["punctuation", ">"]
]],
["keyword", "class"],
["class-name", ["Test"]],
["keyword", "extends"],
["class-name", ["Component"]],
["punctuation", "{"],
["function", "render"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
["tag", [
["punctuation", "<"],
["tag", ["p"]],
["attr-name", ["onClick"]],
["script", [
["script-punctuation", "="],
["punctuation", "{"],
["keyword", "this"],
["punctuation", "."],
"clickHandler",
["punctuation", "}"]
]],
["punctuation", ">"]
]],
["plain-text", "Hello world."],
["tag", [
["punctuation", ""],
["tag", ["p"]],
["punctuation", ">"]
]],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for TSX tags.
================================================
FILE: tests/languages/tt2/comment_feature.test
================================================
[%# this entire directive is ignored no
matter how many lines it wraps onto
%]
[% # this is a comment
theta = 20 # so is this
rho = 30 # me too!
%]
----------------------------------------------------
[
["tt2",
[
["comment", "[%# this entire directive is ignored no\r\n matter how many lines it wraps onto\r\n%]" ]
]
],
["tt2",
[
["delimiter", "[%"],
["comment", "# this is a comment" ],
["variable", "theta"],
["operator", "="],
["number", "20"],
["comment", "# so is this" ],
["variable", "rho"],
["operator", "="],
["number", "30"],
["comment", "# me too! "],
["delimiter", "%]"]
]
]
]
----------------------------------------------------
Checks for single-line and multi-line comments.
================================================
FILE: tests/languages/tt2/delimiter_feature.test
================================================
[%- %]
[% -%]
[%- -%]
[%
%]
----------------------------------------------------
[
["tt2", [["delimiter", "[%-"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["delimiter", "-%]"]]],
["tt2", [["delimiter", "[%-"], ["delimiter", "-%]"]]],
["tt2", [["delimiter", "[%"], ["delimiter", "%]"]]]
]
----------------------------------------------------
Checks for delimiters.
================================================
FILE: tests/languages/tt2/keyword_feature.test
================================================
[% BLOCK header %]
[% CALL dbi.disconnect %]
[% CASE 23 %]
[% CATCH the.ball %]
[% CLEAR %]
[% DEBUG on %]
[% DEBUG off %]
[% DEFAULT answer = 42 %]
[% ELSE %]
[% ELSIF bar %]
[% END %]
[% FILTER html %]
[% FINAL breathe %]
[% FOREACH project IN time %]
[% GET foo %]
[% IF foo %]
[% IN %]
[% INCLUDE "$inc" %]
[% INSERT filename.html %]
[% LAST IF exhausted %]
[% MACRO header INCLUDE header %]
[% META title = 'Hello!' %]
[% NEXT IF client %]
[% PERL %]
[% PROCESS "functions.tt" %]
[% RAWPERL %]
[% RETURN %]
[% SET answer = 42 %]
[% STOP %]
[% SWITCH mday %]
[% TAGS [@ @] %]
[% THROW up %]
[% TRY %]
[% UNLESS fear %]
[% USE Plugin %]
[% WHILE my.guitar.gently.weeps %]
[% WRAPPER 'html5.html' %]
----------------------------------------------------
[
["tt2", [["delimiter", "[%"], ["keyword", "BLOCK"],
["variable", "header"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "CALL"],
["variable", "dbi.disconnect"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "CASE"],
["number", "23"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "CATCH"],
["variable", "the.ball"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "CLEAR"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "DEBUG"],
["variable", "on"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "DEBUG"],
["variable", "off"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "DEFAULT"],
["variable", "answer"], ["operator", "="], ["number", "42"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "ELSE"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "ELSIF"], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "END"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "FILTER"], ["variable", "html"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "FINAL"],
["variable", "breathe"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "FOREACH"],
["variable", "project"], ["keyword", "IN"], ["variable", "time"] ,
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "GET"],
["variable", "foo"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "IF"], ["variable", "foo"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "IN"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "INCLUDE"],
["double-quoted-string", ["\"", ["variable", "$inc"], "\""]],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "INSERT"],
["variable", "filename.html"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "LAST"],
["keyword", "IF"], ["variable", "exhausted"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "MACRO"], ["variable", "header"],
["keyword", "INCLUDE"], ["variable", "header"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "META"],
["variable", "title"], ["operator", "="], ["single-quoted-string", "'Hello!'"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "NEXT"],
["keyword", "IF"], ["variable", "client"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "PERL"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "PROCESS"],
["double-quoted-string", ["\"functions.tt\""]],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "RAWPERL"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "RETURN"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "SET"],
["variable", "answer"], ["operator", "="], ["number", "42"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "STOP"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "SWITCH"], ["variable", "mday"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "TAGS"],
["punctuation", "["], "@ @", ["punctuation", "]"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "THROW"],
["variable", "up"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "TRY"], ["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "UNLESS"], ["variable", "fear"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "USE"], ["variable", "Plugin"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "WHILE"],
["variable", "my.guitar.gently.weeps"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"], ["keyword", "WRAPPER"],
["single-quoted-string", "'html5.html'"],
["delimiter", "%]"]]]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/tt2/operator_feature.test
================================================
[% fat => comma %]
[% foo == bar %]
[% foo != bar %]
[% foo < bar %]
[% foo <= bar %]
[% foo > bar %]
[% foo >= bar %]
[% foo = bar %]
[% foo && bar %]
[% foo || bar %]
[% foo | bar %]
[% foo ! bar %]
[% penthouse and pavement %]
[% sooner or later %]
[% love not war %]
----------------------------------------------------
[
["tt2", [["delimiter", "[%"],
["variable", "fat"], ["operator", "=>"], ["variable", "comma"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", "=="], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", "!="], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", "<"], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", "<="], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", ">"], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", ">="], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", "="], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", "&&"], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", "||"], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", "|"], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "foo"], ["operator", "!"], ["variable", "bar"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "penthouse"], ["operator", "and"], ["variable", "pavement"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "sooner"], ["operator", "or"], ["variable", "later"],
["delimiter", "%]"]]],
["tt2", [["delimiter", "[%"],
["variable", "love"], ["operator", "not"], ["variable", "war"],
["delimiter", "%]"]]]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/tt2/string-interpolation_feature.test
================================================
[% "Hello, $name!" %]
----------------------------------------------------
[
["tt2",
[
["delimiter", "[%"],
["double-quoted-string", [
"\"Hello, ",
["variable", "$name"],
"!\""]
],
["delimiter", "%]"]
]
]
]
----------------------------------------------------
Checks for interpolation inside strings.
================================================
FILE: tests/languages/tt2/string_feature.test
================================================
[%
"https://example.com/"
" # not a comment"
"multi-line
string"
"escaped \"quotes\"\nwork\twell"
'https://example.com/'
' # not a comment'
'multi-line
string'
'escaped \'quotes\' work'
%]
----------------------------------------------------
[
["tt2",
[
["delimiter", "[%"],
["double-quoted-string", ["\"https://example.com/\""]],
["double-quoted-string", ["\" # not a comment\""]],
["double-quoted-string", ["\"multi-line\r\nstring\""]],
["double-quoted-string", ["\"escaped \\\"quotes\\\"\\nwork\\twell\""]],
["single-quoted-string", "'https://example.com/'"],
["single-quoted-string", "' # not a comment'"],
["single-quoted-string", "'multi-line\r\nstring'"],
["single-quoted-string", "'escaped \\'quotes\\' work'"],
["delimiter", "%]"]
]
]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/tt2/variable_feature.test
================================================
[%
foo
foo.bar
foo.2
foo.1.bar.2.baz.3
foo.$index
foo
.
bar
world
hands
knots
%]
----------------------------------------------------
[
["tt2",
[
["delimiter", "[%"],
["variable", "foo"],
["variable", "foo.bar"],
["variable", "foo.2"],
["variable", "foo.1.bar.2.baz.3"],
["variable", "foo.$index"],
["variable", "foo\r\n\t\t.\r\n\t\t\tbar"],
["variable", "world"],
["variable", "hands"],
["variable", "knots"],
["delimiter", "%]"]
]
]
]
----------------------------------------------------
Checks for simple variables.
================================================
FILE: tests/languages/turtle/blank-node_feature.test
================================================
"RDF/XML Syntax Specification (Revised)" .
_:bnode .
_:bnode "Dave Beckett" .
_:bnode .
----------------------------------------------------
[
["url", [
["punctuation", "<"],
"http://www.w3.org/TR/rdf-syntax-grammar",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://purl.org/dc/elements/1.1/title",
["punctuation", ">"]
]],
["string", "\"RDF/XML Syntax Specification (Revised)\""],
["punctuation", "."],
["url", [
["punctuation", "<"],
"http://www.w3.org/TR/rdf-syntax-grammar",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://example.org/stuff/1.0/editor",
["punctuation", ">"]
]],
["function", [
["prefix", [
"_",
["punctuation", ":"]
]],
["local-name", "bnode"]
]],
["punctuation", "."],
["function", [
["prefix", [
"_",
["punctuation", ":"]
]],
["local-name", "bnode"]
]],
["url", [
["punctuation", "<"],
"http://example.org/stuff/1.0/fullname",
["punctuation", ">"]
]],
["string", "\"Dave Beckett\""],
["punctuation", "."],
["function", [
["prefix", [
"_",
["punctuation", ":"]
]],
["local-name", "bnode"]
]],
["url", [
["punctuation", "<"],
"http://example.org/stuff/1.0/homePage",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"http://purl.org/net/dajobe/",
["punctuation", ">"]
]],
["punctuation", "."]
]
----------------------------------------------------
Checks blank node underscore prefixes.
================================================
FILE: tests/languages/turtle/keyword_feature.test
================================================
@base .
BASE .
@prefix rdf: .
PREFIX rdfs: .
GRAPH {
a rdfs:Class ;
= .
}
----------------------------------------------------
[
["keyword", "@base"],
["url", [
["punctuation", "<"],
"http://example.org/",
["punctuation", ">"]
]],
["punctuation", "."],
["keyword", "BASE"],
["url", [
["punctuation", "<"],
"http://example.org/",
["punctuation", ">"]
]],
["punctuation", "."],
["keyword", "@prefix"],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]]
]],
["url", [
["punctuation", "<"],
"http://www.w3.org/1999/02/22-rdf-syntax-ns#",
["punctuation", ">"]
]],
["punctuation", "."],
["keyword", "PREFIX"],
["function", [
["prefix", [
"rdfs",
["punctuation", ":"]
]]
]],
["url", [
["punctuation", "<"],
"http://www.w3.org/2000/01/rdf-schema#",
["punctuation", ">"]
]],
["punctuation", "."],
["keyword", "GRAPH"],
["url", [
["punctuation", "<"],
"urn:newGraph",
["punctuation", ">"]
]],
["punctuation", "{"],
["url", [
["punctuation", "<"],
"urn:myClass",
["punctuation", ">"]
]],
["keyword", "a"],
["function", [
["prefix", [
"rdfs",
["punctuation", ":"]
]],
["local-name", "Class"]
]],
["punctuation", ";"],
["keyword", "="],
["url", [
["punctuation", "<"],
"urn:equivalentClass",
["punctuation", ">"]
]],
["punctuation", "."],
["punctuation", "}"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/turtle/language-tag_feature.test
================================================
show:218 show:localName "That Seventies Show"@en, "test"@en-t-es-t0-abcd .
show:218 show:localName 'Cette Série des Années Soixante-dix'@fr, "Cette Série des Années Septante"@fr-be .
----------------------------------------------------
[
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "localName"]
]],
["string", "\"That Seventies Show\""],
["tag", [
["punctuation", "@"],
"en"
]],
["punctuation", ","],
["string", "\"test\""],
["tag", [
["punctuation", "@"],
"en-t-es-t0-abcd"
]],
["punctuation", "."],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "localName"]
]],
["string", "'Cette Série des Années Soixante-dix'"],
["tag", [
["punctuation", "@"],
"fr"
]],
["punctuation", ","],
["string", "\"Cette Série des Années Septante\""],
["tag", [
["punctuation", "@"],
"fr-be"
]],
["punctuation", "."]
]
----------------------------------------------------
Checks language tags.
================================================
FILE: tests/languages/turtle/local-name-with-colons_feature.test
================================================
:foo:bar:baz
----------------------------------------------------
[
["function", [
["prefix", [
["punctuation", ":"]
]],
["local-name", "foo:bar:baz"]
]]
]
----------------------------------------------------
Checks that local name containing colons is parsed correctly.
================================================
FILE: tests/languages/turtle/number_feature.test
================================================
<1.1> rdf:value 1 .
<1.2> rdf:value +1 .
<1.3> rdf:value -1 .
<2.1> rdf:value 1.13 .
<2.2> rdf:value +1.13 .
<2.3> rdf:value -1.13 .
<3.1> rdf:value 1e3 .
<3.2> rdf:value +1e3 .
<3.3> rdf:value -1e3 .
----------------------------------------------------
[
["url", [
["punctuation", "<"],
"1.1",
["punctuation", ">"]
]],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["number", "1"],
["punctuation", "."],
["url", [
["punctuation", "<"],
"1.2",
["punctuation", ">"]
]],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["number", "+1"],
["punctuation", "."],
["url", [
["punctuation", "<"],
"1.3",
["punctuation", ">"]
]],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["number", "-1"],
["punctuation", "."],
["url", [
["punctuation", "<"],
"2.1",
["punctuation", ">"]
]],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["number", "1.13"],
["punctuation", "."],
["url", [
["punctuation", "<"],
"2.2",
["punctuation", ">"]
]],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["number", "+1.13"],
["punctuation", "."],
["url", [
["punctuation", "<"],
"2.3",
["punctuation", ">"]
]],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["number", "-1.13"],
["punctuation", "."],
["url", [
["punctuation", "<"],
"3.1",
["punctuation", ">"]
]],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["number", "1e3"],
["punctuation", "."],
["url", [
["punctuation", "<"],
"3.2",
["punctuation", ">"]
]],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["number", "+1e3"],
["punctuation", "."],
["url", [
["punctuation", "<"],
"3.3",
["punctuation", ">"]
]],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["number", "-1e3"],
["punctuation", "."]
]
----------------------------------------------------
Checks for supported numbers.
================================================
FILE: tests/languages/turtle/punctuation_feature.test
================================================
@base .
GRAPH {
a rdfs:Class, ;
= .
a rdf:List ;
rdf:value [ a ;
rdf:value ( () [] )
] ;
.
}
----------------------------------------------------
[
["keyword", "@base"],
["url", [
["punctuation", "<"],
"http://example.org/",
["punctuation", ">"]
]],
["punctuation", "."],
["keyword", "GRAPH"],
["url", [
["punctuation", "<"],
"urn:newGraph",
["punctuation", ">"]
]],
["punctuation", "{"],
["url", [
["punctuation", "<"],
"urn:myClass",
["punctuation", ">"]
]],
["keyword", "a"],
["function", [
["prefix", [
"rdfs",
["punctuation", ":"]
]],
["local-name", "Class"]
]],
["punctuation", ","],
["url", [
["punctuation", "<"],
"other-class",
["punctuation", ">"]
]],
["punctuation", ";"],
["keyword", "="],
["url", [
["punctuation", "<"],
"urn:equivalentClass",
["punctuation", ">"]
]],
["punctuation", "."],
["url", [
["punctuation", "<"],
"urn:myList",
["punctuation", ">"]
]],
["keyword", "a"],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "List"]
]],
["punctuation", ";"],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["punctuation", "["],
["keyword", "a"],
["url", [
["punctuation", "<"],
"blankNode",
["punctuation", ">"]
]],
["punctuation", ";"],
["function", [
["prefix", [
"rdf",
["punctuation", ":"]
]],
["local-name", "value"]
]],
["punctuation", "("],
["url", [
["punctuation", "<"],
"list",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"of",
["punctuation", ">"]
]],
["url", [
["punctuation", "<"],
"things",
["punctuation", ">"]
]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ")"],
["punctuation", "]"],
["punctuation", ";"],
["punctuation", "."],
["punctuation", "}"]
]
----------------------------------------------------
Checks for all types of punctuation.
================================================
FILE: tests/languages/turtle/string_feature.test
================================================
show:218 rdfs:label "That Seventies Show"^^xsd:string . # literal with XML Schema string datatype
show:218 rdfs:label "That Seventies Show"^^ . # same as above
show:218 rdfs:label "That Seventies Show" . # same again
show:218 show:localName "That Seventies Show"@en . # literal with a language tag
show:218 show:localName 'Cette Série des Années Soixante-dix'@fr . # literal delimited by single quote
show:218 show:localName "Cette Série des Années Septante"@fr-be . # literal with a region subtag
show:218 show:blurb '''This is a multi-line # literal with embedded new lines and quotes
literal with many quotes (""""")
and up to two sequential apostrophes ('').''' .
show:218 show:blurb """This is a multi-line # literal with embedded new lines and apostrophes
literal with many apostrophes (''''')
and up to two sequential quotes ("").""" .
----------------------------------------------------
[
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"rdfs",
["punctuation", ":"]
]],
["local-name", "label"]
]],
["string", "\"That Seventies Show\""],
["punctuation", "^^"],
["function", [
["prefix", [
"xsd",
["punctuation", ":"]
]],
["local-name", "string"]
]],
["punctuation", "."],
["comment", "# literal with XML Schema string datatype"],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"rdfs",
["punctuation", ":"]
]],
["local-name", "label"]
]],
["string", "\"That Seventies Show\""],
["punctuation", "^^"],
["url", [
["punctuation", "<"],
"http://www.w3.org/2001/XMLSchema#string",
["punctuation", ">"]
]],
["punctuation", "."],
["comment", "# same as above"],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"rdfs",
["punctuation", ":"]
]],
["local-name", "label"]
]],
["string", "\"That Seventies Show\""],
["punctuation", "."],
["comment", "# same again"],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "localName"]
]],
["string", "\"That Seventies Show\""],
["tag", [
["punctuation", "@"],
"en"
]],
["punctuation", "."],
["comment", "# literal with a language tag"],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "localName"]
]],
["string", "'Cette Série des Années Soixante-dix'"],
["tag", [
["punctuation", "@"],
"fr"
]],
["punctuation", "."],
["comment", "# literal delimited by single quote"],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "localName"]
]],
["string", "\"Cette Série des Années Septante\""],
["tag", [
["punctuation", "@"],
"fr-be"
]],
["punctuation", "."],
["comment", "# literal with a region subtag"],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "blurb"]
]],
["multiline-string", [
"'''This is a multi-line ",
["comment", "# literal with embedded new lines and quotes"],
"\r\nliteral with many quotes (\"\"\"\"\")\r\nand up to two sequential apostrophes ('').'''"
]],
["punctuation", "."],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "218"]
]],
["function", [
["prefix", [
"show",
["punctuation", ":"]
]],
["local-name", "blurb"]
]],
["multiline-string", [
"\"\"\"This is a multi-line ",
["comment", "# literal with embedded new lines and apostrophes"],
"\r\nliteral with many apostrophes (''''')\r\nand up to two sequential quotes (\"\").\"\"\""
]],
["punctuation", "."]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/twig/boolean_feature.test
================================================
{{ null }}
{{- true -}}
{{ false }}
----------------------------------------------------
[
["twig", [
["delimiter", "{{"],
["boolean", "null"],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{-"],
["boolean", "true"],
["delimiter", "-}}"]
]],
["twig", [
["delimiter", "{{"],
["boolean", "false"],
["delimiter", "}}"]
]]
]
----------------------------------------------------
Checks for booleans and null.
================================================
FILE: tests/languages/twig/comment_feature.test
================================================
{##}
{# foo #}
{# foo
bar #}
----------------------------------------------------
[
["twig-comment", "{##}"],
["twig-comment", "{# foo #}"],
["twig-comment", "{# foo\r\nbar #}"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/twig/keyword_feature.test
================================================
{% for foo in bar if baz %}{% endfor %}
{%- if foo() -%}{%- endif -%}
{% macro foobar() %}{% endmacro %}
{{ foo is even or bar is odd }}
----------------------------------------------------
[
["twig", [
["delimiter", "{%"],
["tag-name", "for"],
" foo ",
["operator", "in"],
" bar ",
["keyword", "if"],
" baz ",
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "endfor"],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%-"],
["tag-name", "if"],
" foo",
["punctuation", "("],
["punctuation", ")"],
["delimiter", "-%}"]
]],
["twig", [
["delimiter", "{%-"],
["tag-name", "endif"],
["delimiter", "-%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "macro"],
" foobar",
["punctuation", "("],
["punctuation", ")"],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "endmacro"],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{{"],
" foo ",
["operator", "is"],
["keyword", "even"],
["operator", "or"],
" bar ",
["operator", "is"],
["keyword", "odd"],
["delimiter", "}}"]
]]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/twig/markup_feature.test
================================================
My Webpage
My Webpage
{{ a_variable }}
----------------------------------------------------
[
["doctype", [
["punctuation", ""]
]],
["tag", [
["punctuation", "<"],
["tag", ["html"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["head"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["title"]],
["punctuation", ">"]
]],
"My Webpage",
["tag", [
["punctuation", ""],
["tag", ["title"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["head"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["body"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["ul"]],
["attr-name", ["id"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"navigation",
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "for"],
" item ",
["operator", "in"],
" navigation ",
["delimiter", "%}"]
]],
["tag", [
["punctuation", "<"],
["tag", ["li"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["a"]],
["attr-name", ["href"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["twig", [
["delimiter", "{{"],
" item",
["punctuation", "."],
"href ",
["delimiter", "}}"]
]],
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["twig", [
["delimiter", "{{"],
" item",
["punctuation", "."],
"caption ",
["delimiter", "}}"]
]],
["tag", [
["punctuation", ""],
["tag", ["a"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["li"]],
["punctuation", ">"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "endfor"],
["delimiter", "%}"]
]],
["tag", [
["punctuation", ""],
["tag", ["ul"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["h1"]],
["punctuation", ">"]
]],
"My Webpage",
["tag", [
["punctuation", ""],
["tag", ["h1"]],
["punctuation", ">"]
]],
["twig", [
["delimiter", "{{"],
" a_variable ",
["delimiter", "}}"]
]],
["tag", [
["punctuation", ""],
["tag", ["body"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["html"]],
["punctuation", ">"]
]]
]
================================================
FILE: tests/languages/twig/number_feature.test
================================================
{{ 0xBadFace }}
{{ 42 }}
{{ 3.14159 }}
{{ 3e15 }}
{{ 4.5E-4 }}
{{ 0.2e+8 }}
----------------------------------------------------
[
["twig", [
["delimiter", "{{"],
["number", "0xBadFace"],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
["number", "42"],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
["number", "3.14159"],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
["number", "3e15"],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
["number", "4.5E-4"],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
["number", "0.2e+8"],
["delimiter", "}}"]
]]
]
----------------------------------------------------
Checks for hexadecimal and decimal numbers.
================================================
FILE: tests/languages/twig/operator_feature.test
================================================
{% set a = 4 %}
{{ a == 4 }}
{{ b != c }}
{{ c < d }}
{{ d <= e }}
{{ e > f }}
{{ f >= g }}
{{ g + h }}
{{ h - i }}
{{ i ~ j }}
{{ j * k }}
{{ k ** l }}
{{ l / m }}
{{ m // n }}
{{ n % o }}
{{ o|default('foo') }}
{{ p ? q : r }}
{{ s ?: t }}
{% if a and b or not c %}
{% for p in foo %}
{% if d b-and e and f b-xor g or h b-or i %}
{% if j starts with 'h' %}
{% if i ends with 'j' %}
{% if k is same as false %}
{% if l matches '/f[o]{2,}(?:bar)?' %}
----------------------------------------------------
[
["twig", [
["delimiter", "{%"],
["tag-name", "set"],
" a ",
["operator", "="],
["number", "4"],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{{"],
" a ",
["operator", "=="],
["number", "4"],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" b ",
["operator", "!="],
" c ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" c ",
["operator", "<"],
" d ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" d ",
["operator", "<="],
" e ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" e ",
["operator", ">"],
" f ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" f ",
["operator", ">="],
" g ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" g ",
["operator", "+"],
" h ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" h ",
["operator", "-"],
" i ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" i ",
["operator", "~"],
" j ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" j ",
["operator", "*"],
" k ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" k ",
["operator", "**"],
" l ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" l ",
["operator", "/"],
" m ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" m ",
["operator", "//"],
" n ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" n ",
["operator", "%"],
" o ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" o",
["operator", "|"],
"default",
["punctuation", "("],
["string", [
["punctuation", "'"],
"foo",
["punctuation", "'"]
]],
["punctuation", ")"],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" p ",
["operator", "?"],
" q ",
["punctuation", ":"],
" r ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
" s ",
["operator", "?:"],
" t ",
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "if"],
" a ",
["operator", "and"],
" b ",
["operator", "or"],
["operator", "not"],
" c ",
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "for"],
" p ",
["operator", "in"],
" foo ",
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "if"],
" d ",
["operator", "b-and"],
" e ",
["operator", "and"],
" f ",
["operator", "b-xor"],
" g ",
["operator", "or"],
" h ",
["operator", "b-or"],
" i ",
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "if"],
" j ",
["operator", "starts with"],
["string", [
["punctuation", "'"],
"h",
["punctuation", "'"]
]],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "if"],
" i ",
["operator", "ends with"],
["string", [
["punctuation", "'"],
"j",
["punctuation", "'"]
]],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "if"],
" k ",
["operator", "is"],
["operator", "same as"],
["boolean", "false"],
["delimiter", "%}"]
]],
["twig", [
["delimiter", "{%"],
["tag-name", "if"],
" l ",
["operator", "matches"],
["string", [
["punctuation", "'"],
"/f[o]{2,}(?:bar)?",
["punctuation", "'"]
]],
["delimiter", "%}"]
]]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/twig/string_feature.test
================================================
{{ '' }}
{{ "" }}
{{ "ba\"r" }}
{{ 'ba\'z' }}
----------------------------------------------------
[
["twig", [
["delimiter", "{{"],
["string", [
["punctuation", "'"],
["punctuation", "'"]
]],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
["string", [
["punctuation", "\""],
["punctuation", "\""]
]],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
["string", [
["punctuation", "\""],
"ba\\\"r",
["punctuation", "\""]
]],
["delimiter", "}}"]
]],
["twig", [
["delimiter", "{{"],
["string", [
["punctuation", "'"],
"ba\\'z",
["punctuation", "'"]
]],
["delimiter", "}}"]
]]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/twig+pug/twig_inclusion.test
================================================
:atpl
{{42}}
----------------------------------------------------
[
["filter-atpl", [
["filter-name", ":atpl"],
["text", [
["twig", [
["delimiter", "{{"],
["number", "42"],
["delimiter", "}}"]
]]
]]
]]
]
----------------------------------------------------
Checks for atpl filter (Twig) in pug.
================================================
FILE: tests/languages/typescript/builtin_feature.test
================================================
string
Function
any
number
boolean
Array
symbol
console
Promise
unknown
never
----------------------------------------------------
[
["builtin", "string"],
["builtin", "Function"],
["builtin", "any"],
["builtin", "number"],
["builtin", "boolean"],
["builtin", "Array"],
["builtin", "symbol"],
["builtin", "console"],
["builtin", "Promise"],
["builtin", "unknown"],
["builtin", "never"]
]
----------------------------------------------------
Checks for builtins.
================================================
FILE: tests/languages/typescript/class-name_feature.test
================================================
interface Dictionary {
[key: string]: T;
}
interface Foo extends Dictionary {}
class Bar extends Baz implements FooBar {}
type Record = {
[P in K]: T;
}
type Diff = T extends U ? never : T;
----------------------------------------------------
[
["keyword", "interface"],
["class-name", [
"Dictionary",
["operator", "<"],
["constant", "T"],
["operator", ">"]
]],
["punctuation", "{"],
["punctuation", "["],
"key",
["operator", ":"],
["builtin", "string"],
["punctuation", "]"],
["operator", ":"],
["constant", "T"],
["punctuation", ";"],
["punctuation", "}"],
["keyword", "interface"],
["class-name", [
"Foo"
]],
["keyword", "extends"],
["class-name", [
"Dictionary",
["operator", "<"],
["builtin", "number"],
["operator", ">"]
]],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "class"],
["class-name", [
"Bar",
["operator", "<"],
["constant", "T"],
["operator", ">"]
]],
["keyword", "extends"],
["class-name", [
"Baz",
["operator", "<"],
["constant", "T"],
["operator", ">"]
]],
["keyword", "implements"],
["class-name", [
"FooBar",
["operator", "<"],
["builtin", "number"],
["punctuation", ","],
["constant", "T"],
["operator", "|"],
["keyword", "null"],
["operator", ">"]
]],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "type"],
["class-name", [
"Record",
["operator", "<"],
["constant", "K"],
["keyword", "extends"],
["keyword", "keyof"],
["builtin", "any"],
["punctuation", ","],
["constant", "T"],
["operator", ">"]
]],
["operator", "="],
["punctuation", "{"],
["punctuation", "["],
["constant", "P"],
["keyword", "in"],
["constant", "K"],
["punctuation", "]"],
["operator", ":"],
["constant", "T"],
["punctuation", ";"],
["punctuation", "}"],
["keyword", "type"],
["class-name", [
"Diff",
["operator", "<"],
["constant", "T"],
["punctuation", ","],
["constant", "U"],
["operator", ">"]
]],
["operator", "="],
["constant", "T"],
["keyword", "extends"],
["class-name", [
["constant", "U"]
]],
["operator", "?"],
["builtin", "never"],
["operator", ":"],
["constant", "T"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for class, interface, and other type names.
================================================
FILE: tests/languages/typescript/decorator_feature.test
================================================
@f @g x
@f
@g
x
@sealed
class ExampleClass {
@first()
@second()
method() {}
@enumerable(false)
greet() {
return "Hello, " + this.greeting;
}
@configurable(false)
get y() {
return this._y;
}
}
----------------------------------------------------
[
["decorator", [
["at", "@"],
["function", "f"]
]],
["decorator", [
["at", "@"],
["function", "g"]
]],
" x\r\n\r\n",
["decorator", [
["at", "@"],
["function", "f"]
]],
["decorator", [
["at", "@"],
["function", "g"]
]],
"\r\nx\r\n\r\n",
["decorator", [
["at", "@"],
["function", "sealed"]
]],
["keyword", "class"], ["class-name", ["ExampleClass"]], ["punctuation", "{"],
["decorator", [
["at", "@"],
["function", "first"]
]],
["punctuation", "("],
["punctuation", ")"],
["decorator", [
["at", "@"],
["function", "second"]
]],
["punctuation", "("],
["punctuation", ")"],
["function", "method"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["decorator", [
["at", "@"],
["function", "enumerable"]
]],
["punctuation", "("],
["boolean", "false"],
["punctuation", ")"],
["function", "greet"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
["string", "\"Hello, \""],
["operator", "+"],
["keyword", "this"],
["punctuation", "."],
"greeting",
["punctuation", ";"],
["punctuation", "}"],
["decorator", [
["at", "@"],
["function", "configurable"]
]],
["punctuation", "("],
["boolean", "false"],
["punctuation", ")"],
["keyword", "get"],
["function", "y"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["keyword", "return"],
["keyword", "this"],
["punctuation", "."],
"_y",
["punctuation", ";"],
["punctuation", "}"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/typescript/function_feature.test
================================================
function getProperty(o: T, propertyName: K): T[K] { }
declare function f(x: T): T extends true ? string : number;
function assert(condition: any, msg?: string): asserts condition { }
----------------------------------------------------
[
["keyword", "function"],
["generic-function", [
["function", "getProperty"],
["generic", [
["operator", "<"],
["constant", "T"],
["punctuation", ","],
["constant", "K"],
["keyword", "extends"],
["keyword", "keyof"],
["constant", "T"],
["operator", ">"]
]]
]],
["punctuation", "("],
"o",
["operator", ":"],
["constant", "T"],
["punctuation", ","],
" propertyName",
["operator", ":"],
["constant", "K"],
["punctuation", ")"],
["operator", ":"],
["constant", "T"],
["punctuation", "["],
["constant", "K"],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "declare"],
["keyword", "function"],
["generic-function", [
["function", "f"],
["generic", [
["operator", "<"],
["constant", "T"],
["keyword", "extends"],
["builtin", "boolean"],
["operator", ">"]
]]
]],
["punctuation", "("],
"x",
["operator", ":"],
["constant", "T"],
["punctuation", ")"],
["operator", ":"],
["constant", "T"],
["keyword", "extends"],
["class-name", [
["boolean", "true"]
]],
["operator", "?"],
["builtin", "string"],
["operator", ":"],
["builtin", "number"],
["punctuation", ";"],
["keyword", "function"],
["function", "assert"],
["punctuation", "("],
"condition",
["operator", ":"],
["builtin", "any"],
["punctuation", ","],
" msg",
["operator", "?"],
["operator", ":"],
["builtin", "string"],
["punctuation", ")"],
["operator", ":"],
["keyword", "asserts"],
" condition ",
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/typescript/issue2819.test
================================================
@Component({
selector: 'my-app',
template: `Hello World!
`
})
export class AppComponent {}
----------------------------------------------------
[
["decorator", [
["at", "@"],
["function", "Component"]
]],
["punctuation", "("],
["punctuation", "{"],
"\r\n selector",
["operator", ":"],
["string", "'my-app'"],
["punctuation", ","],
"\r\n template",
["operator", ":"],
["template-string", [
["template-punctuation", "`"],
["string", "Hello World!
"],
["template-punctuation", "`"]
]],
["punctuation", "}"],
["punctuation", ")"],
["keyword", "export"],
["keyword", "class"],
["class-name", ["AppComponent"]],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/typescript/issue2860.test
================================================
export interface R {
data: T;
total: number;
type?: string;
}
----------------------------------------------------
[
["keyword", "export"],
["keyword", "interface"],
["class-name", [
["constant", "R"],
["operator", "<"],
["constant", "T"],
["operator", ">"]
]],
["punctuation", "{"],
"\r\n data",
["operator", ":"],
["constant", "T"],
["punctuation", ";"],
"\r\n total",
["operator", ":"],
["builtin", "number"],
["punctuation", ";"],
"\r\n type",
["operator", "?"],
["operator", ":"],
["builtin", "string"],
["punctuation", ";"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/typescript/issue3000.test
================================================
import { infer, inference, infer } from 'module'
// ~~~~~ ✅
import { type, typeDefs, type } from 'module'
// ~~~~ ✅
import { const, constants, const } from 'module'
// ~~~~~ ✅
----------------------------------------------------
[
["keyword", "import"],
["punctuation", "{"],
" infer",
["punctuation", ","],
" inference",
["punctuation", ","],
" infer ",
["punctuation", "}"],
["keyword", "from"],
["string", "'module'"],
["comment", "// ~~~~~ ✅"],
["keyword", "import"],
["punctuation", "{"],
" type",
["punctuation", ","],
" typeDefs",
["punctuation", ","],
" type ",
["punctuation", "}"],
["keyword", "from"],
["string", "'module'"],
["comment", "// ~~~~ ✅"],
["keyword", "import"],
["punctuation", "{"],
["keyword", "const"],
["punctuation", ","],
" constants",
["punctuation", ","],
["keyword", "const"],
["punctuation", "}"],
["keyword", "from"],
["string", "'module'"],
["comment", "// ~~~~~ ✅"]
]
================================================
FILE: tests/languages/typescript/keyword_feature.html.test
================================================
as;
await;
break;
case;
class;
const;
continue;
debugger;
default;
delete;
do;
else;
enum;
export;
extends;
for;
if;
implements;
import;
in;
instanceof;
interface;
let;
new;
null;
of;
package;
private;
protected;
public;
return;
static;
super;
switch;
this;
throw;
try;
typeof;
undefined;
var;
void;
while;
with;
yield;
// contextual keywords
try {} catch {} finally {}
try {} catch (e) {} finally {}
async function (){}
async a => {}
async (a,b,c) => {}
import {} from "foo"
import {} from 'foo'
class { get foo(){} set baz(){} get [value](){} }
// import assertion
import json from "./foo.json" assert { type: "json" };
// variables, not keywords
const { async, from, to } = bar;
promise.catch(foo).finally(bar);
assert.equal(foo, bar);
// TypeScript keywords
abstract;
as;
declare;
implements;
is;
keyof;
readonly;
require;
// contextual keywords
asserts foo;
infer foo;
interface foo;
module foo;
namespace foo;
type foo;
import type { Component } from "react";
import type *, {}
----------------------------------------------------
as
;
await
;
break
;
case
;
class
;
const
;
continue
;
debugger
;
default
;
delete
;
do
;
else
;
enum
;
export
;
extends
;
for
;
if
;
implements
;
import
;
in
;
instanceof
;
interface
;
let
;
new
;
null
;
of
;
package
;
private
;
protected
;
public
;
return
;
static
;
super
;
switch
;
this
;
throw
;
try
;
typeof
;
undefined
;
var
;
void
;
while
;
with
;
yield
;
try
{
}
catch
{
}
finally
{
}
try
{
}
catch
(
e
)
{
}
finally
{
}
async
function
(
)
{
}
async
a
=>
{
}
async
(
a
,
b
,
c
)
=>
{
}
import
{
}
from
"foo"
import
{
}
from
'foo'
class
{
get
foo
(
)
{
}
set
baz
(
)
{
}
get
[
value
]
(
)
{
}
}
import
json
from
"./foo.json"
assert
{
type
:
"json"
}
;
const
{
async
,
from
,
to
}
=
bar
;
promise
.
catch
(
foo
)
.
finally
(
bar
)
;
assert
.
equal
(
foo
,
bar
)
;
abstract
;
as
;
declare
;
implements
;
is
;
keyof
;
readonly
;
require
;
asserts
foo
;
infer
foo
;
interface
foo
;
module
foo
;
namespace
foo
;
type
foo
;
import
type
{
Component
}
from
"react"
;
import
type
*
,
{
}
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/typescript/keyword_feature.test
================================================
as;
await;
break;
case;
class;
const;
continue;
debugger;
default;
delete;
do;
else;
enum;
export;
extends;
for;
if;
implements;
import;
in;
instanceof;
interface;
let;
new;
null;
of;
out;
package;
private;
protected;
public;
return;
satisfies;
static;
super;
switch;
this;
throw;
try;
typeof;
undefined;
var;
void;
while;
with;
yield;
// contextual keywords
try {} catch {} finally {}
try {} catch (e) {} finally {}
async function (){}
async a => {}
async (a,b,c) => {}
import {} from "foo"
import {} from 'foo'
class { get foo(){} set baz(){} get [value](){} }
// variables, not keywords
const { async, from, to } = bar;
promise.catch(foo).finally(bar);
// TypeScript keywords
abstract;
as;
declare;
implements;
is;
keyof;
readonly;
require;
// contextual keywords
asserts foo;
infer foo;
interface foo;
module foo;
namespace foo;
type foo;
import type { Component } from "react";
import type *, {}
----------------------------------------------------
[
["keyword", "as"], ["punctuation", ";"],
["keyword", "await"], ["punctuation", ";"],
["keyword", "break"], ["punctuation", ";"],
["keyword", "case"], ["punctuation", ";"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "const"], ["punctuation", ";"],
["keyword", "continue"], ["punctuation", ";"],
["keyword", "debugger"], ["punctuation", ";"],
["keyword", "default"], ["punctuation", ";"],
["keyword", "delete"], ["punctuation", ";"],
["keyword", "do"], ["punctuation", ";"],
["keyword", "else"], ["punctuation", ";"],
["keyword", "enum"], ["punctuation", ";"],
["keyword", "export"], ["punctuation", ";"],
["keyword", "extends"], ["punctuation", ";"],
["keyword", "for"], ["punctuation", ";"],
["keyword", "if"], ["punctuation", ";"],
["keyword", "implements"], ["punctuation", ";"],
["keyword", "import"], ["punctuation", ";"],
["keyword", "in"], ["punctuation", ";"],
["keyword", "instanceof"], ["punctuation", ";"],
["keyword", "interface"], ["punctuation", ";"],
["keyword", "let"], ["punctuation", ";"],
["keyword", "new"], ["punctuation", ";"],
["keyword", "null"], ["punctuation", ";"],
["keyword", "of"], ["punctuation", ";"],
["keyword", "out"], ["punctuation", ";"],
["keyword", "package"], ["punctuation", ";"],
["keyword", "private"], ["punctuation", ";"],
["keyword", "protected"], ["punctuation", ";"],
["keyword", "public"], ["punctuation", ";"],
["keyword", "return"], ["punctuation", ";"],
["keyword", "satisfies"], ["punctuation", ";"],
["keyword", "static"], ["punctuation", ";"],
["keyword", "super"], ["punctuation", ";"],
["keyword", "switch"], ["punctuation", ";"],
["keyword", "this"], ["punctuation", ";"],
["keyword", "throw"], ["punctuation", ";"],
["keyword", "try"], ["punctuation", ";"],
["keyword", "typeof"], ["punctuation", ";"],
["keyword", "undefined"], ["punctuation", ";"],
["keyword", "var"], ["punctuation", ";"],
["keyword", "void"], ["punctuation", ";"],
["keyword", "while"], ["punctuation", ";"],
["keyword", "with"], ["punctuation", ";"],
["keyword", "yield"], ["punctuation", ";"],
["comment", "// contextual keywords"],
["keyword", "try"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "catch"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "finally"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "try"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "catch"],
["punctuation", "("],
"e",
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "finally"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "async"],
["keyword", "function"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "async"],
" a ",
["operator", "=>"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "async"],
["punctuation", "("],
"a",
["punctuation", ","],
"b",
["punctuation", ","],
"c",
["punctuation", ")"],
["operator", "=>"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "import"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "from"],
["string", "\"foo\""],
["keyword", "import"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "from"],
["string", "'foo'"],
["keyword", "class"],
["punctuation", "{"],
["keyword", "get"],
["function", "foo"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "set"],
["function", "baz"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "get"],
["punctuation", "["],
"value",
["punctuation", "]"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "}"],
["comment", "// variables, not keywords"],
["keyword", "const"],
["punctuation", "{"],
" async",
["punctuation", ","],
" from",
["punctuation", ","],
" to ",
["punctuation", "}"],
["operator", "="],
" bar",
["punctuation", ";"],
"\r\npromise",
["punctuation", "."],
["function", "catch"],
["punctuation", "("],
"foo",
["punctuation", ")"],
["punctuation", "."],
["function", "finally"],
["punctuation", "("],
"bar",
["punctuation", ")"],
["punctuation", ";"],
["comment", "// TypeScript keywords"],
["keyword", "abstract"], ["punctuation", ";"],
["keyword", "as"], ["punctuation", ";"],
["keyword", "declare"], ["punctuation", ";"],
["keyword", "implements"], ["punctuation", ";"],
["keyword", "is"], ["punctuation", ";"],
["keyword", "keyof"], ["punctuation", ";"],
["keyword", "readonly"], ["punctuation", ";"],
["keyword", "require"], ["punctuation", ";"],
["comment", "// contextual keywords"],
["keyword", "asserts"], " foo", ["punctuation", ";"],
["keyword", "infer"], " foo", ["punctuation", ";"],
["keyword", "interface"], ["class-name", ["foo"]], ["punctuation", ";"],
["keyword", "module"], " foo", ["punctuation", ";"],
["keyword", "namespace"], " foo", ["punctuation", ";"],
["keyword", "type"], ["class-name", ["foo"]], ["punctuation", ";"],
["keyword", "import"],
["keyword", "type"],
["punctuation", "{"],
" Component ",
["punctuation", "}"],
["keyword", "from"],
["string", "\"react\""],
["punctuation", ";"],
["keyword", "import"],
["keyword", "type"],
["operator", "*"],
["punctuation", ","],
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/typoscript/comment_feature.test
================================================
// comment
# comment
text // comment
/*
comment
*/
foo = bar // comment
baz = //url
----------------------------------------------------
[
["comment", "// comment"],
["comment", "# comment"],
["tag", ["text"]], ["comment", "// comment"],
["comment", "/*\r\ncomment\r\n*/"],
["tag", ["foo"]], ["operator", "="], ["string", ["bar "]], ["comment", "// comment"],
["tag", ["baz"]], ["operator", "="], ["string", ["//url"]]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/typoscript/function_feature.test
================================================
@import 'foo'
@import "bar"
----------------------------------------------------
[
["function", ["@import ", ["string", "'foo'"]]],
["function", ["@import ", ["string", "\"bar\""]]],
["function", ["<", ["keyword", "INCLUDE_TYPOSCRIPT"], ": source=", ["string", ["\"", ["keyword", "FILE"], ":", ["keyword", "EXT"], ":baz.typoscript\""]], ">"]]
]
----------------------------------------------------
Checks for import functions.
================================================
FILE: tests/languages/typoscript/keyword_feature.test
================================================
TEXT LLL EXT _GIFBUILDER CARRAY CASE CLEARGIF COA COA_INT CONSTANTS CONTENT
EDITPANEL EFFECT FILE FORM FRAME FRAMESET FLUIDTEMPLATE GIFBUILDER
global globalString globalVar GMENU GMENU_FOLDOUT GMENU_LAYERS GP
HMENU HRULER HTML IENV IMAGE IMG_RESOURCE IMGMENU IMGMENUITEM IMGTEXT
JSMENU JSMENUITEM LOAD_REGISTER PAGE RECORDS RESTORE_REGISTER TEMPLATE
TMENU TMENU_LAYERS TMENUITEM USER USER_INT INCLUDE_TYPOSCRIPT NO ACT
IFSUB ACTIFSUB CUR
----------------------------------------------------
[
["keyword", "TEXT"],
["keyword", "LLL"],
["keyword", "EXT"],
["keyword", "_GIFBUILDER"],
["keyword", "CARRAY"],
["keyword", "CASE"],
["keyword", "CLEARGIF"],
["keyword", "COA"],
["keyword", "COA_INT"],
["keyword", "CONSTANTS"],
["keyword", "CONTENT"],
["keyword", "EDITPANEL"],
["keyword", "EFFECT"],
["keyword", "FILE"],
["keyword", "FORM"],
["keyword", "FRAME"],
["keyword", "FRAMESET"],
["keyword", "FLUIDTEMPLATE"],
["keyword", "GIFBUILDER"],
["keyword", "global"],
["keyword", "globalString"],
["keyword", "globalVar"],
["keyword", "GMENU"],
["keyword", "GMENU_FOLDOUT"],
["keyword", "GMENU_LAYERS"],
["keyword", "GP"],
["keyword", "HMENU"],
["keyword", "HRULER"],
["keyword", "HTML"],
["keyword", "IENV"],
["keyword", "IMAGE"],
["keyword", "IMG_RESOURCE"],
["keyword", "IMGMENU"],
["keyword", "IMGMENUITEM"],
["keyword", "IMGTEXT"],
["keyword", "JSMENU"],
["keyword", "JSMENUITEM"],
["keyword", "LOAD_REGISTER"],
["keyword", "PAGE"],
["keyword", "RECORDS"],
["keyword", "RESTORE_REGISTER"],
["keyword", "TEMPLATE"],
["keyword", "TMENU"],
["keyword", "TMENU_LAYERS"],
["keyword", "TMENUITEM"],
["keyword", "USER"],
["keyword", "USER_INT"],
["keyword", "INCLUDE_TYPOSCRIPT"],
["keyword", "NO"],
["keyword", "ACT"],
["keyword", "IFSUB"],
["keyword", "ACTIFSUB"],
["keyword", "CUR"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/typoscript/number_feature.test
================================================
foo = 423
bar=1
baz.10 =
----------------------------------------------------
[
["tag", ["foo"]], ["operator", "="], ["string", [["number", "423"]]],
["tag", ["bar"]], ["operator", "="], ["string", [["number", "1"]]],
["tag", ["baz", ["punctuation", "."]]],["number", ["10 ", ["operator", "="]]], ["string", []]
]
----------------------------------------------------
Checks for import functions.
================================================
FILE: tests/languages/typoscript/tag_string_feature.test
================================================
foo.bar.baz = HMENU
foo.bar.baz {
baz.foo = bar
bar = {$const.foo}
foo = LLL:EXT:str
IFSUB < .NO
IFSUB = 1
IFSUB {
foo = bar
}
}
Namespace\Classes\Test {
baz.foo = bar
}
----------------------------------------------------
[
["tag", ["foo",["punctuation", "."]]], ["tag", ["bar", ["punctuation", "."]]],["tag", ["baz"]], ["operator", "="], ["string", [["keyword", "HMENU"]]],
["tag", ["foo", ["punctuation", "."]]], ["tag", ["bar", ["punctuation", "."]]], ["tag", ["baz"]], ["punctuation", "{"],
["tag", ["baz", ["punctuation", "."]]], ["tag", ["foo"]], ["operator", "="], ["string", ["bar"]],
["tag", ["bar"]], ["operator", "="], ["string", [["function", "{$const.foo}"]]],
["tag", ["foo"]],["operator", "="], ["string", [["keyword", "LLL"], ["punctuation", ":"], ["keyword", "EXT"], ["punctuation", ":"], "str"]],
["keyword", "IFSUB"], ["operator", "<"], ["punctuation", "."],["keyword", "NO"],
["keyword", "IFSUB"], ["operator", "="], ["string", [["number", "1"]]],
["keyword", "IFSUB"], ["punctuation", "{"],
["tag", ["foo"]], ["operator", "="], ["string", ["bar"]],
["punctuation", "}"],
["punctuation", "}"],
["tag", ["Namespace\\Classes\\Test"]], ["punctuation", "{"],
["tag", ["baz", ["punctuation", "."]]], ["tag", ["foo"]], ["operator", "="], ["string", ["bar"]],
["punctuation", "}"]
]
----------------------------------------------------
Checks for tags and string.
================================================
FILE: tests/languages/unrealscript/boolean_feature.test
================================================
false
true
----------------------------------------------------
[
["boolean", "false"],
["boolean", "true"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/unrealscript/category_feature.test
================================================
// MyBool is visible but not editable in UnrealEd
var(MyCategory) editconst bool MyBool;
// MyBool is visible but not editable in UnrealEd and
// not changeable in script
var(MyCategory) const editconst bool MyBool;
// MyBool is visible and can be set in UnrealEd but
// not changeable in script
var(MyCategory) const bool MyBool;
----------------------------------------------------
[
["comment", "// MyBool is visible but not editable in UnrealEd"],
["keyword", "var"],
["punctuation", "("],
["category", "MyCategory"],
["punctuation", ")"],
["keyword", "editconst"],
["keyword", "bool"],
" MyBool",
["punctuation", ";"],
["comment", "// MyBool is visible but not editable in UnrealEd and"],
["comment", "// not changeable in script"],
["keyword", "var"],
["punctuation", "("],
["category", "MyCategory"],
["punctuation", ")"],
["keyword", "const"],
["keyword", "editconst"],
["keyword", "bool"],
" MyBool",
["punctuation", ";"],
["comment", "// MyBool is visible and can be set in UnrealEd but"],
["comment", "// not changeable in script"],
["keyword", "var"],
["punctuation", "("],
["category", "MyCategory"],
["punctuation", ")"],
["keyword", "const"],
["keyword", "bool"],
" MyBool",
["punctuation", ";"]
]
================================================
FILE: tests/languages/unrealscript/class-name_feature.test
================================================
class Foo extends Bar;
struct Baz {};
enum FooBar {};
interface IFoo extends IBar;
state Action {}
state() Defense {}
----------------------------------------------------
[
["keyword", "class"],
["class-name", "Foo"],
["keyword", "extends"],
["class-name", "Bar"],
["punctuation", ";"],
["keyword", "struct"],
["class-name", "Baz"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "enum"],
["class-name", "FooBar"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "interface"],
["class-name", "IFoo"],
["keyword", "extends"],
["class-name", "IBar"],
["punctuation", ";"],
["keyword", "state"],
["class-name", "Action"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "state"],
["punctuation", "("],
["punctuation", ")"],
["class-name", "Defense"],
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/unrealscript/comment_feature.test
================================================
// comment
/*
comment
*/
----------------------------------------------------
[
["comment", "// comment"],
["comment", "/*\r\n comment\r\n*/"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/unrealscript/keyword_feature.test
================================================
abstract
actor
array
auto
autoexpandcategories
bool
break
byte
case
class;
classgroup
client
coerce
collapsecategories
config
const
continue
default
defaultproperties
delegate
dependson
deprecated
do
dontcollapsecategories
editconst
editinlinenew
else
enum;
event
exec
export
extends;
final
float
for
forcescriptorder
foreach
function
goto
guid
hidecategories
hidedropdown
if
ignores
implements
inherits
input
int
interface;
iterator
latent
local
material
name
native
nativereplication
noexport
nontransient
noteditinlinenew
notplaceable
operator
optional
out
pawn
perobjectconfig
perobjectlocalized
placeable
postoperator
preoperator
private
protected
reliable
replication
return
server
showcategories
simulated
singular
state;
static
string
struct;
structdefault
structdefaultproperties
switch
texture
transient
travel
unreliable
until
var
vector
while
within;
----------------------------------------------------
[
["keyword", "abstract"],
["keyword", "actor"],
["keyword", "array"],
["keyword", "auto"],
["keyword", "autoexpandcategories"],
["keyword", "bool"],
["keyword", "break"],
["keyword", "byte"],
["keyword", "case"],
["keyword", "class"],
["punctuation", ";"],
["keyword", "classgroup"],
["keyword", "client"],
["keyword", "coerce"],
["keyword", "collapsecategories"],
["keyword", "config"],
["keyword", "const"],
["keyword", "continue"],
["keyword", "default"],
["keyword", "defaultproperties"],
["keyword", "delegate"],
["keyword", "dependson"],
["keyword", "deprecated"],
["keyword", "do"],
["keyword", "dontcollapsecategories"],
["keyword", "editconst"],
["keyword", "editinlinenew"],
["keyword", "else"],
["keyword", "enum"],
["punctuation", ";"],
["keyword", "event"],
["keyword", "exec"],
["keyword", "export"],
["keyword", "extends"],
["punctuation", ";"],
["keyword", "final"],
["keyword", "float"],
["keyword", "for"],
["keyword", "forcescriptorder"],
["keyword", "foreach"],
["keyword", "function"],
["keyword", "goto"],
["keyword", "guid"],
["keyword", "hidecategories"],
["keyword", "hidedropdown"],
["keyword", "if"],
["keyword", "ignores"],
["keyword", "implements"],
["keyword", "inherits"],
["keyword", "input"],
["keyword", "int"],
["keyword", "interface"],
["punctuation", ";"],
["keyword", "iterator"],
["keyword", "latent"],
["keyword", "local"],
["keyword", "material"],
["keyword", "name"],
["keyword", "native"],
["keyword", "nativereplication"],
["keyword", "noexport"],
["keyword", "nontransient"],
["keyword", "noteditinlinenew"],
["keyword", "notplaceable"],
["keyword", "operator"],
["keyword", "optional"],
["keyword", "out"],
["keyword", "pawn"],
["keyword", "perobjectconfig"],
["keyword", "perobjectlocalized"],
["keyword", "placeable"],
["keyword", "postoperator"],
["keyword", "preoperator"],
["keyword", "private"],
["keyword", "protected"],
["keyword", "reliable"],
["keyword", "replication"],
["keyword", "return"],
["keyword", "server"],
["keyword", "showcategories"],
["keyword", "simulated"],
["keyword", "singular"],
["keyword", "state"],
["punctuation", ";"],
["keyword", "static"],
["keyword", "string"],
["keyword", "struct"],
["punctuation", ";"],
["keyword", "structdefault"],
["keyword", "structdefaultproperties"],
["keyword", "switch"],
["keyword", "texture"],
["keyword", "transient"],
["keyword", "travel"],
["keyword", "unreliable"],
["keyword", "until"],
["keyword", "var"],
["keyword", "vector"],
["keyword", "while"],
["keyword", "within"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/unrealscript/macro_feature.test
================================================
`log("foo");
----------------------------------------------------
[
["macro", "`log"],
["punctuation", "("],
["string", "\"foo\""],
["punctuation", ")"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for macros.
================================================
FILE: tests/languages/unrealscript/metadata_feature.test
================================================
var float MyVar;
enum EMyEnum
{
EME_ValA,
EME_ValB,
};
var() LinearColor DrawColor;
// not metadata
var array> Bar;
----------------------------------------------------
[
["keyword", "var"],
["keyword", "float"],
" MyVar",
["metadata", [
["punctuation", "<"],
["property", "TAG"],
["operator", "="],
"VALUE",
["punctuation", ">"]
]],
["punctuation", ";"],
["keyword", "enum"],
["class-name", "EMyEnum"],
["punctuation", "{"],
"\r\n\tEME_ValA",
["metadata", [
["punctuation", "<"],
["property", "TAG"],
["operator", "="],
"VALUE",
["punctuation", ">"]
]],
["punctuation", ","],
"\r\n\tEME_ValB",
["metadata", [
["punctuation", "<"],
["property", "TAG"],
["operator", "="],
"VALUE",
["punctuation", ">"]
]],
["punctuation", ","],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "var"],
["punctuation", "("],
["punctuation", ")"],
" LinearColor DrawColor",
["metadata", [
["punctuation", "<"],
["property", "DisplayName"],
["operator", "="],
"Draw Color",
["punctuation", "|"],
["property", "EditCondition"],
["operator", "="],
"bOverrideDrawColor",
["punctuation", ">"]
]],
["punctuation", ";"],
["comment", "// not metadata"],
["keyword", "var"],
["keyword", "array"],
["operator", "<"],
["keyword", "class"],
["operator", "<"],
"Foo",
["operator", ">>"],
" Bar",
["punctuation", ";"]
]
----------------------------------------------------
Checks for metadata.
================================================
FILE: tests/languages/unrealscript/number_feature.test
================================================
123
123e+5
0xFFFF
----------------------------------------------------
[
["number", "123"],
["number", "123e+5"],
["number", "0xFFFF"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/unrealscript/operator_feature.test
================================================
+ - * / % **
+= -= *= /=
++ --
~ && || ^^
! & | ^ << >>
> >= < <= == != ~=
$ $= @ @=
=
? :
Cross Dot ClockwiseFrom
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "**"],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "++"],
["operator", "--"],
["operator", "~"],
["operator", "&&"],
["operator", "||"],
["operator", "^^"],
["operator", "!"],
["operator", "&"],
["operator", "|"],
["operator", "^"],
["operator", "<<"],
["operator", ">>"],
["operator", ">"],
["operator", ">="],
["operator", "<"],
["operator", "<="],
["operator", "=="],
["operator", "!="],
["operator", "~="],
["operator", "$"],
["operator", "$="],
["operator", "@"],
["operator", "@="],
["operator", "="],
["operator", "?"],
["operator", ":"],
["operator", "Cross"],
["operator", "Dot"],
["operator", "ClockwiseFrom"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/unrealscript/string_feature.test
================================================
""
"foo"
''
'foo'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\""],
["string", "''"],
["string", "'foo'"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/uorazor/boolean_feature.test
================================================
false
true
----------------------------------------------------
[
["boolean", "false"],
["boolean", "true"]
]
----------------------------------------------------
Checks for boolean values
================================================
FILE: tests/languages/uorazor/breakdown_script_example_feature.test
================================================
setvar "my_training_target"
while skill "anatomy" < 100
useskill "anatomy"
wft 500
target "my_training_target"
wait 2000
endwhile
----------------------------------------------------
[
["source-commands", "setvar"],
["string", [
["punctuation", "\""],
"my_training_target",
["punctuation", "\""]
]],
["keyword", "while"],
["function", "skill"],
["string", [
["punctuation", "\""],
"anatomy",
["punctuation", "\""]
]],
["operator", "<"],
["number", "100"],
["source-commands", "useskill"],
["string", [
["punctuation", "\""],
"anatomy",
["punctuation", "\""]
]],
["source-commands", "wft"],
["number", "500"],
["source-commands", "target"],
["string", [
["punctuation", "\""],
"my_training_target",
["punctuation", "\""]
]],
["source-commands", "wait"],
["number", "2000"],
["keyword", "endwhile"]
]
----------------------------------------------------
Checks for each type of syntax breakdown
================================================
FILE: tests/languages/uorazor/commands_feature.test
================================================
alliance
attack
cast
clearall
clearignore
clearjournal
clearlist
clearsysmsg
createlist
createtimer
dclick
dclicktype
dclickvar
dress
dressconfig
drop
droprelloc
emote
getlabel
guild
gumpclose
gumpresponse
hotkey
ignore
lasttarget
lift
lifttype
menu
menuresponse
msg
org
organize
organizer
overhead
pause
poplist
potion
promptresponse
pushlist
removelist
removetimer
rename
restock
say
scav
scavenger
script
setability
setlasttarget
setskill
settimer
sysmsg
targetloc
targetrelloc
targettype
undress
unignore
unsetvar
useobject
useonce
usetype
virtue
waitforgump
waitformenu
waitforprompt
waitforstat
waitforsysmsg
waitfortarget
walk
wfsysmsg
whisper
yell
----------------------------------------------------
[
["source-commands", "alliance"],
["source-commands", "attack"],
["source-commands", "cast"],
["source-commands", "clearall"],
["source-commands", "clearignore"],
["source-commands", "clearjournal"],
["source-commands", "clearlist"],
["source-commands", "clearsysmsg"],
["source-commands", "createlist"],
["source-commands", "createtimer"],
["source-commands", "dclick"],
["source-commands", "dclicktype"],
["source-commands", "dclickvar"],
["source-commands", "dress"],
["source-commands", "dressconfig"],
["source-commands", "drop"],
["source-commands", "droprelloc"],
["source-commands", "emote"],
["source-commands", "getlabel"],
["source-commands", "guild"],
["source-commands", "gumpclose"],
["source-commands", "gumpresponse"],
["source-commands", "hotkey"],
["source-commands", "ignore"],
["source-commands", "lasttarget"],
["source-commands", "lift"],
["source-commands", "lifttype"],
["source-commands", "menu"],
["source-commands", "menuresponse"],
["source-commands", "msg"],
["source-commands", "org"],
["source-commands", "organize"],
["source-commands", "organizer"],
["source-commands", "overhead"],
["source-commands", "pause"],
["source-commands", "poplist"],
["source-commands", "potion"],
["source-commands", "promptresponse"],
["source-commands", "pushlist"],
["source-commands", "removelist"],
["source-commands", "removetimer"],
["source-commands", "rename"],
["source-commands", "restock"],
["source-commands", "say"],
["source-commands", "scav"],
["source-commands", "scavenger"],
["source-commands", "script"],
["source-commands", "setability"],
["source-commands", "setlasttarget"],
["source-commands", "setskill"],
["source-commands", "settimer"],
["source-commands", "sysmsg"],
["source-commands", "targetloc"],
["source-commands", "targetrelloc"],
["source-commands", "targettype"],
["source-commands", "undress"],
["source-commands", "unignore"],
["source-commands", "unsetvar"],
["source-commands", "useobject"],
["source-commands", "useonce"],
["source-commands", "usetype"],
["source-commands", "virtue"],
["source-commands", "waitforgump"],
["source-commands", "waitformenu"],
["source-commands", "waitforprompt"],
["source-commands", "waitforstat"],
["source-commands", "waitforsysmsg"],
["source-commands", "waitfortarget"],
["source-commands", "walk"],
["source-commands", "wfsysmsg"],
["source-commands", "whisper"],
["source-commands", "yell"]
]
----------------------------------------------------
Checks for commands.
================================================
FILE: tests/languages/uorazor/comment_feature.test
================================================
# This is a comment
// so is this
----------------------------------------------------
[
["comment-hash", "# This is a comment"],
["comment-slash", "// so is this"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/uorazor/functions_feature.test
================================================
atlist close closest count counter counttype dead dex diffhits diffmana diffstam diffweight find findbuff finddebuff findlayer findtype findtypelist followers gumpexists hidden hits hp hue human humanoid ingump inlist insysmessage insysmsg int invul lhandempty list listexists mana maxhits maxhp maxmana maxstam maxweight monster mounted name next noto paralyzed poisoned position prev previous queued rand random rhandempty skill stam str targetexists timer timerexists varexist warmode weight
----------------------------------------------------
[
["function", "atlist"],
["function", "close"],
["function", "closest"],
["function", "count"],
["function", "counter"],
["function", "counttype"],
["function", "dead"],
["function", "dex"],
["function", "diffhits"],
["function", "diffmana"],
["function", "diffstam"],
["function", "diffweight"],
["function", "find"],
["function", "findbuff"],
["function", "finddebuff"],
["function", "findlayer"],
["function", "findtype"],
["function", "findtypelist"],
["function", "followers"],
["function", "gumpexists"],
["function", "hidden"],
["function", "hits"],
["function", "hp"],
["function", "hue"],
["function", "human"],
["function", "humanoid"],
["function", "ingump"],
["function", "inlist"],
["function", "insysmessage"],
["function", "insysmsg"],
["function", "int"],
["function", "invul"],
["function", "lhandempty"],
["function", "list"],
["function", "listexists"],
["function", "mana"],
["function", "maxhits"],
["function", "maxhp"],
["function", "maxmana"],
["function", "maxstam"],
["function", "maxweight"],
["function", "monster"],
["function", "mounted"],
["function", "name"],
["function", "next"],
["function", "noto"],
["function", "paralyzed"],
["function", "poisoned"],
["function", "position"],
["function", "prev"],
["function", "previous"],
["function", "queued"],
["function", "rand"],
["function", "random"],
["function", "rhandempty"],
["function", "skill"],
["function", "stam"],
["function", "str"],
["function", "targetexists"],
["function", "timer"],
["function", "timerexists"],
["function", "varexist"],
["function", "warmode"],
["function", "weight"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/uorazor/keyword_feature.test
================================================
and
as
break
continue
else
elseif
endfor
endif
for
if
loop
not
or
replay
stop
----------------------------------------------------
[
["keyword", "and"],
["keyword", "as"],
["keyword", "break"],
["keyword", "continue"],
["keyword", "else"],
["keyword", "elseif"],
["keyword", "endfor"],
["keyword", "endif"],
["keyword", "for"],
["keyword", "if"],
["keyword", "loop"],
["keyword", "not"],
["keyword", "or"],
["keyword", "replay"],
["keyword", "stop"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/uorazor/source_layers_feature.test
================================================
backpack
gloves
self
ARMS
BLUE
BRACELET
CANCEL
CLEAR
CLOAK
CRIMINAL
EARRINGS
ENEMY
FACIALHAIR
FRIEND
FRIENDLY
GRAY
GREY
GROUND
HAIR
HEAD
INNERLEGS
INNERTORSO
INNOCENT
LEFTHAND
MIDDLETORSO
MURDERER
NECK
NONFRIENDLY
ONEHANDEDSECONDARY
OUTERLEGS
OUTERTORSO
PANTS
RED
RIGHTHAND
RING
SHIRT
SHOES
TALISMAN
WAIST
----------------------------------------------------
[
["source-layers", "backpack"],
["source-layers", "gloves"],
["source-layers", "self"],
["source-layers", "ARMS"],
["source-layers", "BLUE"],
["source-layers", "BRACELET"],
["source-layers", "CANCEL"],
["source-layers", "CLEAR"],
["source-layers", "CLOAK"],
["source-layers", "CRIMINAL"],
["source-layers", "EARRINGS"],
["source-layers", "ENEMY"],
["source-layers", "FACIALHAIR"],
["source-layers", "FRIEND"],
["source-layers", "FRIENDLY"],
["source-layers", "GRAY"],
["source-layers", "GREY"],
["source-layers", "GROUND"],
["source-layers", "HAIR"],
["source-layers", "HEAD"],
["source-layers", "INNERLEGS"],
["source-layers", "INNERTORSO"],
["source-layers", "INNOCENT"],
["source-layers", "LEFTHAND"],
["source-layers", "MIDDLETORSO"],
["source-layers", "MURDERER"],
["source-layers", "NECK"],
["source-layers", "NONFRIENDLY"],
["source-layers", "ONEHANDEDSECONDARY"],
["source-layers", "OUTERLEGS"],
["source-layers", "OUTERTORSO"],
["source-layers", "PANTS"],
["source-layers", "RED"],
["source-layers", "RIGHTHAND"],
["source-layers", "RING"],
["source-layers", "SHIRT"],
["source-layers", "SHOES"],
["source-layers", "TALISMAN"],
["source-layers", "WAIST"]
]
----------------------------------------------------
Checks for source layers.
================================================
FILE: tests/languages/uri/authority_feature.test
================================================
https://john.doe@www.example.com:123/forum/questions
ftp://ftp.is.co.za/rfc/rfc1808.txt
ldap://[2001:db8::7]/
https://[v1.foo]/
//192.0.2.16:80/
//example.com/path/resource.txt
----------------------------------------------------
[
["scheme", [
"https",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["user-info-segment", [
["user-info", "john.doe"],
["user-info-delimiter", "@"]
]],
["host", ["www.example.com"]],
["port-segment", [
["port-delimiter", ":"],
["port", "123"]
]]
]],
["path", [
["path-separator", "/"],
"forum",
["path-separator", "/"],
"questions"
]],
["scheme", [
"ftp",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["host", ["ftp.is.co.za"]]
]],
["path", [
["path-separator", "/"],
"rfc",
["path-separator", "/"],
"rfc1808.txt"
]],
["scheme", [
"ldap",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["host", [
["ip-literal", [
["ip-literal-delimiter", "["],
["ipv6-address", "2001:db8::7"],
["ip-literal-delimiter", "]"]
]]
]]
]],
["path", [
["path-separator", "/"]
]],
["scheme", [
"https",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["host", [
["ip-literal", [
["ip-literal-delimiter", "["],
["ipv-future", "v1.foo"],
["ip-literal-delimiter", "]"]
]]
]]
]],
["path", [
["path-separator", "/"]
]],
["authority", [
["authority-delimiter", "//"],
["host", [
["ipv4-address", "192.0.2.16"]
]],
["port-segment", [
["port-delimiter", ":"],
["port", "80"]
]]
]],
["path", [
["path-separator", "/"]
]],
["authority", [
["authority-delimiter", "//"],
["host", ["example.com"]]
]],
["path", [
["path-separator", "/"],
"path",
["path-separator", "/"],
"resource.txt"
]]
]
================================================
FILE: tests/languages/uri/full.test
================================================
https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top
ldap://[2001:db8::7]/c=GB?objectClass?one
mailto:John.Doe@example.com
news:comp.infosystems.www.servers.unix
telnet://192.0.2.16:80/
https://example.com/path/resource.txt#fragment
----------------------------------------------------
[
["scheme", [
"https",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["user-info-segment", [
["user-info", "john.doe"],
["user-info-delimiter", "@"]
]],
["host", ["www.example.com"]],
["port-segment", [
["port-delimiter", ":"],
["port", "123"]
]]
]],
["path", [
["path-separator", "/"],
"forum",
["path-separator", "/"],
"questions",
["path-separator", "/"]
]],
["query", [
["query-delimiter", "?"],
["pair", [
["key", "tag"],
"=",
["value", "networking"]
]],
["pair-delimiter", "&"],
["pair", [
["key", "order"],
"=",
["value", "newest"]
]]
]],
["fragment", [
["fragment-delimiter", "#"],
"top"
]],
["scheme", [
"ldap",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["host", [
["ip-literal", [
["ip-literal-delimiter", "["],
["ipv6-address", "2001:db8::7"],
["ip-literal-delimiter", "]"]
]]
]]
]],
["path", [
["path-separator", "/"],
"c=GB"
]],
["query", [
["query-delimiter", "?"],
["pair", [
["key", "objectClass?one"]
]]
]],
["scheme", [
"mailto",
["scheme-delimiter", ":"]
]],
["path", ["John.Doe@example.com"]],
["scheme", [
"news",
["scheme-delimiter", ":"]
]],
["path", ["comp.infosystems.www.servers.unix"]],
["scheme", [
"telnet",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["host", [
["ipv4-address", "192.0.2.16"]
]],
["port-segment", [
["port-delimiter", ":"],
["port", "80"]
]]
]],
["path", [
["path-separator", "/"]
]],
["scheme", [
"https",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["host", ["example.com"]]
]],
["path", [
["path-separator", "/"],
"path",
["path-separator", "/"],
"resource.txt"
]],
["fragment", [
["fragment-delimiter", "#"],
"fragment"
]]
]
================================================
FILE: tests/languages/uri/query_feature.test
================================================
?tag=networking&order=newest#top
?objectClass?one
?title=Query_string&action=edit
http://example.com/kb/index.php?cat=1;id=23
----------------------------------------------------
[
["query", [
["query-delimiter", "?"],
["pair", [
["key", "tag"],
"=",
["value", "networking"]
]],
["pair-delimiter", "&"],
["pair", [
["key", "order"],
"=",
["value", "newest"]
]]
]],
["fragment", [
["fragment-delimiter", "#"],
"top"
]],
["query", [
["query-delimiter", "?"],
["pair", [
["key", "objectClass?one"]
]]
]],
["query", [
["query-delimiter", "?"],
["pair", [
["key", "title"],
"=",
["value", "Query_string"]
]],
["pair-delimiter", "&"],
["pair", [
["key", "action"],
"=",
["value", "edit"]
]]
]],
["scheme", [
"http",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["host", ["example.com"]]
]],
["path", [
["path-separator", "/"],
"kb",
["path-separator", "/"],
"index.php"
]],
["query", [
["query-delimiter", "?"],
["pair", [
["key", "cat"],
"=",
["value", "1"]
]],
["pair-delimiter", ";"],
["pair", [
["key", "id"],
"=",
["value", "23"]
]]
]]
]
================================================
FILE: tests/languages/uri/relative.test
================================================
//example.com/path/resource.txt
/path/resource.txt
path/resource.txt
../resource.txt
./resource.txt
resource.txt
#fragment
----------------------------------------------------
[
["authority", [
["authority-delimiter", "//"],
["host", ["example.com"]]
]],
["path", [
["path-separator", "/"],
"path",
["path-separator", "/"],
"resource.txt"
]],
["path", [
["path-separator", "/"],
"path",
["path-separator", "/"],
"resource.txt"
]],
["path", [
"path",
["path-separator", "/"],
"resource.txt"
]],
["path", [
"..",
["path-separator", "/"],
"resource.txt"
]],
["path", [
".",
["path-separator", "/"],
"resource.txt"
]],
["path", ["resource.txt"]],
["fragment", [
["fragment-delimiter", "#"],
"fragment"
]]
]
================================================
FILE: tests/languages/uri/scheme_feature.test
================================================
ftp://ftp.is.co.za/rfc/rfc1808.txt
tel:+1-816-555-1212
urn:oasis:names:specification:docbook:dtd:xml:4.1.2
data:text/vnd-example+xyz;foo=bar;base64,R0lGODdh
----------------------------------------------------
[
["scheme", [
"ftp",
["scheme-delimiter", ":"]
]],
["authority", [
["authority-delimiter", "//"],
["host", ["ftp.is.co.za"]]
]],
["path", [
["path-separator", "/"],
"rfc",
["path-separator", "/"],
"rfc1808.txt"
]],
["scheme", [
"tel",
["scheme-delimiter", ":"]
]],
["path", ["+1-816-555-1212"]],
["scheme", [
"urn",
["scheme-delimiter", ":"]
]],
["path", ["oasis:names:specification:docbook:dtd:xml:4.1.2"]],
["scheme", [
"data",
["scheme-delimiter", ":"]
]],
["path", [
"text",
["path-separator", "/"],
"vnd-example+xyz;foo=bar;base64,R0lGODdh"
]]
]
================================================
FILE: tests/languages/v/attribute_feature.test
================================================
[deprecated]
[unsafe_fn]
[typedef]
[live]
[inline]
[flag]
[ref_only]
[windows_stdcall]
[direct_array_access]
----------------------------------------------------
[
["attribute", [
["punctuation", "["],
["keyword", "deprecated"],
["punctuation", "]"]
]],
["attribute", [
["punctuation", "["],
["keyword", "unsafe_fn"],
["punctuation", "]"]
]],
["attribute", [
["punctuation", "["],
["keyword", "typedef"],
["punctuation", "]"]
]],
["attribute", [
["punctuation", "["],
["keyword", "live"],
["punctuation", "]"]
]],
["attribute", [
["punctuation", "["],
["keyword", "inline"],
["punctuation", "]"]
]],
["attribute", [
["punctuation", "["],
["keyword", "flag"],
["punctuation", "]"]
]],
["attribute", [
["punctuation", "["],
["keyword", "ref_only"],
["punctuation", "]"]
]],
["attribute", [
["punctuation", "["],
["keyword", "windows_stdcall"],
["punctuation", "]"]
]],
["attribute", [
["punctuation", "["],
["keyword", "direct_array_access"],
["punctuation", "]"]
]]
]
================================================
FILE: tests/languages/v/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Check for boolean
================================================
FILE: tests/languages/v/char_feature.test
================================================
`🚀`
`\``
`Not a Rune`
----------------------------------------------------
[
["char", "`🚀`"],
["char", "`\\``"],
"\r\n`Not a Rune`"
]
================================================
FILE: tests/languages/v/class-name_feature.test
================================================
struct Abc { }
type Alphabet = Abc | Xyz
enum Token { }
interface Speaker { }
struct Repo { }
----------------------------------------------------
[
["keyword", "struct"],
["class-name", "Abc"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "type"],
["class-name", "Alphabet"],
["operator", "="],
" Abc ",
["operator", "|"],
" Xyz\r\n",
["keyword", "enum"],
["class-name", "Token"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "interface"],
["class-name", "Speaker"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "struct"],
["class-name", "Repo"],
["generic", [
["punctuation", "<"],
["class-name", "T"],
["punctuation", ">"]
]],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/v/function_feature.test
================================================
fn init() { }
fn add(x int, y int) int { }
fn sum(a ...int) int { }
fn (mut t MyTime) century() int { }
fn (d Dog) speak() string { }
fn (r Repo) find_user_by_id(id int) ?User { }
fn new_repo(db DB) Repo { }
fn (r Repo) find_by_id(id int) ?T { }
----------------------------------------------------
[
["keyword", "fn"],
["function", "init"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "fn"],
["function", "add"],
["punctuation", "("],
"x ",
["builtin", "int"],
["punctuation", ","],
" y ",
["builtin", "int"],
["punctuation", ")"],
["builtin", "int"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "fn"],
["function", "sum"],
["punctuation", "("],
"a ",
["operator", "..."],
["builtin", "int"],
["punctuation", ")"],
["builtin", "int"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "fn"],
["punctuation", "("],
["keyword", "mut"],
" t MyTime",
["punctuation", ")"],
["function", "century"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "int"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "fn"],
["punctuation", "("],
"d Dog",
["punctuation", ")"],
["function", "speak"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "string"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "fn"],
["punctuation", "("],
"r Repo",
["punctuation", ")"],
["function", "find_user_by_id"],
["punctuation", "("],
"id ",
["builtin", "int"],
["punctuation", ")"],
["operator", "?"],
"User ",
["punctuation", "{"],
["punctuation", "}"],
["keyword", "fn"],
["generic-function", [
["function", "new_repo"],
["generic", [
["punctuation", "<"],
["class-name", "T"],
["punctuation", ">"]
]]
]],
["punctuation", "("],
"db DB",
["punctuation", ")"],
" Repo",
["generic", [
["punctuation", "<"],
["class-name", "T"],
["punctuation", ">"]
]],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "fn"],
["punctuation", "("],
"r Repo",
["generic", [
["punctuation", "<"],
["class-name", "T"],
["punctuation", ">"]
]],
["punctuation", ")"],
["function", "find_by_id"],
["punctuation", "("],
"id ",
["builtin", "int"],
["punctuation", ")"],
["operator", "?"],
"T ",
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/v/keyword_feature.test
================================================
as;
asm;
assert;
atomic;
break;
const;
continue;
defer;
else;
embed;
enum;;
fn;
for;
__global;
go;
goto;
if;
import;
in;
interface;
is;
lock;
match;
module;
mut;
none;
or;
pub;
return;
rlock;
select;
shared;
sizeof;
static;
struct;
type;;
typeof;
union;
unsafe;
$if;
$else;
$for;
#include;
#flag;
----------------------------------------------------
[
["keyword", "as"], ["punctuation", ";"],
["keyword", "asm"], ["punctuation", ";"],
["keyword", "assert"], ["punctuation", ";"],
["keyword", "atomic"], ["punctuation", ";"],
["keyword", "break"], ["punctuation", ";"],
["keyword", "const"], ["punctuation", ";"],
["keyword", "continue"], ["punctuation", ";"],
["keyword", "defer"], ["punctuation", ";"],
["keyword", "else"], ["punctuation", ";"],
["keyword", "embed"], ["punctuation", ";"],
["keyword", "enum"], ["punctuation", ";"], ["punctuation", ";"],
["keyword", "fn"], ["punctuation", ";"],
["keyword", "for"], ["punctuation", ";"],
["keyword", "__global"], ["punctuation", ";"],
["keyword", "go"], ["punctuation", ";"],
["keyword", "goto"], ["punctuation", ";"],
["keyword", "if"], ["punctuation", ";"],
["keyword", "import"], ["punctuation", ";"],
["keyword", "in"], ["punctuation", ";"],
["keyword", "interface"], ["punctuation", ";"],
["keyword", "is"], ["punctuation", ";"],
["keyword", "lock"], ["punctuation", ";"],
["keyword", "match"], ["punctuation", ";"],
["keyword", "module"], ["punctuation", ";"],
["keyword", "mut"], ["punctuation", ";"],
["keyword", "none"], ["punctuation", ";"],
["keyword", "or"], ["punctuation", ";"],
["keyword", "pub"], ["punctuation", ";"],
["keyword", "return"], ["punctuation", ";"],
["keyword", "rlock"], ["punctuation", ";"],
["keyword", "select"], ["punctuation", ";"],
["keyword", "shared"], ["punctuation", ";"],
["keyword", "sizeof"], ["punctuation", ";"],
["keyword", "static"], ["punctuation", ";"],
["keyword", "struct"], ["punctuation", ";"],
["keyword", "type"], ["punctuation", ";"], ["punctuation", ";"],
["keyword", "typeof"], ["punctuation", ";"],
["keyword", "union"], ["punctuation", ";"],
["keyword", "unsafe"], ["punctuation", ";"],
["keyword", "$if"], ["punctuation", ";"],
["keyword", "$else"], ["punctuation", ";"],
["keyword", "$for"], ["punctuation", ";"],
["keyword", "#include"], ["punctuation", ";"],
["keyword", "#flag"], ["punctuation", ";"]
]
================================================
FILE: tests/languages/v/number_feature.test
================================================
123
0x7B
0b01111011
0o173
1_000_000
0xF_F
072.40
2.71828
----------------------------------------------------
[
["number", "123"],
["number", "0x7B"],
["number", "0b01111011"],
["number", "0o173"],
["number", "1_000_000"],
["number", "0xF_F"],
["number", "072.40"],
["number", "2.71828"]
]
----------------------------------------------------
Check for numbers
================================================
FILE: tests/languages/v/operator_feature.test
================================================
+
-
*
/
%
~
&
|
^
!
&&
||
!=
<<
>>
==
<
<=
>
>=
+=
-=
*=
/=
%=
&=
|=
^=
>>=
<<=
:=
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "~"],
["operator", "&"],
["operator", "|"],
["operator", "^"],
["operator", "!"],
["operator", "&&"],
["operator", "||"],
["operator", "!="],
["operator", "<<"],
["operator", ">>"],
["operator", "=="],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "%="],
["operator", "&="],
["operator", "|="],
["operator", "^="],
["operator", ">>="],
["operator", "<<="],
["operator", ":="]
]
================================================
FILE: tests/languages/v/string_feature.test
================================================
"https://example.com"
'single quote'
'age = $user.age'
'[${int(x):-10}]'
r'hello\nworld'
----------------------------------------------------
[
["string", ["\"https://example.com\""]],
["string", ["'single quote'"]],
["string", [
"'age = ",
["interpolation", [
["interpolation-variable", "$user.age"]
]],
"'"
]],
["string", [
"'[",
["interpolation", [
["interpolation-punctuation", "${"],
["interpolation-expression", [
["function", "int"],
["punctuation", "("],
"x",
["punctuation", ")"],
["punctuation", ":"],
["operator", "-"],
["number", "10"]
]],
["interpolation-punctuation", "}"]
]],
"]'"
]],
["string", ["r'hello\\nworld'"]]
]
----------------------------------------------------
Check for strings and string interpolation
================================================
FILE: tests/languages/vala/class-name_feature.test
================================================
class Foo
enum Bar
interface BarBaz
class Foo : Bar
[Foobar]
void Foo(Bar bar, Baz baz)
----------------------------------------------------
[
["keyword", "class"],
["class-name", ["Foo"]],
["keyword", "enum"],
["class-name", ["Bar"]],
["keyword", "interface"],
["class-name", ["BarBaz"]],
["keyword", "class"],
["class-name", ["Foo"]],
["punctuation", ":"],
["class-name", ["Bar"]],
["punctuation", "["],
["class-name", ["Foobar"]],
["punctuation", "]"],
["keyword", "void"],
["function", "Foo"],
["punctuation", "("],
["class-name", ["Bar"]],
" bar",
["punctuation", ","],
["class-name", ["Baz"]],
" baz",
["punctuation", ")"]
]
----------------------------------------------------
Checks for class names.
================================================
FILE: tests/languages/vala/constant_feature.test
================================================
FOO
----------------------------------------------------
[
["constant", "FOO"]
]
================================================
FILE: tests/languages/vala/keyword_feature.test
================================================
bool
char
double
float
null
size_t
ssize_t
string
unichar
void
int
int8
int16
int32
int64
long
short
uchar
uint
uint8
uint16
uint32
uint64
ulong
ushort
class
delegate
enum
errordomain
interface
namespace
struct
break
continue
do
for
foreach
return
while
else
if
switch
assert
case
default
abstract
const
dynamic
ensures
extern
inline
internal
override
private
protected
public
requires
signal
static
virtual
volatile
weak
async
owned
unowned
try
catch
finally
throw
as
base
construct
delete
get
in
is
lock
new
out
params
ref
sizeof
set
this
throws
typeof
using
value
var
yield
----------------------------------------------------
[
["keyword", "bool"],
["keyword", "char"],
["keyword", "double"],
["keyword", "float"],
["keyword", "null"],
["keyword", "size_t"],
["keyword", "ssize_t"],
["keyword", "string"],
["keyword", "unichar"],
["keyword", "void"],
["keyword", "int"],
["keyword", "int8"],
["keyword", "int16"],
["keyword", "int32"],
["keyword", "int64"],
["keyword", "long"],
["keyword", "short"],
["keyword", "uchar"],
["keyword", "uint"],
["keyword", "uint8"],
["keyword", "uint16"],
["keyword", "uint32"],
["keyword", "uint64"],
["keyword", "ulong"],
["keyword", "ushort"],
["keyword", "class"],
["keyword", "delegate"],
["keyword", "enum"],
["keyword", "errordomain"],
["keyword", "interface"],
["keyword", "namespace"],
["keyword", "struct"],
["keyword", "break"],
["keyword", "continue"],
["keyword", "do"],
["keyword", "for"],
["keyword", "foreach"],
["keyword", "return"],
["keyword", "while"],
["keyword", "else"],
["keyword", "if"],
["keyword", "switch"],
["keyword", "assert"],
["keyword", "case"],
["keyword", "default"],
["keyword", "abstract"],
["keyword", "const"],
["keyword", "dynamic"],
["keyword", "ensures"],
["keyword", "extern"],
["keyword", "inline"],
["keyword", "internal"],
["keyword", "override"],
["keyword", "private"],
["keyword", "protected"],
["keyword", "public"],
["keyword", "requires"],
["keyword", "signal"],
["keyword", "static"],
["keyword", "virtual"],
["keyword", "volatile"],
["keyword", "weak"],
["keyword", "async"],
["keyword", "owned"],
["keyword", "unowned"],
["keyword", "try"],
["keyword", "catch"],
["keyword", "finally"],
["keyword", "throw"],
["keyword", "as"],
["keyword", "base"],
["keyword", "construct"],
["keyword", "delete"],
["keyword", "get"],
["keyword", "in"],
["keyword", "is"],
["keyword", "lock"],
["keyword", "new"],
["keyword", "out"],
["keyword", "params"],
["keyword", "ref"],
["keyword", "sizeof"],
["keyword", "set"],
["keyword", "this"],
["keyword", "throws"],
["keyword", "typeof"],
["keyword", "using"],
["keyword", "value"],
["keyword", "var"],
["keyword", "yield"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/vala/number_feature.test
================================================
42
3.14159
5ul
0.75f
4e10
2.1e-10
0.4e+2
0xbabe
0xBABE
----------------------------------------------------
[
["number", "42"],
["number", "3.14159"],
["number", "5ul"],
["number", "0.75f"],
["number", "4e10"],
["number", "2.1e-10"],
["number", "0.4e+2"],
["number", "0xbabe"],
["number", "0xBABE"]
]
----------------------------------------------------
Checks for decimal numbers and hexadecimal numbers.
================================================
FILE: tests/languages/vala/operator_feature.test
================================================
+ - * / % -- ++
>> <<
~ & | ^
+= -= *= /= %= >>= <<= &= |= ^=
! && ||
= == != < > <= >= =>
? ??
...
->
----------------------------------------------------
[
["operator", "+"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "--"],
["operator", "++"],
["operator", ">>"],
["operator", "<<"],
["operator", "~"],
["operator", "&"],
["operator", "|"],
["operator", "^"],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "%="],
["operator", ">>="],
["operator", "<<="],
["operator", "&="],
["operator", "|="],
["operator", "^="],
["operator", "!"],
["operator", "&&"],
["operator", "||"],
["operator", "="],
["operator", "=="],
["operator", "!="],
["operator", "<"],
["operator", ">"],
["operator", "<="],
["operator", ">="],
["operator", "=>"],
["operator", "?"],
["operator", "??"],
["operator", "..."],
["operator", "->"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/vala/punctuation_feature.test
================================================
. , ; :
[ ] { } ( )
----------------------------------------------------
[
["punctuation", "."],
["punctuation", ","],
["punctuation", ";"],
["punctuation", ":"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "("],
["punctuation", ")"]
]
----------------------------------------------------
Checks for punctuation.
================================================
FILE: tests/languages/vala/regex_feature.test
================================================
/(\d+\.\d+\.\d+)/
----------------------------------------------------
[
["regex", [
["regex-delimiter", "/"],
["regex-source", "(\\d+\\.\\d+\\.\\d+)"],
["regex-delimiter", "/"]
]]
]
================================================
FILE: tests/languages/vala/string_feature.test
================================================
""
"fo\"o"
"""Multi line
string"""
@"foo $bar"
@"foo $(bar)"
'a'
'\''
'\\'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"o\""],
["raw-string", "\"\"\"Multi line\r\nstring\"\"\""],
["template-string",
[
["string", "@\"foo "],
[
"interpolation",
[
[
"delimiter", "$"
],
"bar"
]
],
["string", "\""]
]
],
["template-string",
[
["string", "@\"foo "],
[
"interpolation",
[
[
"delimiter",
"$("
],
"bar",
[
"delimiter",
")"
]
]
],
["string", "\""]
]
],
["string", "'a'"],
["string", "'\\''"],
["string", "'\\\\'"]
]
----------------------------------------------------
Checks for normal and verbatim strings.
Also checks for single quoted characters.
================================================
FILE: tests/languages/vbnet/comment_feature.test
================================================
!foobar
REM foobar
'
'foobar
----------------------------------------------------
[
["comment", ["!foobar"]],
["comment", [["keyword", "REM"], " foobar"]],
["comment", "'"],
["comment", "'foobar"]
]
----------------------------------------------------
Checks for comments
================================================
FILE: tests/languages/vbnet/issue2781.test
================================================
bob = new SqlCommand("Select * from test Where Code=@Code");
bob = new SqlCommand("Select * from test Where Code=Code");
----------------------------------------------------
[
"bob ",
["operator", "="],
["keyword", "new"],
" SqlCommand",
["punctuation", "("],
["string", "\"Select * from test Where Code=@Code\""],
["punctuation", ")"],
["punctuation", ";"],
"\r\nbob ",
["operator", "="],
["keyword", "new"],
" SqlCommand",
["punctuation", "("],
["string", "\"Select * from test Where Code=Code\""],
["punctuation", ")"],
["punctuation", ";"]
]
================================================
FILE: tests/languages/vbnet/keyword_feature.test
================================================
ADDHANDLER
ADDRESSOF
ALIAS
AND
ANDALSO
AS
BEEP
BLOAD
BOOLEAN
BSAVE
BYREF
BYTE
BYVAL
CALL
CALL ABSOLUTE
CASE
CATCH
CBOOL
CBYTE
CCHAR
CDATE
CDEC
CDBL
CHAIN
CHAR
CHDIR
CINT
CLASS
CLEAR
CLNG
CLOSE
CLS
COBJ
COM
COMMON
CONST
CONTINUE
CSBYTE
CSHORT
CSNG
CSTR
CTYPE
CUINT
CULNG
CUSHORT
DATA
DATE
DECIMAL
DECLARE
DEFAULT
DEF FN
DEF SEG
DEFDBL
DEFINT
DEFLNG
DEFSNG
DEFSTR
DELEGATE
DIM
DIRECTCAST
DO
DOUBLE
ELSE
ELSEIF
END
ENUM
ENVIRON
ERASE
ERROR
EVENT
EXIT
FALSE
FIELD
FILES
FINALLY
FOR
FOR EACH
FRIEND
FUNCTION
GET
GETTYPE
GETXMLNAMESPACE
GLOBAL
GOSUB
GOTO
HANDLES
IF
IMPLEMENTS
IMPORTS
IN
INHERITS
INPUT
INTEGER
INTERFACE
IOCTL
IS
ISNOT
KEY
KILL
LINE INPUT
LET
LIB
LIKE
LOCATE
LOCK
LONG
LOOP
LSET
ME
MKDIR
MOD
MODULE
MUSTINHERIT
MUSTOVERRIDE
MYBASE
MYCLASS
NAME
NAMESPACE
NARROWING
NEW
NEXT
NOT
NOTHING
NOTINHERITABLE
NOTOVERRIDABLE
OBJECT
OF
OFF
ON
ON COM
ON ERROR
ON KEY
ON TIMER
OPERATOR
OPEN
OPTION
OPTION BASE
OPTIONAL
OR
ORELSE
OUT
OVERLOADS
OVERRIDABLE
OVERRIDES
PARAMARRAY
PARTIAL
POKE
PRIVATE
PROPERTY
PROTECTED
PUBLIC
PUT
RAISEEVENT
READ
READONLY
REDIM
REM
REMOVEHANDLER
RESTORE
RESUME
RETURN
RMDIR
RSET
RUN
SBYTE
SELECT
SELECT CASE
SET
SHADOWS
SHARED
SHORT
SINGLE
SHELL
SLEEP
STATIC
STEP
STOP
STRING
STRUCTURE
SUB
SYNCLOCK
SWAP
SYSTEM
THEN
THROW
TIMER
TO
TROFF
TRON
TRUE
TRY
TRYCAST
TYPE
TYPEOF
UINTEGER
ULONG
UNLOCK
UNTIL
USHORT
USING
VIEW PRINT
WAIT
WEND
WHEN
WHILE
WIDENING
WITH
WITHEVENTS
WRITE
WRITEONLY
XOR
#CONST
#ELSE
#ELSE
#ELSEIF
#END
#IF
----------------------------------------------------
[
["keyword", "ADDHANDLER"],
["keyword", "ADDRESSOF"],
["keyword", "ALIAS"],
["keyword", "AND"],
["keyword", "ANDALSO"],
["keyword", "AS"],
["keyword", "BEEP"],
["keyword", "BLOAD"],
["keyword", "BOOLEAN"],
["keyword", "BSAVE"],
["keyword", "BYREF"],
["keyword", "BYTE"],
["keyword", "BYVAL"],
["keyword", "CALL"],
["keyword", "CALL ABSOLUTE"],
["keyword", "CASE"],
["keyword", "CATCH"],
["keyword", "CBOOL"],
["keyword", "CBYTE"],
["keyword", "CCHAR"],
["keyword", "CDATE"],
["keyword", "CDEC"],
["keyword", "CDBL"],
["keyword", "CHAIN"],
["keyword", "CHAR"],
["keyword", "CHDIR"],
["keyword", "CINT"],
["keyword", "CLASS"],
["keyword", "CLEAR"],
["keyword", "CLNG"],
["keyword", "CLOSE"],
["keyword", "CLS"],
["keyword", "COBJ"],
["keyword", "COM"],
["keyword", "COMMON"],
["keyword", "CONST"],
["keyword", "CONTINUE"],
["keyword", "CSBYTE"],
["keyword", "CSHORT"],
["keyword", "CSNG"],
["keyword", "CSTR"],
["keyword", "CTYPE"],
["keyword", "CUINT"],
["keyword", "CULNG"],
["keyword", "CUSHORT"],
["keyword", "DATA"],
["keyword", "DATE"],
["keyword", "DECIMAL"],
["keyword", "DECLARE"],
["keyword", "DEFAULT"],
["keyword", "DEF FN"],
["keyword", "DEF SEG"],
["keyword", "DEFDBL"],
["keyword", "DEFINT"],
["keyword", "DEFLNG"],
["keyword", "DEFSNG"],
["keyword", "DEFSTR"],
["keyword", "DELEGATE"],
["keyword", "DIM"],
["keyword", "DIRECTCAST"],
["keyword", "DO"],
["keyword", "DOUBLE"],
["keyword", "ELSE"],
["keyword", "ELSEIF"],
["keyword", "END"],
["keyword", "ENUM"],
["keyword", "ENVIRON"],
["keyword", "ERASE"],
["keyword", "ERROR"],
["keyword", "EVENT"],
["keyword", "EXIT"],
["keyword", "FALSE"],
["keyword", "FIELD"],
["keyword", "FILES"],
["keyword", "FINALLY"],
["keyword", "FOR"],
["keyword", "FOR EACH"],
["keyword", "FRIEND"],
["keyword", "FUNCTION"],
["keyword", "GET"],
["keyword", "GETTYPE"],
["keyword", "GETXMLNAMESPACE"],
["keyword", "GLOBAL"],
["keyword", "GOSUB"],
["keyword", "GOTO"],
["keyword", "HANDLES"],
["keyword", "IF"],
["keyword", "IMPLEMENTS"],
["keyword", "IMPORTS"],
["keyword", "IN"],
["keyword", "INHERITS"],
["keyword", "INPUT"],
["keyword", "INTEGER"],
["keyword", "INTERFACE"],
["keyword", "IOCTL"],
["keyword", "IS"],
["keyword", "ISNOT"],
["keyword", "KEY"],
["keyword", "KILL"],
["keyword", "LINE INPUT"],
["keyword", "LET"],
["keyword", "LIB"],
["keyword", "LIKE"],
["keyword", "LOCATE"],
["keyword", "LOCK"],
["keyword", "LONG"],
["keyword", "LOOP"],
["keyword", "LSET"],
["keyword", "ME"],
["keyword", "MKDIR"],
["keyword", "MOD"],
["keyword", "MODULE"],
["keyword", "MUSTINHERIT"],
["keyword", "MUSTOVERRIDE"],
["keyword", "MYBASE"],
["keyword", "MYCLASS"],
["keyword", "NAME"],
["keyword", "NAMESPACE"],
["keyword", "NARROWING"],
["keyword", "NEW"],
["keyword", "NEXT"],
["keyword", "NOT"],
["keyword", "NOTHING"],
["keyword", "NOTINHERITABLE"],
["keyword", "NOTOVERRIDABLE"],
["keyword", "OBJECT"],
["keyword", "OF"],
["keyword", "OFF"],
["keyword", "ON"],
["keyword", "ON COM"],
["keyword", "ON ERROR"],
["keyword", "ON KEY"],
["keyword", "ON TIMER"],
["keyword", "OPERATOR"],
["keyword", "OPEN"],
["keyword", "OPTION"],
["keyword", "OPTION BASE"],
["keyword", "OPTIONAL"],
["keyword", "OR"],
["keyword", "ORELSE"],
["keyword", "OUT"],
["keyword", "OVERLOADS"],
["keyword", "OVERRIDABLE"],
["keyword", "OVERRIDES"],
["keyword", "PARAMARRAY"],
["keyword", "PARTIAL"],
["keyword", "POKE"],
["keyword", "PRIVATE"],
["keyword", "PROPERTY"],
["keyword", "PROTECTED"],
["keyword", "PUBLIC"],
["keyword", "PUT"],
["keyword", "RAISEEVENT"],
["keyword", "READ"],
["keyword", "READONLY"],
["keyword", "REDIM"],
["keyword", "REM"],
["keyword", "REMOVEHANDLER"],
["keyword", "RESTORE"],
["keyword", "RESUME"],
["keyword", "RETURN"],
["keyword", "RMDIR"],
["keyword", "RSET"],
["keyword", "RUN"],
["keyword", "SBYTE"],
["keyword", "SELECT"],
["keyword", "SELECT CASE"],
["keyword", "SET"],
["keyword", "SHADOWS"],
["keyword", "SHARED"],
["keyword", "SHORT"],
["keyword", "SINGLE"],
["keyword", "SHELL"],
["keyword", "SLEEP"],
["keyword", "STATIC"],
["keyword", "STEP"],
["keyword", "STOP"],
["keyword", "STRING"],
["keyword", "STRUCTURE"],
["keyword", "SUB"],
["keyword", "SYNCLOCK"],
["keyword", "SWAP"],
["keyword", "SYSTEM"],
["keyword", "THEN"],
["keyword", "THROW"],
["keyword", "TIMER"],
["keyword", "TO"],
["keyword", "TROFF"],
["keyword", "TRON"],
["keyword", "TRUE"],
["keyword", "TRY"],
["keyword", "TRYCAST"],
["keyword", "TYPE"],
["keyword", "TYPEOF"],
["keyword", "UINTEGER"],
["keyword", "ULONG"],
["keyword", "UNLOCK"],
["keyword", "UNTIL"],
["keyword", "USHORT"],
["keyword", "USING"],
["keyword", "VIEW PRINT"],
["keyword", "WAIT"],
["keyword", "WEND"],
["keyword", "WHEN"],
["keyword", "WHILE"],
["keyword", "WIDENING"],
["keyword", "WITH"],
["keyword", "WITHEVENTS"],
["keyword", "WRITE"],
["keyword", "WRITEONLY"],
["keyword", "XOR"],
["keyword", "#CONST"],
["keyword", "#ELSE"],
["keyword", "#ELSE"],
["keyword", "#ELSEIF"],
["keyword", "#END"],
["keyword", "#IF"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/vbnet/punctuation_feature.test
================================================
, ; :
( ) { }
----------------------------------------------------
[
["punctuation", ","],
["punctuation", ";"],
["punctuation", ":"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/vbnet/string_feature.test
================================================
Dim x = "hello
world"
Console.WriteLine("Message: {0}", message)
----------------------------------------------------
[
["keyword", "Dim"],
" x ",
["operator", "="],
["string", "\"hello\r\nworld\""],
"\r\n\r\nConsole.WriteLine",
["punctuation", "("],
["string", "\"Message: {0}\""],
["punctuation", ","],
" message",
["punctuation", ")"]
]
================================================
FILE: tests/languages/vbnet!+xml-doc/inclusion.test
================================================
'''
''' Class level summary documentation goes here.
'''
'''
''' Longer comments can be associated with a type or member through
''' the remarks tag.
'''
----------------------------------------------------
[
["doc-comment", [
"''' ",
["tag", [
["punctuation", "<"],
["tag", ["summary"]],
["punctuation", ">"]
]]
]],
["doc-comment", ["''' Class level summary documentation goes here."]],
["doc-comment", [
"''' ",
["tag", [
["punctuation", ""],
["tag", ["summary"]],
["punctuation", ">"]
]]
]],
["doc-comment", [
"''' ",
["tag", [
["punctuation", "<"],
["tag", ["remarks"]],
["punctuation", ">"]
]]
]],
["doc-comment", ["''' Longer comments can be associated with a type or member through"]],
["doc-comment", ["''' the remarks tag."]],
["doc-comment", [
"''' ",
["tag", [
["punctuation", ""],
["tag", ["remarks"]],
["punctuation", ">"]
]]
]]
]
----------------------------------------------------
Checks for XML documentation comments.
================================================
FILE: tests/languages/velocity/directive_feature.test
================================================
#foreach($mud in $mudsOnSpecial)
#if($customer.hasPurchased($mud))
#set($a = "Velocity")
#set($foo.bar[1] = 3)
#{set}($map["apple"] = "orange")
#if($foo == $bar)#end
#if (!$foo)#end
#if ($foo && $foo.bar)#end
#{if}($foo1 || $foo2)#end
#set( $monkey.Say = ["Not", $my, "fault"] )
#set( $monkey.Map = {"banana" : "good", "roast beef" : "bad"})
#set( $result = $query.criteria("address") )
#set( $result = true )
#set( $result = false )
#if( $foo < 10 )
#elseif( $foo == 10 )
#else
#end
#if( $foo == $bar)it's true!#{else}it's not!#end
#include( "greetings.txt", $seasonalstock )
#parse( "me.vm" )
#{parse}( "me.vm" )
#break
#{break}
#break($macro.topmost)
#stop('$foo was not in context')
#{stop}
#evaluate($dynamicsource)
#macro( d )
#end
#d()
#@d()Hello!#end
\#include( "a.txt" )
\\#include ( "a.txt" )
#set($foo=["$10 and ","a pie"])#foreach($a in $foo)$a#end
#set( $foo = $bar + 3 )
#set( $foo = $bar - 4 )
#set( $foo = $bar * 6 )
#set( $foo = $bar / 2 )
#set( $foo = $bar % 5 )
#foreach( $foo in [1..5] )
----------------------------------------------------
[
["directive", [
["keyword", ["#foreach"]],
["punctuation", "("],
["variable", ["$mud"]],
["keyword", ["in"]],
["variable", ["$mudsOnSpecial"]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#if"]],
["punctuation", "("],
["variable", [
"$customer",
["punctuation", "."],
["function", "hasPurchased"],
["punctuation", "("],
"$mud",
["punctuation", ")"]
]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$a"]],
["operator", "="],
["string", "\"Velocity\""],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", [
"$foo",
["punctuation", "."],
"bar",
["punctuation", "["],
["number", "1"],
["punctuation", "]"]
]],
["operator", "="],
["number", "3"],
["punctuation", ")"]
]],
["directive", [
["keyword", [
"#",
["punctuation", "{"],
"set",
["punctuation", "}"]
]],
["punctuation", "("],
["variable", [
"$map",
["punctuation", "["],
["string", "\"apple\""],
["punctuation", "]"]
]],
["operator", "="],
["string", "\"orange\""],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#if"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "=="],
["variable", ["$bar"]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#end"]]
]],
["directive", [
["keyword", ["#if"]],
["punctuation", "("],
["operator", "!"],
["variable", ["$foo"]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#end"]]
]],
["directive", [
["keyword", ["#if"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "&&"],
["variable", [
"$foo",
["punctuation", "."],
"bar"
]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#end"]]
]],
["directive", [
["keyword", [
"#",
["punctuation", "{"],
"if",
["punctuation", "}"]
]],
["punctuation", "("],
["variable", ["$foo1"]],
["operator", "||"],
["variable", ["$foo2"]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#end"]]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", [
"$monkey",
["punctuation", "."],
"Say"
]],
["operator", "="],
["punctuation", "["],
["string", "\"Not\""],
["punctuation", ","],
["variable", ["$my"]],
["punctuation", ","],
["string", "\"fault\""],
["punctuation", "]"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", [
"$monkey",
["punctuation", "."],
"Map"
]],
["operator", "="],
["punctuation", "{"],
["string", "\"banana\""],
["punctuation", ":"],
["string", "\"good\""],
["punctuation", ","],
["string", "\"roast beef\""],
["punctuation", ":"],
["string", "\"bad\""],
["punctuation", "}"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$result"]],
["operator", "="],
["variable", [
"$query",
["punctuation", "."],
["function", "criteria"],
["punctuation", "("],
["string", "\"address\""],
["punctuation", ")"]
]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$result"]],
["operator", "="],
["boolean", "true"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$result"]],
["operator", "="],
["boolean", "false"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#if"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "<"],
["number", "10"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#elseif"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "=="],
["number", "10"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#else"]]
]],
["directive", [
["keyword", ["#end"]]
]],
["directive", [
["keyword", ["#if"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "=="],
["variable", ["$bar"]],
["punctuation", ")"]
]],
"it's true!",
["directive", [
["keyword", [
"#",
["punctuation", "{"],
"else",
["punctuation", "}"]
]]
]],
"it's not!",
["directive", [
["keyword", ["#end"]]
]],
["directive", [
["keyword", ["#include"]],
["punctuation", "("],
["string", "\"greetings.txt\""],
["punctuation", ","],
["variable", ["$seasonalstock"]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#parse"]],
["punctuation", "("],
["string", "\"me.vm\""],
["punctuation", ")"]
]],
["directive", [
["keyword", [
"#",
["punctuation", "{"],
"parse",
["punctuation", "}"]
]],
["punctuation", "("],
["string", "\"me.vm\""],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#break"]]
]],
["directive", [
["keyword", [
"#",
["punctuation", "{"],
"break",
["punctuation", "}"]
]]
]],
["directive", [
["keyword", ["#break"]],
["punctuation", "("],
["variable", [
"$macro",
["punctuation", "."],
"topmost"
]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#stop"]],
["punctuation", "("],
["string", "'$foo was not in context'"],
["punctuation", ")"]
]],
["directive", [
["keyword", [
"#",
["punctuation", "{"],
"stop",
["punctuation", "}"]
]]
]],
["directive", [
["keyword", ["#evaluate"]],
["punctuation", "("],
["variable", ["$dynamicsource"]],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#macro"]],
["punctuation", "("],
" d ",
["punctuation", ")"]
]],
["tag", [
["punctuation", "<"],
["tag", ["tr"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["td"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["td"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["tr"]],
["punctuation", ">"]
]],
["directive", [
["keyword", ["#end"]]
]],
["directive", [
["keyword", ["#d"]],
["punctuation", "("],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#@d"]],
["punctuation", "("],
["punctuation", ")"]
]],
"Hello!",
["directive", [
["keyword", ["#end"]]
]],
"\r\n\\#include( \"a.txt\" )\r\n\\\\",
["directive", [
["keyword", ["#include"]],
["punctuation", "("],
["string", "\"a.txt\""],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "="],
["punctuation", "["],
["string", "\"$10 and \""],
["punctuation", ","],
["string", "\"a pie\""],
["punctuation", "]"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#foreach"]],
["punctuation", "("],
["variable", ["$a"]],
["keyword", ["in"]],
["variable", ["$foo"]],
["punctuation", ")"]
]],
["variable", ["$a"]],
["directive", [
["keyword", ["#end"]]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "="],
["variable", ["$bar"]],
["operator", "+"],
["number", "3"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "="],
["variable", ["$bar"]],
["operator", "-"],
["number", "4"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "="],
["variable", ["$bar"]],
["operator", "*"],
["number", "6"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "="],
["variable", ["$bar"]],
["operator", "/"],
["number", "2"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#set"]],
["punctuation", "("],
["variable", ["$foo"]],
["operator", "="],
["variable", ["$bar"]],
["operator", "%"],
["number", "5"],
["punctuation", ")"]
]],
["directive", [
["keyword", ["#foreach"]],
["punctuation", "("],
["variable", ["$foo"]],
["keyword", ["in"]],
["punctuation", "["],
["number", "1"],
["operator", ".."],
["number", "5"],
["punctuation", "]"],
["punctuation", ")"]
]]
]
----------------------------------------------------
Checks for directives.
================================================
FILE: tests/languages/velocity/unparsed_feature.test
================================================
#[[]]#
#[[This is not parsed]]#
#[[#if("some quotes" 'some quotes')
## #* *#
$dollar
]]#
----------------------------------------------------
[
["unparsed", [
["punctuation", "#[["],
["punctuation", "]]#"]
]],
["unparsed", [
["punctuation", "#[["],
"This is not parsed",
["punctuation", "]]#"]
]],
["unparsed", [
["punctuation", "#[["],
"#if(\"some quotes\" 'some quotes')\r\n## #* *#\r\n$dollar\r\n",
["punctuation", "]]#"]
]]
]
----------------------------------------------------
Checks for unparsed sections.
================================================
FILE: tests/languages/velocity/variable_feature.test
================================================
$mud
$customer.Name
$flogger.getPromo( $mud )
$mud-slinger
$mud_slinger
$mudSlinger1
$!mudSlinger_9
$person.setAttributes( ["Strange", false, "Excited"] )
$foo[0]
$foo[$i]
$foo["bar"]
$foo.bar[1].junk
$foo.callMethod()[1]
$foo["apple"][4]
${mudSlinger}
$!{mudSlinger_9}
${customer.Address}
${purchase.getTotal()}
$\!foo
$\!{foo}
$\\!foo
$\\\!foo
\$foo
\$!foo
\$!{foo}
\\$!{foo}
----------------------------------------------------
[
["variable", ["$mud"]],
["variable", [
"$customer",
["punctuation", "."],
"Name"
]],
["variable", [
"$flogger",
["punctuation", "."],
["function", "getPromo"],
["punctuation", "("],
" $mud ",
["punctuation", ")"]
]],
["variable", ["$mud-slinger"]],
["variable", ["$mud_slinger"]],
["variable", ["$mudSlinger1"]],
["variable", ["$!mudSlinger_9"]],
["variable", [
"$person",
["punctuation", "."],
["function", "setAttributes"],
["punctuation", "("],
["punctuation", "["],
["string", "\"Strange\""],
["punctuation", ","],
["boolean", "false"],
["punctuation", ","],
["string", "\"Excited\""],
["punctuation", "]"],
["punctuation", ")"]
]],
["variable", [
"$foo",
["punctuation", "["],
["number", "0"],
["punctuation", "]"]
]],
["variable", [
"$foo",
["punctuation", "["],
"$i",
["punctuation", "]"]
]],
["variable", [
"$foo",
["punctuation", "["],
["string", "\"bar\""],
["punctuation", "]"]
]],
["variable", [
"$foo",
["punctuation", "."],
"bar",
["punctuation", "["],
["number", "1"],
["punctuation", "]"],
["punctuation", "."],
"junk"
]],
["variable", [
"$foo",
["punctuation", "."],
["function", "callMethod"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["number", "1"],
["punctuation", "]"]
]],
["variable", [
"$foo",
["punctuation", "["],
["string", "\"apple\""],
["punctuation", "]"],
["punctuation", "["],
["number", "4"],
["punctuation", "]"]
]],
["variable", [
"$",
["punctuation", "{"],
"mudSlinger",
["punctuation", "}"]
]],
["variable", [
"$!",
["punctuation", "{"],
"mudSlinger_9",
["punctuation", "}"]
]],
["variable", [
"$",
["punctuation", "{"],
"customer",
["punctuation", "."],
"Address",
["punctuation", "}"]
]],
["variable", [
"$",
["punctuation", "{"],
"purchase",
["punctuation", "."],
["function", "getTotal"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "}"]
]],
["tag", [
["punctuation", "<"],
["tag", ["input"]],
["attr-name", ["value"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["variable", ["$email"]],
["punctuation", "\""]
]],
["punctuation", "/>"]
]],
["tag", [
["punctuation", "<"],
["tag", ["input"]],
["attr-name", ["value"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
["variable", [
"$!",
["punctuation", "{"],
"email",
["punctuation", "}"]
]],
["punctuation", "\""]
]],
["punctuation", "/>"]
]],
"\r\n$\\!foo\r\n$\\!{foo}\r\n$\\\\!foo\r\n$\\\\\\!foo\r\n\\$foo\r\n\\$!foo\r\n\\$!{foo}\r\n\\\\",
["variable", [
"$!",
["punctuation", "{"],
"foo",
["punctuation", "}"]
]]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/velocity/velocity-comment_feature.test
================================================
#**#
#*Multiline
comment*#
##
## Single line comment
----------------------------------------------------
[
["velocity-comment", "#**#"],
["velocity-comment", "#*Multiline
\r\ncomment*#"],
["velocity-comment", "##"],
["velocity-comment", "## Single line comment
"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/verilog/comment_feature.test
================================================
//
// Foobar
/**/
/* foo
bar */
----------------------------------------------------
[
["comment", "//"],
["comment", "// Foobar"],
["comment", "/**/"],
["comment", "/* foo\r\nbar */"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/verilog/constant_feature.test
================================================
`define
`UNKNOWN
----------------------------------------------------
[
["constant", "`define"],
["constant", "`UNKNOWN"]
]
----------------------------------------------------
Checks for user defined constants.
================================================
FILE: tests/languages/verilog/function_feature.test
================================================
foo()
foo_bar()
foo_BAR_42()
----------------------------------------------------
[
["function", "foo"], ["punctuation", "("], ["punctuation", ")"],
["function", "foo_bar"], ["punctuation", "("], ["punctuation", ")"],
["function", "foo_BAR_42"], ["punctuation", "("], ["punctuation", ")"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/verilog/important_feature.test
================================================
always_latch
always_comb
always_ff
always
always_latch @
always_comb @
always_ff @
always @
----------------------------------------------------
[
["important", "always_latch"],
["important", "always_comb"],
["important", "always_ff"],
["important", "always"],
["important", "always_latch @"],
["important", "always_comb @"],
["important", "always_ff @"],
["important", "always @"]
]
----------------------------------------------------
Checks for logic blocks.
================================================
FILE: tests/languages/verilog/kernel-function_feature.test
================================================
$display()
----------------------------------------------------
[
["kernel-function", "$display"],
["punctuation", "("],
["punctuation", ")"]
]
----------------------------------------------------
Checks for kernel functions.
================================================
FILE: tests/languages/verilog/keyword_feature.test
================================================
alias
and
assert
assign
assume
automatic
before
begin
bind
bins
binsof
bit
break
buf
bufif0
bufif1
byte
class
case
casex
casez
cell
chandle
clocking
cmos
config
const
constraint
context
continue
cover
covergroup
coverpoint
cross
deassign
default
defparam
design
disable
dist
do
edge
else
end
endcase
endclass
endclocking
endconfig
endfunction
endgenerate
endgroup
endinterface
endmodule
endpackage
endprimitive
endprogram
endproperty
endspecify
endsequence
endtable
endtask
enum
event
expect
export
extends
extern
final
first_match
for
force
foreach
forever
fork
forkjoin
function
generate
genvar
highz0
highz1
if
iff
ifnone
ignore_bins
illegal_bins
import
incdir
include
initial
inout
input
inside
instance
int
integer
interface
intersect
join
join_any
join_none
large
liblist
library
local
localparam
logic
longint
macromodule
matches
medium
modport
module
nand
negedge
new
nmos
nor
noshowcancelled
not
notif0
notif1
null
or
output
package
packed
parameter
pmos
posedge
primitive
priority
program
property
protected
pull0
pull1
pulldown
pullup
pulsestyle_onevent
pulsestyle_ondetect
pure
rand
randc
randcase
randsequence
rcmos
real
realtime
ref
reg
release
repeat
return
rnmos
rpmos
rtran
rtranif0
rtranif1
scalared
sequence
shortint
shortreal
showcancelled
signed
small
solve
specify
specparam
static
string
strong0
strong1
struct
super
supply0
supply1
table
tagged
task
this
throughout
time
timeprecision
timeunit
tran
tranif0
tranif1
tri
tri0
tri1
triand
trior
trireg
type
typedef
union
unique
unsigned
use
uwire
var
vectored
virtual
void
wait
wait_order
wand
weak0
weak1
while
wildcard
wire
with
within
wor
xnor
xor
----------------------------------------------------
[
["keyword", "alias"],
["keyword", "and"],
["keyword", "assert"],
["keyword", "assign"],
["keyword", "assume"],
["keyword", "automatic"],
["keyword", "before"],
["keyword", "begin"],
["keyword", "bind"],
["keyword", "bins"],
["keyword", "binsof"],
["keyword", "bit"],
["keyword", "break"],
["keyword", "buf"],
["keyword", "bufif0"],
["keyword", "bufif1"],
["keyword", "byte"],
["keyword", "class"],
["keyword", "case"],
["keyword", "casex"],
["keyword", "casez"],
["keyword", "cell"],
["keyword", "chandle"],
["keyword", "clocking"],
["keyword", "cmos"],
["keyword", "config"],
["keyword", "const"],
["keyword", "constraint"],
["keyword", "context"],
["keyword", "continue"],
["keyword", "cover"],
["keyword", "covergroup"],
["keyword", "coverpoint"],
["keyword", "cross"],
["keyword", "deassign"],
["keyword", "default"],
["keyword", "defparam"],
["keyword", "design"],
["keyword", "disable"],
["keyword", "dist"],
["keyword", "do"],
["keyword", "edge"],
["keyword", "else"],
["keyword", "end"],
["keyword", "endcase"],
["keyword", "endclass"],
["keyword", "endclocking"],
["keyword", "endconfig"],
["keyword", "endfunction"],
["keyword", "endgenerate"],
["keyword", "endgroup"],
["keyword", "endinterface"],
["keyword", "endmodule"],
["keyword", "endpackage"],
["keyword", "endprimitive"],
["keyword", "endprogram"],
["keyword", "endproperty"],
["keyword", "endspecify"],
["keyword", "endsequence"],
["keyword", "endtable"],
["keyword", "endtask"],
["keyword", "enum"],
["keyword", "event"],
["keyword", "expect"],
["keyword", "export"],
["keyword", "extends"],
["keyword", "extern"],
["keyword", "final"],
["keyword", "first_match"],
["keyword", "for"],
["keyword", "force"],
["keyword", "foreach"],
["keyword", "forever"],
["keyword", "fork"],
["keyword", "forkjoin"],
["keyword", "function"],
["keyword", "generate"],
["keyword", "genvar"],
["keyword", "highz0"],
["keyword", "highz1"],
["keyword", "if"],
["keyword", "iff"],
["keyword", "ifnone"],
["keyword", "ignore_bins"],
["keyword", "illegal_bins"],
["keyword", "import"],
["keyword", "incdir"],
["keyword", "include"],
["keyword", "initial"],
["keyword", "inout"],
["keyword", "input"],
["keyword", "inside"],
["keyword", "instance"],
["keyword", "int"],
["keyword", "integer"],
["keyword", "interface"],
["keyword", "intersect"],
["keyword", "join"],
["keyword", "join_any"],
["keyword", "join_none"],
["keyword", "large"],
["keyword", "liblist"],
["keyword", "library"],
["keyword", "local"],
["keyword", "localparam"],
["keyword", "logic"],
["keyword", "longint"],
["keyword", "macromodule"],
["keyword", "matches"],
["keyword", "medium"],
["keyword", "modport"],
["keyword", "module"],
["keyword", "nand"],
["keyword", "negedge"],
["keyword", "new"],
["keyword", "nmos"],
["keyword", "nor"],
["keyword", "noshowcancelled"],
["keyword", "not"],
["keyword", "notif0"],
["keyword", "notif1"],
["keyword", "null"],
["keyword", "or"],
["keyword", "output"],
["keyword", "package"],
["keyword", "packed"],
["keyword", "parameter"],
["keyword", "pmos"],
["keyword", "posedge"],
["keyword", "primitive"],
["keyword", "priority"],
["keyword", "program"],
["keyword", "property"],
["keyword", "protected"],
["keyword", "pull0"],
["keyword", "pull1"],
["keyword", "pulldown"],
["keyword", "pullup"],
["keyword", "pulsestyle_onevent"],
["keyword", "pulsestyle_ondetect"],
["keyword", "pure"],
["keyword", "rand"],
["keyword", "randc"],
["keyword", "randcase"],
["keyword", "randsequence"],
["keyword", "rcmos"],
["keyword", "real"],
["keyword", "realtime"],
["keyword", "ref"],
["keyword", "reg"],
["keyword", "release"],
["keyword", "repeat"],
["keyword", "return"],
["keyword", "rnmos"],
["keyword", "rpmos"],
["keyword", "rtran"],
["keyword", "rtranif0"],
["keyword", "rtranif1"],
["keyword", "scalared"],
["keyword", "sequence"],
["keyword", "shortint"],
["keyword", "shortreal"],
["keyword", "showcancelled"],
["keyword", "signed"],
["keyword", "small"],
["keyword", "solve"],
["keyword", "specify"],
["keyword", "specparam"],
["keyword", "static"],
["keyword", "string"],
["keyword", "strong0"],
["keyword", "strong1"],
["keyword", "struct"],
["keyword", "super"],
["keyword", "supply0"],
["keyword", "supply1"],
["keyword", "table"],
["keyword", "tagged"],
["keyword", "task"],
["keyword", "this"],
["keyword", "throughout"],
["keyword", "time"],
["keyword", "timeprecision"],
["keyword", "timeunit"],
["keyword", "tran"],
["keyword", "tranif0"],
["keyword", "tranif1"],
["keyword", "tri"],
["keyword", "tri0"],
["keyword", "tri1"],
["keyword", "triand"],
["keyword", "trior"],
["keyword", "trireg"],
["keyword", "type"],
["keyword", "typedef"],
["keyword", "union"],
["keyword", "unique"],
["keyword", "unsigned"],
["keyword", "use"],
["keyword", "uwire"],
["keyword", "var"],
["keyword", "vectored"],
["keyword", "virtual"],
["keyword", "void"],
["keyword", "wait"],
["keyword", "wait_order"],
["keyword", "wand"],
["keyword", "weak0"],
["keyword", "weak1"],
["keyword", "while"],
["keyword", "wildcard"],
["keyword", "wire"],
["keyword", "with"],
["keyword", "within"],
["keyword", "wor"],
["keyword", "xnor"],
["keyword", "xor"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/verilog/number_feature.test
================================================
#1
##42
'h 12
6'h 12
8'B0010_1010
123
8'o 77
'h x
16'h ????
3.14159
4e8
3.2E-14
0.7e+8
----------------------------------------------------
[
["number", "#1"],
["number", "##42"],
["number", "'h 12"],
["number", "6'h 12"],
["number", "8'B0010_1010"],
["number", "123"],
["number", "8'o 77"],
["number", "'h x"],
["number", "16'h ????"],
["number", "3.14159"],
["number", "4e8"],
["number", "3.2E-14"],
["number", "0.7e+8"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/verilog/operator_feature.test
================================================
! ~ & |
~& ~| ^
~^ ^~
+ - { }
* ** / %
<< >> <<< >>>
< <= > >=
== != === !==
==? !=?
&& || ?
-> <->
++ --
+= -= /= *=
%= &= |= ^=
<<= >>= <<<= >>>=
----------------------------------------------------
[
["operator", "!"], ["operator", "~"], ["operator", "&"], ["operator", "|"],
["operator", "~&"], ["operator", "~|"], ["operator", "^"],
["operator", "~^"], ["operator", "^~"],
["operator", "+"], ["operator", "-"], ["operator", "{"], ["operator", "}"],
["operator", "*"], ["operator", "**"], ["operator", "/"], ["operator", "%"],
["operator", "<<"], ["operator", ">>"], ["operator", "<<<"], ["operator", ">>>"],
["operator", "<"], ["operator", "<="], ["operator", ">"], ["operator", ">="],
["operator", "=="], ["operator", "!="], ["operator", "==="], ["operator", "!=="],
["operator", "==?"], ["operator", "!=?"],
["operator", "&&"], ["operator", "||"], ["operator", "?"],
["operator", "->"], ["operator", "<->"],
["operator", "++"], ["operator", "--"],
["operator", "+="], ["operator", "-="], ["operator", "/="], ["operator", "*="],
["operator", "%="], ["operator", "&="], ["operator", "|="], ["operator", "^="],
["operator", "<<="], ["operator", ">>="], ["operator", "<<<="], ["operator", ">>>="]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/verilog/string_feature.test
================================================
""
"fo\"obar"
"foo\
bar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"obar\""],
["string", "\"foo\\\r\nbar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/vhdl/attribute_feature.test
================================================
T'BASE
T'IMAGE(X)
A'RANGE
A'RANGE(N)
A'REVERSE_RANGE
A'REVERSE_RANGE(N)
S'DELAYED(t)
E'INSTANCE_NAME
----------------------------------------------------
[
"T", ["attribute", "'BASE"],
"\r\nT", ["attribute", "'IMAGE"], ["punctuation", "("], "X", ["punctuation", ")"],
"\r\nA", ["attribute", "'RANGE"],
"\r\nA", ["attribute", "'RANGE"], ["punctuation", "("], "N", ["punctuation", ")"],
"\r\nA", ["attribute", "'REVERSE_RANGE"],
"\r\nA", ["attribute", "'REVERSE_RANGE"], ["punctuation", "("], "N", ["punctuation", ")"],
"\r\nS", ["attribute", "'DELAYED"], ["punctuation", "("], "t", ["punctuation", ")"],
"\r\nE", ["attribute", "'INSTANCE_NAME"]
]
----------------------------------------------------
Checks for attributes.
================================================
FILE: tests/languages/vhdl/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/vhdl/comment_feature.test
================================================
-- Foo
--foobar
----------------------------------------------------
[
["comment", "-- Foo"],
["comment", "--foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/vhdl/function_feature.test
================================================
Bit_vector(7 downto 0)
DataBus(7)
function BOOL_TO_SL(X : boolean)
function "*"(a : resistance; b : capacitance)
----------------------------------------------------
[
["function", "Bit_vector"],
["punctuation", "("], ["number", "7"],
["keyword", "downto"], ["number", "0"], ["punctuation", ")"],
["function", "DataBus"],
["punctuation", "("], ["number", "7"], ["punctuation", ")"],
["keyword", "function"], ["function", "BOOL_TO_SL"],
["punctuation", "("], "X ",
["punctuation", ":"], " boolean", ["punctuation", ")"],
["keyword", "function"], ["quoted-function", "\"*\""],
["punctuation", "("], "a ",
["punctuation", ":"], " resistance",
["punctuation", ";"], " b ",
["punctuation", ":"], " capacitance", ["punctuation", ")"]
]
----------------------------------------------------
Checks for functions and operator overloading.
================================================
FILE: tests/languages/vhdl/keyword_feature.test
================================================
access
after
alias
all
architecture
array
assert
attribute
begin
block
body
buffer
bus
case
component
configuration
constant
disconnect
downto
else
elsif
end
entity
exit
file
for
function
generate
generic
group
guarded
if
impure
in
inertial
inout
is
label
library
linkage
literal
loop
map
new
next
null
of
on
open
others
out
package
port
postponed
private
procedure
process
pure
range
record
register
reject
report
return
select
severity
shared
signal
subtype
then
to
transport
type
unaffected
units
until
use
variable
view
wait
when
while
with
----------------------------------------------------
[
["keyword", "access"],
["keyword", "after"],
["keyword", "alias"],
["keyword", "all"],
["keyword", "architecture"],
["keyword", "array"],
["keyword", "assert"],
["keyword", "attribute"],
["keyword", "begin"],
["keyword", "block"],
["keyword", "body"],
["keyword", "buffer"],
["keyword", "bus"],
["keyword", "case"],
["keyword", "component"],
["keyword", "configuration"],
["keyword", "constant"],
["keyword", "disconnect"],
["keyword", "downto"],
["keyword", "else"],
["keyword", "elsif"],
["keyword", "end"],
["keyword", "entity"],
["keyword", "exit"],
["keyword", "file"],
["keyword", "for"],
["keyword", "function"],
["keyword", "generate"],
["keyword", "generic"],
["keyword", "group"],
["keyword", "guarded"],
["keyword", "if"],
["keyword", "impure"],
["keyword", "in"],
["keyword", "inertial"],
["keyword", "inout"],
["keyword", "is"],
["keyword", "label"],
["keyword", "library"],
["keyword", "linkage"],
["keyword", "literal"],
["keyword", "loop"],
["keyword", "map"],
["keyword", "new"],
["keyword", "next"],
["keyword", "null"],
["keyword", "of"],
["keyword", "on"],
["keyword", "open"],
["keyword", "others"],
["keyword", "out"],
["keyword", "package"],
["keyword", "port"],
["keyword", "postponed"],
["keyword", "private"],
["keyword", "procedure"],
["keyword", "process"],
["keyword", "pure"],
["keyword", "range"],
["keyword", "record"],
["keyword", "register"],
["keyword", "reject"],
["keyword", "report"],
["keyword", "return"],
["keyword", "select"],
["keyword", "severity"],
["keyword", "shared"],
["keyword", "signal"],
["keyword", "subtype"],
["keyword", "then"],
["keyword", "to"],
["keyword", "transport"],
["keyword", "type"],
["keyword", "unaffected"],
["keyword", "units"],
["keyword", "until"],
["keyword", "use"],
["keyword", "variable"],
["keyword", "view"],
["keyword", "wait"],
["keyword", "when"],
["keyword", "while"],
["keyword", "with"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/vhdl/number_feature.test
================================================
'0'
'1'
'x'
'z'
42
42_000
3.14159
2.4E8
3.0e-2
7.54e+24
2#1010_1010#
16#BadFace#
----------------------------------------------------
[
["number", "'0'"],
["number", "'1'"],
["number", "'x'"],
["number", "'z'"],
["number", "42"],
["number", "42_000"],
["number", "3.14159"],
["number", "2.4E8"],
["number", "3.0e-2"],
["number", "7.54e+24"],
["number", "2#1010_1010#"],
["number", "16#BadFace#"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/vhdl/operator_feature.test
================================================
> >=
< <=
:=
+ -
* /
& =
abs not mod rem
sll srl sla sra
rol ror and or
nand xnor xor nor
----------------------------------------------------
[
["operator", ">"], ["operator", ">="],
["operator", "<"], ["operator", "<="],
["operator", ":="],
["operator", "+"], ["operator", "-"],
["operator", "*"], ["operator", "/"],
["operator", "&"], ["operator", "="],
["operator", "abs"], ["operator", "not"], ["operator", "mod"], ["operator", "rem"],
["operator", "sll"], ["operator", "srl"], ["operator", "sla"], ["operator", "sra"],
["operator", "rol"], ["operator", "ror"], ["operator", "and"], ["operator", "or"],
["operator", "nand"], ["operator", "xnor"], ["operator", "xor"], ["operator", "nor"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/vhdl/string_feature.test
================================================
""
"fo\"o"
"fo\"o\
bar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"fo\\\"o\""],
["string", "\"fo\\\"o\\\r\nbar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/vhdl/vhdl-vectors_feature.test
================================================
B"1111_1111"
O"353"
X"AA55"
"010101"
"Z"
"X"
----------------------------------------------------
[
["vhdl-vectors", "B\"1111_1111\""],
["vhdl-vectors", "O\"353\""],
["vhdl-vectors", "X\"AA55\""],
["vhdl-vectors", "\"010101\""],
["vhdl-vectors", "\"Z\""],
["vhdl-vectors", "\"X\""]
]
----------------------------------------------------
Checks for vectors
================================================
FILE: tests/languages/vim/builtin_feature.test
================================================
autocmd
acd
ai
akm
aleph
allowrevins
altkeymap
ambiwidth
ambw
anti
antialias
arab
arabic
arabicshape
ari
arshape
autochdir
autoindent
autoread
autowrite
autowriteall
aw
awa
background
backspace
backup
backupcopy
backupdir
backupext
backupskip
balloondelay
ballooneval
balloonexpr
bdir
bdlay
beval
bex
bexpr
bg
bh
bin
binary
biosk
bioskey
bk
bkc
bomb
breakat
brk
browsedir
bs
bsdir
bsk
bt
bufhidden
buflisted
buftype
casemap
ccv
cdpath
cedit
cfu
ch
charconvert
ci
cin
cindent
cink
cinkeys
cino
cinoptions
cinw
cinwords
clipboard
cmdheight
cmdwinheight
cmp
cms
columns
com
comments
commentstring
compatible
complete
completefunc
completeopt
consk
conskey
copyindent
cot
cpo
cpoptions
cpt
cscopepathcomp
cscopeprg
cscopequickfix
cscopetag
cscopetagorder
cscopeverbose
cspc
csprg
csqf
cst
csto
csverb
cuc
cul
cursorcolumn
cursorline
cwh
debug
deco
def
define
delcombine
dex
dg
dict
dictionary
diff
diffexpr
diffopt
digraph
dip
dir
directory
dy
ea
ead
eadirection
eb
ed
edcompatible
ef
efm
ei
ek
enc
encoding
endofline
eol
ep
equalalways
equalprg
errorbells
errorfile
errorformat
esckeys
et
eventignore
expandtab
exrc
fcl
fcs
fdc
fde
fdi
fdl
fdls
fdm
fdn
fdo
fdt
fen
fenc
fencs
fex
ff
ffs
fileencoding
fileencodings
fileformat
fileformats
fillchars
fk
fkmap
flp
fml
fmr
foldcolumn
foldenable
foldexpr
foldignore
foldlevel
foldlevelstart
foldmarker
foldmethod
foldminlines
foldnestmax
foldtext
formatexpr
formatlistpat
formatoptions
formatprg
fp
fs
fsync
ft
gcr
gd
gdefault
gfm
gfn
gfs
gfw
ghr
gp
grepformat
grepprg
gtl
gtt
guicursor
guifont
guifontset
guifontwide
guiheadroom
guioptions
guipty
guitablabel
guitabtooltip
helpfile
helpheight
helplang
hf
hh
hi
hidden
highlight
hk
hkmap
hkmapp
hkp
hl
hlg
hls
hlsearch
ic
icon
iconstring
ignorecase
im
imactivatekey
imak
imc
imcmdline
imd
imdisable
imi
iminsert
ims
imsearch
inc
include
includeexpr
incsearch
inde
indentexpr
indentkeys
indk
inex
inf
infercase
insertmode
isf
isfname
isi
isident
isk
iskeyword
isprint
joinspaces
js
key
keymap
keymodel
keywordprg
km
kmp
kp
langmap
langmenu
laststatus
lazyredraw
lbr
lcs
linebreak
lines
linespace
lisp
lispwords
listchars
loadplugins
lpl
lsp
lz
macatsui
magic
makeef
makeprg
matchpairs
matchtime
maxcombine
maxfuncdepth
maxmapdepth
maxmem
maxmempattern
maxmemtot
mco
mef
menuitems
mfd
mh
mis
mkspellmem
ml
mls
mm
mmd
mmp
mmt
modeline
modelines
modifiable
modified
more
mouse
mousef
mousefocus
mousehide
mousem
mousemodel
mouses
mouseshape
mouset
mousetime
mp
mps
msm
mzq
mzquantum
nf
nrformats
numberwidth
nuw
odev
oft
ofu
omnifunc
opendevice
operatorfunc
opfunc
osfiletype
pa
para
paragraphs
paste
pastetoggle
patchexpr
patchmode
path
pdev
penc
pex
pexpr
pfn
ph
pheader
pi
pm
pmbcs
pmbfn
popt
preserveindent
previewheight
previewwindow
printdevice
printencoding
printexpr
printfont
printheader
printmbcharset
printmbfont
printoptions
prompt
pt
pumheight
pvh
pvw
qe
quoteescape
readonly
remap
report
restorescreen
revins
rightleft
rightleftcmd
rl
rlc
ro
rs
rtp
ruf
ruler
rulerformat
runtimepath
sbo
sc
scb
scr
scroll
scrollbind
scrolljump
scrolloff
scrollopt
scs
sect
sections
secure
sel
selection
selectmode
sessionoptions
sft
shcf
shellcmdflag
shellpipe
shellquote
shellredir
shellslash
shelltemp
shelltype
shellxquote
shiftround
shiftwidth
shm
shortmess
shortname
showbreak
showcmd
showfulltag
showmatch
showmode
showtabline
shq
si
sidescroll
sidescrolloff
siso
sj
slm
smartcase
smartindent
smarttab
smc
smd
softtabstop
sol
spc
spell
spellcapcheck
spellfile
spelllang
spellsuggest
spf
spl
splitbelow
splitright
sps
sr
srr
ss
ssl
ssop
stal
startofline
statusline
stl
stmp
su
sua
suffixes
suffixesadd
sw
swapfile
swapsync
swb
swf
switchbuf
sws
sxq
syn
synmaxcol
syntax
tabline
tabpagemax
tabstop
tagbsearch
taglength
tagrelative
tagstack
tal
tb
tbi
tbidi
tbis
tbs
tenc
term
termbidi
termencoding
terse
textauto
textmode
textwidth
tgst
thesaurus
tildeop
timeout
timeoutlen
title
titlelen
titleold
titlestring
toolbar
toolbariconsize
top
tpm
tsl
tsr
ttimeout
ttimeoutlen
ttm
tty
ttybuiltin
ttyfast
ttym
ttymouse
ttyscroll
ttytype
tw
tx
uc
ul
undolevels
updatecount
updatetime
ut
vb
vbs
vdir
verbosefile
vfile
viewdir
viewoptions
viminfo
virtualedit
visualbell
vop
wak
warn
wb
wc
wcm
wd
weirdinvert
wfh
wfw
whichwrap
wi
wig
wildchar
wildcharm
wildignore
wildmenu
wildmode
wildoptions
wim
winaltkeys
window
winfixheight
winfixwidth
winheight
winminheight
winminwidth
winwidth
wiv
wiw
wm
wmh
wmnu
wmw
wop
wrap
wrapmargin
wrapscan
writeany
writebackup
writedelay
ww
noacd
noai
noakm
noallowrevins
noaltkeymap
noanti
noantialias
noar
noarab
noarabic
noarabicshape
noari
noarshape
noautochdir
noautoindent
noautoread
noautowrite
noautowriteall
noaw
noawa
nobackup
noballooneval
nobeval
nobin
nobinary
nobiosk
nobioskey
nobk
nobl
nobomb
nobuflisted
nocf
noci
nocin
nocindent
nocompatible
noconfirm
noconsk
noconskey
nocopyindent
nocp
nocscopetag
nocscopeverbose
nocst
nocsverb
nocuc
nocul
nocursorcolumn
nocursorline
nodeco
nodelcombine
nodg
nodiff
nodigraph
nodisable
noea
noeb
noed
noedcompatible
noek
noendofline
noeol
noequalalways
noerrorbells
noesckeys
noet
noex
noexpandtab
noexrc
nofen
nofk
nofkmap
nofoldenable
nogd
nogdefault
noguipty
nohid
nohidden
nohk
nohkmap
nohkmapp
nohkp
nohls
noic
noicon
noignorecase
noim
noimc
noimcmdline
noimd
noincsearch
noinf
noinfercase
noinsertmode
nois
nojoinspaces
nojs
nolazyredraw
nolbr
nolinebreak
nolisp
nolist
noloadplugins
nolpl
nolz
noma
nomacatsui
nomagic
nomh
noml
nomod
nomodeline
nomodifiable
nomodified
nomore
nomousef
nomousefocus
nomousehide
nonu
nonumber
noodev
noopendevice
nopaste
nopi
nopreserveindent
nopreviewwindow
noprompt
nopvw
noreadonly
noremap
norestorescreen
norevins
nori
norightleft
norightleftcmd
norl
norlc
noro
nors
noru
noruler
nosb
nosc
noscb
noscrollbind
noscs
nosecure
nosft
noshellslash
noshelltemp
noshiftround
noshortname
noshowcmd
noshowfulltag
noshowmatch
noshowmode
nosi
nosm
nosmartcase
nosmartindent
nosmarttab
nosmd
nosn
nosol
nospell
nosplitbelow
nosplitright
nospr
nosr
nossl
nosta
nostartofline
nostmp
noswapfile
noswf
nota
notagbsearch
notagrelative
notagstack
notbi
notbidi
notbs
notermbidi
noterse
notextauto
notextmode
notf
notgst
notildeop
notimeout
notitle
noto
notop
notr
nottimeout
nottybuiltin
nottyfast
notx
novb
novisualbell
nowa
nowarn
nowb
noweirdinvert
nowfh
nowfw
nowildmenu
nowinfixheight
nowinfixwidth
nowiv
nowmnu
nowrap
nowrapscan
nowrite
nowriteany
nowritebackup
nows
invacd
invai
invakm
invallowrevins
invaltkeymap
invanti
invantialias
invar
invarab
invarabic
invarabicshape
invari
invarshape
invautochdir
invautoindent
invautoread
invautowrite
invautowriteall
invaw
invawa
invbackup
invballooneval
invbeval
invbin
invbinary
invbiosk
invbioskey
invbk
invbl
invbomb
invbuflisted
invcf
invci
invcin
invcindent
invcompatible
invconfirm
invconsk
invconskey
invcopyindent
invcp
invcscopetag
invcscopeverbose
invcst
invcsverb
invcuc
invcul
invcursorcolumn
invcursorline
invdeco
invdelcombine
invdg
invdiff
invdigraph
invdisable
invea
inveb
inved
invedcompatible
invek
invendofline
inveol
invequalalways
inverrorbells
invesckeys
invet
invex
invexpandtab
invexrc
invfen
invfk
invfkmap
invfoldenable
invgd
invgdefault
invguipty
invhid
invhidden
invhk
invhkmap
invhkmapp
invhkp
invhls
invhlsearch
invic
invicon
invignorecase
invim
invimc
invimcmdline
invimd
invincsearch
invinf
invinfercase
invinsertmode
invis
invjoinspaces
invjs
invlazyredraw
invlbr
invlinebreak
invlisp
invlist
invloadplugins
invlpl
invlz
invma
invmacatsui
invmagic
invmh
invml
invmod
invmodeline
invmodifiable
invmodified
invmore
invmousef
invmousefocus
invmousehide
invnu
invnumber
invodev
invopendevice
invpaste
invpi
invpreserveindent
invpreviewwindow
invprompt
invpvw
invreadonly
invremap
invrestorescreen
invrevins
invri
invrightleft
invrightleftcmd
invrl
invrlc
invro
invrs
invru
invruler
invsb
invsc
invscb
invscrollbind
invscs
invsecure
invsft
invshellslash
invshelltemp
invshiftround
invshortname
invshowcmd
invshowfulltag
invshowmatch
invshowmode
invsi
invsm
invsmartcase
invsmartindent
invsmarttab
invsmd
invsn
invsol
invspell
invsplitbelow
invsplitright
invspr
invsr
invssl
invsta
invstartofline
invstmp
invswapfile
invswf
invta
invtagbsearch
invtagrelative
invtagstack
invtbi
invtbidi
invtbs
invtermbidi
invterse
invtextauto
invtextmode
invtf
invtgst
invtildeop
invtimeout
invtitle
invto
invtop
invtr
invttimeout
invttybuiltin
invttyfast
invtx
invvb
invvisualbell
invwa
invwarn
invwb
invweirdinvert
invwfh
invwfw
invwildmenu
invwinfixheight
invwinfixwidth
invwiv
invwmnu
invwrap
invwrapscan
invwrite
invwriteany
invwritebackup
invws
t_AB
t_AF
t_al
t_AL
t_bc
t_cd
t_ce
t_Ce
t_cl
t_cm
t_Co
t_cs
t_Cs
t_CS
t_CV
t_da
t_db
t_dl
t_DL
t_EI
t_F1
t_F2
t_F3
t_F4
t_F5
t_F6
t_F7
t_F8
t_F9
t_fs
t_IE
t_IS
t_k1
t_K1
t_k2
t_k3
t_K3
t_k4
t_K4
t_k5
t_K5
t_k6
t_K6
t_k7
t_K7
t_k8
t_K8
t_k9
t_K9
t_KA
t_kb
t_kB
t_KB
t_KC
t_kd
t_kD
t_KD
t_ke
t_KE
t_KF
t_KG
t_kh
t_KH
t_kI
t_KI
t_KJ
t_KK
t_kl
t_KL
t_kN
t_kP
t_kr
t_ks
t_ku
t_le
t_mb
t_md
t_me
t_mr
t_ms
t_nd
t_op
t_RI
t_RV
t_Sb
t_se
t_Sf
t_SI
t_so
t_sr
t_te
t_ti
t_ts
t_ue
t_us
t_ut
t_vb
t_ve
t_vi
t_vs
t_WP
t_WS
t_xs
t_ZH
t_ZR
----------------------------------------------------
[
["builtin", "autocmd"],
["builtin", "acd"],
["builtin", "ai"],
["builtin", "akm"],
["builtin", "aleph"],
["builtin", "allowrevins"],
["builtin", "altkeymap"],
["builtin", "ambiwidth"],
["builtin", "ambw"],
["builtin", "anti"],
["builtin", "antialias"],
["builtin", "arab"],
["builtin", "arabic"],
["builtin", "arabicshape"],
["builtin", "ari"],
["builtin", "arshape"],
["builtin", "autochdir"],
["builtin", "autoindent"],
["builtin", "autoread"],
["builtin", "autowrite"],
["builtin", "autowriteall"],
["builtin", "aw"],
["builtin", "awa"],
["builtin", "background"],
["builtin", "backspace"],
["builtin", "backup"],
["builtin", "backupcopy"],
["builtin", "backupdir"],
["builtin", "backupext"],
["builtin", "backupskip"],
["builtin", "balloondelay"],
["builtin", "ballooneval"],
["builtin", "balloonexpr"],
["builtin", "bdir"],
["builtin", "bdlay"],
["builtin", "beval"],
["builtin", "bex"],
["builtin", "bexpr"],
["builtin", "bg"],
["builtin", "bh"],
["builtin", "bin"],
["builtin", "binary"],
["builtin", "biosk"],
["builtin", "bioskey"],
["builtin", "bk"],
["builtin", "bkc"],
["builtin", "bomb"],
["builtin", "breakat"],
["builtin", "brk"],
["builtin", "browsedir"],
["builtin", "bs"],
["builtin", "bsdir"],
["builtin", "bsk"],
["builtin", "bt"],
["builtin", "bufhidden"],
["builtin", "buflisted"],
["builtin", "buftype"],
["builtin", "casemap"],
["builtin", "ccv"],
["builtin", "cdpath"],
["builtin", "cedit"],
["builtin", "cfu"],
["builtin", "ch"],
["builtin", "charconvert"],
["builtin", "ci"],
["builtin", "cin"],
["builtin", "cindent"],
["builtin", "cink"],
["builtin", "cinkeys"],
["builtin", "cino"],
["builtin", "cinoptions"],
["builtin", "cinw"],
["builtin", "cinwords"],
["builtin", "clipboard"],
["builtin", "cmdheight"],
["builtin", "cmdwinheight"],
["builtin", "cmp"],
["builtin", "cms"],
["builtin", "columns"],
["builtin", "com"],
["builtin", "comments"],
["builtin", "commentstring"],
["builtin", "compatible"],
["builtin", "complete"],
["builtin", "completefunc"],
["builtin", "completeopt"],
["builtin", "consk"],
["builtin", "conskey"],
["builtin", "copyindent"],
["builtin", "cot"],
["builtin", "cpo"],
["builtin", "cpoptions"],
["builtin", "cpt"],
["builtin", "cscopepathcomp"],
["builtin", "cscopeprg"],
["builtin", "cscopequickfix"],
["builtin", "cscopetag"],
["builtin", "cscopetagorder"],
["builtin", "cscopeverbose"],
["builtin", "cspc"],
["builtin", "csprg"],
["builtin", "csqf"],
["builtin", "cst"],
["builtin", "csto"],
["builtin", "csverb"],
["builtin", "cuc"],
["builtin", "cul"],
["builtin", "cursorcolumn"],
["builtin", "cursorline"],
["builtin", "cwh"],
["builtin", "debug"],
["builtin", "deco"],
["builtin", "def"],
["builtin", "define"],
["builtin", "delcombine"],
["builtin", "dex"],
["builtin", "dg"],
["builtin", "dict"],
["builtin", "dictionary"],
["builtin", "diff"],
["builtin", "diffexpr"],
["builtin", "diffopt"],
["builtin", "digraph"],
["builtin", "dip"],
["builtin", "dir"],
["builtin", "directory"],
["builtin", "dy"],
["builtin", "ea"],
["builtin", "ead"],
["builtin", "eadirection"],
["builtin", "eb"],
["builtin", "ed"],
["builtin", "edcompatible"],
["builtin", "ef"],
["builtin", "efm"],
["builtin", "ei"],
["builtin", "ek"],
["builtin", "enc"],
["builtin", "encoding"],
["builtin", "endofline"],
["builtin", "eol"],
["builtin", "ep"],
["builtin", "equalalways"],
["builtin", "equalprg"],
["builtin", "errorbells"],
["builtin", "errorfile"],
["builtin", "errorformat"],
["builtin", "esckeys"],
["builtin", "et"],
["builtin", "eventignore"],
["builtin", "expandtab"],
["builtin", "exrc"],
["builtin", "fcl"],
["builtin", "fcs"],
["builtin", "fdc"],
["builtin", "fde"],
["builtin", "fdi"],
["builtin", "fdl"],
["builtin", "fdls"],
["builtin", "fdm"],
["builtin", "fdn"],
["builtin", "fdo"],
["builtin", "fdt"],
["builtin", "fen"],
["builtin", "fenc"],
["builtin", "fencs"],
["builtin", "fex"],
["builtin", "ff"],
["builtin", "ffs"],
["builtin", "fileencoding"],
["builtin", "fileencodings"],
["builtin", "fileformat"],
["builtin", "fileformats"],
["builtin", "fillchars"],
["builtin", "fk"],
["builtin", "fkmap"],
["builtin", "flp"],
["builtin", "fml"],
["builtin", "fmr"],
["builtin", "foldcolumn"],
["builtin", "foldenable"],
["builtin", "foldexpr"],
["builtin", "foldignore"],
["builtin", "foldlevel"],
["builtin", "foldlevelstart"],
["builtin", "foldmarker"],
["builtin", "foldmethod"],
["builtin", "foldminlines"],
["builtin", "foldnestmax"],
["builtin", "foldtext"],
["builtin", "formatexpr"],
["builtin", "formatlistpat"],
["builtin", "formatoptions"],
["builtin", "formatprg"],
["builtin", "fp"],
["builtin", "fs"],
["builtin", "fsync"],
["builtin", "ft"],
["builtin", "gcr"],
["builtin", "gd"],
["builtin", "gdefault"],
["builtin", "gfm"],
["builtin", "gfn"],
["builtin", "gfs"],
["builtin", "gfw"],
["builtin", "ghr"],
["builtin", "gp"],
["builtin", "grepformat"],
["builtin", "grepprg"],
["builtin", "gtl"],
["builtin", "gtt"],
["builtin", "guicursor"],
["builtin", "guifont"],
["builtin", "guifontset"],
["builtin", "guifontwide"],
["builtin", "guiheadroom"],
["builtin", "guioptions"],
["builtin", "guipty"],
["builtin", "guitablabel"],
["builtin", "guitabtooltip"],
["builtin", "helpfile"],
["builtin", "helpheight"],
["builtin", "helplang"],
["builtin", "hf"],
["builtin", "hh"],
["builtin", "hi"],
["builtin", "hidden"],
["builtin", "highlight"],
["builtin", "hk"],
["builtin", "hkmap"],
["builtin", "hkmapp"],
["builtin", "hkp"],
["builtin", "hl"],
["builtin", "hlg"],
["builtin", "hls"],
["builtin", "hlsearch"],
["builtin", "ic"],
["builtin", "icon"],
["builtin", "iconstring"],
["builtin", "ignorecase"],
["builtin", "im"],
["builtin", "imactivatekey"],
["builtin", "imak"],
["builtin", "imc"],
["builtin", "imcmdline"],
["builtin", "imd"],
["builtin", "imdisable"],
["builtin", "imi"],
["builtin", "iminsert"],
["builtin", "ims"],
["builtin", "imsearch"],
["builtin", "inc"],
["builtin", "include"],
["builtin", "includeexpr"],
["builtin", "incsearch"],
["builtin", "inde"],
["builtin", "indentexpr"],
["builtin", "indentkeys"],
["builtin", "indk"],
["builtin", "inex"],
["builtin", "inf"],
["builtin", "infercase"],
["builtin", "insertmode"],
["builtin", "isf"],
["builtin", "isfname"],
["builtin", "isi"],
["builtin", "isident"],
["builtin", "isk"],
["builtin", "iskeyword"],
["builtin", "isprint"],
["builtin", "joinspaces"],
["builtin", "js"],
["builtin", "key"],
["builtin", "keymap"],
["builtin", "keymodel"],
["builtin", "keywordprg"],
["builtin", "km"],
["builtin", "kmp"],
["builtin", "kp"],
["builtin", "langmap"],
["builtin", "langmenu"],
["builtin", "laststatus"],
["builtin", "lazyredraw"],
["builtin", "lbr"],
["builtin", "lcs"],
["builtin", "linebreak"],
["builtin", "lines"],
["builtin", "linespace"],
["builtin", "lisp"],
["builtin", "lispwords"],
["builtin", "listchars"],
["builtin", "loadplugins"],
["builtin", "lpl"],
["builtin", "lsp"],
["builtin", "lz"],
["builtin", "macatsui"],
["builtin", "magic"],
["builtin", "makeef"],
["builtin", "makeprg"],
["builtin", "matchpairs"],
["builtin", "matchtime"],
["builtin", "maxcombine"],
["builtin", "maxfuncdepth"],
["builtin", "maxmapdepth"],
["builtin", "maxmem"],
["builtin", "maxmempattern"],
["builtin", "maxmemtot"],
["builtin", "mco"],
["builtin", "mef"],
["builtin", "menuitems"],
["builtin", "mfd"],
["builtin", "mh"],
["builtin", "mis"],
["builtin", "mkspellmem"],
["builtin", "ml"],
["builtin", "mls"],
["builtin", "mm"],
["builtin", "mmd"],
["builtin", "mmp"],
["builtin", "mmt"],
["builtin", "modeline"],
["builtin", "modelines"],
["builtin", "modifiable"],
["builtin", "modified"],
["builtin", "more"],
["builtin", "mouse"],
["builtin", "mousef"],
["builtin", "mousefocus"],
["builtin", "mousehide"],
["builtin", "mousem"],
["builtin", "mousemodel"],
["builtin", "mouses"],
["builtin", "mouseshape"],
["builtin", "mouset"],
["builtin", "mousetime"],
["builtin", "mp"],
["builtin", "mps"],
["builtin", "msm"],
["builtin", "mzq"],
["builtin", "mzquantum"],
["builtin", "nf"],
["builtin", "nrformats"],
["builtin", "numberwidth"],
["builtin", "nuw"],
["builtin", "odev"],
["builtin", "oft"],
["builtin", "ofu"],
["builtin", "omnifunc"],
["builtin", "opendevice"],
["builtin", "operatorfunc"],
["builtin", "opfunc"],
["builtin", "osfiletype"],
["builtin", "pa"],
["builtin", "para"],
["builtin", "paragraphs"],
["builtin", "paste"],
["builtin", "pastetoggle"],
["builtin", "patchexpr"],
["builtin", "patchmode"],
["builtin", "path"],
["builtin", "pdev"],
["builtin", "penc"],
["builtin", "pex"],
["builtin", "pexpr"],
["builtin", "pfn"],
["builtin", "ph"],
["builtin", "pheader"],
["builtin", "pi"],
["builtin", "pm"],
["builtin", "pmbcs"],
["builtin", "pmbfn"],
["builtin", "popt"],
["builtin", "preserveindent"],
["builtin", "previewheight"],
["builtin", "previewwindow"],
["builtin", "printdevice"],
["builtin", "printencoding"],
["builtin", "printexpr"],
["builtin", "printfont"],
["builtin", "printheader"],
["builtin", "printmbcharset"],
["builtin", "printmbfont"],
["builtin", "printoptions"],
["builtin", "prompt"],
["builtin", "pt"],
["builtin", "pumheight"],
["builtin", "pvh"],
["builtin", "pvw"],
["builtin", "qe"],
["builtin", "quoteescape"],
["builtin", "readonly"],
["builtin", "remap"],
["builtin", "report"],
["builtin", "restorescreen"],
["builtin", "revins"],
["builtin", "rightleft"],
["builtin", "rightleftcmd"],
["builtin", "rl"],
["builtin", "rlc"],
["builtin", "ro"],
["builtin", "rs"],
["builtin", "rtp"],
["builtin", "ruf"],
["builtin", "ruler"],
["builtin", "rulerformat"],
["builtin", "runtimepath"],
["builtin", "sbo"],
["builtin", "sc"],
["builtin", "scb"],
["builtin", "scr"],
["builtin", "scroll"],
["builtin", "scrollbind"],
["builtin", "scrolljump"],
["builtin", "scrolloff"],
["builtin", "scrollopt"],
["builtin", "scs"],
["builtin", "sect"],
["builtin", "sections"],
["builtin", "secure"],
["builtin", "sel"],
["builtin", "selection"],
["builtin", "selectmode"],
["builtin", "sessionoptions"],
["builtin", "sft"],
["builtin", "shcf"],
["builtin", "shellcmdflag"],
["builtin", "shellpipe"],
["builtin", "shellquote"],
["builtin", "shellredir"],
["builtin", "shellslash"],
["builtin", "shelltemp"],
["builtin", "shelltype"],
["builtin", "shellxquote"],
["builtin", "shiftround"],
["builtin", "shiftwidth"],
["builtin", "shm"],
["builtin", "shortmess"],
["builtin", "shortname"],
["builtin", "showbreak"],
["builtin", "showcmd"],
["builtin", "showfulltag"],
["builtin", "showmatch"],
["builtin", "showmode"],
["builtin", "showtabline"],
["builtin", "shq"],
["builtin", "si"],
["builtin", "sidescroll"],
["builtin", "sidescrolloff"],
["builtin", "siso"],
["builtin", "sj"],
["builtin", "slm"],
["builtin", "smartcase"],
["builtin", "smartindent"],
["builtin", "smarttab"],
["builtin", "smc"],
["builtin", "smd"],
["builtin", "softtabstop"],
["builtin", "sol"],
["builtin", "spc"],
["builtin", "spell"],
["builtin", "spellcapcheck"],
["builtin", "spellfile"],
["builtin", "spelllang"],
["builtin", "spellsuggest"],
["builtin", "spf"],
["builtin", "spl"],
["builtin", "splitbelow"],
["builtin", "splitright"],
["builtin", "sps"],
["builtin", "sr"],
["builtin", "srr"],
["builtin", "ss"],
["builtin", "ssl"],
["builtin", "ssop"],
["builtin", "stal"],
["builtin", "startofline"],
["builtin", "statusline"],
["builtin", "stl"],
["builtin", "stmp"],
["builtin", "su"],
["builtin", "sua"],
["builtin", "suffixes"],
["builtin", "suffixesadd"],
["builtin", "sw"],
["builtin", "swapfile"],
["builtin", "swapsync"],
["builtin", "swb"],
["builtin", "swf"],
["builtin", "switchbuf"],
["builtin", "sws"],
["builtin", "sxq"],
["builtin", "syn"],
["builtin", "synmaxcol"],
["builtin", "syntax"],
["builtin", "tabline"],
["builtin", "tabpagemax"],
["builtin", "tabstop"],
["builtin", "tagbsearch"],
["builtin", "taglength"],
["builtin", "tagrelative"],
["builtin", "tagstack"],
["builtin", "tal"],
["builtin", "tb"],
["builtin", "tbi"],
["builtin", "tbidi"],
["builtin", "tbis"],
["builtin", "tbs"],
["builtin", "tenc"],
["builtin", "term"],
["builtin", "termbidi"],
["builtin", "termencoding"],
["builtin", "terse"],
["builtin", "textauto"],
["builtin", "textmode"],
["builtin", "textwidth"],
["builtin", "tgst"],
["builtin", "thesaurus"],
["builtin", "tildeop"],
["builtin", "timeout"],
["builtin", "timeoutlen"],
["builtin", "title"],
["builtin", "titlelen"],
["builtin", "titleold"],
["builtin", "titlestring"],
["builtin", "toolbar"],
["builtin", "toolbariconsize"],
["builtin", "top"],
["builtin", "tpm"],
["builtin", "tsl"],
["builtin", "tsr"],
["builtin", "ttimeout"],
["builtin", "ttimeoutlen"],
["builtin", "ttm"],
["builtin", "tty"],
["builtin", "ttybuiltin"],
["builtin", "ttyfast"],
["builtin", "ttym"],
["builtin", "ttymouse"],
["builtin", "ttyscroll"],
["builtin", "ttytype"],
["builtin", "tw"],
["builtin", "tx"],
["builtin", "uc"],
["builtin", "ul"],
["builtin", "undolevels"],
["builtin", "updatecount"],
["builtin", "updatetime"],
["builtin", "ut"],
["builtin", "vb"],
["builtin", "vbs"],
["builtin", "vdir"],
["builtin", "verbosefile"],
["builtin", "vfile"],
["builtin", "viewdir"],
["builtin", "viewoptions"],
["builtin", "viminfo"],
["builtin", "virtualedit"],
["builtin", "visualbell"],
["builtin", "vop"],
["builtin", "wak"],
["builtin", "warn"],
["builtin", "wb"],
["builtin", "wc"],
["builtin", "wcm"],
["builtin", "wd"],
["builtin", "weirdinvert"],
["builtin", "wfh"],
["builtin", "wfw"],
["builtin", "whichwrap"],
["builtin", "wi"],
["builtin", "wig"],
["builtin", "wildchar"],
["builtin", "wildcharm"],
["builtin", "wildignore"],
["builtin", "wildmenu"],
["builtin", "wildmode"],
["builtin", "wildoptions"],
["builtin", "wim"],
["builtin", "winaltkeys"],
["builtin", "window"],
["builtin", "winfixheight"],
["builtin", "winfixwidth"],
["builtin", "winheight"],
["builtin", "winminheight"],
["builtin", "winminwidth"],
["builtin", "winwidth"],
["builtin", "wiv"],
["builtin", "wiw"],
["builtin", "wm"],
["builtin", "wmh"],
["builtin", "wmnu"],
["builtin", "wmw"],
["builtin", "wop"],
["builtin", "wrap"],
["builtin", "wrapmargin"],
["builtin", "wrapscan"],
["builtin", "writeany"],
["builtin", "writebackup"],
["builtin", "writedelay"],
["builtin", "ww"],
["builtin", "noacd"],
["builtin", "noai"],
["builtin", "noakm"],
["builtin", "noallowrevins"],
["builtin", "noaltkeymap"],
["builtin", "noanti"],
["builtin", "noantialias"],
["builtin", "noar"],
["builtin", "noarab"],
["builtin", "noarabic"],
["builtin", "noarabicshape"],
["builtin", "noari"],
["builtin", "noarshape"],
["builtin", "noautochdir"],
["builtin", "noautoindent"],
["builtin", "noautoread"],
["builtin", "noautowrite"],
["builtin", "noautowriteall"],
["builtin", "noaw"],
["builtin", "noawa"],
["builtin", "nobackup"],
["builtin", "noballooneval"],
["builtin", "nobeval"],
["builtin", "nobin"],
["builtin", "nobinary"],
["builtin", "nobiosk"],
["builtin", "nobioskey"],
["builtin", "nobk"],
["builtin", "nobl"],
["builtin", "nobomb"],
["builtin", "nobuflisted"],
["builtin", "nocf"],
["builtin", "noci"],
["builtin", "nocin"],
["builtin", "nocindent"],
["builtin", "nocompatible"],
["builtin", "noconfirm"],
["builtin", "noconsk"],
["builtin", "noconskey"],
["builtin", "nocopyindent"],
["builtin", "nocp"],
["builtin", "nocscopetag"],
["builtin", "nocscopeverbose"],
["builtin", "nocst"],
["builtin", "nocsverb"],
["builtin", "nocuc"],
["builtin", "nocul"],
["builtin", "nocursorcolumn"],
["builtin", "nocursorline"],
["builtin", "nodeco"],
["builtin", "nodelcombine"],
["builtin", "nodg"],
["builtin", "nodiff"],
["builtin", "nodigraph"],
["builtin", "nodisable"],
["builtin", "noea"],
["builtin", "noeb"],
["builtin", "noed"],
["builtin", "noedcompatible"],
["builtin", "noek"],
["builtin", "noendofline"],
["builtin", "noeol"],
["builtin", "noequalalways"],
["builtin", "noerrorbells"],
["builtin", "noesckeys"],
["builtin", "noet"],
["builtin", "noex"],
["builtin", "noexpandtab"],
["builtin", "noexrc"],
["builtin", "nofen"],
["builtin", "nofk"],
["builtin", "nofkmap"],
["builtin", "nofoldenable"],
["builtin", "nogd"],
["builtin", "nogdefault"],
["builtin", "noguipty"],
["builtin", "nohid"],
["builtin", "nohidden"],
["builtin", "nohk"],
["builtin", "nohkmap"],
["builtin", "nohkmapp"],
["builtin", "nohkp"],
["builtin", "nohls"],
["builtin", "noic"],
["builtin", "noicon"],
["builtin", "noignorecase"],
["builtin", "noim"],
["builtin", "noimc"],
["builtin", "noimcmdline"],
["builtin", "noimd"],
["builtin", "noincsearch"],
["builtin", "noinf"],
["builtin", "noinfercase"],
["builtin", "noinsertmode"],
["builtin", "nois"],
["builtin", "nojoinspaces"],
["builtin", "nojs"],
["builtin", "nolazyredraw"],
["builtin", "nolbr"],
["builtin", "nolinebreak"],
["builtin", "nolisp"],
["builtin", "nolist"],
["builtin", "noloadplugins"],
["builtin", "nolpl"],
["builtin", "nolz"],
["builtin", "noma"],
["builtin", "nomacatsui"],
["builtin", "nomagic"],
["builtin", "nomh"],
["builtin", "noml"],
["builtin", "nomod"],
["builtin", "nomodeline"],
["builtin", "nomodifiable"],
["builtin", "nomodified"],
["builtin", "nomore"],
["builtin", "nomousef"],
["builtin", "nomousefocus"],
["builtin", "nomousehide"],
["builtin", "nonu"],
["builtin", "nonumber"],
["builtin", "noodev"],
["builtin", "noopendevice"],
["builtin", "nopaste"],
["builtin", "nopi"],
["builtin", "nopreserveindent"],
["builtin", "nopreviewwindow"],
["builtin", "noprompt"],
["builtin", "nopvw"],
["builtin", "noreadonly"],
["builtin", "noremap"],
["builtin", "norestorescreen"],
["builtin", "norevins"],
["builtin", "nori"],
["builtin", "norightleft"],
["builtin", "norightleftcmd"],
["builtin", "norl"],
["builtin", "norlc"],
["builtin", "noro"],
["builtin", "nors"],
["builtin", "noru"],
["builtin", "noruler"],
["builtin", "nosb"],
["builtin", "nosc"],
["builtin", "noscb"],
["builtin", "noscrollbind"],
["builtin", "noscs"],
["builtin", "nosecure"],
["builtin", "nosft"],
["builtin", "noshellslash"],
["builtin", "noshelltemp"],
["builtin", "noshiftround"],
["builtin", "noshortname"],
["builtin", "noshowcmd"],
["builtin", "noshowfulltag"],
["builtin", "noshowmatch"],
["builtin", "noshowmode"],
["builtin", "nosi"],
["builtin", "nosm"],
["builtin", "nosmartcase"],
["builtin", "nosmartindent"],
["builtin", "nosmarttab"],
["builtin", "nosmd"],
["builtin", "nosn"],
["builtin", "nosol"],
["builtin", "nospell"],
["builtin", "nosplitbelow"],
["builtin", "nosplitright"],
["builtin", "nospr"],
["builtin", "nosr"],
["builtin", "nossl"],
["builtin", "nosta"],
["builtin", "nostartofline"],
["builtin", "nostmp"],
["builtin", "noswapfile"],
["builtin", "noswf"],
["builtin", "nota"],
["builtin", "notagbsearch"],
["builtin", "notagrelative"],
["builtin", "notagstack"],
["builtin", "notbi"],
["builtin", "notbidi"],
["builtin", "notbs"],
["builtin", "notermbidi"],
["builtin", "noterse"],
["builtin", "notextauto"],
["builtin", "notextmode"],
["builtin", "notf"],
["builtin", "notgst"],
["builtin", "notildeop"],
["builtin", "notimeout"],
["builtin", "notitle"],
["builtin", "noto"],
["builtin", "notop"],
["builtin", "notr"],
["builtin", "nottimeout"],
["builtin", "nottybuiltin"],
["builtin", "nottyfast"],
["builtin", "notx"],
["builtin", "novb"],
["builtin", "novisualbell"],
["builtin", "nowa"],
["builtin", "nowarn"],
["builtin", "nowb"],
["builtin", "noweirdinvert"],
["builtin", "nowfh"],
["builtin", "nowfw"],
["builtin", "nowildmenu"],
["builtin", "nowinfixheight"],
["builtin", "nowinfixwidth"],
["builtin", "nowiv"],
["builtin", "nowmnu"],
["builtin", "nowrap"],
["builtin", "nowrapscan"],
["builtin", "nowrite"],
["builtin", "nowriteany"],
["builtin", "nowritebackup"],
["builtin", "nows"],
["builtin", "invacd"],
["builtin", "invai"],
["builtin", "invakm"],
["builtin", "invallowrevins"],
["builtin", "invaltkeymap"],
["builtin", "invanti"],
["builtin", "invantialias"],
["builtin", "invar"],
["builtin", "invarab"],
["builtin", "invarabic"],
["builtin", "invarabicshape"],
["builtin", "invari"],
["builtin", "invarshape"],
["builtin", "invautochdir"],
["builtin", "invautoindent"],
["builtin", "invautoread"],
["builtin", "invautowrite"],
["builtin", "invautowriteall"],
["builtin", "invaw"],
["builtin", "invawa"],
["builtin", "invbackup"],
["builtin", "invballooneval"],
["builtin", "invbeval"],
["builtin", "invbin"],
["builtin", "invbinary"],
["builtin", "invbiosk"],
["builtin", "invbioskey"],
["builtin", "invbk"],
["builtin", "invbl"],
["builtin", "invbomb"],
["builtin", "invbuflisted"],
["builtin", "invcf"],
["builtin", "invci"],
["builtin", "invcin"],
["builtin", "invcindent"],
["builtin", "invcompatible"],
["builtin", "invconfirm"],
["builtin", "invconsk"],
["builtin", "invconskey"],
["builtin", "invcopyindent"],
["builtin", "invcp"],
["builtin", "invcscopetag"],
["builtin", "invcscopeverbose"],
["builtin", "invcst"],
["builtin", "invcsverb"],
["builtin", "invcuc"],
["builtin", "invcul"],
["builtin", "invcursorcolumn"],
["builtin", "invcursorline"],
["builtin", "invdeco"],
["builtin", "invdelcombine"],
["builtin", "invdg"],
["builtin", "invdiff"],
["builtin", "invdigraph"],
["builtin", "invdisable"],
["builtin", "invea"],
["builtin", "inveb"],
["builtin", "inved"],
["builtin", "invedcompatible"],
["builtin", "invek"],
["builtin", "invendofline"],
["builtin", "inveol"],
["builtin", "invequalalways"],
["builtin", "inverrorbells"],
["builtin", "invesckeys"],
["builtin", "invet"],
["builtin", "invex"],
["builtin", "invexpandtab"],
["builtin", "invexrc"],
["builtin", "invfen"],
["builtin", "invfk"],
["builtin", "invfkmap"],
["builtin", "invfoldenable"],
["builtin", "invgd"],
["builtin", "invgdefault"],
["builtin", "invguipty"],
["builtin", "invhid"],
["builtin", "invhidden"],
["builtin", "invhk"],
["builtin", "invhkmap"],
["builtin", "invhkmapp"],
["builtin", "invhkp"],
["builtin", "invhls"],
["builtin", "invhlsearch"],
["builtin", "invic"],
["builtin", "invicon"],
["builtin", "invignorecase"],
["builtin", "invim"],
["builtin", "invimc"],
["builtin", "invimcmdline"],
["builtin", "invimd"],
["builtin", "invincsearch"],
["builtin", "invinf"],
["builtin", "invinfercase"],
["builtin", "invinsertmode"],
["builtin", "invis"],
["builtin", "invjoinspaces"],
["builtin", "invjs"],
["builtin", "invlazyredraw"],
["builtin", "invlbr"],
["builtin", "invlinebreak"],
["builtin", "invlisp"],
["builtin", "invlist"],
["builtin", "invloadplugins"],
["builtin", "invlpl"],
["builtin", "invlz"],
["builtin", "invma"],
["builtin", "invmacatsui"],
["builtin", "invmagic"],
["builtin", "invmh"],
["builtin", "invml"],
["builtin", "invmod"],
["builtin", "invmodeline"],
["builtin", "invmodifiable"],
["builtin", "invmodified"],
["builtin", "invmore"],
["builtin", "invmousef"],
["builtin", "invmousefocus"],
["builtin", "invmousehide"],
["builtin", "invnu"],
["builtin", "invnumber"],
["builtin", "invodev"],
["builtin", "invopendevice"],
["builtin", "invpaste"],
["builtin", "invpi"],
["builtin", "invpreserveindent"],
["builtin", "invpreviewwindow"],
["builtin", "invprompt"],
["builtin", "invpvw"],
["builtin", "invreadonly"],
["builtin", "invremap"],
["builtin", "invrestorescreen"],
["builtin", "invrevins"],
["builtin", "invri"],
["builtin", "invrightleft"],
["builtin", "invrightleftcmd"],
["builtin", "invrl"],
["builtin", "invrlc"],
["builtin", "invro"],
["builtin", "invrs"],
["builtin", "invru"],
["builtin", "invruler"],
["builtin", "invsb"],
["builtin", "invsc"],
["builtin", "invscb"],
["builtin", "invscrollbind"],
["builtin", "invscs"],
["builtin", "invsecure"],
["builtin", "invsft"],
["builtin", "invshellslash"],
["builtin", "invshelltemp"],
["builtin", "invshiftround"],
["builtin", "invshortname"],
["builtin", "invshowcmd"],
["builtin", "invshowfulltag"],
["builtin", "invshowmatch"],
["builtin", "invshowmode"],
["builtin", "invsi"],
["builtin", "invsm"],
["builtin", "invsmartcase"],
["builtin", "invsmartindent"],
["builtin", "invsmarttab"],
["builtin", "invsmd"],
["builtin", "invsn"],
["builtin", "invsol"],
["builtin", "invspell"],
["builtin", "invsplitbelow"],
["builtin", "invsplitright"],
["builtin", "invspr"],
["builtin", "invsr"],
["builtin", "invssl"],
["builtin", "invsta"],
["builtin", "invstartofline"],
["builtin", "invstmp"],
["builtin", "invswapfile"],
["builtin", "invswf"],
["builtin", "invta"],
["builtin", "invtagbsearch"],
["builtin", "invtagrelative"],
["builtin", "invtagstack"],
["builtin", "invtbi"],
["builtin", "invtbidi"],
["builtin", "invtbs"],
["builtin", "invtermbidi"],
["builtin", "invterse"],
["builtin", "invtextauto"],
["builtin", "invtextmode"],
["builtin", "invtf"],
["builtin", "invtgst"],
["builtin", "invtildeop"],
["builtin", "invtimeout"],
["builtin", "invtitle"],
["builtin", "invto"],
["builtin", "invtop"],
["builtin", "invtr"],
["builtin", "invttimeout"],
["builtin", "invttybuiltin"],
["builtin", "invttyfast"],
["builtin", "invtx"],
["builtin", "invvb"],
["builtin", "invvisualbell"],
["builtin", "invwa"],
["builtin", "invwarn"],
["builtin", "invwb"],
["builtin", "invweirdinvert"],
["builtin", "invwfh"],
["builtin", "invwfw"],
["builtin", "invwildmenu"],
["builtin", "invwinfixheight"],
["builtin", "invwinfixwidth"],
["builtin", "invwiv"],
["builtin", "invwmnu"],
["builtin", "invwrap"],
["builtin", "invwrapscan"],
["builtin", "invwrite"],
["builtin", "invwriteany"],
["builtin", "invwritebackup"],
["builtin", "invws"],
["builtin", "t_AB"],
["builtin", "t_AF"],
["builtin", "t_al"],
["builtin", "t_AL"],
["builtin", "t_bc"],
["builtin", "t_cd"],
["builtin", "t_ce"],
["builtin", "t_Ce"],
["builtin", "t_cl"],
["builtin", "t_cm"],
["builtin", "t_Co"],
["builtin", "t_cs"],
["builtin", "t_Cs"],
["builtin", "t_CS"],
["builtin", "t_CV"],
["builtin", "t_da"],
["builtin", "t_db"],
["builtin", "t_dl"],
["builtin", "t_DL"],
["builtin", "t_EI"],
["builtin", "t_F1"],
["builtin", "t_F2"],
["builtin", "t_F3"],
["builtin", "t_F4"],
["builtin", "t_F5"],
["builtin", "t_F6"],
["builtin", "t_F7"],
["builtin", "t_F8"],
["builtin", "t_F9"],
["builtin", "t_fs"],
["builtin", "t_IE"],
["builtin", "t_IS"],
["builtin", "t_k1"],
["builtin", "t_K1"],
["builtin", "t_k2"],
["builtin", "t_k3"],
["builtin", "t_K3"],
["builtin", "t_k4"],
["builtin", "t_K4"],
["builtin", "t_k5"],
["builtin", "t_K5"],
["builtin", "t_k6"],
["builtin", "t_K6"],
["builtin", "t_k7"],
["builtin", "t_K7"],
["builtin", "t_k8"],
["builtin", "t_K8"],
["builtin", "t_k9"],
["builtin", "t_K9"],
["builtin", "t_KA"],
["builtin", "t_kb"],
["builtin", "t_kB"],
["builtin", "t_KB"],
["builtin", "t_KC"],
["builtin", "t_kd"],
["builtin", "t_kD"],
["builtin", "t_KD"],
["builtin", "t_ke"],
["builtin", "t_KE"],
["builtin", "t_KF"],
["builtin", "t_KG"],
["builtin", "t_kh"],
["builtin", "t_KH"],
["builtin", "t_kI"],
["builtin", "t_KI"],
["builtin", "t_KJ"],
["builtin", "t_KK"],
["builtin", "t_kl"],
["builtin", "t_KL"],
["builtin", "t_kN"],
["builtin", "t_kP"],
["builtin", "t_kr"],
["builtin", "t_ks"],
["builtin", "t_ku"],
["builtin", "t_le"],
["builtin", "t_mb"],
["builtin", "t_md"],
["builtin", "t_me"],
["builtin", "t_mr"],
["builtin", "t_ms"],
["builtin", "t_nd"],
["builtin", "t_op"],
["builtin", "t_RI"],
["builtin", "t_RV"],
["builtin", "t_Sb"],
["builtin", "t_se"],
["builtin", "t_Sf"],
["builtin", "t_SI"],
["builtin", "t_so"],
["builtin", "t_sr"],
["builtin", "t_te"],
["builtin", "t_ti"],
["builtin", "t_ts"],
["builtin", "t_ue"],
["builtin", "t_us"],
["builtin", "t_ut"],
["builtin", "t_vb"],
["builtin", "t_ve"],
["builtin", "t_vi"],
["builtin", "t_vs"],
["builtin", "t_WP"],
["builtin", "t_WS"],
["builtin", "t_xs"],
["builtin", "t_ZH"],
["builtin", "t_ZR"]
]
----------------------------------------------------
Checks for builtins.
================================================
FILE: tests/languages/vim/comment_feature.test
================================================
"
" Foobar
----------------------------------------------------
[
["comment", "\""],
["comment", "\" Foobar"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/vim/function_feature.test
================================================
has("mac")
exists("s:call_count")
----------------------------------------------------
[
["function", "has"], ["punctuation", "("], ["string", "\"mac\""], ["punctuation", ")"],
["function", "exists"], ["punctuation", "("], ["string", "\"s:call_count\""], ["punctuation", ")"]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/vim/keyword_feature.test
================================================
ab
abbreviate
abc
abclear
abo
aboveleft
al
all
arga
argadd
argd
argdelete
argdo
arge
argedit
argg
argglobal
argl
arglocal
ar
args
argu
argument
as
ascii
bad
badd
ba
ball
bd
bdelete
be
bel
belowright
bf
bfirst
bl
blast
bm
bmodified
bn
bnext
bN
bNext
bo
botright
bp
bprevious
brea
break
breaka
breakadd
breakd
breakdel
breakl
breaklist
br
brewind
bro
browse
bufdo
b
buffer
buffers
bun
bunload
bw
bwipeout
ca
cabbrev
cabc
cabclear
caddb
caddbuffer
cad
caddexpr
caddf
caddfile
cal
call
cat
catch
cb
cbuffer
cc
ccl
cclose
cd
ce
center
cex
cexpr
cf
cfile
cfir
cfirst
cgetb
cgetbuffer
cgete
cgetexpr
cg
cgetfile
c
change
changes
chd
chdir
che
checkpath
checkt
checktime
cla
clast
cl
clist
clo
close
cmapc
cmapclear
cnew
cnewer
cn
cnext
cN
cNext
cnf
cnfile
cNfcNfile
cnorea
cnoreabbrev
col
colder
colo
colorscheme
comc
comclear
comp
compiler
conf
confirm
con
continue
cope
copen
co
copy
cpf
cpfile
cp
cprevious
cq
cquit
cr
crewind
cuna
cunabbrev
cu
cunmap
cw
cwindow
debugg
debuggreedy
delc
delcommand
d
delete
delf
delfunction
delm
delmarks
diffg
diffget
diffoff
diffpatch
diffpu
diffput
diffsplit
diffthis
diffu
diffupdate
dig
digraphs
di
display
dj
djump
dl
dlist
dr
drop
ds
dsearch
dsp
dsplit
earlier
echoe
echoerr
echom
echomsg
echon
e
edit
el
else
elsei
elseif
em
emenu
endfo
endfor
endf
endfunction
endfun
en
endif
endt
endtry
endw
endwhile
ene
enew
ex
exi
exit
exu
exusage
f
file
files
filetype
fina
finally
fin
find
fini
finish
fir
first
fix
fixdel
fo
fold
foldc
foldclose
folddoc
folddoclosed
foldd
folddoopen
foldo
foldopen
for
fu
fun
function
go
goto
gr
grep
grepa
grepadd
ha
hardcopy
h
help
helpf
helpfind
helpg
helpgrep
helpt
helptags
hid
hide
his
history
ia
iabbrev
iabc
iabclear
if
ij
ijump
il
ilist
imapc
imapclear
in
inorea
inoreabbrev
isearch
isp
isplit
iuna
iunabbrev
iu
iunmap
j
join
ju
jumps
k
keepalt
keepj
keepjumps
kee
keepmarks
laddb
laddbuffer
lad
laddexpr
laddf
laddfile
lan
language
la
last
later
lb
lbuffer
lc
lcd
lch
lchdir
lcl
lclose
let
left
lefta
leftabove
lex
lexpr
lf
lfile
lfir
lfirst
lgetb
lgetbuffer
lgete
lgetexpr
lg
lgetfile
lgr
lgrep
lgrepa
lgrepadd
lh
lhelpgrep
l
list
ll
lla
llast
lli
llist
lmak
lmake
lm
lmap
lmapc
lmapclear
lnew
lnewer
lne
lnext
lN
lNext
lnf
lnfile
lNf
lNfile
ln
lnoremap
lo
loadview
loc
lockmarks
lockv
lockvar
lol
lolder
lop
lopen
lpf
lpfile
lp
lprevious
lr
lrewind
ls
lt
ltag
lu
lunmap
lv
lvimgrep
lvimgrepa
lvimgrepadd
lw
lwindow
mak
make
ma
mark
marks
mat
match
menut
menutranslate
mk
mkexrc
mks
mksession
mksp
mkspell
mkvie
mkview
mkv
mkvimrc
mod
mode
m
move
mzf
mzfile
mz
mzscheme
nbkey
new
n
next
N
Next
nmapc
nmapclear
noh
nohlsearch
norea
noreabbrev
nu
number
nun
nunmap
omapc
omapclear
on
only
o
open
opt
options
ou
ounmap
pc
pclose
ped
pedit
pe
perl
perld
perldo
po
pop
popu
popu
popup
pp
ppop
pre
preserve
prev
previous
p
print
P
Print
profd
profdel
prof
profile
promptf
promptfind
promptr
promptrepl
ps
psearch
pta
ptag
ptf
ptfirst
ptj
ptjump
ptl
ptlast
ptn
ptnext
ptN
ptNext
ptp
ptprevious
ptr
ptrewind
pts
ptselect
pu
put
pw
pwd
pyf
pyfile
py
python
qa
qall
q
quit
quita
quitall
r
read
rec
recover
redi
redir
red
redo
redr
redraw
redraws
redrawstatus
reg
registers
res
resize
ret
retab
retu
return
rew
rewind
ri
right
rightb
rightbelow
rub
ruby
rubyd
rubydo
rubyf
rubyfile
ru
runtime
rv
rviminfo
sal
sall
san
sandbox
sa
sargument
sav
saveas
sba
sball
sbf
sbfirst
sbl
sblast
sbm
sbmodified
sbn
sbnext
sbN
sbNext
sbp
sbprevious
sbr
sbrewind
sb
sbuffer
scripte
scriptencoding
scrip
scriptnames
se
set
setf
setfiletype
setg
setglobal
setl
setlocal
sf
sfind
sfir
sfirst
sh
shell
sign
sil
silent
sim
simalt
sla
slast
sl
sleep
sm
smagic
sm
smap
smapc
smapclear
sme
smenu
sn
snext
sN
sNext
sni
sniff
sno
snomagic
snor
snoremap
snoreme
snoremenu
sor
sort
so
source
spelld
spelldump
spe
spellgood
spelli
spellinfo
spellr
spellrepall
spellu
spellundo
spellw
spellwrong
sp
split
spr
sprevious
sre
srewind
sta
stag
startg
startgreplace
star
startinsert
startr
startreplace
stj
stjump
st
stop
stopi
stopinsert
sts
stselect
sun
sunhide
sunm
sunmap
sus
suspend
sv
sview
syncbind
t
tab
tabc
tabclose
tabd
tabdo
tabe
tabedit
tabf
tabfind
tabfir
tabfirst
tabl
tablast
tabm
tabmove
tabnew
tabn
tabnext
tabN
tabNext
tabo
tabonly
tabp
tabprevious
tabr
tabrewind
tabs
ta
tag
tags
tc
tcl
tcld
tcldo
tclf
tclfile
te
tearoff
tf
tfirst
th
throw
tj
tjump
tl
tlast
tm
tm
tmenu
tn
tnext
tN
tNext
to
topleft
tp
tprevious
tr
trewind
try
ts
tselect
tu
tu
tunmenu
una
unabbreviate
u
undo
undoj
undojoin
undol
undolist
unh
unhide
unlet
unlo
unlockvar
unm
unmap
up
update
verb
verbose
ve
version
vert
vertical
vie
view
vim
vimgrep
vimgrepa
vimgrepadd
vi
visual
viu
viusage
vmapc
vmapclear
vne
vnew
vs
vsplit
vu
vunmap
wa
wall
wh
while
winc
wincmd
windo
winp
winpos
win
winsize
wn
wnext
wN
wNext
wp
wprevious
wq
wqa
wqall
w
write
ws
wsverb
wv
wviminfo
X
xa
xall
x
xit
xm
xmap
xmapc
xmapclear
xme
xmenu
XMLent
XMLns
xn
xnoremap
xnoreme
xnoremenu
xu
xunmap
y
yank
----------------------------------------------------
[
["keyword", "ab"],
["keyword", "abbreviate"],
["keyword", "abc"],
["keyword", "abclear"],
["keyword", "abo"],
["keyword", "aboveleft"],
["keyword", "al"],
["keyword", "all"],
["keyword", "arga"],
["keyword", "argadd"],
["keyword", "argd"],
["keyword", "argdelete"],
["keyword", "argdo"],
["keyword", "arge"],
["keyword", "argedit"],
["keyword", "argg"],
["keyword", "argglobal"],
["keyword", "argl"],
["keyword", "arglocal"],
["keyword", "ar"],
["keyword", "args"],
["keyword", "argu"],
["keyword", "argument"],
["keyword", "as"],
["keyword", "ascii"],
["keyword", "bad"],
["keyword", "badd"],
["keyword", "ba"],
["keyword", "ball"],
["keyword", "bd"],
["keyword", "bdelete"],
["keyword", "be"],
["keyword", "bel"],
["keyword", "belowright"],
["keyword", "bf"],
["keyword", "bfirst"],
["keyword", "bl"],
["keyword", "blast"],
["keyword", "bm"],
["keyword", "bmodified"],
["keyword", "bn"],
["keyword", "bnext"],
["keyword", "bN"],
["keyword", "bNext"],
["keyword", "bo"],
["keyword", "botright"],
["keyword", "bp"],
["keyword", "bprevious"],
["keyword", "brea"],
["keyword", "break"],
["keyword", "breaka"],
["keyword", "breakadd"],
["keyword", "breakd"],
["keyword", "breakdel"],
["keyword", "breakl"],
["keyword", "breaklist"],
["keyword", "br"],
["keyword", "brewind"],
["keyword", "bro"],
["keyword", "browse"],
["keyword", "bufdo"],
["keyword", "b"],
["keyword", "buffer"],
["keyword", "buffers"],
["keyword", "bun"],
["keyword", "bunload"],
["keyword", "bw"],
["keyword", "bwipeout"],
["keyword", "ca"],
["keyword", "cabbrev"],
["keyword", "cabc"],
["keyword", "cabclear"],
["keyword", "caddb"],
["keyword", "caddbuffer"],
["keyword", "cad"],
["keyword", "caddexpr"],
["keyword", "caddf"],
["keyword", "caddfile"],
["keyword", "cal"],
["keyword", "call"],
["keyword", "cat"],
["keyword", "catch"],
["keyword", "cb"],
["keyword", "cbuffer"],
["keyword", "cc"],
["keyword", "ccl"],
["keyword", "cclose"],
["keyword", "cd"],
["keyword", "ce"],
["keyword", "center"],
["keyword", "cex"],
["keyword", "cexpr"],
["keyword", "cf"],
["keyword", "cfile"],
["keyword", "cfir"],
["keyword", "cfirst"],
["keyword", "cgetb"],
["keyword", "cgetbuffer"],
["keyword", "cgete"],
["keyword", "cgetexpr"],
["keyword", "cg"],
["keyword", "cgetfile"],
["keyword", "c"],
["keyword", "change"],
["keyword", "changes"],
["keyword", "chd"],
["keyword", "chdir"],
["keyword", "che"],
["keyword", "checkpath"],
["keyword", "checkt"],
["keyword", "checktime"],
["keyword", "cla"],
["keyword", "clast"],
["keyword", "cl"],
["keyword", "clist"],
["keyword", "clo"],
["keyword", "close"],
["keyword", "cmapc"],
["keyword", "cmapclear"],
["keyword", "cnew"],
["keyword", "cnewer"],
["keyword", "cn"],
["keyword", "cnext"],
["keyword", "cN"],
["keyword", "cNext"],
["keyword", "cnf"],
["keyword", "cnfile"],
["keyword", "cNfcNfile"],
["keyword", "cnorea"],
["keyword", "cnoreabbrev"],
["keyword", "col"],
["keyword", "colder"],
["keyword", "colo"],
["keyword", "colorscheme"],
["keyword", "comc"],
["keyword", "comclear"],
["keyword", "comp"],
["keyword", "compiler"],
["keyword", "conf"],
["keyword", "confirm"],
["keyword", "con"],
["keyword", "continue"],
["keyword", "cope"],
["keyword", "copen"],
["keyword", "co"],
["keyword", "copy"],
["keyword", "cpf"],
["keyword", "cpfile"],
["keyword", "cp"],
["keyword", "cprevious"],
["keyword", "cq"],
["keyword", "cquit"],
["keyword", "cr"],
["keyword", "crewind"],
["keyword", "cuna"],
["keyword", "cunabbrev"],
["keyword", "cu"],
["keyword", "cunmap"],
["keyword", "cw"],
["keyword", "cwindow"],
["keyword", "debugg"],
["keyword", "debuggreedy"],
["keyword", "delc"],
["keyword", "delcommand"],
["keyword", "d"],
["keyword", "delete"],
["keyword", "delf"],
["keyword", "delfunction"],
["keyword", "delm"],
["keyword", "delmarks"],
["keyword", "diffg"],
["keyword", "diffget"],
["keyword", "diffoff"],
["keyword", "diffpatch"],
["keyword", "diffpu"],
["keyword", "diffput"],
["keyword", "diffsplit"],
["keyword", "diffthis"],
["keyword", "diffu"],
["keyword", "diffupdate"],
["keyword", "dig"],
["keyword", "digraphs"],
["keyword", "di"],
["keyword", "display"],
["keyword", "dj"],
["keyword", "djump"],
["keyword", "dl"],
["keyword", "dlist"],
["keyword", "dr"],
["keyword", "drop"],
["keyword", "ds"],
["keyword", "dsearch"],
["keyword", "dsp"],
["keyword", "dsplit"],
["keyword", "earlier"],
["keyword", "echoe"],
["keyword", "echoerr"],
["keyword", "echom"],
["keyword", "echomsg"],
["keyword", "echon"],
["keyword", "e"],
["keyword", "edit"],
["keyword", "el"],
["keyword", "else"],
["keyword", "elsei"],
["keyword", "elseif"],
["keyword", "em"],
["keyword", "emenu"],
["keyword", "endfo"],
["keyword", "endfor"],
["keyword", "endf"],
["keyword", "endfunction"],
["keyword", "endfun"],
["keyword", "en"],
["keyword", "endif"],
["keyword", "endt"],
["keyword", "endtry"],
["keyword", "endw"],
["keyword", "endwhile"],
["keyword", "ene"],
["keyword", "enew"],
["keyword", "ex"],
["keyword", "exi"],
["keyword", "exit"],
["keyword", "exu"],
["keyword", "exusage"],
["keyword", "f"],
["keyword", "file"],
["keyword", "files"],
["keyword", "filetype"],
["keyword", "fina"],
["keyword", "finally"],
["keyword", "fin"],
["keyword", "find"],
["keyword", "fini"],
["keyword", "finish"],
["keyword", "fir"],
["keyword", "first"],
["keyword", "fix"],
["keyword", "fixdel"],
["keyword", "fo"],
["keyword", "fold"],
["keyword", "foldc"],
["keyword", "foldclose"],
["keyword", "folddoc"],
["keyword", "folddoclosed"],
["keyword", "foldd"],
["keyword", "folddoopen"],
["keyword", "foldo"],
["keyword", "foldopen"],
["keyword", "for"],
["keyword", "fu"],
["keyword", "fun"],
["keyword", "function"],
["keyword", "go"],
["keyword", "goto"],
["keyword", "gr"],
["keyword", "grep"],
["keyword", "grepa"],
["keyword", "grepadd"],
["keyword", "ha"],
["keyword", "hardcopy"],
["keyword", "h"],
["keyword", "help"],
["keyword", "helpf"],
["keyword", "helpfind"],
["keyword", "helpg"],
["keyword", "helpgrep"],
["keyword", "helpt"],
["keyword", "helptags"],
["keyword", "hid"],
["keyword", "hide"],
["keyword", "his"],
["keyword", "history"],
["keyword", "ia"],
["keyword", "iabbrev"],
["keyword", "iabc"],
["keyword", "iabclear"],
["keyword", "if"],
["keyword", "ij"],
["keyword", "ijump"],
["keyword", "il"],
["keyword", "ilist"],
["keyword", "imapc"],
["keyword", "imapclear"],
["keyword", "in"],
["keyword", "inorea"],
["keyword", "inoreabbrev"],
["keyword", "isearch"],
["keyword", "isp"],
["keyword", "isplit"],
["keyword", "iuna"],
["keyword", "iunabbrev"],
["keyword", "iu"],
["keyword", "iunmap"],
["keyword", "j"],
["keyword", "join"],
["keyword", "ju"],
["keyword", "jumps"],
["keyword", "k"],
["keyword", "keepalt"],
["keyword", "keepj"],
["keyword", "keepjumps"],
["keyword", "kee"],
["keyword", "keepmarks"],
["keyword", "laddb"],
["keyword", "laddbuffer"],
["keyword", "lad"],
["keyword", "laddexpr"],
["keyword", "laddf"],
["keyword", "laddfile"],
["keyword", "lan"],
["keyword", "language"],
["keyword", "la"],
["keyword", "last"],
["keyword", "later"],
["keyword", "lb"],
["keyword", "lbuffer"],
["keyword", "lc"],
["keyword", "lcd"],
["keyword", "lch"],
["keyword", "lchdir"],
["keyword", "lcl"],
["keyword", "lclose"],
["keyword", "let"],
["keyword", "left"],
["keyword", "lefta"],
["keyword", "leftabove"],
["keyword", "lex"],
["keyword", "lexpr"],
["keyword", "lf"],
["keyword", "lfile"],
["keyword", "lfir"],
["keyword", "lfirst"],
["keyword", "lgetb"],
["keyword", "lgetbuffer"],
["keyword", "lgete"],
["keyword", "lgetexpr"],
["keyword", "lg"],
["keyword", "lgetfile"],
["keyword", "lgr"],
["keyword", "lgrep"],
["keyword", "lgrepa"],
["keyword", "lgrepadd"],
["keyword", "lh"],
["keyword", "lhelpgrep"],
["keyword", "l"],
["keyword", "list"],
["keyword", "ll"],
["keyword", "lla"],
["keyword", "llast"],
["keyword", "lli"],
["keyword", "llist"],
["keyword", "lmak"],
["keyword", "lmake"],
["keyword", "lm"],
["keyword", "lmap"],
["keyword", "lmapc"],
["keyword", "lmapclear"],
["keyword", "lnew"],
["keyword", "lnewer"],
["keyword", "lne"],
["keyword", "lnext"],
["keyword", "lN"],
["keyword", "lNext"],
["keyword", "lnf"],
["keyword", "lnfile"],
["keyword", "lNf"],
["keyword", "lNfile"],
["keyword", "ln"],
["keyword", "lnoremap"],
["keyword", "lo"],
["keyword", "loadview"],
["keyword", "loc"],
["keyword", "lockmarks"],
["keyword", "lockv"],
["keyword", "lockvar"],
["keyword", "lol"],
["keyword", "lolder"],
["keyword", "lop"],
["keyword", "lopen"],
["keyword", "lpf"],
["keyword", "lpfile"],
["keyword", "lp"],
["keyword", "lprevious"],
["keyword", "lr"],
["keyword", "lrewind"],
["keyword", "ls"],
["keyword", "lt"],
["keyword", "ltag"],
["keyword", "lu"],
["keyword", "lunmap"],
["keyword", "lv"],
["keyword", "lvimgrep"],
["keyword", "lvimgrepa"],
["keyword", "lvimgrepadd"],
["keyword", "lw"],
["keyword", "lwindow"],
["keyword", "mak"],
["keyword", "make"],
["keyword", "ma"],
["keyword", "mark"],
["keyword", "marks"],
["keyword", "mat"],
["keyword", "match"],
["keyword", "menut"],
["keyword", "menutranslate"],
["keyword", "mk"],
["keyword", "mkexrc"],
["keyword", "mks"],
["keyword", "mksession"],
["keyword", "mksp"],
["keyword", "mkspell"],
["keyword", "mkvie"],
["keyword", "mkview"],
["keyword", "mkv"],
["keyword", "mkvimrc"],
["keyword", "mod"],
["keyword", "mode"],
["keyword", "m"],
["keyword", "move"],
["keyword", "mzf"],
["keyword", "mzfile"],
["keyword", "mz"],
["keyword", "mzscheme"],
["keyword", "nbkey"],
["keyword", "new"],
["keyword", "n"],
["keyword", "next"],
["keyword", "N"],
["keyword", "Next"],
["keyword", "nmapc"],
["keyword", "nmapclear"],
["keyword", "noh"],
["keyword", "nohlsearch"],
["keyword", "norea"],
["keyword", "noreabbrev"],
["keyword", "nu"],
["keyword", "number"],
["keyword", "nun"],
["keyword", "nunmap"],
["keyword", "omapc"],
["keyword", "omapclear"],
["keyword", "on"],
["keyword", "only"],
["keyword", "o"],
["keyword", "open"],
["keyword", "opt"],
["keyword", "options"],
["keyword", "ou"],
["keyword", "ounmap"],
["keyword", "pc"],
["keyword", "pclose"],
["keyword", "ped"],
["keyword", "pedit"],
["keyword", "pe"],
["keyword", "perl"],
["keyword", "perld"],
["keyword", "perldo"],
["keyword", "po"],
["keyword", "pop"],
["keyword", "popu"],
["keyword", "popu"],
["keyword", "popup"],
["keyword", "pp"],
["keyword", "ppop"],
["keyword", "pre"],
["keyword", "preserve"],
["keyword", "prev"],
["keyword", "previous"],
["keyword", "p"],
["keyword", "print"],
["keyword", "P"],
["keyword", "Print"],
["keyword", "profd"],
["keyword", "profdel"],
["keyword", "prof"],
["keyword", "profile"],
["keyword", "promptf"],
["keyword", "promptfind"],
["keyword", "promptr"],
["keyword", "promptrepl"],
["keyword", "ps"],
["keyword", "psearch"],
["keyword", "pta"],
["keyword", "ptag"],
["keyword", "ptf"],
["keyword", "ptfirst"],
["keyword", "ptj"],
["keyword", "ptjump"],
["keyword", "ptl"],
["keyword", "ptlast"],
["keyword", "ptn"],
["keyword", "ptnext"],
["keyword", "ptN"],
["keyword", "ptNext"],
["keyword", "ptp"],
["keyword", "ptprevious"],
["keyword", "ptr"],
["keyword", "ptrewind"],
["keyword", "pts"],
["keyword", "ptselect"],
["keyword", "pu"],
["keyword", "put"],
["keyword", "pw"],
["keyword", "pwd"],
["keyword", "pyf"],
["keyword", "pyfile"],
["keyword", "py"],
["keyword", "python"],
["keyword", "qa"],
["keyword", "qall"],
["keyword", "q"],
["keyword", "quit"],
["keyword", "quita"],
["keyword", "quitall"],
["keyword", "r"],
["keyword", "read"],
["keyword", "rec"],
["keyword", "recover"],
["keyword", "redi"],
["keyword", "redir"],
["keyword", "red"],
["keyword", "redo"],
["keyword", "redr"],
["keyword", "redraw"],
["keyword", "redraws"],
["keyword", "redrawstatus"],
["keyword", "reg"],
["keyword", "registers"],
["keyword", "res"],
["keyword", "resize"],
["keyword", "ret"],
["keyword", "retab"],
["keyword", "retu"],
["keyword", "return"],
["keyword", "rew"],
["keyword", "rewind"],
["keyword", "ri"],
["keyword", "right"],
["keyword", "rightb"],
["keyword", "rightbelow"],
["keyword", "rub"],
["keyword", "ruby"],
["keyword", "rubyd"],
["keyword", "rubydo"],
["keyword", "rubyf"],
["keyword", "rubyfile"],
["keyword", "ru"],
["keyword", "runtime"],
["keyword", "rv"],
["keyword", "rviminfo"],
["keyword", "sal"],
["keyword", "sall"],
["keyword", "san"],
["keyword", "sandbox"],
["keyword", "sa"],
["keyword", "sargument"],
["keyword", "sav"],
["keyword", "saveas"],
["keyword", "sba"],
["keyword", "sball"],
["keyword", "sbf"],
["keyword", "sbfirst"],
["keyword", "sbl"],
["keyword", "sblast"],
["keyword", "sbm"],
["keyword", "sbmodified"],
["keyword", "sbn"],
["keyword", "sbnext"],
["keyword", "sbN"],
["keyword", "sbNext"],
["keyword", "sbp"],
["keyword", "sbprevious"],
["keyword", "sbr"],
["keyword", "sbrewind"],
["keyword", "sb"],
["keyword", "sbuffer"],
["keyword", "scripte"],
["keyword", "scriptencoding"],
["keyword", "scrip"],
["keyword", "scriptnames"],
["keyword", "se"],
["keyword", "set"],
["keyword", "setf"],
["keyword", "setfiletype"],
["keyword", "setg"],
["keyword", "setglobal"],
["keyword", "setl"],
["keyword", "setlocal"],
["keyword", "sf"],
["keyword", "sfind"],
["keyword", "sfir"],
["keyword", "sfirst"],
["keyword", "sh"],
["keyword", "shell"],
["keyword", "sign"],
["keyword", "sil"],
["keyword", "silent"],
["keyword", "sim"],
["keyword", "simalt"],
["keyword", "sla"],
["keyword", "slast"],
["keyword", "sl"],
["keyword", "sleep"],
["keyword", "sm"],
["keyword", "smagic"],
["keyword", "sm"],
["keyword", "smap"],
["keyword", "smapc"],
["keyword", "smapclear"],
["keyword", "sme"],
["keyword", "smenu"],
["keyword", "sn"],
["keyword", "snext"],
["keyword", "sN"],
["keyword", "sNext"],
["keyword", "sni"],
["keyword", "sniff"],
["keyword", "sno"],
["keyword", "snomagic"],
["keyword", "snor"],
["keyword", "snoremap"],
["keyword", "snoreme"],
["keyword", "snoremenu"],
["keyword", "sor"],
["keyword", "sort"],
["keyword", "so"],
["keyword", "source"],
["keyword", "spelld"],
["keyword", "spelldump"],
["keyword", "spe"],
["keyword", "spellgood"],
["keyword", "spelli"],
["keyword", "spellinfo"],
["keyword", "spellr"],
["keyword", "spellrepall"],
["keyword", "spellu"],
["keyword", "spellundo"],
["keyword", "spellw"],
["keyword", "spellwrong"],
["keyword", "sp"],
["keyword", "split"],
["keyword", "spr"],
["keyword", "sprevious"],
["keyword", "sre"],
["keyword", "srewind"],
["keyword", "sta"],
["keyword", "stag"],
["keyword", "startg"],
["keyword", "startgreplace"],
["keyword", "star"],
["keyword", "startinsert"],
["keyword", "startr"],
["keyword", "startreplace"],
["keyword", "stj"],
["keyword", "stjump"],
["keyword", "st"],
["keyword", "stop"],
["keyword", "stopi"],
["keyword", "stopinsert"],
["keyword", "sts"],
["keyword", "stselect"],
["keyword", "sun"],
["keyword", "sunhide"],
["keyword", "sunm"],
["keyword", "sunmap"],
["keyword", "sus"],
["keyword", "suspend"],
["keyword", "sv"],
["keyword", "sview"],
["keyword", "syncbind"],
["keyword", "t"],
["keyword", "tab"],
["keyword", "tabc"],
["keyword", "tabclose"],
["keyword", "tabd"],
["keyword", "tabdo"],
["keyword", "tabe"],
["keyword", "tabedit"],
["keyword", "tabf"],
["keyword", "tabfind"],
["keyword", "tabfir"],
["keyword", "tabfirst"],
["keyword", "tabl"],
["keyword", "tablast"],
["keyword", "tabm"],
["keyword", "tabmove"],
["keyword", "tabnew"],
["keyword", "tabn"],
["keyword", "tabnext"],
["keyword", "tabN"],
["keyword", "tabNext"],
["keyword", "tabo"],
["keyword", "tabonly"],
["keyword", "tabp"],
["keyword", "tabprevious"],
["keyword", "tabr"],
["keyword", "tabrewind"],
["keyword", "tabs"],
["keyword", "ta"],
["keyword", "tag"],
["keyword", "tags"],
["keyword", "tc"],
["keyword", "tcl"],
["keyword", "tcld"],
["keyword", "tcldo"],
["keyword", "tclf"],
["keyword", "tclfile"],
["keyword", "te"],
["keyword", "tearoff"],
["keyword", "tf"],
["keyword", "tfirst"],
["keyword", "th"],
["keyword", "throw"],
["keyword", "tj"],
["keyword", "tjump"],
["keyword", "tl"],
["keyword", "tlast"],
["keyword", "tm"],
["keyword", "tm"],
["keyword", "tmenu"],
["keyword", "tn"],
["keyword", "tnext"],
["keyword", "tN"],
["keyword", "tNext"],
["keyword", "to"],
["keyword", "topleft"],
["keyword", "tp"],
["keyword", "tprevious"],
["keyword", "tr"],
["keyword", "trewind"],
["keyword", "try"],
["keyword", "ts"],
["keyword", "tselect"],
["keyword", "tu"],
["keyword", "tu"],
["keyword", "tunmenu"],
["keyword", "una"],
["keyword", "unabbreviate"],
["keyword", "u"],
["keyword", "undo"],
["keyword", "undoj"],
["keyword", "undojoin"],
["keyword", "undol"],
["keyword", "undolist"],
["keyword", "unh"],
["keyword", "unhide"],
["keyword", "unlet"],
["keyword", "unlo"],
["keyword", "unlockvar"],
["keyword", "unm"],
["keyword", "unmap"],
["keyword", "up"],
["keyword", "update"],
["keyword", "verb"],
["keyword", "verbose"],
["keyword", "ve"],
["keyword", "version"],
["keyword", "vert"],
["keyword", "vertical"],
["keyword", "vie"],
["keyword", "view"],
["keyword", "vim"],
["keyword", "vimgrep"],
["keyword", "vimgrepa"],
["keyword", "vimgrepadd"],
["keyword", "vi"],
["keyword", "visual"],
["keyword", "viu"],
["keyword", "viusage"],
["keyword", "vmapc"],
["keyword", "vmapclear"],
["keyword", "vne"],
["keyword", "vnew"],
["keyword", "vs"],
["keyword", "vsplit"],
["keyword", "vu"],
["keyword", "vunmap"],
["keyword", "wa"],
["keyword", "wall"],
["keyword", "wh"],
["keyword", "while"],
["keyword", "winc"],
["keyword", "wincmd"],
["keyword", "windo"],
["keyword", "winp"],
["keyword", "winpos"],
["keyword", "win"],
["keyword", "winsize"],
["keyword", "wn"],
["keyword", "wnext"],
["keyword", "wN"],
["keyword", "wNext"],
["keyword", "wp"],
["keyword", "wprevious"],
["keyword", "wq"],
["keyword", "wqa"],
["keyword", "wqall"],
["keyword", "w"],
["keyword", "write"],
["keyword", "ws"],
["keyword", "wsverb"],
["keyword", "wv"],
["keyword", "wviminfo"],
["keyword", "X"],
["keyword", "xa"],
["keyword", "xall"],
["keyword", "x"],
["keyword", "xit"],
["keyword", "xm"],
["keyword", "xmap"],
["keyword", "xmapc"],
["keyword", "xmapclear"],
["keyword", "xme"],
["keyword", "xmenu"],
["keyword", "XMLent"],
["keyword", "XMLns"],
["keyword", "xn"],
["keyword", "xnoremap"],
["keyword", "xnoreme"],
["keyword", "xnoremenu"],
["keyword", "xu"],
["keyword", "xunmap"],
["keyword", "y"],
["keyword", "yank"]
]
----------------------------------------------------
Checks for keywords.
================================================
FILE: tests/languages/vim/number_feature.test
================================================
0xBadFace
42
3.14159
----------------------------------------------------
[
["number", "0xBadFace"],
["number", "42"],
["number", "3.14159"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/vim/operator_feature.test
================================================
|| &&
? * / %
+ +=
- -=
. .=
= == =~
==# =~# ==? =~?
! != !~
!=# !~# !=? !~?
< <=
<# <=# <=?
> >=
># >=# >? >=?
is isnot
----------------------------------------------------
[
["operator", "||"], ["operator", "&&"],
["operator", "?"], ["operator", "*"], ["operator", "/"], ["operator", "%"],
["operator", "+"], ["operator", "+="],
["operator", "-"], ["operator", "-="],
["operator", "."], ["operator", ".="],
["operator", "="], ["operator", "=="], ["operator", "=~"],
["operator", "==#"], ["operator", "=~#"], ["operator", "==?"], ["operator", "=~?"],
["operator", "!"], ["operator", "!="], ["operator", "!~"],
["operator", "!=#"], ["operator", "!~#"], ["operator", "!=?"], ["operator", "!~?"],
["operator", "<"], ["operator", "<="],
["operator", "<#"], ["operator", "<=#"], ["operator", ""], ["operator", "<=?"],
["operator", ">"], ["operator", ">="],
["operator", ">#"], ["operator", ">=#"], ["operator", ">?"], ["operator", ">=?"],
["operator", "is"], ["operator", "isnot"]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/vim/string_feature.test
================================================
""
"Fo\"ob'ar"
''
'\'
'Foo''bar'
----------------------------------------------------
[
["string", "\"\""],
["string", "\"Fo\\\"ob'ar\""],
["string", "''"],
["string", "'\\'"],
["string", "'Foo''bar'"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/visual-basic/boolean_feature.test
================================================
True
False
Nothing
----------------------------------------------------
[
["boolean", "True"],
["boolean", "False"],
["boolean", "Nothing"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/visual-basic/comment_feature.test
================================================
'
' Foo "bar"
‘
‘ Foobar
’
’ Foobar
REM
REM Foobar
' multi-line _
comment
----------------------------------------------------
[
["comment", ["'"]],
["comment", ["' Foo \"bar\""]],
["comment", ["‘"]],
["comment", ["‘ Foobar"]],
["comment", ["’"]],
["comment", ["’ Foobar"]],
["comment", [["keyword", "REM"]]],
["comment", [["keyword", "REM"], " Foobar"]],
["comment", ["' multi-line _\r\n comment"]]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/visual-basic/date_feature.test
================================================
# 8/23/1970 3:45:39AM #
#8/23/1970 #
# 3:45:39AM #
# 3:45:39#
# 13:45:39 #
# 1AM #
# 13:45:39PM #
----------------------------------------------------
[
["date", "# 8/23/1970 3:45:39AM #"],
["date", "#8/23/1970 #"],
["date", "# 3:45:39AM #"],
["date", "# 3:45:39#"],
["date", "# 13:45:39 #"],
["date", "# 1AM #"],
["date", "# 13:45:39PM #"]
]
----------------------------------------------------
Checks for dates and times.
================================================
FILE: tests/languages/visual-basic/directive_feature.test
================================================
#Const DebugCode = True
#If DebugCode Then
#End If
#ExternalSource("c:\wwwroot\inetpub\test.aspx", 30)
#End ExternalSource
#ExternalChecksum("c:\wwwroot\inetpub\test.aspx", _
"{12345678-1234-1234-1234-123456789abc}", _
"1a2b3c4e5f617239a49b9a9c0391849d34950f923fab9484")
----------------------------------------------------
[
["directive", "#Const DebugCode = True"],
["directive", "#If DebugCode Then"],
["directive", "#End If"],
["directive", "#ExternalSource(\"c:\\wwwroot\\inetpub\\test.aspx\", 30)"],
["directive", "#End ExternalSource"],
["directive", "#ExternalChecksum(\"c:\\wwwroot\\inetpub\\test.aspx\", _\r\n \"{12345678-1234-1234-1234-123456789abc}\", _\r\n \"1a2b3c4e5f617239a49b9a9c0391849d34950f923fab9484\")"]
]
----------------------------------------------------
Checks for preprocessing directives.
================================================
FILE: tests/languages/visual-basic/keyword_feature.test
================================================
AddHandler
AddressOf
Alias
And
AndAlso
As
Boolean
ByRef
Byte
ByVal
Call
Case
Catch
CBool
CByte
CChar
CDate
CDbl
CDec
Char
CInt
Class
CLng
CObj
Const
Continue
CSByte
CShort
CSng
CStr
CType
CUInt
CULng
CUShort
Currency
Date
Decimal
Declare
Default
Delegate
Dim
DirectCast
Do
Double
Each
Else
ElseIf
End
EndIf
Enum
Erase
Error
Event
Exit
Finally
For
Friend
Function
Get
GetType
GetXMLNamespace
Global
GoSub
GoTo
Handles
If
Implements
Imports
In
Inherits
Integer
Interface
Is
IsNot
Let
Lib
Like
Long
Loop
Me
Mod
Module
MustInherit
MustOverride
MyBase
MyClass
Namespace
Narrowing
New
Next
Not
NotInheritable
NotOverridable
Object
Of
On
Operator
Option
Optional
Or
OrElse
Out
Overloads
Overridable
Overrides
ParamArray
Partial
Private
Property
Protected
Public
RaiseEvent
ReadOnly
ReDim
RemoveHandler
Resume
Return
SByte
Select
Set
Shadows
Shared
short
Single
Static
Step
Stop
String
Structure
Sub
SyncLock
Then
Throw
To
Try
TryCast
Type
TypeOf
UInteger
ULong
UShort
Using
Variant
Wend
When
While
Widening
With
WithEvents
WriteOnly
Until
Xor
----------------------------------------------------
[
["keyword", "AddHandler"],
["keyword", "AddressOf"],
["keyword", "Alias"],
["keyword", "And"],
["keyword", "AndAlso"],
["keyword", "As"],
["keyword", "Boolean"],
["keyword", "ByRef"],
["keyword", "Byte"],
["keyword", "ByVal"],
["keyword", "Call"],
["keyword", "Case"],
["keyword", "Catch"],
["keyword", "CBool"],
["keyword", "CByte"],
["keyword", "CChar"],
["keyword", "CDate"],
["keyword", "CDbl"],
["keyword", "CDec"],
["keyword", "Char"],
["keyword", "CInt"],
["keyword", "Class"],
["keyword", "CLng"],
["keyword", "CObj"],
["keyword", "Const"],
["keyword", "Continue"],
["keyword", "CSByte"],
["keyword", "CShort"],
["keyword", "CSng"],
["keyword", "CStr"],
["keyword", "CType"],
["keyword", "CUInt"],
["keyword", "CULng"],
["keyword", "CUShort"],
["keyword", "Currency"],
["keyword", "Date"],
["keyword", "Decimal"],
["keyword", "Declare"],
["keyword", "Default"],
["keyword", "Delegate"],
["keyword", "Dim"],
["keyword", "DirectCast"],
["keyword", "Do"],
["keyword", "Double"],
["keyword", "Each"],
["keyword", "Else"],
["keyword", "ElseIf"],
["keyword", "End"],
["keyword", "EndIf"],
["keyword", "Enum"],
["keyword", "Erase"],
["keyword", "Error"],
["keyword", "Event"],
["keyword", "Exit"],
["keyword", "Finally"],
["keyword", "For"],
["keyword", "Friend"],
["keyword", "Function"],
["keyword", "Get"],
["keyword", "GetType"],
["keyword", "GetXMLNamespace"],
["keyword", "Global"],
["keyword", "GoSub"],
["keyword", "GoTo"],
["keyword", "Handles"],
["keyword", "If"],
["keyword", "Implements"],
["keyword", "Imports"],
["keyword", "In"],
["keyword", "Inherits"],
["keyword", "Integer"],
["keyword", "Interface"],
["keyword", "Is"],
["keyword", "IsNot"],
["keyword", "Let"],
["keyword", "Lib"],
["keyword", "Like"],
["keyword", "Long"],
["keyword", "Loop"],
["keyword", "Me"],
["keyword", "Mod"],
["keyword", "Module"],
["keyword", "MustInherit"],
["keyword", "MustOverride"],
["keyword", "MyBase"],
["keyword", "MyClass"],
["keyword", "Namespace"],
["keyword", "Narrowing"],
["keyword", "New"],
["keyword", "Next"],
["keyword", "Not"],
["keyword", "NotInheritable"],
["keyword", "NotOverridable"],
["keyword", "Object"],
["keyword", "Of"],
["keyword", "On"],
["keyword", "Operator"],
["keyword", "Option"],
["keyword", "Optional"],
["keyword", "Or"],
["keyword", "OrElse"],
["keyword", "Out"],
["keyword", "Overloads"],
["keyword", "Overridable"],
["keyword", "Overrides"],
["keyword", "ParamArray"],
["keyword", "Partial"],
["keyword", "Private"],
["keyword", "Property"],
["keyword", "Protected"],
["keyword", "Public"],
["keyword", "RaiseEvent"],
["keyword", "ReadOnly"],
["keyword", "ReDim"],
["keyword", "RemoveHandler"],
["keyword", "Resume"],
["keyword", "Return"],
["keyword", "SByte"],
["keyword", "Select"],
["keyword", "Set"],
["keyword", "Shadows"],
["keyword", "Shared"],
["keyword", "short"],
["keyword", "Single"],
["keyword", "Static"],
["keyword", "Step"],
["keyword", "Stop"],
["keyword", "String"],
["keyword", "Structure"],
["keyword", "Sub"],
["keyword", "SyncLock"],
["keyword", "Then"],
["keyword", "Throw"],
["keyword", "To"],
["keyword", "Try"],
["keyword", "TryCast"],
["keyword", "Type"],
["keyword", "TypeOf"],
["keyword", "UInteger"],
["keyword", "ULong"],
["keyword", "UShort"],
["keyword", "Using"],
["keyword", "Variant"],
["keyword", "Wend"],
["keyword", "When"],
["keyword", "While"],
["keyword", "Widening"],
["keyword", "With"],
["keyword", "WithEvents"],
["keyword", "WriteOnly"],
["keyword", "Until"],
["keyword", "Xor"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/visual-basic/number_feature.test
================================================
42
42S
42US
&O157I
&O157UI
&HBADFACE42L
&HBADFACE42UL
4F
0.4
3.1415R
.24
4E7D
12.87E-8
.369E+14
----------------------------------------------------
[
["number", "42"],
["number", "42S"],
["number", "42US"],
["number", "&O157I"],
["number", "&O157UI"],
["number", "&HBADFACE42L"],
["number", "&HBADFACE42UL"],
["number", "4F"],
["number", "0.4"],
["number", "3.1415R"],
["number", ".24"],
["number", "4E7D"],
["number", "12.87E-8"],
["number", ".369E+14"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/visual-basic/operator_feature.test
================================================
+ -
* /
\ ^
< = >
& # @
$ % !
Sub Print( _
Param1 As Integer, _
Param2 As Integer )
----------------------------------------------------
[
["operator", "+"], ["operator", "-"],
["operator", "*"], ["operator", "/"],
["operator", "\\"], ["operator", "^"],
["operator", "<"], ["operator", "="], ["operator", ">"],
["operator", "&"], ["operator", "#"], ["operator", "@"],
["operator", "$"], ["operator", "%"], ["operator", "!"],
["keyword", "Sub"],
" Print",
["punctuation", "("],
["operator", "_"],
"\r\n Param1 ",
["keyword", "As"],
["keyword", "Integer"],
["punctuation", ","],
["operator", "_"],
"\r\n Param2 ",
["keyword", "As"],
["keyword", "Integer"],
["punctuation", ")"]
]
----------------------------------------------------
Checks for operators and type characters.
================================================
FILE: tests/languages/visual-basic/string_feature.test
================================================
""
"Foobar"
"Foo""bar"
“”
“Foo
bar”
“Foo""bar”
““
””
”“
“"
"Foo”“ba
r"
"a"c
$"Foobar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"Foobar\""],
["string", "\"Foo\"\"bar\""],
["string", "“”"],
["string", "“Foo\r\nbar”"],
["string", "“Foo\"\"bar”"],
["string", "““"],
["string", "””"],
["string", "”“"],
["string", "“\""],
["string", "\"Foo”“ba\r\nr\""],
["string", "\"a\"c"],
["string", "$\"Foobar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/warpscript/boolean_feature.test
================================================
false
true
F
T
----------------------------------------------------
[
["boolean", "false"],
["boolean", "true"],
["boolean", "F"],
["boolean", "T"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/warpscript/comment_feature.test
================================================
# Python style comments, starting with a '#' and extending to the end of the line
// Java style comments, extending to the end of the line after the '//'
/*
C style block comments, possibly spanning multiple lines
*/
----------------------------------------------------
[
["comment", "# Python style comments, starting with a '#' and extending to the end of the line"],
["comment", "// Java style comments, extending to the end of the line after the '//'"],
["comment", "/*\r\n C style block comments, possibly spanning multiple lines\r\n*/"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/warpscript/keyword_feature.test
================================================
BREAK
CHECKMACRO
CONTINUE
CUDF
DEFINED
DEFINEDMACRO
EVAL
FAIL
FOR
FOREACH
FORSTEP
IFT
IFTE
MSGFAIL
NRETURN
RETHROW
RETURN
SWITCH
TRY
UDF
UNTIL
WHILE
----------------------------------------------------
[
["keyword", "BREAK"],
["keyword", "CHECKMACRO"],
["keyword", "CONTINUE"],
["keyword", "CUDF"],
["keyword", "DEFINED"],
["keyword", "DEFINEDMACRO"],
["keyword", "EVAL"],
["keyword", "FAIL"],
["keyword", "FOR"],
["keyword", "FOREACH"],
["keyword", "FORSTEP"],
["keyword", "IFT"],
["keyword", "IFTE"],
["keyword", "MSGFAIL"],
["keyword", "NRETURN"],
["keyword", "RETHROW"],
["keyword", "RETURN"],
["keyword", "SWITCH"],
["keyword", "TRY"],
["keyword", "UDF"],
["keyword", "UNTIL"],
["keyword", "WHILE"]
]
================================================
FILE: tests/languages/warpscript/macro_feature.test
================================================
@foo
----------------------------------------------------
[
["macro", "@foo"]
]
================================================
FILE: tests/languages/warpscript/number_feature.test
================================================
123
-123
5e4
5e-4
123.546
123.546E-5
0xFFF
0b10101
NaN
Infinity
-Infinity
----------------------------------------------------
[
["number", "123"],
["number", "-123"],
["number", "5e4"],
["number", "5e-4"],
["number", "123.546"],
["number", "123.546E-5"],
["number", "0xFFF"],
["number", "0b10101"],
["number", "NaN"],
["number", "Infinity"],
["number", "-Infinity"]
]
----------------------------------------------------
Checks for numbers.
================================================
FILE: tests/languages/warpscript/operator_feature.test
================================================
!= < > ~= <= == >=
% * + - / **
! && AND OR NOT ||
& ^ | >>> ~ << >>
+!
----------------------------------------------------
[
["operator", "!="],
["operator", "<"],
["operator", ">"],
["operator", "~="],
["operator", "<="],
["operator", "=="],
["operator", ">="],
["operator", "%"],
["operator", "*"],
["operator", "+"],
["operator", "-"],
["operator", "/"],
["operator", "**"],
["operator", "!"],
["operator", "&&"],
["operator", "AND"],
["operator", "OR"],
["operator", "NOT"],
["operator", "||"],
["operator", "&"],
["operator", "^"],
["operator", "|"],
["operator", ">>>"],
["operator", "~"],
["operator", "<<"],
["operator", ">>"],
["operator", "+!"]
]
----------------------------------------------------
Checks for operators.
================================================
FILE: tests/languages/warpscript/punctuation_feature.test
================================================
<% %>
( ) [ ] { }
----------------------------------------------------
[
["punctuation", "<%"],
["punctuation", "%>"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"]
]
----------------------------------------------------
Checks for punctuation.
================================================
FILE: tests/languages/warpscript/string_feature.test
================================================
'Caf%C3%A9'
"foo"
<'
foo
'>
----------------------------------------------------
[
["string", "'Caf%C3%A9'"],
["string", "\"foo\""],
["string", "<'\r\n foo\r\n'>"]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/warpscript/variable_feature.test
================================================
$foo
----------------------------------------------------
[
["variable", "$foo"]
]
================================================
FILE: tests/languages/wasm/comment_feature.test
================================================
;;
;; Foobar
;; (; foobar ;)
(;;)
(;Foobar;)
(;Foo ;;bar
baz;)
----------------------------------------------------
[
["comment", ";;"],
["comment", ";; Foobar"],
["comment", ";; (; foobar ;)"],
["comment", "(;;)"],
["comment", "(;Foobar;)"],
["comment", "(;Foo ;;bar\r\nbaz;)"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/wasm/keyword_feature.test
================================================
align=
offset=
f32
f64
i32
i64
i32.load
i64.load
f32.load
f64.load
i32.load8_s
i32.load8_u
i32.load16_s
i32.load16_u
i64.load8_s
i64.load8_u
i64.load16_s
i64.load16_u
i64.load32_s
i64.load32_u
i32.store
i64.store
f32.store
f64.store
i32.store8
i32.store16
i64.store8
i64.store16
i64.store32
i32.const
i64.const
f32.const
f64.const
i32.clz
i32.ctz
i32.popcnt
i32.add
i32.sub
i32.mul
i32.div_s
i32.div_u
i32.rem_s
i32.rem_u
i32.and
i32.or
i32.xor
i32.shl
i32.shr_s
i32.shr_u
i32.rotl
i32.rotr
i64.clz
i64.ctz
i64.popcnt
i64.add
i64.sub
i64.mul
i64.div_s
i64.div_u
i64.rem_s
i64.rem_u
i64.and
i64.or
i64.xor
i64.shl
i64.shr_s
i64.shr_u
i64.rotl
i64.rotr
f32.abs
f32.neg
f32.ceil
f32.floor
f32.trunc
f32.nearest
f32.sqrt
f32.add
f32.sub
f32.mul
f32.div
f32.min
f32.max
f32.copysign
f64.abs
f64.neg
f64.ceil
f64.floor
f64.trunc
f64.nearest
f64.sqrt
f64.add
f64.sub
f64.mul
f64.div
f64.min
f64.max
f64.copysign
i32.eqz
i32.eq
i32.ne
i32.lt_s
i32.lt_u
i32.gt_s
i32.gt_u
i32.le_s
i32.le_u
i32.ge_s
i32.ge_u
i64.eqz
i64.eq
i64.ne
i64.lt_s
i64.lt_u
i64.gt_s
i64.gt_u
i64.le_s
i64.le_u
i64.ge_s
i64.ge_u
f32.eq
f32.ne
f32.lt
f32.gt
f32.le
f32.ge
f64.eq
f64.ne
f64.lt
f64.gt
f64.le
f64.ge
i32.wrap/i64
i32.trunc_s/f32
i32.trunc_u/f32
i32.trunc_s/f64
i32.trunc_u/f64
i64.extend_s/i32
i64.extend_u/i32
i64.trunc_s/f32
i64.trunc_u/f32
i64.trunc_s/f64
i64.trunc_u/f64
f32.convert_s/i32
f32.convert_u/i32
f32.convert_s/i64
f32.convert_u/i64
f32.demote/f64
f64.convert_s/i32
f64.convert_u/i32
f64.convert_s/i64
f64.convert_u/i64
f64.promote/f32
i32.reinterpret/f32
i64.reinterpret/f64
f32.reinterpret/i32
f64.reinterpret/i64
memory.size
memory.grow
anyfunc
block
br
br_if
br_table
call
call_indirect
data
drop
elem
else
end
export
func
get_global
get_local
global
if
import
local
loop
memory
module
mut
nop
offset
param
result
return
select
set_global
set_local
start
table
tee_local
then
type
unreachable
----------------------------------------------------
[
["keyword", ["align", ["operator", "="]]],
["keyword", ["offset", ["operator", "="]]],
["keyword", ["f32"]],
["keyword", ["f64"]],
["keyword", ["i32"]],
["keyword", ["i64"]],
["keyword", ["i32", ["punctuation", "."], "load"]],
["keyword", ["i64", ["punctuation", "."], "load"]],
["keyword", ["f32", ["punctuation", "."], "load"]],
["keyword", ["f64", ["punctuation", "."], "load"]],
["keyword", ["i32", ["punctuation", "."], "load8_s"]],
["keyword", ["i32", ["punctuation", "."], "load8_u"]],
["keyword", ["i32", ["punctuation", "."], "load16_s"]],
["keyword", ["i32", ["punctuation", "."], "load16_u"]],
["keyword", ["i64", ["punctuation", "."], "load8_s"]],
["keyword", ["i64", ["punctuation", "."], "load8_u"]],
["keyword", ["i64", ["punctuation", "."], "load16_s"]],
["keyword", ["i64", ["punctuation", "."], "load16_u"]],
["keyword", ["i64", ["punctuation", "."], "load32_s"]],
["keyword", ["i64", ["punctuation", "."], "load32_u"]],
["keyword", ["i32", ["punctuation", "."], "store"]],
["keyword", ["i64", ["punctuation", "."], "store"]],
["keyword", ["f32", ["punctuation", "."], "store"]],
["keyword", ["f64", ["punctuation", "."], "store"]],
["keyword", ["i32", ["punctuation", "."], "store8"]],
["keyword", ["i32", ["punctuation", "."], "store16"]],
["keyword", ["i64", ["punctuation", "."], "store8"]],
["keyword", ["i64", ["punctuation", "."], "store16"]],
["keyword", ["i64", ["punctuation", "."], "store32"]],
["keyword", ["i32", ["punctuation", "."], "const"]],
["keyword", ["i64", ["punctuation", "."], "const"]],
["keyword", ["f32", ["punctuation", "."], "const"]],
["keyword", ["f64", ["punctuation", "."], "const"]],
["keyword", ["i32", ["punctuation", "."], "clz"]],
["keyword", ["i32", ["punctuation", "."], "ctz"]],
["keyword", ["i32", ["punctuation", "."], "popcnt"]],
["keyword", ["i32", ["punctuation", "."], "add"]],
["keyword", ["i32", ["punctuation", "."], "sub"]],
["keyword", ["i32", ["punctuation", "."], "mul"]],
["keyword", ["i32", ["punctuation", "."], "div_s"]],
["keyword", ["i32", ["punctuation", "."], "div_u"]],
["keyword", ["i32", ["punctuation", "."], "rem_s"]],
["keyword", ["i32", ["punctuation", "."], "rem_u"]],
["keyword", ["i32", ["punctuation", "."], "and"]],
["keyword", ["i32", ["punctuation", "."], "or"]],
["keyword", ["i32", ["punctuation", "."], "xor"]],
["keyword", ["i32", ["punctuation", "."], "shl"]],
["keyword", ["i32", ["punctuation", "."], "shr_s"]],
["keyword", ["i32", ["punctuation", "."], "shr_u"]],
["keyword", ["i32", ["punctuation", "."], "rotl"]],
["keyword", ["i32", ["punctuation", "."], "rotr"]],
["keyword", ["i64", ["punctuation", "."], "clz"]],
["keyword", ["i64", ["punctuation", "."], "ctz"]],
["keyword", ["i64", ["punctuation", "."], "popcnt"]],
["keyword", ["i64", ["punctuation", "."], "add"]],
["keyword", ["i64", ["punctuation", "."], "sub"]],
["keyword", ["i64", ["punctuation", "."], "mul"]],
["keyword", ["i64", ["punctuation", "."], "div_s"]],
["keyword", ["i64", ["punctuation", "."], "div_u"]],
["keyword", ["i64", ["punctuation", "."], "rem_s"]],
["keyword", ["i64", ["punctuation", "."], "rem_u"]],
["keyword", ["i64", ["punctuation", "."], "and"]],
["keyword", ["i64", ["punctuation", "."], "or"]],
["keyword", ["i64", ["punctuation", "."], "xor"]],
["keyword", ["i64", ["punctuation", "."], "shl"]],
["keyword", ["i64", ["punctuation", "."], "shr_s"]],
["keyword", ["i64", ["punctuation", "."], "shr_u"]],
["keyword", ["i64", ["punctuation", "."], "rotl"]],
["keyword", ["i64", ["punctuation", "."], "rotr"]],
["keyword", ["f32", ["punctuation", "."], "abs"]],
["keyword", ["f32", ["punctuation", "."], "neg"]],
["keyword", ["f32", ["punctuation", "."], "ceil"]],
["keyword", ["f32", ["punctuation", "."], "floor"]],
["keyword", ["f32", ["punctuation", "."], "trunc"]],
["keyword", ["f32", ["punctuation", "."], "nearest"]],
["keyword", ["f32", ["punctuation", "."], "sqrt"]],
["keyword", ["f32", ["punctuation", "."], "add"]],
["keyword", ["f32", ["punctuation", "."], "sub"]],
["keyword", ["f32", ["punctuation", "."], "mul"]],
["keyword", ["f32", ["punctuation", "."], "div"]],
["keyword", ["f32", ["punctuation", "."], "min"]],
["keyword", ["f32", ["punctuation", "."], "max"]],
["keyword", ["f32", ["punctuation", "."], "copysign"]],
["keyword", ["f64", ["punctuation", "."], "abs"]],
["keyword", ["f64", ["punctuation", "."], "neg"]],
["keyword", ["f64", ["punctuation", "."], "ceil"]],
["keyword", ["f64", ["punctuation", "."], "floor"]],
["keyword", ["f64", ["punctuation", "."], "trunc"]],
["keyword", ["f64", ["punctuation", "."], "nearest"]],
["keyword", ["f64", ["punctuation", "."], "sqrt"]],
["keyword", ["f64", ["punctuation", "."], "add"]],
["keyword", ["f64", ["punctuation", "."], "sub"]],
["keyword", ["f64", ["punctuation", "."], "mul"]],
["keyword", ["f64", ["punctuation", "."], "div"]],
["keyword", ["f64", ["punctuation", "."], "min"]],
["keyword", ["f64", ["punctuation", "."], "max"]],
["keyword", ["f64", ["punctuation", "."], "copysign"]],
["keyword", ["i32", ["punctuation", "."], "eqz"]],
["keyword", ["i32", ["punctuation", "."], "eq"]],
["keyword", ["i32", ["punctuation", "."], "ne"]],
["keyword", ["i32", ["punctuation", "."], "lt_s"]],
["keyword", ["i32", ["punctuation", "."], "lt_u"]],
["keyword", ["i32", ["punctuation", "."], "gt_s"]],
["keyword", ["i32", ["punctuation", "."], "gt_u"]],
["keyword", ["i32", ["punctuation", "."], "le_s"]],
["keyword", ["i32", ["punctuation", "."], "le_u"]],
["keyword", ["i32", ["punctuation", "."], "ge_s"]],
["keyword", ["i32", ["punctuation", "."], "ge_u"]],
["keyword", ["i64", ["punctuation", "."], "eqz"]],
["keyword", ["i64", ["punctuation", "."], "eq"]],
["keyword", ["i64", ["punctuation", "."], "ne"]],
["keyword", ["i64", ["punctuation", "."], "lt_s"]],
["keyword", ["i64", ["punctuation", "."], "lt_u"]],
["keyword", ["i64", ["punctuation", "."], "gt_s"]],
["keyword", ["i64", ["punctuation", "."], "gt_u"]],
["keyword", ["i64", ["punctuation", "."], "le_s"]],
["keyword", ["i64", ["punctuation", "."], "le_u"]],
["keyword", ["i64", ["punctuation", "."], "ge_s"]],
["keyword", ["i64", ["punctuation", "."], "ge_u"]],
["keyword", ["f32", ["punctuation", "."], "eq"]],
["keyword", ["f32", ["punctuation", "."], "ne"]],
["keyword", ["f32", ["punctuation", "."], "lt"]],
["keyword", ["f32", ["punctuation", "."], "gt"]],
["keyword", ["f32", ["punctuation", "."], "le"]],
["keyword", ["f32", ["punctuation", "."], "ge"]],
["keyword", ["f64", ["punctuation", "."], "eq"]],
["keyword", ["f64", ["punctuation", "."], "ne"]],
["keyword", ["f64", ["punctuation", "."], "lt"]],
["keyword", ["f64", ["punctuation", "."], "gt"]],
["keyword", ["f64", ["punctuation", "."], "le"]],
["keyword", ["f64", ["punctuation", "."], "ge"]],
["keyword", ["i32", ["punctuation", "."], "wrap/i64"]],
["keyword", ["i32", ["punctuation", "."], "trunc_s/f32"]],
["keyword", ["i32", ["punctuation", "."], "trunc_u/f32"]],
["keyword", ["i32", ["punctuation", "."], "trunc_s/f64"]],
["keyword", ["i32", ["punctuation", "."], "trunc_u/f64"]],
["keyword", ["i64", ["punctuation", "."], "extend_s/i32"]],
["keyword", ["i64", ["punctuation", "."], "extend_u/i32"]],
["keyword", ["i64", ["punctuation", "."], "trunc_s/f32"]],
["keyword", ["i64", ["punctuation", "."], "trunc_u/f32"]],
["keyword", ["i64", ["punctuation", "."], "trunc_s/f64"]],
["keyword", ["i64", ["punctuation", "."], "trunc_u/f64"]],
["keyword", ["f32", ["punctuation", "."], "convert_s/i32"]],
["keyword", ["f32", ["punctuation", "."], "convert_u/i32"]],
["keyword", ["f32", ["punctuation", "."], "convert_s/i64"]],
["keyword", ["f32", ["punctuation", "."], "convert_u/i64"]],
["keyword", ["f32", ["punctuation", "."], "demote/f64"]],
["keyword", ["f64", ["punctuation", "."], "convert_s/i32"]],
["keyword", ["f64", ["punctuation", "."], "convert_u/i32"]],
["keyword", ["f64", ["punctuation", "."], "convert_s/i64"]],
["keyword", ["f64", ["punctuation", "."], "convert_u/i64"]],
["keyword", ["f64", ["punctuation", "."], "promote/f32"]],
["keyword", ["i32", ["punctuation", "."], "reinterpret/f32"]],
["keyword", ["i64", ["punctuation", "."], "reinterpret/f64"]],
["keyword", ["f32", ["punctuation", "."], "reinterpret/i32"]],
["keyword", ["f64", ["punctuation", "."], "reinterpret/i64"]],
["keyword", ["memory", ["punctuation", "."], "size"]],
["keyword", ["memory", ["punctuation", "."], "grow"]],
["keyword", "anyfunc"],
["keyword", "block"],
["keyword", "br"],
["keyword", "br_if"],
["keyword", "br_table"],
["keyword", "call"],
["keyword", "call_indirect"],
["keyword", "data"],
["keyword", "drop"],
["keyword", "elem"],
["keyword", "else"],
["keyword", "end"],
["keyword", "export"],
["keyword", "func"],
["keyword", "get_global"],
["keyword", "get_local"],
["keyword", "global"],
["keyword", "if"],
["keyword", "import"],
["keyword", "local"],
["keyword", "loop"],
["keyword", "memory"],
["keyword", "module"],
["keyword", "mut"],
["keyword", "nop"],
["keyword", "offset"],
["keyword", "param"],
["keyword", "result"],
["keyword", "return"],
["keyword", "select"],
["keyword", "set_global"],
["keyword", "set_local"],
["keyword", "start"],
["keyword", "table"],
["keyword", "tee_local"],
["keyword", "then"],
["keyword", "type"],
["keyword", "unreachable"]
]
----------------------------------------------------
Checks for all keywords.
================================================
FILE: tests/languages/wasm/number_feature.test
================================================
0
42_147
+42
+4_2
-3.1415
-3.1_41_5
4e2
4_7e2
-7E+8
-7E+1_8
+8.004e-12
+8.0_04e-12
0xBadFace
0xB_adF_a_c_e
-0x4E.F8d
-0x4_E.F8_d
+0xff
0xefp4
0xe_fp4_2
+0x5CP+12
+0x5_CP+12
-0xef.efp-7
-0xef_14.00_0_Ap-1_7
inf
nan
nan:0xF_4
----------------------------------------------------
[
["number", "0"],
["number", "42_147"],
["number", "+42"],
["number", "+4_2"],
["number", "-3.1415"],
["number", "-3.1_41_5"],
["number", "4e2"],
["number", "4_7e2"],
["number", "-7E+8"],
["number", "-7E+1_8"],
["number", "+8.004e-12"],
["number", "+8.0_04e-12"],
["number", "0xBadFace"],
["number", "0xB_adF_a_c_e"],
["number", "-0x4E.F8d"],
["number", "-0x4_E.F8_d"],
["number", "+0xff"],
["number", "0xefp4"],
["number", "0xe_fp4_2"],
["number", "+0x5CP+12"],
["number", "+0x5_CP+12"],
["number", "-0xef.efp-7"],
["number", "-0xef_14.00_0_Ap-1_7"],
["number", "inf"],
["number", "nan"],
["number", "nan:0xF_4"]
]
----------------------------------------------------
Checks for decimal and hexadecimal numbers.
================================================
FILE: tests/languages/wasm/string_feature.test
================================================
""
"Foo\"\\bar"
"\t\n\r\"\'\\\u{004e}\u{0_0_4_e}"
"foo
bar"
";; foo"
"(; foo bar ;)"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"Foo\\\"\\\\bar\""],
["string", "\"\\t\\n\\r\\\"\\'\\\\\\u{004e}\\u{0_0_4_e}\""],
["string", "\"foo\r\nbar\""],
["string", "\";; foo\""],
["string", "\"(; foo bar ;)\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/wasm/variable_feature.test
================================================
$Foo
$foo_42!
$$
$!#$%&'*+-./:<=>?@\^_`|~
----------------------------------------------------
[
["variable", "$Foo"],
["variable", "$foo_42!"],
["variable", "$$"],
["variable", "$!#$%&'*+-./:<=>?@\\^_`|~"]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/web-idl/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
================================================
FILE: tests/languages/web-idl/builtin_feature.test
================================================
ArrayBuffer
BigInt64Array
BigUint64Array
ByteString
DOMString
DataView
Float32Array
Float64Array
FrozenArray
Int16Array
Int32Array
Int8Array
ObservableArray
Promise
USVString
Uint16Array
Uint32Array
Uint8Array
Uint8ClampedArray
----------------------------------------------------
[
["builtin", "ArrayBuffer"],
["builtin", "BigInt64Array"],
["builtin", "BigUint64Array"],
["builtin", "ByteString"],
["builtin", "DOMString"],
["builtin", "DataView"],
["builtin", "Float32Array"],
["builtin", "Float64Array"],
["builtin", "FrozenArray"],
["builtin", "Int16Array"],
["builtin", "Int32Array"],
["builtin", "Int8Array"],
["builtin", "ObservableArray"],
["builtin", "Promise"],
["builtin", "USVString"],
["builtin", "Uint16Array"],
["builtin", "Uint32Array"],
["builtin", "Uint8Array"],
["builtin", "Uint8ClampedArray"]
]
================================================
FILE: tests/languages/web-idl/class-name_feature.test
================================================
// names
interface interface_identifier { /* interface_members... */ };
partial interface interface_identifier { /* interface_members... */ };
dictionary dictionary_identifier { /* dictionary_members... */ };
partial dictionary dictionary_identifier { /* dictionary_members... */ };
enum enumeration_identifier { "enum", "values" /* , ... */ };
callback callback_identifier = return_type (/* arguments... */);
callback interface callback_interface_identifier { /* interface_members... */ };
// interfaces
interface interface_identifier {
return_type identifier([extended_attributes] type identifier, [extended_attributes] type identifier);
};
interface interface_identifier {
return_type identifier(type... identifier);
return_type identifier(type identifier, type... identifier);
};
interface SolidColor : Paint {
constructor(double radius);
attribute double red;
readonly attribute unsigned long width;
undefined drawText(double x, double y, DOMString text);
getter DOMString (DOMString keyName);
getter DOMString foo(DOMString keyName);
boolean hasAddressForName(USVString name, optional LookupOptions options = {});
const unsigned long BIT_MASK = 0x0000fc00;
iterable
;
};
// dictionary
dictionary identifier {
type identifier;
};
dictionary identifier {
type identifier = "value";
};
dictionary identifier {
required type identifier;
};
dictionary B : A {
long b;
long a;
};
// callback
callback AsyncOperationCallback = undefined (DOMString status);
// enum
enum MealType { "rice", "noodles", "other" };
// typedef
typedef sequence Points;
// includes and implements
Foo includes Bar;
Foo implements Bar;
----------------------------------------------------
[
["comment", "// names"],
["keyword", "interface"],
["class-name", "interface_identifier"],
["punctuation", "{"],
["comment", "/* interface_members... */"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "partial"],
["keyword", "interface"],
["class-name", "interface_identifier"],
["punctuation", "{"],
["comment", "/* interface_members... */"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "dictionary"],
["class-name", "dictionary_identifier"],
["punctuation", "{"],
["comment", "/* dictionary_members... */"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "partial"],
["keyword", "dictionary"],
["class-name", "dictionary_identifier"],
["punctuation", "{"],
["comment", "/* dictionary_members... */"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "enum"],
["class-name", "enumeration_identifier"],
["punctuation", "{"],
["string", "\"enum\""],
["punctuation", ","],
["string", "\"values\""],
["comment", "/* , ... */"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "callback"],
["class-name", "callback_identifier"],
["operator", "="],
["class-name", ["return_type"]],
["punctuation", "("],
["comment", "/* arguments... */"],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "callback"],
["keyword", "interface"],
["class-name", "callback_interface_identifier"],
["punctuation", "{"],
["comment", "/* interface_members... */"],
["punctuation", "}"],
["punctuation", ";"],
["comment", "// interfaces"],
["keyword", "interface"],
["class-name", "interface_identifier"],
["punctuation", "{"],
["class-name", ["return_type"]],
" identifier",
["punctuation", "("],
["punctuation", "["],
"extended_attributes",
["punctuation", "]"],
["class-name", ["type"]],
" identifier",
["punctuation", ","],
["punctuation", "["],
"extended_attributes",
["punctuation", "]"],
["class-name", ["type"]],
" identifier",
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "interface"],
["class-name", "interface_identifier"],
["punctuation", "{"],
["class-name", ["return_type"]],
" identifier",
["punctuation", "("],
["class-name", ["type"]],
["operator", "..."],
" identifier",
["punctuation", ")"],
["punctuation", ";"],
["class-name", ["return_type"]],
" identifier",
["punctuation", "("],
["class-name", ["type"]],
" identifier",
["punctuation", ","],
["class-name", ["type"]],
["operator", "..."],
" identifier",
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "interface"],
["class-name", "SolidColor"],
["operator", ":"],
["class-name", "Paint"],
["punctuation", "{"],
["keyword", "constructor"],
["punctuation", "("],
["class-name", [
["keyword", "double"]
]],
" radius",
["punctuation", ")"],
["punctuation", ";"],
["keyword", "attribute"],
["class-name", [
["keyword", "double"]
]],
" red",
["punctuation", ";"],
["keyword", "readonly"],
["keyword", "attribute"],
["class-name", [
["keyword", "unsigned"],
["keyword", "long"]
]],
" width",
["punctuation", ";"],
["class-name", [
["keyword", "undefined"]
]],
" drawText",
["punctuation", "("],
["class-name", [
["keyword", "double"]
]],
" x",
["punctuation", ","],
["class-name", [
["keyword", "double"]
]],
" y",
["punctuation", ","],
["class-name", [
["builtin", "DOMString"]
]],
" text",
["punctuation", ")"],
["punctuation", ";"],
["keyword", "getter"],
["class-name", [
["builtin", "DOMString"]
]],
["punctuation", "("],
["class-name", [
["builtin", "DOMString"]
]],
" keyName",
["punctuation", ")"],
["punctuation", ";"],
["keyword", "getter"],
["class-name", [
["builtin", "DOMString"]
]],
" foo",
["punctuation", "("],
["class-name", [
["builtin", "DOMString"]
]],
" keyName",
["punctuation", ")"],
["punctuation", ";"],
["class-name", [
["keyword", "boolean"]
]],
" hasAddressForName",
["punctuation", "("],
["class-name", [
["builtin", "USVString"]
]],
" name",
["punctuation", ","],
["keyword", "optional"],
["class-name", ["LookupOptions"]],
" options ",
["operator", "="],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "const"],
["class-name", [
["keyword", "unsigned"],
["keyword", "long"]
]],
" BIT_MASK ",
["operator", "="],
["number", "0x0000fc00"],
["punctuation", ";"],
["class-name", [
["keyword", "iterable"],
["operator", "<"],
["builtin", "DOMString"],
["punctuation", ","],
" Session",
["operator", ">"]
]],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", ";"],
["comment", "// dictionary"],
["keyword", "dictionary"],
["class-name", "identifier"],
["punctuation", "{"],
["class-name", ["type"]],
" identifier",
["punctuation", ";"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "dictionary"],
["class-name", "identifier"],
["punctuation", "{"],
["class-name", ["type"]],
" identifier ",
["operator", "="],
["string", "\"value\""],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "dictionary"],
["class-name", "identifier"],
["punctuation", "{"],
["keyword", "required"],
["class-name", ["type"]],
" identifier",
["punctuation", ";"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "dictionary"],
["class-name", "B"],
["operator", ":"],
["class-name", "A"],
["punctuation", "{"],
["class-name", [
["keyword", "long"]
]],
" b",
["punctuation", ";"],
["class-name", [
["keyword", "long"]
]],
" a",
["punctuation", ";"],
["punctuation", "}"],
["punctuation", ";"],
["comment", "// callback"],
["keyword", "callback"],
["class-name", "AsyncOperationCallback"],
["operator", "="],
["class-name", [
["keyword", "undefined"]
]],
["punctuation", "("],
["class-name", [
["builtin", "DOMString"]
]],
" status",
["punctuation", ")"],
["punctuation", ";"],
["comment", "// enum"],
["keyword", "enum"],
["class-name", "MealType"],
["punctuation", "{"],
["string", "\"rice\""],
["punctuation", ","],
["string", "\"noodles\""],
["punctuation", ","],
["string", "\"other\""],
["punctuation", "}"],
["punctuation", ";"],
["comment", "// typedef"],
["keyword", "typedef"],
["class-name", [
["keyword", "sequence"],
["operator", "<"],
"Point",
["operator", ">"]
]],
" Points",
["punctuation", ";"],
["comment", "// includes and implements"],
["class-name", "Foo"],
["keyword", "includes"],
["class-name", "Bar"],
["punctuation", ";"],
["class-name", "Foo"],
["keyword", "implements"],
["class-name", "Bar"],
["punctuation", ";"]
]
================================================
FILE: tests/languages/web-idl/comment_feature.test
================================================
// comment
/* comment */
----------------------------------------------------
[
["comment", "// comment"],
["comment", "/* comment */"]
]
================================================
FILE: tests/languages/web-idl/keyword_feature.test
================================================
async;
attribute;
callback;
const;
constructor;
deleter;
dictionary;
enum;
getter;
includes;
inherit;
interface;
mixin;
namespace;
null;
optional;
or;
partial;
readonly;
required;
setter;
static;
stringifier;
typedef;
unrestricted;
----------------------------------------------------
[
["keyword", "async"], ["punctuation", ";"],
["keyword", "attribute"], ["punctuation", ";"],
["keyword", "callback"], ["punctuation", ";"],
["keyword", "const"], ["punctuation", ";"],
["keyword", "constructor"], ["punctuation", ";"],
["keyword", "deleter"], ["punctuation", ";"],
["keyword", "dictionary"], ["punctuation", ";"],
["keyword", "enum"], ["punctuation", ";"],
["keyword", "getter"], ["punctuation", ";"],
["keyword", "includes"], ["punctuation", ";"],
["keyword", "inherit"], ["punctuation", ";"],
["keyword", "interface"], ["punctuation", ";"],
["keyword", "mixin"], ["punctuation", ";"],
["keyword", "namespace"], ["punctuation", ";"],
["keyword", "null"], ["punctuation", ";"],
["keyword", "optional"], ["punctuation", ";"],
["keyword", "or"], ["punctuation", ";"],
["keyword", "partial"], ["punctuation", ";"],
["keyword", "readonly"], ["punctuation", ";"],
["keyword", "required"], ["punctuation", ";"],
["keyword", "setter"], ["punctuation", ";"],
["keyword", "static"], ["punctuation", ";"],
["keyword", "stringifier"], ["punctuation", ";"],
["keyword", "typedef"], ["punctuation", ";"],
["keyword", "unrestricted"], ["punctuation", ";"]
]
================================================
FILE: tests/languages/web-idl/namespace_feature.test
================================================
namespace SomeNamespace {
/* namespace_members... */
};
partial namespace SomeNamespace {
/* namespace_members... */
};
----------------------------------------------------
[
["keyword", "namespace"],
["namespace", "SomeNamespace"],
["punctuation", "{"],
["comment", "/* namespace_members... */"],
["punctuation", "}"],
["punctuation", ";"],
["keyword", "partial"],
["keyword", "namespace"],
["namespace", "SomeNamespace"],
["punctuation", "{"],
["comment", "/* namespace_members... */"],
["punctuation", "}"],
["punctuation", ";"]
]
================================================
FILE: tests/languages/web-idl/number_feature.test
================================================
0xfff
123423
-123423
123.456
123.e64
123.324e-4
.324e+4
NaN
Infinity
-Infinity
----------------------------------------------------
[
["number", "0xfff"],
["number", "123423"],
["number", "-123423"],
["number", "123.456"],
["number", "123.e64"],
["number", "123.324e-4"],
["number", ".324e+4"],
["number", "NaN"],
["number", "Infinity"],
["number", "-Infinity"]
]
================================================
FILE: tests/languages/web-idl/operator_feature.test
================================================
...
= : ? < >
----------------------------------------------------
[
["operator", "..."],
["operator", "="],
["operator", ":"],
["operator", "?"],
["operator", "<"],
["operator", ">"]
]
================================================
FILE: tests/languages/web-idl/primitive-type_feature.test
================================================
any
bigint
boolean
byte
double
float
iterable
long
maplike
object
octet
record
sequence
setlike
short
symbol
undefined
unsigned
void
----------------------------------------------------
[
["keyword", "any"],
["keyword", "bigint"],
["keyword", "boolean"],
["keyword", "byte"],
["keyword", "double"],
["keyword", "float"],
["keyword", "iterable"],
["keyword", "long"],
["keyword", "maplike"],
["keyword", "object"],
["keyword", "octet"],
["keyword", "record"],
["keyword", "sequence"],
["keyword", "setlike"],
["keyword", "short"],
["keyword", "symbol"],
["keyword", "undefined"],
["keyword", "unsigned"],
["keyword", "void"]
]
================================================
FILE: tests/languages/web-idl/punctuation_feature.test
================================================
( ) [ ] { }
. , ;
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "."],
["punctuation", ","],
["punctuation", ";"]
]
================================================
FILE: tests/languages/web-idl/string_feature.test
================================================
""
"foo"
"\"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\""],
["string", "\"\\\""]
]
================================================
FILE: tests/languages/wgsl/attributes_feature.test
================================================
@notAnAttribute
@align()
@binding()
@builtin()
@builtin(vertex_index)
@builtin(instance_index)
@builtin(position)
@builtin(front_facing)
@builtin(frag_depth)
@builtin(sample_index)
@builtin(sample_mask)
@builtin(local_invocation_id)
@builtin(local_invocation_index)
@builtin(global_invocation_id)
@builtin(workgroup_id)
@builtin(num_workgroups)
@builtin(notABuiltInValue)
something.vertex_index;
@const
@group()
@id()
@interpolate()
@invariant
@location()
@size()
@workgroup_size()
@vertex
@fragment
@compute
----------------------------------------------------
[
["punctuation", "@"],
"notAnAttribute\r\n",
["punctuation", "@"],
["attributes", "align"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "@"],
["attributes", "binding"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "vertex_index"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "instance_index"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "position"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "front_facing"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "frag_depth"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "sample_index"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "sample_mask"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "local_invocation_id"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "local_invocation_index"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "global_invocation_id"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "workgroup_id"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
["built-in-values", "num_workgroups"],
["punctuation", ")"]
]],
["punctuation", "@"],
["builtin-attribute", [
["attribute", "builtin"],
["punctuation", "("],
"notABuiltInValue",
["punctuation", ")"]
]],
"\r\nsomething",
["punctuation", "."],
"vertex_index",
["punctuation", ";"],
["punctuation", "@"],
["attributes", "const"],
["punctuation", "@"],
["attributes", "group"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "@"],
["attributes", "id"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "@"],
["attributes", "interpolate"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "@"],
["attributes", "invariant"],
["punctuation", "@"],
["attributes", "location"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "@"],
["attributes", "size"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "@"],
["attributes", "workgroup_size"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "@"], ["attributes", "vertex"],
["punctuation", "@"], ["attributes", "fragment"],
["punctuation", "@"], ["attributes", "compute"]
]
================================================
FILE: tests/languages/wgsl/builtin_feature.test
================================================
bool
i32
u32
f32
i64
u64
f64
vec2
vec3
vec4
mat2x2
mat2x3
mat2x4
mat3x2
mat3x3
mat3x4
mat4x2
mat4x3
mat4x4
atomic
array
override
ptr
sampler
sampler_comparison
staticAssert
texture_1d
texture_2d
texture_2d_array
texture_3d
texture_cube
texture_cube_array
texture_multisampled_2d
texture_storage_1d
texture_storage_2d
texture_storage_2d_array
texture_storage_3d
texture_depth_2d
texture_depth_2d_array
texture_depth_cube
texture_depth_cube_array
texture_depth_multisampled_2d
staticAssert()
all
any
select
abs
acos
acosh
asin
asinh
atan
atanh
atan2
ceil
clamp
cos
cosh
cross
degrees
distance
exp
exp2
faceForward
floor
fma
fract
frexp
inverseSqrt
ldexp
length
log
log2
max
min
mix
modf
normalize
pow
quantizeToF16
radians
reflect
refract
round
sign
sin
sinh
smoothstep
sqrt
step
tan
tanh
trunc
countLeadingZeros
countOneBits
countTrailingZeros
firstLeadingBit
extractBits
insertBits
reverseBits
shiftLeft
shiftRight
determinant
transpose
dot
dpdx
dpdxCoarse
dpdxFine
dpdy
dpdyCoarse
dpdyFine
fwidth
fwidthCoarse
fwidthFine
textureDimensions
textureGather
textureGatherCompare
textureLoad
textureNumLayers
textureNumLevels
textureNumSamples
textureSample
textureSampleBias
textureSampleCompare
textureSampleCompareLevel
textureSampleGrad
textureSampleLevel
textureStore
atomicLoad
atomicStore
atomicAdd
atomicSub
atomicMax
atomicMin
atomicAnd
atomicOr
atomicXor
atomicExchange
atomicCompareExchangeWeak
pack4x8snorm
pack4x8unorm
pack2x16snorm
pack2x16unorm
pack2x16float
unpack4x8snorm
unpack4x8unorm
unpack2x16snorm
unpack2x16unorm
unpack2x16float
storageBarrier
workgroupBarrier
----------------------------------------------------
[
["builtin", "bool"],
["builtin", "i32"],
["builtin", "u32"],
["builtin", "f32"],
["builtin", "i64"],
["builtin", "u64"],
["builtin", "f64"],
["builtin", "vec2"],
["builtin", "vec3"],
["builtin", "vec4"],
["builtin", "mat2x2"],
["builtin", "mat2x3"],
["builtin", "mat2x4"],
["builtin", "mat3x2"],
["builtin", "mat3x3"],
["builtin", "mat3x4"],
["builtin", "mat4x2"],
["builtin", "mat4x3"],
["builtin", "mat4x4"],
["builtin", "atomic"],
["builtin", "array"],
["builtin", "override"],
["builtin", "ptr"],
["builtin", "sampler"],
["builtin", "sampler_comparison"],
["builtin", "staticAssert"],
["builtin", "texture_1d"],
["builtin", "texture_2d"],
["builtin", "texture_2d_array"],
["builtin", "texture_3d"],
["builtin", "texture_cube"],
["builtin", "texture_cube_array"],
["builtin", "texture_multisampled_2d"],
["builtin", "texture_storage_1d"],
["builtin", "texture_storage_2d"],
["builtin", "texture_storage_2d_array"],
["builtin", "texture_storage_3d"],
["builtin", "texture_depth_2d"],
["builtin", "texture_depth_2d_array"],
["builtin", "texture_depth_cube"],
["builtin", "texture_depth_cube_array"],
["builtin", "texture_depth_multisampled_2d"],
["builtin", "staticAssert"],
["punctuation", "("],
["punctuation", ")"],
["builtin", "all"],
["builtin", "any"],
["builtin", "select"],
["builtin", "abs"],
["builtin", "acos"],
["builtin", "acosh"],
["builtin", "asin"],
["builtin", "asinh"],
["builtin", "atan"],
["builtin", "atanh"],
["builtin", "atan2"],
["builtin", "ceil"],
["builtin", "clamp"],
["builtin", "cos"],
["builtin", "cosh"],
["builtin", "cross"],
["builtin", "degrees"],
["builtin", "distance"],
["builtin", "exp"],
["builtin", "exp2"],
["builtin", "faceForward"],
["builtin", "floor"],
["builtin", "fma"],
["builtin", "fract"],
["builtin", "frexp"],
["builtin", "inverseSqrt"],
["builtin", "ldexp"],
["builtin", "length"],
["builtin", "log"],
["builtin", "log2"],
["builtin", "max"],
["builtin", "min"],
["builtin", "mix"],
["builtin", "modf"],
["builtin", "normalize"],
["builtin", "pow"],
["builtin", "quantizeToF16"],
["builtin", "radians"],
["builtin", "reflect"],
["builtin", "refract"],
["builtin", "round"],
["builtin", "sign"],
["builtin", "sin"],
["builtin", "sinh"],
["builtin", "smoothstep"],
["builtin", "sqrt"],
["builtin", "step"],
["builtin", "tan"],
["builtin", "tanh"],
["builtin", "trunc"],
["builtin", "countLeadingZeros"],
["builtin", "countOneBits"],
["builtin", "countTrailingZeros"],
["builtin", "firstLeadingBit"],
["builtin", "extractBits"],
["builtin", "insertBits"],
["builtin", "reverseBits"],
["builtin", "shiftLeft"],
["builtin", "shiftRight"],
["builtin", "determinant"],
["builtin", "transpose"],
["builtin", "dot"],
["builtin", "dpdx"],
["builtin", "dpdxCoarse"],
["builtin", "dpdxFine"],
["builtin", "dpdy"],
["builtin", "dpdyCoarse"],
["builtin", "dpdyFine"],
["builtin", "fwidth"],
["builtin", "fwidthCoarse"],
["builtin", "fwidthFine"],
["builtin", "textureDimensions"],
["builtin", "textureGather"],
["builtin", "textureGatherCompare"],
["builtin", "textureLoad"],
["builtin", "textureNumLayers"],
["builtin", "textureNumLevels"],
["builtin", "textureNumSamples"],
["builtin", "textureSample"],
["builtin", "textureSampleBias"],
["builtin", "textureSampleCompare"],
["builtin", "textureSampleCompareLevel"],
["builtin", "textureSampleGrad"],
["builtin", "textureSampleLevel"],
["builtin", "textureStore"],
["builtin", "atomicLoad"],
["builtin", "atomicStore"],
["builtin", "atomicAdd"],
["builtin", "atomicSub"],
["builtin", "atomicMax"],
["builtin", "atomicMin"],
["builtin", "atomicAnd"],
["builtin", "atomicOr"],
["builtin", "atomicXor"],
["builtin", "atomicExchange"],
["builtin", "atomicCompareExchangeWeak"],
["builtin", "pack4x8snorm"],
["builtin", "pack4x8unorm"],
["builtin", "pack2x16snorm"],
["builtin", "pack2x16unorm"],
["builtin", "pack2x16float"],
["builtin", "unpack4x8snorm"],
["builtin", "unpack4x8unorm"],
["builtin", "unpack2x16snorm"],
["builtin", "unpack2x16unorm"],
["builtin", "unpack2x16float"],
["builtin", "storageBarrier"],
["builtin", "workgroupBarrier"]
]
================================================
FILE: tests/languages/wgsl/class_name_feature.test
================================================
ClassName
notAClassName
----------------------------------------------------
[
["class-name", "ClassName"],
"\r\nnotAClassName"
]
================================================
FILE: tests/languages/wgsl/comment_feature.test
================================================
//test
// test
/* multi
line
comment */
----------------------------------------------------
[
["comment", "//test"],
["comment", "// test"],
["comment", "/* multi\r\n line\r\n comment */"]
]
================================================
FILE: tests/languages/wgsl/function_feature.test
================================================
fn my_function() -> bool {
my_function();
return true;
}
----------------------------------------------------
[
["keyword", "fn"],
["functions", "my_function"],
["punctuation", "("],
["punctuation", ")"],
["operator", "->"],
["builtin", "bool"],
["punctuation", "{"],
["function-calls", "my_function"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["keyword", "return"],
["bool-literal", "true"],
["punctuation", ";"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/wgsl/keyword_feature.test
================================================
bitcast
break
case
const
continue
continuing
default
discard
else
enable
fallthrough
fn
for
function
if
let
loop
private
return
storage
struct
switch
type
uniform
var
while
workgroup
----------------------------------------------------
[
["keyword", "bitcast"],
["keyword", "break"],
["keyword", "case"],
["keyword", "const"],
["keyword", "continue"],
["keyword", "continuing"],
["keyword", "default"],
["keyword", "discard"],
["keyword", "else"],
["keyword", "enable"],
["keyword", "fallthrough"],
["keyword", "fn"],
["keyword", "for"],
["keyword", "function"],
["keyword", "if"],
["keyword", "let"],
["keyword", "loop"],
["keyword", "private"],
["keyword", "return"],
["keyword", "storage"],
["keyword", "struct"],
["keyword", "switch"],
["keyword", "type"],
["keyword", "uniform"],
["keyword", "var"],
["keyword", "while"],
["keyword", "workgroup"]
]
================================================
FILE: tests/languages/wgsl/literal_feature.test
================================================
0x123
0X123u
1u
123
0
0i
0x3f
0.e+4f
01.
.01
12.34
.0f
0h
1e-3
0xa.fp+2
0x1P+4f
0X.3
0x3p+2h
0X1.fp-4
0x3.2p+2h
true
false
notALiteral20x3f
----------------------------------------------------
[
["hex-int-literal", "0x123"],
["hex-int-literal", "0X123u"],
["int-literal", "1u"],
["int-literal", "123"],
["int-literal", "0"],
["int-literal", "0i"],
["hex-int-literal", "0x3f"],
["decimal-float-literal", "0.e+4f"],
["decimal-float-literal", "01."],
["decimal-float-literal", ".01"],
["decimal-float-literal", "12.34"],
["decimal-float-literal", ".0f"],
["decimal-float-literal", "0h"],
["decimal-float-literal", "1e-3"],
["hex-float-literal", "0xa.fp+2"],
["hex-float-literal", "0x1P+4f"],
["hex-float-literal", "0X.3"],
["hex-float-literal", "0x3p+2h"],
["hex-float-literal", "0X1.fp-4"],
["hex-float-literal", "0x3.2p+2h"],
["bool-literal", "true"],
["bool-literal", "false"],
"\r\n\r\nnotALiteral20x3f"
]
================================================
FILE: tests/languages/wgsl/operator_feature.test
================================================
^
~
|
||
&&
<<
>>
!
&
+=
-=
*=
/=
%=
^=
&=
|=
<<=
>>=
=
==
!=
<=
>=
+
++
%
*
-
--
/
->
----------------------------------------------------
[
["operator", "^"],
["operator", "~"],
["operator", "|"],
["operator", "||"],
["operator", "&&"],
["operator", "<<"],
["operator", ">>"],
["operator", "!"],
["operator", "&"],
["operator", "+="],
["operator", "-="],
["operator", "*="],
["operator", "/="],
["operator", "%="],
["operator", "^="],
["operator", "&="],
["operator", "|="],
["operator", "<<="],
["operator", ">>="],
["operator", "="],
["operator", "=="],
["operator", "!="],
["operator", "<="],
["operator", ">="],
["operator", "+"],
["operator", "++"],
["operator", "%"],
["operator", "*"],
["operator", "-"],
["operator", "--"],
["operator", "/"],
["operator", "->"]
]
================================================
FILE: tests/languages/wgsl/punctuation_feature.test
================================================
@
(
)
{
}
[
]
,
;
<
>
:
.
----------------------------------------------------
[
["punctuation", "@"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", ","],
["punctuation", ";"],
["punctuation", "<"],
["punctuation", ">"],
["punctuation", ":"],
["punctuation", "."]
]
================================================
FILE: tests/languages/wiki/block-comment_feature.test
================================================
/**/
/* foo */
/* foo
bar */
----------------------------------------------------
[
["block-comment", "/**/"],
["block-comment", "/* foo */"],
["block-comment", "/* foo\r\nbar */"]
]
----------------------------------------------------
Checks for comments.
================================================
FILE: tests/languages/wiki/emphasis_feature.test
================================================
'''''foo'''''
'''bar'''
''baz''
----------------------------------------------------
[
["emphasis", [
["punctuation", "'''''"],
["bold-italic", "foo"],
["punctuation", "'''''"]
]],
["emphasis", [
["punctuation", "'''"],
["bold", "bar"],
["punctuation", "'''"]
]],
["emphasis", [
["punctuation", "''"],
["italic", "baz"],
["punctuation", "''"]
]]
]
----------------------------------------------------
Checks for bold and italic.
================================================
FILE: tests/languages/wiki/heading_feature.test
================================================
= Header 1 =
== Header 2 ==
=== Header 3 ===
==== Header 4 ====
===== Header 5 =====
====== Header 6 ======
----------------------------------------------------
[
["heading", [
["punctuation", "="], ["important", " Header 1 "], ["punctuation", "="]
]],
["heading", [
["punctuation", "=="], ["important", " Header 2 "], ["punctuation", "=="]
]],
["heading", [
["punctuation", "==="], ["important", " Header 3 "], ["punctuation", "==="]
]],
["heading", [
["punctuation", "===="], ["important", " Header 4 "], ["punctuation", "===="]
]],
["heading", [
["punctuation", "====="], ["important", " Header 5 "], ["punctuation", "====="]
]],
["heading", [
["punctuation", "======"], ["important", " Header 6 "], ["punctuation", "======"]
]]
]
----------------------------------------------------
Checks for titles.
================================================
FILE: tests/languages/wiki/hr_feature.test
================================================
----
-----
----------------------------------------------------
[
["hr", "----"],
["hr", "-----"]
]
----------------------------------------------------
Checks for horizontal rows.
================================================
FILE: tests/languages/wiki/nowiki_feature.test
================================================
{{foo}} ''bar''
{{foo}} ''bar''
{{foo}} ''bar''
----------------------------------------------------
[
["nowiki", [
["tag", [
["punctuation", "<"],
["tag", ["nowiki"]],
["punctuation", ">"]
]],
"{{foo}} ''bar'' ",
["tag", [
["punctuation", ""],
["tag", ["nowiki"]],
["punctuation", ">"]
]]
]],
["nowiki", [
["tag", [
["punctuation", "<"],
["tag", ["source"]],
["punctuation", ">"]
]],
"{{foo}} ''bar'' ",
["tag", [
["punctuation", ""],
["tag", ["source"]],
["punctuation", ">"]
]]
]],
["nowiki", [
["tag", [
["punctuation", "<"],
["tag", ["pre"]],
["punctuation", ">"]
]],
"{{foo}} ''bar'' ",
["tag", [
["punctuation", ""],
["tag", ["pre"]],
["punctuation", ">"]
]]
]]
]
----------------------------------------------------
Checks that no highlighting is done inside , and tags.
================================================
FILE: tests/languages/wiki/symbol_feature.test
================================================
#REDIRECT [[somewhere]]
~~~
~~~~
~~~~~
----------------------------------------------------
[
["symbol", "#REDIRECT"], ["url", "[[somewhere]]"],
["symbol", "~~~"],
["symbol", "~~~~"],
["symbol", "~~~~~"]
]
----------------------------------------------------
Checks for redirects and signatures.
================================================
FILE: tests/languages/wiki/url_feature.test
================================================
[[w:en:Formal_grammar|Formal grammar]]
[http://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html EBNF help]
ISBN 1234567890
ISBN 123456789x
ISBN 1 2 3-4-5 6789 X
ISBN 978-9999999999
RFC 822
PMID 822
----------------------------------------------------
[
["url", "[[w:en:Formal_grammar|Formal grammar]]"],
["url", "[http://www.cl.cam.ac.uk/~mgk25/iso-ebnf.html EBNF help]"],
["url", "ISBN 1234567890"],
["url", "ISBN 123456789x"],
["url", "ISBN 1 2 3-4-5 6789 X"],
["url", "ISBN 978-9999999999"],
["url", "RFC 822"],
["url", "PMID 822"]
]
----------------------------------------------------
Checks for links, ISBN, RFC and PMID.
================================================
FILE: tests/languages/wiki/variable_feature.test
================================================
__NOTOC__
{{{1}}}
{{!}}
{{SITENAME}}
{{#ifexists:foo}}
----------------------------------------------------
[
["variable", "__NOTOC__"],
["variable", "{{{1}}}"],
["variable", "{{!}}"],
["variable", "{{SITENAME}}"],
["variable", "{{#ifexists:foo}}"]
]
----------------------------------------------------
Checks for variables and magic words.
================================================
FILE: tests/languages/wolfram/black_feature.test
================================================
__
x__
----------------------------------------------------
[
["blank", "__"],
["blank", "x__"]
]
================================================
FILE: tests/languages/wolfram/boolean_feature.test
================================================
True
False
0
1
None
----------------------------------------------------
[
["boolean", "True"],
["boolean", "False"],
["number", "0"],
["number", "1"],
["keyword", "None"]
]
----------------------------------------------------
Checks for booleans.
================================================
FILE: tests/languages/wolfram/context_feature.test
================================================
Global`
System`Foo
----------------------------------------------------
[
["context", "Global`"],
["context", "System`Foo"]
]
================================================
FILE: tests/languages/wolfram/keyword_feature.test
================================================
Abs
AbsArg
Accuracy
Block
Do
For
Function
If
Manipulate
Module
Nest
NestList
None
Return
Switch
Table
Which
While
----------------------------------------------------
[
["keyword", "Abs"],
["keyword", "AbsArg"],
["keyword", "Accuracy"],
["keyword", "Block"],
["keyword", "Do"],
["keyword", "For"],
["keyword", "Function"],
["keyword", "If"],
["keyword", "Manipulate"],
["keyword", "Module"],
["keyword", "Nest"],
["keyword", "NestList"],
["keyword", "None"],
["keyword", "Return"],
["keyword", "Switch"],
["keyword", "Table"],
["keyword", "Which"],
["keyword", "While"]
]
================================================
FILE: tests/languages/wolfram/operator_feature.test
================================================
@ //
/@ @@ @@@
/ /= //=
> >= <=
>> <<
+ - ^ *
= == ===
:= =.
!= =!=
----------------------------------------------------
[
["operator", "@"], ["operator", "//"],
["operator", "/@"], ["operator", "@@"], ["operator", "@@@"],
["operator", "/"], ["operator", "/="], ["operator", "//="],
["operator", ">"], ["operator", ">="], ["operator", "<="],
["operator", ">>"], ["operator", "<<"],
["operator", "+"], ["operator", "-"], ["operator", "^"], ["operator", "*"],
["operator", "="], ["operator", "=="], ["operator", "==="],
["operator", ":="], ["operator", "=."],
["operator", "!="], ["operator", "=!="]
]
----------------------------------------------------
Checks for all operators.
================================================
FILE: tests/languages/wolfram/punctuation_feature.test
================================================
{ } [ ] ( )
, ; . :
----------------------------------------------------
[
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ","],
["operator", ";"],
["punctuation", "."],
["punctuation", ":"]
]
================================================
FILE: tests/languages/wolfram/string_feature.test
================================================
""
"foo"
"fo\"obar"
----------------------------------------------------
[
["string", "\"\""],
["string", "\"foo\""],
["string", "\"fo\\\"obar\""]
]
----------------------------------------------------
Checks for strings.
================================================
FILE: tests/languages/wren/attribute_feature.test
================================================
#hidden = true
class Example {}
#key
#key = value
#group(
multiple,
lines = true,
lines = 0
)
class Example {
#test(skip = true, iterations = 32)
doStuff() {}
}
#doc = "not runtime data"
#!runtimeAccess = true
#!maxIterations = 16
----------------------------------------------------
[
["attribute", "#hidden"],
["operator", "="],
["boolean", "true"],
["keyword", "class"],
["class-name", "Example"],
["punctuation", "{"],
["punctuation", "}"],
["attribute", "#key"],
["attribute", "#key"],
["operator", "="],
" value\r\n",
["attribute", "#group"],
["punctuation", "("],
"\r\n multiple",
["punctuation", ","],
"\r\n lines ",
["operator", "="],
["boolean", "true"],
["punctuation", ","],
"\r\n lines ",
["operator", "="],
["number", "0"],
["punctuation", ")"],
["keyword", "class"],
["class-name", "Example"],
["punctuation", "{"],
["attribute", "#test"],
["punctuation", "("],
"skip ",
["operator", "="],
["boolean", "true"],
["punctuation", ","],
" iterations ",
["operator", "="],
["number", "32"],
["punctuation", ")"],
["function", "doStuff"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "}"],
["attribute", "#doc"],
["operator", "="],
["string-literal", [
["string", "\"not runtime data\""]
]],
["attribute", "#!runtimeAccess"],
["operator", "="],
["boolean", "true"],
["attribute", "#!maxIterations"],
["operator", "="],
["number", "16"]
]
================================================
FILE: tests/languages/wren/boolean_feature.test
================================================
true
false
----------------------------------------------------
[
["boolean", "true"],
["boolean", "false"]
]
================================================
FILE: tests/languages/wren/class-name_feature.test
================================================
Foo.bar()
import "beverages" for Coffee, Tea
class Foo {}
class foo {}
----------------------------------------------------
[
["class-name", "Foo"],
["punctuation", "."],
["function", "bar"],
["punctuation", "("],
["punctuation", ")"],
["keyword", "import"],
["string-literal", [
["string", "\"beverages\""]
]],
["keyword", "for"],
["class-name", "Coffee"],
["punctuation", ","],
["class-name", "Tea"],
["keyword", "class"],
["class-name", "Foo"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "class"],
["class-name", "foo"],
["punctuation", "{"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/wren/comment_feature.test
================================================
// comment
/**/
/* comment */
/*
/*
nested comment
*/
*/
----------------------------------------------------
[
["comment", "// comment"],
["comment", "/**/"],
["comment", "/* comment */"],
["comment", "/*\r\n/*\r\nnested comment\r\n*/\r\n*/"]
]
================================================
FILE: tests/languages/wren/constant_feature.test
================================================
FOO
----------------------------------------------------
[
["constant", "FOO"]
]
================================================
FILE: tests/languages/wren/function_feature.test
================================================
foo()
foo {|x| x * 2}
----------------------------------------------------
[
["function", "foo"], ["punctuation", "("], ["punctuation", ")"],
["function", "foo"],
["punctuation", "{"],
["operator", "|"],
"x",
["operator", "|"],
" x ",
["operator", "*"],
["number", "2"],
["punctuation", "}"]
]
================================================
FILE: tests/languages/wren/hashbang_feature.test
================================================
#!/usr/bin/env wren
----------------------------------------------------
[
["hashbang", "#!/usr/bin/env wren"]
]
================================================
FILE: tests/languages/wren/keyword_feature.test
================================================
as;
break;
class;
construct;
continue;
else;
for;
foreign;
if;
import;
in;
is;
return;
static;
super;
this;
var;
while;
null
----------------------------------------------------
[
["keyword", "as"], ["punctuation", ";"],
["keyword", "break"], ["punctuation", ";"],
["keyword", "class"], ["punctuation", ";"],
["keyword", "construct"], ["punctuation", ";"],
["keyword", "continue"], ["punctuation", ";"],
["keyword", "else"], ["punctuation", ";"],
["keyword", "for"], ["punctuation", ";"],
["keyword", "foreign"], ["punctuation", ";"],
["keyword", "if"], ["punctuation", ";"],
["keyword", "import"], ["punctuation", ";"],
["keyword", "in"], ["punctuation", ";"],
["keyword", "is"], ["punctuation", ";"],
["keyword", "return"], ["punctuation", ";"],
["keyword", "static"], ["punctuation", ";"],
["keyword", "super"], ["punctuation", ";"],
["keyword", "this"], ["punctuation", ";"],
["keyword", "var"], ["punctuation", ";"],
["keyword", "while"], ["punctuation", ";"],
["null", "null"]
]
================================================
FILE: tests/languages/wren/number_feature.test
================================================
0
1234
-5678
3.14159
1.0
-12.34
0.0314159e02
0.0314159e+02
314.159e-02
0xcaffe2
----------------------------------------------------
[
["number", "0"],
["number", "1234"],
["operator", "-"], ["number", "5678"],
["number", "3.14159"],
["number", "1.0"],
["operator", "-"], ["number", "12.34"],
["number", "0.0314159e02"],
["number", "0.0314159e+02"],
["number", "314.159e-02"],
["number", "0xcaffe2"]
]
================================================
FILE: tests/languages/wren/operator_feature.test
================================================
! ~ -
* / % + -
.. ...
<< >>
< <= > >= == !=
& ^ |
=
&& ||
? :
1..2 1...3
----------------------------------------------------
[
["operator", "!"],
["operator", "~"],
["operator", "-"],
["operator", "*"],
["operator", "/"],
["operator", "%"],
["operator", "+"],
["operator", "-"],
["operator", ".."],
["operator", "..."],
["operator", "<<"],
["operator", ">>"],
["operator", "<"],
["operator", "<="],
["operator", ">"],
["operator", ">="],
["operator", "=="],
["operator", "!="],
["operator", "&"],
["operator", "^"],
["operator", "|"],
["operator", "="],
["operator", "&&"], ["operator", "||"],
["operator", "?"], ["operator", ":"],
["number", "1"],
["operator", ".."],
["number", "2"],
["number", "1"],
["operator", "..."],
["number", "3"]
]
================================================
FILE: tests/languages/wren/punctuation_feature.test
================================================
( ) [ ] { }
, ; .
----------------------------------------------------
[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "["],
["punctuation", "]"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", ","],
["punctuation", ";"],
["punctuation", "."]
]
================================================
FILE: tests/languages/wren/string_feature.test
================================================
""
"\"\\"
"foo
bar"
""""""
"""
foo
bar
"""
"""
{
"hello": "wren",
"from" : "json"
}
"""
"foo %(bar)"
"foo * %(1 + 2) ~= bar"
----------------------------------------------------
[
["string-literal", [
["string", "\"\""]
]],
["string-literal", [
["string", "\"\\\"\\\\\""]
]],
["string-literal", [
["string", "\"foo\r\nbar\""]
]],
["triple-quoted-string", "\"\"\"\"\"\""],
["triple-quoted-string", "\"\"\"\r\nfoo\r\nbar\r\n\"\"\""],
["triple-quoted-string", "\"\"\"\r\n {\r\n \"hello\": \"wren\",\r\n \"from\" : \"json\"\r\n }\r\n\"\"\""],
["string-literal", [
["string", "\"foo "],
["interpolation", [
["interpolation-punctuation", "%("],
["expression", ["bar"]],
["interpolation-punctuation", ")"]
]],
["string", "\""]
]],
["string-literal", [
["string", "\"foo * "],
["interpolation", [
["interpolation-punctuation", "%("],
["expression", [
["number", "1"],
["operator", "+"],
["number", "2"]
]],
["interpolation-punctuation", ")"]
]],
["string", " ~= bar\""]
]]
]
================================================
FILE: tests/languages/xeora/constant_feature.test
================================================
$DomainContents$
$PageRenderDuration$
----------------------------------------------------
[
["constant", [
["punctuation", "$"], "DomainContents", ["punctuation", "$"]]],
["constant", [
["punctuation", "$"], "PageRenderDuration", ["punctuation", "$"]]]
]
----------------------------------------------------
Checks for constants.
================================================
FILE: tests/languages/xeora/directive-block-close_feature.test
================================================
}:Control3$
----------------------------------------------------
[
["directive-block-close", [
["punctuation", "}"], ["punctuation", ":"], "Control3", ["punctuation", "$"]]]
]
----------------------------------------------------
Checks for directive-block-closes.
================================================
FILE: tests/languages/xeora/directive-block-open_feature.test
================================================
$C:Control2:{
$C#1:Control2:{
$C[ParentControl]:Control2:{
$C#1[ParentControl]:Control2:{
$S:Statement:{!NOCACHE
$H:HttpRequest:{!RENDERONREQUEST
$C:Control2:{!MESSAGETEMPLATE
----------------------------------------------------
[
["directive-block-open", [
["punctuation", ["$C:"]], "Control2", ["punctuation", [":"]], ["punctuation", ["{"]]]],
["directive-block-open", [
["punctuation", ["$C", ["tag", "#1"]]], ["punctuation", [":"]], "Control2", ["punctuation", [":"]], ["punctuation", ["{"]]]],
["directive-block-open", [
["punctuation", ["$C["]], "ParentControl", ["punctuation", ["]"]], ["punctuation", [":"]], "Control2", ["punctuation", [":"]], ["punctuation", ["{"]]]],
["directive-block-open", [
["punctuation", ["$C", ["tag", "#1"]]], ["punctuation", ["["]], "ParentControl", ["punctuation", ["]"]], ["punctuation", [":"]], "Control2", ["punctuation", [":"]], ["punctuation", ["{"]]]],
["directive-block-open", [
["punctuation", ["$S:"]], "Statement", ["punctuation", [":"]], ["punctuation", ["{"]], ["attribute", [["punctuation", "!"], "NOCACHE"]]]],
["directive-block-open", [
["punctuation", ["$H:"]], "HttpRequest", ["punctuation", [":"]], ["punctuation", ["{"]], ["attribute", [["punctuation", "!"], "RENDERONREQUEST"]]]],
["directive-block-open", [
["punctuation", ["$C:"]], "Control2", ["punctuation", [":"]], ["punctuation", ["{"]], ["attribute", [["punctuation", "!"], "MESSAGETEMPLATE"]]]]
]
----------------------------------------------------
Checks for directive-block-opens.
================================================
FILE: tests/languages/xeora/directive-block-separator_feature.test
================================================
}:Control3:{
----------------------------------------------------
[
["directive-block-separator", [
["punctuation", "}"],
["punctuation", ":"],
"Control3",
["punctuation", ":"],
["punctuation", "{"]
]]
]
----------------------------------------------------
Checks for functions.
================================================
FILE: tests/languages/xeora/directive-inline_feature.test
================================================
$C:Control2$
$C#1:Control2$
$C[ParentControl]:Control2$
$C#1[ParentControl]:Control2$
----------------------------------------------------
[
["directive-inline", [
["punctuation", ["$C:"]], "Control2", ["punctuation", ["$"]]]],
["directive-inline", [
["punctuation", ["$C", ["tag", "#1"]]], ["punctuation", [":"]], "Control2", ["punctuation", ["$"]]]],
["directive-inline", [
["punctuation", ["$C["]], "ParentControl", ["punctuation", ["]"]], ["punctuation", [":"]], "Control2", ["punctuation", ["$"]]]],
["directive-inline", [
["punctuation", ["$C", ["tag", "#1"]]], ["punctuation", ["["]], "ParentControl", ["punctuation", ["]"]], ["punctuation", [":"]], "Control2", ["punctuation", ["$"]]]]
]
----------------------------------------------------
Checks for directive-inlines.
================================================
FILE: tests/languages/xeora/function-block_feature.test
================================================
$XF:{Library?ClassName.FuncName}:XF$
$XF:{Library?ClassName.FuncName,=Param1|~Param2}:XF$
----------------------------------------------------
[
["function-block", [
["punctuation", "$"],
"XF",
["punctuation", ":"],
["punctuation", "{"],
"Library",
["punctuation", "?"],
"ClassName",
["punctuation", "."],
"FuncName",
["punctuation", "}"],
["punctuation", ":"],
"XF",
["punctuation", "$"]
]],
["function-block", [
["punctuation", "$"],
"XF",
["punctuation", ":"],
["punctuation", "{"],
"Library",
["punctuation", "?"],
"ClassName",
["punctuation", "."],
"FuncName",
["variable", [["punctuation", ","], ["operator", "="], "Param1"]],
["variable", [["punctuation", "|"], ["operator", "~"], "Param2"]],
["punctuation", "}"],
["punctuation", ":"],
"XF",
["punctuation", "$"]
]]
]
----------------------------------------------------
Checks for function-inlines.
================================================
FILE: tests/languages/xeora/function-inline_feature.test
================================================
$F:Library?ClassName.FuncName$
$F:Library?ClassName.FuncName,=Param1|~Param2$
----------------------------------------------------
[
["function-inline", [
["punctuation", "$F:"],
"Library",
["punctuation", "?"],
"ClassName",
["punctuation", "."],
"FuncName",
["punctuation", "$"]
]],
["function-inline", [
["punctuation", "$F:"],
"Library",
["punctuation", "?"],
"ClassName",
["punctuation", "."],
"FuncName",
["variable", [["punctuation", ","], ["operator", "="], "Param1"]],
["variable", [["punctuation", "|"], ["operator", "~"], "Param2"]],
["punctuation", "$"]
]]
]
----------------------------------------------------
Checks for function-inlines.
================================================
FILE: tests/languages/xeora/variable_feature.test
================================================
$SearchKey$
$^SearchKey$
$~SearchKey$
$-SearchKey$
$+SearchKey$
$=SearchKey$
$#SearchKey$
$*SearchKey$
$@SearchObject.SearchProperty$
----------------------------------------------------
[
["variable", [
["punctuation", "$"], "SearchKey", ["punctuation", "$"]]],
["variable", [
["punctuation", "$"], ["operator", "^"], "SearchKey", ["punctuation", "$"]]],
["variable", [
["punctuation", "$"], ["operator", "~"], "SearchKey", ["punctuation", "$"]]],
["variable", [
["punctuation", "$"], ["operator", "-"], "SearchKey", ["punctuation", "$"]]],
["variable", [
["punctuation", "$"], ["operator", "+"], "SearchKey", ["punctuation", "$"]]],
["variable", [
["punctuation", "$"], ["operator", "="], "SearchKey", ["punctuation", "$"]]],
["variable", [
["punctuation", "$"], ["operator", "#"], "SearchKey", ["punctuation", "$"]]],
["variable", [
["punctuation", "$"], ["operator", "*"], "SearchKey", ["punctuation", "$"]]],
["variable", [
["punctuation", "$"], ["operator", "@"], "SearchObject", ["punctuation", "."], "SearchProperty", ["punctuation", "$"]]]
]
----------------------------------------------------
Checks for variables.
================================================
FILE: tests/languages/xml/cdata_feature.test
================================================
----------------------------------------------------
[
["cdata", ""],
["cdata", ""]
]
----------------------------------------------------
Checks for CDATA sections, single-line and multi-line.
================================================
FILE: tests/languages/xml/comment_feature.test
================================================
----------------------------------------------------
[
["comment", ""],
["comment", ""],
["comment", ""]
]
----------------------------------------------------
Checks for empty comment, single-line comment and multi-line comment.
================================================
FILE: tests/languages/xml/doctype_feature.test
================================================
]>
]>
----------------------------------------------------
[
["doctype", [
["punctuation", ""]
]],
["doctype", [
["punctuation", ""]
]],
["doctype", [
["punctuation", ""]
]],
["doctype", [
["punctuation", ""]
]],
["doctype", [
["punctuation", ""]
]]
]],
["punctuation", "]"],
["punctuation", ">"]
]],
["doctype", [
["punctuation", ""]
]],
["tag", [
["punctuation", "<"],
["tag", ["!ELEMENT"]],
["attr-name", ["subject"]],
["attr-name", ["(#PCDATA)"]],
["punctuation", ">"]
]],
["comment", ""]
]],
["punctuation", "]"],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for different doctypes, single-line and multi-line.
================================================
FILE: tests/languages/xml/entity_feature.html.test
================================================
&
ϑ
A
A
⛵
----------------------------------------------------
&
ϑ
A
A
⛵
----------------------------------------------------
Checks for HTML/XML character entity references.
================================================
FILE: tests/languages/xml/issue3441.test
================================================
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["google-chart"]],
["attr-name", ["data"]],
["attr-value", [
["punctuation", "="],
["punctuation", "'"],
"[[\"Month\", \"Days\"], [\"Jan\", 31]]",
["punctuation", "'"]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", ["google-chart"]],
["punctuation", ">"]
]]
]
================================================
FILE: tests/languages/xml/issue585.test
================================================
foo
baz
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["Läufer"]],
["punctuation", ">"]
]],
"foo",
["tag", [
["punctuation", ""],
["tag", ["Läufer"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["tag"]],
["attr-name", ["läufer"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"läufer",
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", [
["namespace", "läufer:"],
"tag"
]],
["punctuation", ">"]
]],
"baz",
["tag", [
["punctuation", ""],
["tag", [
["namespace", "läufer:"],
"tag"
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for tags, attributes and namespaces containing unicode characters.
See #585 for details.
================================================
FILE: tests/languages/xml/issue888.test
================================================
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["android.support.v7.widget.CardView"]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for tag names containing dots.
See #888 for details.
================================================
FILE: tests/languages/xml/prolog_feature.test
================================================
----------------------------------------------------
[
["prolog", ""],
["prolog", ""],
["prolog", ""]
]
----------------------------------------------------
Checks for different XML prologs, single-line and multi-line.
================================================
FILE: tests/languages/xml/tag_attribute_feature.test
================================================
----------------------------------------------------
[
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"test",
["punctuation", "\""]
]],
["attr-name", ["foo"]],
["attr-name", ["bar"]],
["attr-value", [
["punctuation", "="],
"baz"
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["foo"]],
["attr-value", [
["punctuation", "="],
["punctuation", "'"],
"bar",
["punctuation", "'"]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["class"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"foo\r\nbar\r\nbaz",
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", [
["namespace", "foo:"],
"bar"
]],
["attr-value", [
["punctuation", "="],
"42"
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["foo"]],
["attr-value", [
["punctuation", "="],
" 42"
]],
["attr-name", ["bar"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"42",
["punctuation", "\""]
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["attr-name", ["foo"]],
["attr-value", [
["punctuation", "="],
["punctuation", "\""],
"=\\",
["punctuation", "\""]
]],
["attr-name", ["bar"]],
["attr-value", [
["punctuation", "="],
"baz/"
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for single-quoted, double-quoted and unquoted attributes, attributes without value and
namespaced attributes.
================================================
FILE: tests/languages/xml/tag_feature.test
================================================
dummy
"]
]],
["tag", [
["punctuation", ""],
["tag", ["p"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", ["div"]],
["punctuation", ">"]
]],
"dummy",
["tag", [
["punctuation", ""],
["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"], ["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""], ["tag", ["div"]],
["punctuation", ">"]
]],
["tag", [
["punctuation", "<"],
["tag", [
["namespace", "foo:"],
"bar"
]],
["punctuation", ">"]
]],
["tag", [
["punctuation", ""],
["tag", [
["namespace", "foo:"],
"bar"
]],
["punctuation", ">"]
]],
"\r\n