Tests: Automatically normalize line ends (#2934)

This commit is contained in:
Michael Schmidt 2021-06-13 22:00:43 +02:00 committed by GitHub
parent 8e93c5daa8
commit 99f3ddcdc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
91 changed files with 1158 additions and 830 deletions

3
.gitattributes vendored
View File

@ -1,4 +1 @@
* text=auto * text=auto
# Test files should not have their line endings modified by git
/tests/languages/**/*.test binary

View File

@ -13,7 +13,7 @@
greedy: true greedy: true
}, },
'character-code': { 'character-code': {
pattern: /'[\s\S]/, pattern: /'(?:[^\r]|\r\n?)/,
alias: 'number' alias: 'number'
}, },
'assembler-code': { 'assembler-code': {

View File

@ -1 +1 @@
Prism.languages.false={comment:{pattern:/\{[^}]*\}/},string:{pattern:/"[^"]*"/,greedy:!0},"character-code":{pattern:/'[\s\S]/,alias:"number"},"assembler-code":{pattern:/\d+`/,alias:"important"},number:/\d+/,operator:/[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()<BDO®]/,alias:"bold"}}; Prism.languages.false={comment:{pattern:/\{[^}]*\}/},string:{pattern:/"[^"]*"/,greedy:!0},"character-code":{pattern:/'(?:[^\r]|\r\n?)/,alias:"number"},"assembler-code":{pattern:/\d+`/,alias:"important"},number:/\d+/,operator:/[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()<BDO®]/,alias:"bold"}};

View File

@ -66,7 +66,6 @@ module.exports = {
function updateFile() { function updateFile() {
// change the file // change the file
const lineEnd = (/\r\n/.test(testCase.code) || !/\n/.test(testCase.code)) ? '\r\n' : '\n';
const separator = '\n\n----------------------------------------------------\n\n'; const separator = '\n\n----------------------------------------------------\n\n';
const pretty = TokenStreamTransformer.prettyprint(tokenStream, '\t'); const pretty = TokenStreamTransformer.prettyprint(tokenStream, '\t');
@ -75,7 +74,9 @@ module.exports = {
content += separator + testCase.comment.trim(); content += separator + testCase.comment.trim();
} }
content += '\n'; content += '\n';
content = content.replace(/\r?\n/g, lineEnd);
// convert line ends to the line ends of the file
content = content.replace(/\r\n?|\n/g, testCase.lineEndOnDisk);
fs.writeFileSync(filePath, content, 'utf-8'); fs.writeFileSync(filePath, content, 'utf-8');
} }
@ -202,6 +203,7 @@ module.exports = {
* @returns {ParsedTestCase} * @returns {ParsedTestCase}
* *
* @typedef ParsedTestCase * @typedef ParsedTestCase
* @property {string} lineEndOnDisk The EOL format used by the parsed file.
* @property {string} code * @property {string} code
* @property {string} expectedJson * @property {string} expectedJson
* @property {number} expectedLineOffset * @property {number} expectedLineOffset
@ -209,7 +211,11 @@ module.exports = {
* @property {string} comment * @property {string} comment
*/ */
parseTestCaseFile(filePath) { parseTestCaseFile(filePath) {
const testCaseSource = fs.readFileSync(filePath, 'utf8'); let testCaseSource = fs.readFileSync(filePath, 'utf8');
const lineEndOnDisk = (/\r\n?|\n/.exec(testCaseSource) || ['\n'])[0];
// normalize line ends to \r\n
testCaseSource = testCaseSource.replace(/\r\n?|\n/g, '\r\n');
const testCaseParts = testCaseSource.split(/^-{10,}[ \t]*$/m); const testCaseParts = testCaseSource.split(/^-{10,}[ \t]*$/m);
if (testCaseParts.length > 3) { if (testCaseParts.length > 3) {
@ -221,9 +227,10 @@ module.exports = {
const comment = (testCaseParts[2] || '').trimStart(); const comment = (testCaseParts[2] || '').trimStart();
const testCase = { const testCase = {
lineEndOnDisk,
code, code,
expectedJson: expected, expectedJson: expected,
expectedLineOffset: code.split(/\r\n?|\n/g).length, expectedLineOffset: code.split(/\r\n/g).length,
expectedTokenStream: expected ? JSON.parse(expected) : null, expectedTokenStream: expected ? JSON.parse(expected) : null,
comment comment
}; };

View File

@ -7,7 +7,7 @@
---------------------------------------------------- ----------------------------------------------------
[ [
["comment", "{-\n\tThis is a\n\tmultiline comment\n-}"], ["comment", "{-\r\n\tThis is a\r\n\tmultiline comment\r\n-}"],
["comment", "-- This is a singleline comment"] ["comment", "-- This is a singleline comment"]
] ]

View File

@ -29,11 +29,11 @@ merge xs@(x ∷ xs₁) ys@(y ∷ ys₁) =
["operator", "→"], ["operator", "→"],
" List A ", " List A ",
["operator", "→"], ["operator", "→"],
" List A\nmerge xs [] ", " List A\r\nmerge xs [] ",
["operator", "="], ["operator", "="],
" xs\nmerge [] ys ", " xs\r\nmerge [] ys ",
["operator", "="], ["operator", "="],
" ys\nmerge xs", " ys\r\nmerge xs",
["punctuation", "@"], ["punctuation", "@"],
["punctuation", "("], ["punctuation", "("],
"x ∷ xs₁", "x ∷ xs₁",
@ -44,7 +44,8 @@ merge xs@(x ∷ xs₁) ys@(y ∷ ys₁) =
"y ∷ ys₁", "y ∷ ys₁",
["punctuation", ")"], ["punctuation", ")"],
["operator", "="], ["operator", "="],
"\n\tif x < y then x ∷ merge xs₁ ys\n\t\t\t\t\t else y ∷ merge xs ys₁"
"\r\n\tif x < y then x ∷ merge xs₁ ys\r\n\t\t\t\t\t else y ∷ merge xs ys₁"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -11,12 +11,14 @@ open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) renaming (begin_ to star
["punctuation", "."], ["punctuation", "."],
"test ", "test ",
["keyword", "where"], ["keyword", "where"],
["keyword", "import"], ["keyword", "import"],
" Relation", " Relation",
["punctuation", "."], ["punctuation", "."],
"Binary", "Binary",
["punctuation", "."], ["punctuation", "."],
"PropositionalEquality as Eq\n", "PropositionalEquality as Eq\r\n",
["keyword", "open"], ["keyword", "open"],
" Eq ", " Eq ",
["keyword", "hiding"], ["keyword", "hiding"],
@ -25,6 +27,7 @@ open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) renaming (begin_ to star
["punctuation", ";"], ["punctuation", ";"],
" refl", " refl",
["punctuation", ")"], ["punctuation", ")"],
["keyword", "open"], ["keyword", "open"],
" Eq", " Eq",
["punctuation", "."], ["punctuation", "."],

View File

@ -18,15 +18,20 @@ open Fin
["operator", ":"], ["operator", ":"],
["keyword", "Set"], ["keyword", "Set"],
["keyword", "where"], ["keyword", "where"],
["keyword", "constructor"], ["keyword", "constructor"],
" _[_]\n\t", " _[_]\r\n\t",
["keyword", "field"], ["keyword", "field"],
["function", "⟦_⟧ "], ["function", "⟦_⟧ "],
["operator", ":"], ["operator", ":"],
" Nat\n\t\t", " Nat\r\n\t\t",
["function", "proof "], ["function", "proof "],
["operator", ":"], ["operator", ":"],
" suc ⟦_⟧ ≤ n\n", " suc ⟦_⟧ ≤ n\r\n",
["keyword", "open"], ["keyword", "open"],
" Fin" " Fin"
] ]

View File

@ -9,7 +9,7 @@
[ [
["comment", "// comment"], ["comment", "// comment"],
["comment", "/**/"], ["comment", "/**/"],
["comment", "/*\n comment\n*/"] ["comment", "/*\r\n comment\r\n*/"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -21,12 +21,14 @@ from LexerAdaptor import LexerAdaptor
["content", " superClass = LexerAdaptor; "], ["content", " superClass = LexerAdaptor; "],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
["annotation", "@lexer::header"], ["annotation", "@lexer::header"],
["action", [ ["action", [
["punctuation", "{"], ["punctuation", "{"],
["content", "\n import { Token } from 'antlr4ts/Token';\n import { CommonToken } from 'antlr4ts/CommonToken';\n import { Python3Parser } from './Python3Parser';\n"], ["content", "\r\n import { Token } from 'antlr4ts/Token';\r\n import { CommonToken } from 'antlr4ts/CommonToken';\r\n import { Python3Parser } from './Python3Parser';\r\n"],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
["definition", "END"], ["definition", "END"],
["punctuation", ":"], ["punctuation", ":"],
["string", "'end'"], ["string", "'end'"],
@ -36,10 +38,11 @@ from LexerAdaptor import LexerAdaptor
["punctuation", "}"] ["punctuation", "}"]
]], ]],
["punctuation", ";"], ["punctuation", ";"],
["annotation", "@header"], ["annotation", "@header"],
["action", [ ["action", [
["punctuation", "{"], ["punctuation", "{"],
["content", "\nfrom LexerAdaptor import LexerAdaptor\n"], ["content", "\r\nfrom LexerAdaptor import LexerAdaptor\r\n"],
["punctuation", "}"] ["punctuation", "}"]
]] ]]
] ]

View File

@ -7,7 +7,7 @@
[ [
["comment", "// comment"], ["comment", "// comment"],
["comment", "/*\n comment\n*/"] ["comment", "/*\r\n comment\r\n*/"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -29,6 +29,7 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "["], ["punctuation", "["],
@ -36,7 +37,8 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
"Entry A\n ", "Entry A\r\n ",
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "["], ["punctuation", "["],
@ -44,7 +46,8 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
"Entry B\n", "Entry B\r\n",
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "[/"], ["punctuation", "[/"],
@ -64,6 +67,7 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "["], ["punctuation", "["],
@ -71,7 +75,8 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
"Entry 1\n ", "Entry 1\r\n ",
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "["], ["punctuation", "["],
@ -79,7 +84,8 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
"Entry 2\n", "Entry 2\r\n",
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "[/"], ["punctuation", "[/"],
@ -110,7 +116,8 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
" or\n", " or\r\n",
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "["], ["punctuation", "["],
@ -131,7 +138,8 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
" or\n", " or\r\n",
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "["], ["punctuation", "["],
@ -151,6 +159,7 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "["], ["punctuation", "["],
@ -166,6 +175,7 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "["], ["punctuation", "["],
@ -211,6 +221,7 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
["tag", [ ["tag", [
["tag", [ ["tag", [
["punctuation", "["], ["punctuation", "["],

View File

@ -9,15 +9,11 @@ a = { foo: 5, bar: 6, "foo bar": 7 }
[ [
["punctuation", "{"], ["punctuation", "{"],
["property", "foo"], ["property", "foo"], ["operator", ":"], ["number", "4"],
["operator", ":"], ["property", "\"bar\""], ["operator", ":"], ["number", "5"],
["number", "4"],
["property", "\"bar\""],
["operator", ":"],
["number", "5"],
["punctuation", "}"], ["punctuation", "}"],
"\n\na ", "\r\n\r\na ",
["operator", "="], ["operator", "="],
["punctuation", "{"], ["punctuation", "{"],
["property", "foo"], ["property", "foo"],

View File

@ -8,7 +8,7 @@ string"
[ [
["string", "\"\""], ["string", "\"\""],
["string", "\"Fo\\\"obar\""], ["string", "\"Fo\\\"obar\""],
["string", "\"multi-line\nstring\""] ["string", "\"multi-line\r\nstring\""]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -10,29 +10,39 @@ string"
[ [
["string", ["\"This is a string\""]], ["string", ["\"This is a string\""]],
["string", ["\"This is \nmulti\nline\nstring\""]], ["string", ["\"This is \r\nmulti\r\nline\r\nstring\""]],
["string", [ ["string", [
"\"", "\"",
["interpolation", [ ["interpolation", [
["punctuation", "${"], ["variable", "VAR"], ["punctuation", "}"]] ["punctuation", "${"],
], ["variable", "VAR"],
["punctuation", "}"]
]],
"with", "with",
["interpolation", [ ["interpolation", [
["punctuation", "${"], ["variable", "BAR"], ["punctuation", "}"]] ["punctuation", "${"],
], "\""] ["variable", "BAR"],
], ["punctuation", "}"]
]],
"\""
]],
["string", [ ["string", [
"\"", "\"",
["interpolation", [ ["interpolation", [
["punctuation", "${"], ["variable", "FOO"], ["punctuation", "}"]] ["punctuation", "${"],
], ["variable", "FOO"],
["punctuation", "}"]
]],
" with ", " with ",
["interpolation", [ ["interpolation", [
["punctuation", "${"], ["variable", "BAR"], ["punctuation", "}"]] ["punctuation", "${"],
], "\""] ["variable", "BAR"],
] ["punctuation", "}"]
]],
"\""
]]
] ]
---------------------------------------------------- ----------------------------------------------------
Checks for strings. Checks for strings.

View File

@ -69,7 +69,7 @@ greeting pic x(12) value is "Hello World".
]], ]],
["punctuation", "."], ["punctuation", "."],
"\n\ngreeting ", "\r\n\r\ngreeting ",
["keyword", "pic"], ["keyword", "pic"],
["class-name", [ ["class-name", [
"x", "x",
@ -81,4 +81,4 @@ greeting pic x(12) value is "Hello World".
["keyword", "is"], ["keyword", "is"],
["string", "\"Hello World\""], ["string", "\"Hello World\""],
["punctuation", "."] ["punctuation", "."]
] ]

View File

@ -23,7 +23,7 @@ void MainWindow::changeWindowTitle()
["punctuation", "{"], ["punctuation", "{"],
"\n Q_OBJECT\n\n ", "\r\n Q_OBJECT\r\n\r\n ",
["keyword", "private"], ["keyword", "private"],
" slots", " slots",
@ -67,4 +67,4 @@ void MainWindow::changeWindowTitle()
["punctuation", ";"], ["punctuation", ";"],
["punctuation", "}"] ["punctuation", "}"]
] ]

View File

@ -29,16 +29,13 @@ var c = new (int, int)[Count];
[ [
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]],
["attribute-arguments", [ ["attribute-arguments", [
["punctuation", "("], ["punctuation", "("],
["number", "1"], ["number", "1"],
@ -48,11 +45,10 @@ var c = new (int, int)[Count];
]] ]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]],
["attribute-arguments", [ ["attribute-arguments", [
["punctuation", "("], ["punctuation", "("],
["number", "1"], ["number", "1"],
@ -66,58 +62,48 @@ var c = new (int, int)[Count];
]] ]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]],
["punctuation", ","], ["punctuation", ","],
["class-name", [ ["class-name", ["Bar"]]
"Bar"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]],
["attribute-arguments", [ ["attribute-arguments", [
["punctuation", "("], ["punctuation", "("],
["string", "\"()\""], ["string", "\"()\""],
["punctuation", ")"] ["punctuation", ")"]
]], ]],
["punctuation", ","], ["punctuation", ","],
["class-name", [ ["class-name", ["Bar"]],
"Bar"
]],
["attribute-arguments", [ ["attribute-arguments", [
["punctuation", "("], ["punctuation", "("],
["string", "\"[]\""], ["string", "\"[]\""],
["punctuation", ")"] ["punctuation", ")"]
]], ]],
["punctuation", ","], ["punctuation", ","],
["class-name", [ ["class-name", ["Baz"]]
"Baz"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "return"], ["target", "return"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["MaybeNull"]]
"MaybeNull"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "assembly"], ["target", "assembly"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["InternalsVisibleTo"]],
"InternalsVisibleTo"
]],
["attribute-arguments", [ ["attribute-arguments", [
["punctuation", "("], ["punctuation", "("],
["string", "\"Tests\""], ["string", "\"Tests\""],
@ -125,98 +111,93 @@ var c = new (int, int)[Count];
]] ]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "assembly"], ["target", "assembly"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "module"], ["target", "module"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "field"], ["target", "field"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "event"], ["target", "event"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "method"], ["target", "method"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "param"], ["target", "param"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "property"], ["target", "property"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "return"], ["target", "return"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "["], ["punctuation", "["],
["attribute", [ ["attribute", [
["target", "type"], ["target", "type"],
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["Foo"]]
"Foo"
]]
]], ]],
["punctuation", "]"], ["punctuation", "]"],
["comment", "// not attributes"], ["comment", "// not attributes"],
["class-name", [ ["class-name", [
["keyword", "var"] ["keyword", "var"]
]], ]],
" a ", " a ",
["operator", "="], ["operator", "="],
" d\n", " d\r\n",
["punctuation", "["], ["punctuation", "["],
"Foo", "Foo",
["punctuation", "]"], ["punctuation", "]"],
["punctuation", ";"], ["punctuation", ";"],
["class-name", [ ["class-name", [
["keyword", "var"] ["keyword", "var"]
]], ]],
@ -234,6 +215,7 @@ var c = new (int, int)[Count];
"Count", "Count",
["punctuation", "]"], ["punctuation", "]"],
["punctuation", ";"], ["punctuation", ";"],
["class-name", [ ["class-name", [
["keyword", "var"] ["keyword", "var"]
]], ]],

View File

@ -51,28 +51,25 @@ public static RGBColor FromRainbow(Rainbow colorBand) =>
["keyword", "public"], ["keyword", "public"],
["keyword", "static"], ["keyword", "static"],
["return-type", [ ["return-type", ["RGBColor"]],
"RGBColor"
]],
["function", "FromRainbow"], ["function", "FromRainbow"],
["punctuation", "("], ["punctuation", "("],
["class-name", [ ["class-name", ["Rainbow"]],
"Rainbow"
]],
" colorBand", " colorBand",
["punctuation", ")"], ["punctuation", ")"],
["operator", "=>"], ["operator", "=>"],
"\n\tcolorBand ",
"\r\n\tcolorBand ",
["keyword", "switch"], ["keyword", "switch"],
["punctuation", "{"], ["punctuation", "{"],
"\n\t\tRainbow",
"\r\n\t\tRainbow",
["punctuation", "."], ["punctuation", "."],
"Red ", "Red ",
["operator", "=>"], ["operator", "=>"],
["keyword", "new"], ["keyword", "new"],
["constructor-invocation", [ ["constructor-invocation", ["RGBColor"]],
"RGBColor"
]],
["punctuation", "("], ["punctuation", "("],
["number", "0xFF"], ["number", "0xFF"],
["punctuation", ","], ["punctuation", ","],
@ -81,13 +78,12 @@ public static RGBColor FromRainbow(Rainbow colorBand) =>
["number", "0x00"], ["number", "0x00"],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ","], ["punctuation", ","],
"\n\t\t_ ",
"\r\n\t\t_ ",
["operator", "=>"], ["operator", "=>"],
["keyword", "throw"], ["keyword", "throw"],
["keyword", "new"], ["keyword", "new"],
["constructor-invocation", [ ["constructor-invocation", ["ArgumentException"]],
"ArgumentException"
]],
["punctuation", "("], ["punctuation", "("],
["named-parameter", "message"], ["named-parameter", "message"],
["punctuation", ":"], ["punctuation", ":"],
@ -101,6 +97,7 @@ public static RGBColor FromRainbow(Rainbow colorBand) =>
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ","], ["punctuation", ","],
["punctuation", "}"], ["punctuation", "}"],
["punctuation", ";"] ["punctuation", ";"]
] ]

View File

@ -18,9 +18,7 @@ $@"{
["string", "$\"Hello, {{ "], ["string", "$\"Hello, {{ "],
["interpolation", [ ["interpolation", [
["punctuation", "{"], ["punctuation", "{"],
["expression", [ ["expression", ["name"]],
"name"
]],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
["string", " }}! Today is "], ["string", " }}! Today is "],
@ -36,9 +34,7 @@ $@"{
["string", ", it's "], ["string", ", it's "],
["interpolation", [ ["interpolation", [
["punctuation", "{"], ["punctuation", "{"],
["expression", [ ["expression", ["date"]],
"date"
]],
["format-string", [ ["format-string", [
["punctuation", ":"], ["punctuation", ":"],
"HH:mm" "HH:mm"
@ -113,12 +109,14 @@ $@"{
]], ]],
["string", "\""] ["string", "\""]
]], ]],
["interpolation-string", [ ["interpolation-string", [
["string", "@$\"\n\""] ["string", "@$\"\r\n\""]
]], ]],
["interpolation-string", [ ["interpolation-string", [
["string", "$@\"\n\""] ["string", "$@\"\r\n\""]
]], ]],
["interpolation-string", [ ["interpolation-string", [
["string", "$@\""], ["string", "$@\""],
["interpolation", [ ["interpolation", [

View File

@ -15,7 +15,7 @@ list[..];
["punctuation", "]"], ["punctuation", "]"],
["punctuation", ";"], ["punctuation", ";"],
"\nlist", "\r\nlist",
["punctuation", "["], ["punctuation", "["],
["range", ".."], ["range", ".."],
["operator", "^"], ["operator", "^"],
@ -23,14 +23,14 @@ list[..];
["punctuation", "]"], ["punctuation", "]"],
["punctuation", ";"], ["punctuation", ";"],
"\nlist", "\r\nlist",
["punctuation", "["], ["punctuation", "["],
["number", "2"], ["number", "2"],
["range", ".."], ["range", ".."],
["punctuation", "]"], ["punctuation", "]"],
["punctuation", ";"], ["punctuation", ";"],
"\nlist", "\r\nlist",
["punctuation", "["], ["punctuation", "["],
["range", ".."], ["range", ".."],
["punctuation", "]"], ["punctuation", "]"],

View File

@ -113,12 +113,13 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
" vehicle", " vehicle",
["punctuation", ")"], ["punctuation", ")"],
["operator", "=>"], ["operator", "=>"],
"\n\tvehicle ",
"\r\n\tvehicle ",
["keyword", "switch"], ["keyword", "switch"],
["punctuation", "{"], ["punctuation", "{"],
["class-name", [
"DeliveryTruck" ["class-name", ["DeliveryTruck"]],
]],
" t ", " t ",
["keyword", "when"], ["keyword", "when"],
" t", " t",
@ -131,9 +132,8 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", "+"], ["operator", "+"],
["number", "5.00m"], ["number", "5.00m"],
["punctuation", ","], ["punctuation", ","],
["class-name", [
"DeliveryTruck" ["class-name", ["DeliveryTruck"]],
]],
" t ", " t ",
["keyword", "when"], ["keyword", "when"],
" t", " t",
@ -146,20 +146,18 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", "-"], ["operator", "-"],
["number", "2.00m"], ["number", "2.00m"],
["punctuation", ","], ["punctuation", ","],
["return-type", [
"DeliveryTruck" ["return-type", ["DeliveryTruck"]],
]],
" _ ", " _ ",
["operator", "=>"], ["operator", "=>"],
["number", "10.00m"], ["number", "10.00m"],
["punctuation", ","], ["punctuation", ","],
"\n\t\t_ ",
"\r\n\t\t_ ",
["operator", "=>"], ["operator", "=>"],
["keyword", "throw"], ["keyword", "throw"],
["keyword", "new"], ["keyword", "new"],
["constructor-invocation", [ ["constructor-invocation", ["ArgumentException"]],
"ArgumentException"
]],
["punctuation", "("], ["punctuation", "("],
["string", "\"Not a known vehicle type\""], ["string", "\"Not a known vehicle type\""],
["punctuation", ","], ["punctuation", ","],
@ -168,18 +166,20 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
"vehicle", "vehicle",
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", "}"], ["punctuation", "}"],
["punctuation", ";"], ["punctuation", ";"],
["class-name", [
"DeliveryTruck" ["class-name", ["DeliveryTruck"]],
]],
" t ", " t ",
["keyword", "when"], ["keyword", "when"],
" t", " t",
["punctuation", "."], ["punctuation", "."],
"GrossWeightClass ", "GrossWeightClass ",
["keyword", "switch"], ["keyword", "switch"],
["punctuation", "{"], ["punctuation", "{"],
["operator", ">"], ["operator", ">"],
["number", "5000"], ["number", "5000"],
["operator", "=>"], ["operator", "=>"],
@ -187,6 +187,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", "+"], ["operator", "+"],
["number", "5.00m"], ["number", "5.00m"],
["punctuation", ","], ["punctuation", ","],
["operator", "<"], ["operator", "<"],
["number", "3000"], ["number", "3000"],
["operator", "=>"], ["operator", "=>"],
@ -194,22 +195,25 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", "-"], ["operator", "-"],
["number", "2.00m"], ["number", "2.00m"],
["punctuation", ","], ["punctuation", ","],
"\n\t_ ",
"\r\n\t_ ",
["operator", "=>"], ["operator", "=>"],
["number", "10.00m"], ["number", "10.00m"],
["punctuation", ","], ["punctuation", ","],
["punctuation", "}"], ["punctuation", "}"],
["punctuation", ","], ["punctuation", ","],
["class-name", [
"DeliveryTruck" ["class-name", ["DeliveryTruck"]],
]],
" t ", " t ",
["keyword", "when"], ["keyword", "when"],
" t", " t",
["punctuation", "."], ["punctuation", "."],
"GrossWeightClass ", "GrossWeightClass ",
["keyword", "switch"], ["keyword", "switch"],
["punctuation", "{"], ["punctuation", "{"],
["operator", "<"], ["operator", "<"],
["number", "3000"], ["number", "3000"],
["operator", "=>"], ["operator", "=>"],
@ -217,6 +221,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", "-"], ["operator", "-"],
["number", "2.00m"], ["number", "2.00m"],
["punctuation", ","], ["punctuation", ","],
["operator", ">="], ["operator", ">="],
["number", "3000"], ["number", "3000"],
["keyword", "and"], ["keyword", "and"],
@ -225,6 +230,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", "=>"], ["operator", "=>"],
["number", "10.00m"], ["number", "10.00m"],
["punctuation", ","], ["punctuation", ","],
["operator", ">"], ["operator", ">"],
["number", "5000"], ["number", "5000"],
["operator", "=>"], ["operator", "=>"],
@ -232,8 +238,10 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", "+"], ["operator", "+"],
["number", "5.00m"], ["number", "5.00m"],
["punctuation", ","], ["punctuation", ","],
["punctuation", "}"], ["punctuation", "}"],
["punctuation", ","], ["punctuation", ","],
["keyword", "switch"], ["keyword", "switch"],
["punctuation", "("], ["punctuation", "("],
"DateTime", "DateTime",
@ -242,150 +250,187 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["punctuation", "."], ["punctuation", "."],
"DayOfWeek", "DayOfWeek",
["punctuation", ")"], ["punctuation", ")"],
["punctuation", "{"], ["punctuation", "{"],
["keyword", "case"], ["keyword", "case"],
" DayOfWeek", " DayOfWeek",
["punctuation", "."], ["punctuation", "."],
"Sunday", "Sunday",
["punctuation", ":"], ["punctuation", ":"],
["keyword", "case"], ["keyword", "case"],
" DayOfWeek", " DayOfWeek",
["punctuation", "."], ["punctuation", "."],
"Saturday", "Saturday",
["punctuation", ":"], ["punctuation", ":"],
"\n\t\tConsole",
"\r\n\t\tConsole",
["punctuation", "."], ["punctuation", "."],
["function", "WriteLine"], ["function", "WriteLine"],
["punctuation", "("], ["punctuation", "("],
["string", "\"The weekend\""], ["string", "\"The weekend\""],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
" DayOfWeek", " DayOfWeek",
["punctuation", "."], ["punctuation", "."],
"Monday", "Monday",
["punctuation", ":"], ["punctuation", ":"],
"\n\t\tConsole",
"\r\n\t\tConsole",
["punctuation", "."], ["punctuation", "."],
["function", "WriteLine"], ["function", "WriteLine"],
["punctuation", "("], ["punctuation", "("],
["string", "\"The first day of the work week.\""], ["string", "\"The first day of the work week.\""],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
" DayOfWeek", " DayOfWeek",
["punctuation", "."], ["punctuation", "."],
"Friday", "Friday",
["punctuation", ":"], ["punctuation", ":"],
"\n\t\tConsole",
"\r\n\t\tConsole",
["punctuation", "."], ["punctuation", "."],
["function", "WriteLine"], ["function", "WriteLine"],
["punctuation", "("], ["punctuation", "("],
["string", "\"The last day of the work week.\""], ["string", "\"The last day of the work week.\""],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "default"], ["keyword", "default"],
["punctuation", ":"], ["punctuation", ":"],
"\n\t\tConsole",
"\r\n\t\tConsole",
["punctuation", "."], ["punctuation", "."],
["function", "WriteLine"], ["function", "WriteLine"],
["punctuation", "("], ["punctuation", "("],
["string", "\"The middle of the work week.\""], ["string", "\"The middle of the work week.\""],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["punctuation", "}"], ["punctuation", "}"],
["keyword", "switch"], ["keyword", "switch"],
["punctuation", "("], ["punctuation", "("],
"str", "str",
["punctuation", ")"], ["punctuation", ")"],
["punctuation", "{"], ["punctuation", "{"],
["keyword", "case"], ["keyword", "case"],
["string", "\"1\""], ["string", "\"1\""],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "case"], ["keyword", "case"],
["string", "\"small\""], ["string", "\"small\""],
["punctuation", ":"], ["punctuation", ":"],
"\n\t\tcost ",
"\r\n\t\tcost ",
["operator", "+="], ["operator", "+="],
["number", "25"], ["number", "25"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
["string", "\"2\""], ["string", "\"2\""],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "case"], ["keyword", "case"],
["string", "\"medium\""], ["string", "\"medium\""],
["punctuation", ":"], ["punctuation", ":"],
"\n\t\tcost ",
"\r\n\t\tcost ",
["operator", "+="], ["operator", "+="],
["number", "25"], ["number", "25"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "goto"], ["keyword", "goto"],
["keyword", "case"], ["keyword", "case"],
["string", "\"1\""], ["string", "\"1\""],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
["string", "\"3\""], ["string", "\"3\""],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "case"], ["keyword", "case"],
["string", "\"large\""], ["string", "\"large\""],
["punctuation", ":"], ["punctuation", ":"],
"\n\t\tcost ",
"\r\n\t\tcost ",
["operator", "+="], ["operator", "+="],
["number", "50"], ["number", "50"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "goto"], ["keyword", "goto"],
["keyword", "case"], ["keyword", "case"],
["string", "\"1\""], ["string", "\"1\""],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "default"], ["keyword", "default"],
["punctuation", ":"], ["punctuation", ":"],
"\n\t\tConsole",
"\r\n\t\tConsole",
["punctuation", "."], ["punctuation", "."],
["function", "WriteLine"], ["function", "WriteLine"],
["punctuation", "("], ["punctuation", "("],
["string", "\"Invalid selection. Please select 1, 2, or 3.\""], ["string", "\"Invalid selection. Please select 1, 2, or 3.\""],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["punctuation", "}"], ["punctuation", "}"],
["keyword", "switch"], ["keyword", "switch"],
["punctuation", "("], ["punctuation", "("],
"sh", "sh",
["punctuation", ")"], ["punctuation", ")"],
["punctuation", "{"], ["punctuation", "{"],
["comment", "// Note that this code never evaluates to true."], ["comment", "// Note that this code never evaluates to true."],
["keyword", "case"], ["keyword", "case"],
["class-name", [ ["class-name", ["Shape"]],
"Shape"
]],
" shape ", " shape ",
["keyword", "when"], ["keyword", "when"],
" shape ", " shape ",
["operator", "=="], ["operator", "=="],
["keyword", "null"], ["keyword", "null"],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
["keyword", "null"], ["keyword", "null"],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
["class-name", [ ["class-name", ["Rectangle"]],
"Rectangle"
]],
" r ", " r ",
["keyword", "when"], ["keyword", "when"],
" r", " r",
@ -402,26 +447,33 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", ">"], ["operator", ">"],
["number", "0"], ["number", "0"],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "default"], ["keyword", "default"],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["punctuation", "}"], ["punctuation", "}"],
["keyword", "switch"], ["keyword", "switch"],
["punctuation", "("], ["punctuation", "("],
"coll", "coll",
["punctuation", ")"], ["punctuation", ")"],
["punctuation", "{"], ["punctuation", "{"],
["keyword", "case"], ["keyword", "case"],
["class-name", [ ["class-name", ["Array"]],
"Array"
]],
" arr", " arr",
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
["class-name", [ ["class-name", [
"IEnumerable", "IEnumerable",
@ -431,21 +483,28 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
]], ]],
" ieInt", " ieInt",
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
["class-name", [ ["class-name", [
["keyword", "object"] ["keyword", "object"]
]], ]],
" o", " o",
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "default"], ["keyword", "default"],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["punctuation", "}"], ["punctuation", "}"],
["return-type", [ ["return-type", [
["keyword", "bool"] ["keyword", "bool"]
]], ]],
@ -459,6 +518,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", "=>"], ["operator", "=>"],
" x ", " x ",
["keyword", "is"], ["keyword", "is"],
["operator", ">="], ["operator", ">="],
["number", "0"], ["number", "0"],
["keyword", "and"], ["keyword", "and"],
@ -466,6 +526,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["number", "100"], ["number", "100"],
["keyword", "or"], ["keyword", "or"],
["comment", "// integer tests"], ["comment", "// integer tests"],
["operator", ">="], ["operator", ">="],
["number", "0F"], ["number", "0F"],
["keyword", "and"], ["keyword", "and"],
@ -473,6 +534,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["number", "100F"], ["number", "100F"],
["keyword", "or"], ["keyword", "or"],
["comment", "// float tests"], ["comment", "// float tests"],
["operator", ">="], ["operator", ">="],
["number", "0D"], ["number", "0D"],
["keyword", "and"], ["keyword", "and"],
@ -480,6 +542,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["number", "100D"], ["number", "100D"],
["punctuation", ";"], ["punctuation", ";"],
["comment", "// double tests"], ["comment", "// double tests"],
["return-type", [ ["return-type", [
["keyword", "bool"] ["keyword", "bool"]
]], ]],
@ -500,6 +563,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["operator", "<"], ["operator", "<"],
["number", "100"], ["number", "100"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
["punctuation", "("], ["punctuation", "("],
["number", "0"], ["number", "0"],
@ -510,6 +574,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
" x", " x",
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "case"], ["keyword", "case"],
["punctuation", "("], ["punctuation", "("],
["class-name", [ ["class-name", [
@ -520,19 +585,22 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["number", "0"], ["number", "0"],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ":"], ["punctuation", ":"],
"\n\tConsole",
"\r\n\tConsole",
["punctuation", "."], ["punctuation", "."],
["function", "WriteLine"], ["function", "WriteLine"],
["punctuation", "("], ["punctuation", "("],
"x", "x",
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
["operator", "<"], ["operator", "<"],
["number", "2"], ["number", "2"],
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "case"], ["keyword", "case"],
["number", "0"], ["number", "0"],
["keyword", "or"], ["keyword", "or"],
@ -548,6 +616,7 @@ int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 };
["punctuation", ":"], ["punctuation", ":"],
["keyword", "break"], ["keyword", "break"],
["punctuation", ";"], ["punctuation", ";"],
["class-name", [ ["class-name", [
["keyword", "int"] ["keyword", "int"]
]], ]],

View File

@ -5,9 +5,7 @@ a.$name
[ [
["variable", "$name"], ["variable", "$name"],
"\na", "\r\na", ["punctuation", "."], ["variable", "$name"]
["punctuation", "."],
["variable", "$name"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -13,7 +13,7 @@ payload.myFunction(1,2,3)
["number", "123"], ["number", "123"],
["punctuation", ")"], ["punctuation", ")"],
"\npayload", "\r\npayload",
["punctuation", "."], ["punctuation", "."],
["function", "myFunction"], ["function", "myFunction"],
["punctuation", "("], ["punctuation", "("],
@ -24,5 +24,7 @@ payload.myFunction(1,2,3)
["number", "3"], ["number", "3"],
["punctuation", ")"] ["punctuation", ")"]
] ]
---------------------------------------------------- ----------------------------------------------------
Check for functions
Check for functions

View File

@ -42,7 +42,7 @@ payload match {
["keyword", "type"], ["keyword", "type"],
" T ", " T ",
["operator", "="], ["operator", "="],
" String\n", " String\r\n",
["keyword", "fun"], ["keyword", "fun"],
["function", "test"], ["function", "test"],
@ -73,7 +73,7 @@ payload match {
["operator", "->"], ["operator", "->"],
" x ", " x ",
["keyword", "as"], ["keyword", "as"],
" String\n", " String\r\n",
["punctuation", "}"], ["punctuation", "}"],
@ -105,7 +105,7 @@ payload match {
["keyword", "else"], ["keyword", "else"],
" \npayload ", " \r\npayload ",
["keyword", "match"], ["keyword", "match"],
["punctuation", "{"], ["punctuation", "{"],
@ -116,9 +116,11 @@ payload match {
["operator", "->"], ["operator", "->"],
" x ", " x ",
["keyword", "as"], ["keyword", "as"],
" String\n", " String\r\n",
["punctuation", "}"] ["punctuation", "}"]
] ]
---------------------------------------------------- ----------------------------------------------------
Check for keywords
Check for keywords

View File

@ -19,37 +19,37 @@ payload.name?
[ [
"a ", "a ",
["operator", ">"], ["operator", ">"],
" b\nc ", " b\r\nc ",
["operator", "<"], ["operator", "<"],
" d\na ", " d\r\na ",
["operator", "="], ["operator", "="],
["number", "1"], ["number", "1"],
"\na ", "\r\na ",
["operator", "<<"], ["operator", "<<"],
["number", "1"], ["number", "1"],
"\nb ", "\r\nb ",
["operator", ">>"], ["operator", ">>"],
["number", "2"], ["number", "2"],
"\nd ", "\r\nd ",
["operator", "<="], ["operator", "<="],
["number", "2"], ["number", "2"],
"\ne ", "\r\ne ",
["operator", ">="], ["operator", ">="],
["number", "3"], ["number", "3"],
"\nf ", "\r\nf ",
["operator", "!="], ["operator", "!="],
["number", "4"], ["number", "4"],
"\ng ", "\r\ng ",
["operator", "~="], ["operator", "~="],
["number", "4"], ["number", "4"],
"\nh ", "\r\nh ",
["operator", "=="], ["operator", "=="],
["number", "1"], ["number", "1"],
@ -59,19 +59,21 @@ payload.name?
["operator", "->"], ["operator", "->"],
["number", "1"], ["number", "1"],
"\na ", "\r\na ",
["operator", "++"], ["operator", "++"],
" b\nc ", " b\r\nc ",
["operator", "--"], ["operator", "--"],
" d\npayload", " d\r\npayload",
["punctuation", "."], ["punctuation", "."],
"name", "name",
["operator", "!"], ["operator", "!"],
"\npayload", "\r\npayload",
["punctuation", "."], ["punctuation", "."],
"name", "name",
["operator", "?"] ["operator", "?"]
] ]
---------------------------------------------------- ----------------------------------------------------
Check for operators
Check for operators

View File

@ -12,7 +12,7 @@
[ [
["comment", "-- comment"], ["comment", "-- comment"],
["comment", "{-\n\tcomment\n\t{-\n\t\tnested comment\n\t-}\n-}"] ["comment", "{-\r\n\tcomment\r\n\t{-\r\n\t\tnested comment\r\n\t-}\r\n-}"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -14,45 +14,32 @@ foo/${bar}
---------------------------------------------------- ----------------------------------------------------
[ [
["string", [ ["string", ["\"\""]],
"\"\"" ["string", ["\"foo\""]],
]], ["string", ["\"\\\"\""]],
["string", [
"\"foo\""
]],
["string", [
"\"\\\"\""
]],
["string", [ ["string", [
"\"foo/", "\"foo/",
["interpolation", [ ["interpolation", [
["punctuation", "${"], ["punctuation", "${"],
["expression", [ ["expression", ["bar"]],
"bar"
]],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\"" "\""
]], ]],
["string", [ ["string", ["''foo''"]],
"''foo''" ["string", ["''bar'''baz''"]],
]],
["string", [
"''bar'''baz''"
]],
["string", [ ["string", [
"''\nfoo/", "''\r\nfoo/",
["interpolation", [ ["interpolation", [
["punctuation", "${"], ["punctuation", "${"],
["expression", [ ["expression", ["bar"]],
"bar"
]],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n''"
"\r\n''"
]] ]]
] ]

View File

@ -6,7 +6,7 @@ bar%>
[ [
["ejs", [ ["ejs", [
["delimiter", "<%"], ["delimiter", "<%"],
["comment", "#foo\nbar"], ["comment", "#foo\r\nbar"],
["delimiter", "%>"] ["delimiter", "%>"]
]] ]]
] ]

View File

@ -27,30 +27,79 @@ multiline
---------------------------------------------------- ----------------------------------------------------
[ [
[ "doc", [ [ "attribute", "@doc" ], [ "string", "\"single\"" ] ] ], ["doc", [
[ "doc", [ [ "attribute", "@doc" ], [ "string", "'single'" ] ] ], ["attribute", "@doc"],
[ "doc", [ [ "attribute", "@doc" ], [ "string", "\"\"\"triple\"\"\"" ] ] ], ["string", "\"single\""]
[ "doc", [ [ "attribute", "@doc" ], [ "string", "'''triple'''" ] ] ], ]],
[ "doc", [ [ "attribute", "@doc" ], [ "string", "'''\nmultiline\n'''" ] ] ],
[ "doc", [ [ "attribute", "@doc" ], [ "string", "\"\"\"\nmultiline\n\"\"\"" ] ] ],
[ "attribute", "@doc" ],
[ "attr-name", "since:" ],
[ "string", [ "\"1.3.0\"" ] ],
[ "attribute", "@doc" ],
[ "attr-name", "deprecated:" ],
[ "string", [ "\"phased out\"" ] ],
[ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "\"single\"" ] ] ],
[ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "'single'" ] ] ],
[ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "\"\"\"triple\"\"\"" ] ] ],
[ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "'''triple'''" ] ] ],
[ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "'''\nmultiline\n'''" ] ] ],
[ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "\"\"\"\nmultiline\n\"\"\"" ] ] ],
[ "attribute", "@moduledoc" ],
[ "attr-name", "since:" ],
[ "string", [ "\"1.3.0\"" ] ],
[ "attribute", "@moduledoc" ],
[ "attr-name", "deprecated:" ],
[ "string", [ "\"phased out\"" ] ]
]
---------------------------------------------------- ["doc", [
["attribute", "@doc"],
["string", "'single'"]
]],
["doc", [
["attribute", "@doc"],
["string", "\"\"\"triple\"\"\""]
]],
["doc", [
["attribute", "@doc"],
["string", "'''triple'''"]
]],
["doc", [
["attribute", "@doc"],
["string", "'''\r\nmultiline\r\n'''"]
]],
["doc", [
["attribute", "@doc"],
["string", "\"\"\"\r\nmultiline\r\n\"\"\""]
]],
["attribute", "@doc"],
["attr-name", "since:"],
["string", ["\"1.3.0\""]],
["attribute", "@doc"],
["attr-name", "deprecated:"],
["string", ["\"phased out\""]],
["doc", [
["attribute", "@moduledoc"],
["string", "\"single\""]
]],
["doc", [
["attribute", "@moduledoc"],
["string", "'single'"]
]],
["doc", [
["attribute", "@moduledoc"],
["string", "\"\"\"triple\"\"\""]
]],
["doc", [
["attribute", "@moduledoc"],
["string", "'''triple'''"]
]],
["doc", [
["attribute", "@moduledoc"],
["string", "'''\r\nmultiline\r\n'''"]
]],
["doc", [
["attribute", "@moduledoc"],
["string", "\"\"\"\r\nmultiline\r\n\"\"\""]
]],
["attribute", "@moduledoc"],
["attr-name", "since:"],
["string", ["\"1.3.0\""]],
["attribute", "@moduledoc"],
["attr-name", "deprecated:"],
["string", ["\"phased out\""]]
]

View File

@ -7,21 +7,26 @@ end
---------------------------------------------------- ----------------------------------------------------
[ [
["keyword", "defmodule"], ["module", "Math"], ["keyword", "do"], ["keyword", "defmodule"],
["module", "Math"],
["keyword", "do"],
["keyword", "def"], ["keyword", "def"],
["function", "sum"], ["function", "sum"],
["punctuation", "("], ["punctuation", "("],
"a", "a",
["punctuation", ","], ["punctuation", ","],
" b", " b",
["punctuation", ")"], ["punctuation", ")"],
["keyword", "do"], ["keyword", "do"],
"\n a ", ["operator", "+"], " b\n ", "\r\n a ",
["operator", "+"],
" b\r\n ",
["keyword", "end"], ["keyword", "end"],
["keyword", "end"]
["keyword", "end"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -21,10 +21,9 @@
["comment", "# this is a block comment "], ["comment", "# this is a block comment "],
["delimiter", "%>"] ["delimiter", "%>"]
]], ]],
["erb", [ ["erb", [
["delimiter", "<%"], ["delimiter", "<%"],
["comment", "=begin %>\n\tblock comment\n\t(both lines of both the begin and end tags must be at the start of their lines)\n<%\n=end"], ["comment", "=begin %>\r\n\tblock comment\r\n\t(both lines of both the begin and end tags must be at the start of their lines)\r\n<%\r\n=end"],
["delimiter", "%>"] ["delimiter", "%>"]
]], ]],
@ -33,21 +32,14 @@
["comment", "# this is not "], ["comment", "# this is not "],
["delimiter", "%>"] ["delimiter", "%>"]
]], ]],
["erb", [ ["erb", [
["delimiter", "<%"], ["delimiter", "<%"],
["operator", "="], ["operator", "="], ["keyword", "begin"], ["delimiter", "%>"]
["keyword", "begin"],
["delimiter", "%>"]
]], ]],
"\r\n\tnot a comment\r\n\t",
"\n\tnot a comment\n\t",
["erb", [ ["erb", [
["delimiter", "<%"], ["delimiter", "<%"],
["operator", "="], ["operator", "="], ["keyword", "end"], ["delimiter", "%>"]
["keyword", "end"],
["delimiter", "%>"]
]] ]]
] ]

View File

@ -6,7 +6,7 @@
---------------------------------------------------- ----------------------------------------------------
[ [
["character-code", "'\n"], ["character-code", "'\t"], ["character-code", "'\r\n"], ["character-code", "'\t"],
["character-code", "' "], ["character-code", "' "],
["character-code", "''"] ["character-code", "''"]
] ]

View File

@ -11,7 +11,7 @@
---------------------------------------------------- ----------------------------------------------------
[ [
["comment", "{\n}"], ["comment", "{\r\n}"],
["comment", "{!#$%&'*+,-./:;=>?@[\\]^_`|~ßø}"], ["comment", "{!#$%&'*+,-./:;=>?@[\\]^_`|~ßø}"],
["comment", "{\"\"}"], ["comment", "{\"\"}"],
["comment", "{foo}"], ["comment", "{foo}"],

View File

@ -9,7 +9,7 @@
---------------------------------------------------- ----------------------------------------------------
[ [
["string", "\"\n\""], ["string", "\"\r\n\""],
["string", "\"!#$%&'*+,-./:;=>?@[\\]^_`|~ßø\""], ["string", "\"!#$%&'*+,-./:;=>?@[\\]^_`|~ßø\""],
["string", "\"\""], ["string", "\"\""],
["string", "\"\""], ["string", "\"\""], ["string", "\"\""], ["string", "\"\""],

View File

@ -34,51 +34,172 @@ exception Error2 of string * int
---------------------------------------------------- ----------------------------------------------------
[ [
["keyword", "let"], " func ", ["keyword", "let"],
["punctuation", ":"], ["class-name", ["HttpFunc"]], " func ",
["operator", "="], " handler ", ["punctuation", "("], ["punctuation", ":"],
"Some ", ["operator", ">>"], " Task", ["punctuation", "."], "FromResult", ["class-name", ["HttpFunc"]],
["operator", "="],
" handler ",
["punctuation", "("],
"Some ",
["operator", ">>"],
" Task",
["punctuation", "."],
"FromResult",
["punctuation", ")"], ["punctuation", ")"],
["keyword", "type"], ["class-name", ["Base1"]], ["punctuation", "("], ["punctuation", ")"], ["operator", "="], ["keyword", "type"],
["keyword", "abstract"], ["keyword", "member"], " F ", ["punctuation", ":"], ["class-name", ["Base1"]],
["punctuation", "("],
["punctuation", ")"],
["operator", "="],
["keyword", "abstract"],
["keyword", "member"],
" F ",
["punctuation", ":"],
["class-name", [ ["class-name", [
"unit ", ["operator", "->"], " unit"] "unit ",
], ["operator", "->"],
["keyword", "default"], " u", ["punctuation", "."], ["function", "F"], ["punctuation", "("], ["punctuation", ")"], " unit"
["operator", "="], "\n printfn ", ["string", "\"F Base1\""], ]],
["keyword", "type"], ["class-name", ["Derived1"]], ["punctuation", "("], ["punctuation", ")"], ["operator", "="], ["keyword", "default"],
["keyword", "inherit"], ["class-name", ["Base1"]], ["punctuation", "("], ["punctuation", ")"], " u",
["keyword", "override"], " u", ["punctuation", "."], ["function", "F"], ["punctuation", "("], ["punctuation", ")"], ["operator", "="], ["punctuation", "."],
"\n printfn ", ["string", "\"F Derived1\""], ["function", "F"],
["punctuation", "("],
["punctuation", ")"],
["operator", "="],
["keyword", "let"], " d1 ", ["punctuation", ":"], ["class-name", ["Derived1"]], ["operator", "="], "\r\n printfn ",
["function", "Derived1"], ["punctuation", "("], ["punctuation", ")"], ["string", "\"F Base1\""],
["keyword", "let"], " base1 ", ["operator", "="], " d1 ", ["operator", ":>"], ["class-name", ["Base1"]], ["keyword", "type"],
["class-name", ["Derived1"]],
["punctuation", "("],
["punctuation", ")"],
["operator", "="],
["keyword", "let"], " derived1 ", ["operator", "="], " base1 ", ["operator", ":?>"], ["class-name", ["Derived1"]], ["keyword", "inherit"],
["class-name", ["Base1"]],
["punctuation", "("],
["punctuation", ")"],
["keyword", "type"], ["class-name", ["PersonName"]], ["operator", "="], ["keyword", "override"],
["operator", "|"], " FirstOnly ", ["keyword", "of"], ["class-name", ["string"]], " u",
["operator", "|"], " LastOnly ", ["keyword", "of"], ["class-name", ["string"]], ["punctuation", "."],
["operator", "|"], " FirstLast ", ["keyword", "of"], ["class-name", ["string ", ["operator", "*"], " string"]], ["function", "F"],
["punctuation", "("],
["punctuation", ")"],
["operator", "="],
["keyword", "type"], ["class-name", ["Shape"]], ["operator", "="], "\r\n printfn ",
["operator", "|"], " Rectangle ", ["keyword", "of"], ["string", "\"F Derived1\""],
" height ", ["punctuation", ":"], ["class-name", ["float"]], ["operator", "*"],
" width ", ["punctuation", ":"], ["class-name", ["float"]],
["operator", "|"], " Circle ", ["keyword", "of"], " radius ", ["punctuation", ":"], ["class-name", ["float"]],
["keyword", "type"], ["class-name", ["MyInterface"]], ["operator", "="], ["keyword", "let"],
["keyword", "abstract"], ["keyword", "member"], " Add", ["punctuation", ":"], " d1 ",
["class-name", ["int ", ["operator", "->"], " int ", ["operator", "->"], " int"]], ["punctuation", ":"],
["keyword", "abstract"], ["keyword", "member"], " Pi ", ["punctuation", ":"], ["class-name", ["float"]], ["class-name", ["Derived1"]],
["operator", "="],
["function", "Derived1"],
["punctuation", "("],
["punctuation", ")"],
["keyword", "exception"], ["class-name", ["Error1"]], ["keyword", "of"], ["class-name", ["string"]], ["keyword", "let"],
" base1 ",
["operator", "="],
" d1 ",
["operator", ":>"],
["class-name", ["Base1"]],
["keyword", "exception"], ["class-name", ["Error2"]], ["keyword", "of"], ["class-name", ["string ", ["operator", "*"], " int"]] ["keyword", "let"],
" derived1 ",
["operator", "="],
" base1 ",
["operator", ":?>"],
["class-name", ["Derived1"]],
["keyword", "type"],
["class-name", ["PersonName"]],
["operator", "="],
["operator", "|"],
" FirstOnly ",
["keyword", "of"],
["class-name", ["string"]],
["operator", "|"],
" LastOnly ",
["keyword", "of"],
["class-name", ["string"]],
["operator", "|"],
" FirstLast ",
["keyword", "of"],
["class-name", [
"string ",
["operator", "*"],
" string"
]],
["keyword", "type"],
["class-name", ["Shape"]],
["operator", "="],
["operator", "|"],
" Rectangle ",
["keyword", "of"],
" height ",
["punctuation", ":"],
["class-name", ["float"]],
["operator", "*"],
" width ",
["punctuation", ":"],
["class-name", ["float"]],
["operator", "|"],
" Circle ",
["keyword", "of"],
" radius ",
["punctuation", ":"],
["class-name", ["float"]],
["keyword", "type"],
["class-name", ["MyInterface"]],
["operator", "="],
["keyword", "abstract"],
["keyword", "member"],
" Add",
["punctuation", ":"],
["class-name", [
"int ",
["operator", "->"],
" int ",
["operator", "->"],
" int"
]],
["keyword", "abstract"],
["keyword", "member"],
" Pi ",
["punctuation", ":"],
["class-name", ["float"]],
["keyword", "exception"],
["class-name", ["Error1"]],
["keyword", "of"],
["class-name", ["string"]],
["keyword", "exception"],
["class-name", ["Error2"]],
["keyword", "of"],
["class-name", [
"string ",
["operator", "*"],
" int"
]]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -6,9 +6,9 @@ E420:420
---------------------------------------------------- ----------------------------------------------------
[ [
["property", "X"], "123\n", ["property", "X"], "123\r\n",
["property", "Y"], "0.2\n", ["property", "Y"], "0.2\r\n",
["property", "Z"], "-3.1415\n", ["property", "Z"], "-3.1415\r\n",
["property", "E"], "420", ["punctuation", ":"], "420" ["property", "E"], "420", ["punctuation", ":"], "420"
] ]

View File

@ -16,21 +16,18 @@ func add(reference: Item, amount: int) -> Item:
---------------------------------------------------- ----------------------------------------------------
[ [
["keyword", "class_name"], ["keyword", "class_name"], ["class-name", "Foo"],
["class-name", "Foo"], ["keyword", "extends"], ["class-name", "Bar"],
["keyword", "extends"],
["class-name", "Bar"],
["keyword", "class"], ["keyword", "class"], ["class-name", "InnerClass"], ["punctuation", ":"],
["class-name", "InnerClass"],
["punctuation", ":"],
["keyword", "export"], ["keyword", "export"],
["punctuation", "("], ["punctuation", "("],
["class-name", "int"], ["class-name", "int"],
["punctuation", ")"], ["punctuation", ")"],
["keyword", "var"], ["keyword", "var"],
" baz\n", " baz\r\n",
["keyword", "export"], ["keyword", "export"],
["punctuation", "("], ["punctuation", "("],
["class-name", "int"], ["class-name", "int"],
@ -38,12 +35,9 @@ func add(reference: Item, amount: int) -> Item:
["number", "0"], ["number", "0"],
["punctuation", ")"], ["punctuation", ")"],
["keyword", "var"], ["keyword", "var"],
" i\n\n", " i\r\n\r\n",
["keyword", "return"], ["keyword", "return"], " foo ", ["keyword", "as"], ["class-name", "Node"],
" foo ",
["keyword", "as"],
["class-name", "Node"],
["keyword", "const"], ["keyword", "const"],
["constant", "FOO"], ["constant", "FOO"],
@ -51,6 +45,7 @@ func add(reference: Item, amount: int) -> Item:
["class-name", "int"], ["class-name", "int"],
["operator", "="], ["operator", "="],
["number", "9"], ["number", "9"],
["keyword", "var"], ["keyword", "var"],
" bar", " bar",
["punctuation", ":"], ["punctuation", ":"],

View File

@ -18,7 +18,9 @@
["string", "'bar'"], ["string", "'bar'"],
["string", "\"\\\"'foo'\\\"\""], ["string", "\"\\\"'foo'\\\"\""],
["string", "'\"\\'bar\\'\"'"], ["string", "'\"\\'bar\\'\"'"],
["string", "\"\"\"\n\"baz\"\n\"\"\""],
["string", "\"\"\"\r\n\"baz\"\r\n\"\"\""],
["string", "@\"foo\""], ["string", "@\"foo\""],
["string", "@'bar'"], ["string", "@'bar'"],
["string", "@\"\"\"baz\"\"\""] ["string", "@\"\"\"baz\"\"\""]

View File

@ -13,27 +13,29 @@ enum Color {
---------------------------------------------------- ----------------------------------------------------
[ [
["keyword", "enum"], ["keyword", "enum"], ["class-name", "Color"], ["punctuation", "{"],
["class-name", "Color"],
["punctuation", "{"],
["constant", "RED"], ["constant", "RED"],
["constant", "GREEN"], ["constant", "GREEN"],
["constant", "BLUE"], ["constant", "BLUE"],
["punctuation", "}"], ["punctuation", "}"],
["punctuation", "{"], ["punctuation", "{"],
"\n\tfoo",
"\r\n\tfoo",
["punctuation", "("], ["punctuation", "("],
["attr-name", "bar"], ["attr-name", "bar"],
["punctuation", ":"], ["punctuation", ":"],
["constant", "RED"], ["constant", "RED"],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", "{"], ["punctuation", "{"],
"\n\t\tbaz\n\t",
"\r\n\t\tbaz\r\n\t",
["punctuation", "}"], ["punctuation", "}"],
["punctuation", "}"] ["punctuation", "}"]
] ]
---------------------------------------------------- ----------------------------------------------------
Checks for constants. Checks for constants.

View File

@ -6,7 +6,8 @@ END_VAR
[ [
["class-name", "VAR"], ["class-name", "VAR"],
"\n varname ",
"\r\n varname ",
["keyword", "AT"], ["keyword", "AT"],
["symbol", "%QX1.0.0"], ["symbol", "%QX1.0.0"],
["operator", ":"], ["operator", ":"],
@ -14,6 +15,7 @@ END_VAR
["operator", ":="], ["operator", ":="],
["boolean", "TRUE"], ["boolean", "TRUE"],
["punctuation", ";"], ["punctuation", ";"],
["class-name", "END_VAR"] ["class-name", "END_VAR"]
] ]

View File

@ -1,4 +1,4 @@
# #
; ;
# #
; ;
@ -42,7 +42,7 @@ foobar;
["comment", ";[foo]"], ["comment", ";[foo]"],
["comment", ";foo=bar"], ["comment", ";foo=bar"],
["comment", ";foobar"], ["comment", ";foobar"],
"\nfoo#bar\nfoobar#\nfoo;bar\nfoobar;" "\r\nfoo#bar\r\nfoobar#\r\nfoo;bar\r\nfoobar;"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -1,4 +1,4 @@
bar1 = bar1 =
"bar2" = "bar2" =
'bar3' = 'bar3' =
bar4 = bar4 =
@ -32,36 +32,127 @@ bar30=baz30=qux30
---------------------------------------------------- ----------------------------------------------------
[ [
["key", "bar1"], ["punctuation", "="], ["key", "bar1"],
["key", "\"bar2\""], ["punctuation", "="], ["punctuation", "="],
["key", "'bar3'"], ["punctuation", "="],
["key", "bar4"], ["punctuation", "="], ["key", "\"bar2\""],
["key", "\" bar5 \""], ["punctuation", "="], ["punctuation", "="],
["key", "\"bar6\""], ["punctuation", "="],
["key", "' bar7 '"], ["punctuation", "="], ["key", "'bar3'"],
["key", "'bar8'"], ["punctuation", "="], ["punctuation", "="],
["punctuation", "="], ["value", ["baz9"]],
["punctuation", "="], ["value", ["\"", ["inner-value", "baz10"], "\""]], ["key", "bar4"],
["punctuation", "="], ["value", ["'", ["inner-value", "baz11"], "'"]], ["punctuation", "="],
["punctuation", "="], ["value", ["baz12"]],
["punctuation", "="], ["value", ["\"", ["inner-value", " baz13 "], "\""]], ["key", "\" bar5 \""],
["punctuation", "="], ["value", ["\"", ["inner-value", "b14\"a14\"z14"], "\""]], ["punctuation", "="],
["punctuation", "="], ["value", ["\"", ["inner-value", "baz15"], "\""]],
["punctuation", "="], ["value", ["\"baz16"]], ["key", "\"bar6\""],
["punctuation", "="], ["value", ["'", ["inner-value", " baz17 "], "'"]], ["punctuation", "="],
["punctuation", "="], ["value", ["'", ["inner-value", "baz18"], "'"]],
["punctuation", "="], ["value", ["b19\"a19\"z19"]], ["key", "' bar7 '"],
["punctuation", "="], ["value", ["b20\"az20"]], ["punctuation", "="],
["punctuation", "="], ["value", ["ba21\"z21"]],
["punctuation", "="], ["value", ["baz22"]], ["key", "'bar8'"],
["punctuation", "="], ["value", ["baz23\""]], ["punctuation", "="],
"\nbar24\n",
["key", "bar25 baz25"], ["punctuation", "="], ["value", ["qux25"]], ["punctuation", "="],
["key", "bar26"], ["punctuation", "="], ["value", ["baz9"]],
["key", "bar27"], ["punctuation", "="], ["value", ["=baz27"]],
["key", "bar28"], ["punctuation", "="], ["value", ["baz28"]], ["punctuation", "="],
["key", "bar29"], ["punctuation", "="], ["value", ["baz29 qux29"]], ["value", [
["key", "bar30"], ["punctuation", "="], ["value", ["baz30=qux30"]] "\"",
["inner-value", "baz10"],
"\""
]],
["punctuation", "="],
["value", [
"'",
["inner-value", "baz11"],
"'"
]],
["punctuation", "="],
["value", ["baz12"]],
["punctuation", "="],
["value", [
"\"",
["inner-value", " baz13 "],
"\""
]],
["punctuation", "="],
["value", [
"\"",
["inner-value", "b14\"a14\"z14"],
"\""
]],
["punctuation", "="],
["value", [
"\"",
["inner-value", "baz15"],
"\""
]],
["punctuation", "="],
["value", ["\"baz16"]],
["punctuation", "="],
["value", [
"'",
["inner-value", " baz17 "],
"'"
]],
["punctuation", "="],
["value", [
"'",
["inner-value", "baz18"],
"'"
]],
["punctuation", "="],
["value", ["b19\"a19\"z19"]],
["punctuation", "="],
["value", ["b20\"az20"]],
["punctuation", "="],
["value", ["ba21\"z21"]],
["punctuation", "="],
["value", ["baz22"]],
["punctuation", "="],
["value", ["baz23\""]],
"\r\nbar24\r\n",
["key", "bar25 baz25"],
["punctuation", "="],
["value", ["qux25"]],
["key", "bar26"],
["punctuation", "="],
["key", "bar27"],
["punctuation", "="],
["value", ["=baz27"]],
["key", "bar28"],
["punctuation", "="],
["value", ["baz28"]],
["key", "bar29"],
["punctuation", "="],
["value", ["baz29 qux29"]],
["key", "bar30"],
["punctuation", "="],
["value", ["baz30=qux30"]]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -11,7 +11,7 @@ comment
["comment", "//"], ["comment", "//"],
["comment", "// Foobar"], ["comment", "// Foobar"],
["comment", "#!/usr/bin/env io"], ["comment", "#!/usr/bin/env io"],
["comment", "/* multiline\ncomment\n*/"] ["comment", "/* multiline\r\ncomment\r\n*/"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -4,15 +4,15 @@
"""this is a "test". """this is a "test".
This is only a test.""" This is only a test."""
------------------------------------------------------------------------- ----------------------------------------------------
[ [
["string", "\"\""], ["string", "\"\""],
["triple-quoted-string", "\"\"\"\"\"\""], ["triple-quoted-string", "\"\"\"\"\"\""],
["string", "\"this is a \\\"test\\\".\\nThis is only a test.\""], ["string", "\"this is a \\\"test\\\".\\nThis is only a test.\""],
["triple-quoted-string", "\"\"\"this is a \"test\".\nThis is only a test.\"\"\""] ["triple-quoted-string", "\"\"\"this is a \"test\".\r\nThis is only a test.\"\"\""]
] ]
------------------------------------------------------------------------- ----------------------------------------------------
Check strings. Check strings.

View File

@ -23,29 +23,27 @@ String empty = """
["string", "\"foo\""], ["string", "\"foo\""],
["string", "\"\\\"foo\\\"\""], ["string", "\"\\\"foo\\\"\""],
["triple-quoted-string", "\"\"\"\nfoo\n\"\"\""], ["triple-quoted-string", "\"\"\"\r\nfoo\r\n\"\"\""],
["keyword", "var"], ["keyword", "var"],
" a ", " a ",
["operator", "="], ["operator", "="],
["triple-quoted-string", "\"\"\"\n\\\"\"\"\nfoo\"\"\""], ["triple-quoted-string", "\"\"\"\r\n\\\"\"\"\r\nfoo\"\"\""],
["punctuation", ";"], ["punctuation", ";"],
["triple-quoted-string", "\"\"\"\nThe quick brown fox\"\"\""], ["triple-quoted-string", "\"\"\"\r\nThe quick brown fox\"\"\""],
["operator", "+"], ["operator", "+"],
["string", "\" \\n\""], ["string", "\" \\n\""],
["operator", "+"], ["operator", "+"],
["triple-quoted-string", "\"\"\"\njumps over the lazy dog\n\"\"\""], ["triple-quoted-string", "\"\"\"\r\njumps over the lazy dog\r\n\"\"\""],
["class-name", [ ["class-name", ["String"]],
"String"
]],
" empty ", " empty ",
["operator", "="], ["operator", "="],
["triple-quoted-string", "\"\"\"\n\"\"\""], ["triple-quoted-string", "\"\"\"\r\n\"\"\""],
["punctuation", ";"] ["punctuation", ";"]
] ]
---------------------------------------------------- ----------------------------------------------------
Checks for strings. Checks for strings.

View File

@ -25,9 +25,7 @@ foo.Bar = function() {};
["maybe-class-name", "Baz"], ["maybe-class-name", "Baz"],
["punctuation", "."], ["punctuation", "."],
["method", [ ["method", ["foo"]],
"foo"
]],
["punctuation", "("], ["punctuation", "("],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
@ -44,7 +42,7 @@ foo.Bar = function() {};
["punctuation", "}"], ["punctuation", "}"],
["punctuation", ";"], ["punctuation", ";"],
"\nfoo", "\r\nfoo",
["punctuation", "."], ["punctuation", "."],
["method-variable", [ ["method-variable", [
["maybe-class-name", "Bar"] ["maybe-class-name", "Bar"]

View File

@ -7,9 +7,7 @@ this.bar = () => {};
[ [
"foo", "foo",
["punctuation", "."], ["punctuation", "."],
["method-variable", [ ["method-variable", ["bar"]],
"bar"
]],
["operator", "="], ["operator", "="],
["keyword", "function"], ["keyword", "function"],
["punctuation", "("], ["punctuation", "("],
@ -18,11 +16,9 @@ this.bar = () => {};
["punctuation", "}"], ["punctuation", "}"],
["punctuation", ";"], ["punctuation", ";"],
"\nfoo", "\r\nfoo",
["punctuation", "."], ["punctuation", "."],
["method-variable", [ ["method-variable", ["bar"]],
"bar"
]],
["operator", "="], ["operator", "="],
["keyword", "async"], ["keyword", "async"],
["punctuation", "("], ["punctuation", "("],
@ -34,9 +30,7 @@ this.bar = () => {};
["keyword", "this"], ["keyword", "this"],
["punctuation", "."], ["punctuation", "."],
["method-variable", [ ["method-variable", ["bar"]],
"bar"
]],
["operator", "="], ["operator", "="],
["punctuation", "("], ["punctuation", "("],
["punctuation", ")"], ["punctuation", ")"],

View File

@ -7,31 +7,23 @@ this.#bar();
[ [
"foo", "foo",
["punctuation", "."], ["punctuation", "."],
["method", [ ["method", ["bar"]],
"bar"
]],
["punctuation", "("], ["punctuation", "("],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
"\nfoo", "\r\nfoo",
["punctuation", "."], ["punctuation", "."],
["method", [ ["method", ["bar"]],
"bar"
]],
["punctuation", "."], ["punctuation", "."],
["method", [ ["method", ["call"]],
"call"
]],
["punctuation", "("], ["punctuation", "("],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "this"], ["keyword", "this"],
["punctuation", "."], ["punctuation", "."],
["method", [ ["method", ["#bar"]],
"#bar"
]],
["punctuation", "("], ["punctuation", "("],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"] ["punctuation", ";"]

View File

@ -6,10 +6,22 @@ gl.FLOAT_MAT2x4;
---------------------------------------------------- ----------------------------------------------------
[ [
["keyword", "var"], ["constant", "FOO"], ["punctuation", ";"], ["keyword", "var"],
["keyword", "const"], ["constant", "FOO_BAR"], ["punctuation", ";"], ["constant", "FOO"],
["keyword", "const"], ["constant", "BAZ42"], ["punctuation", ";"], ["punctuation", ";"],
"\ngl", ["punctuation", "."], ["constant", "FLOAT_MAT2x4"], ["punctuation", ";"]
["keyword", "const"],
["constant", "FOO_BAR"],
["punctuation", ";"],
["keyword", "const"],
["constant", "BAZ42"],
["punctuation", ";"],
"\r\ngl",
["punctuation", "."],
["constant", "FLOAT_MAT2x4"],
["punctuation", ";"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -10,7 +10,8 @@ foo.var.new;
["punctuation", "("], ["punctuation", "("],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
"\nfoo",
"\r\nfoo",
["punctuation", "."], ["punctuation", "."],
"var", "var",
["punctuation", "."], ["punctuation", "."],

View File

@ -17,7 +17,7 @@ fooBar.prototype.bar;
"constructor", "constructor",
["punctuation", ";"], ["punctuation", ";"],
"\nfooBar", "\r\nfooBar",
["punctuation", "."], ["punctuation", "."],
"prototype", "prototype",
["punctuation", "."], ["punctuation", "."],

View File

@ -42,7 +42,7 @@ at at.foo.bar.Main$FooBar.main(Native Method)
]], ]],
["punctuation", ")"] ["punctuation", ")"]
]], ]],
" Same but with some additional notes\n", " Same but with some additional notes\r\n",
["stack-frame", [ ["stack-frame", [
["keyword", "at"], ["keyword", "at"],
@ -233,7 +233,7 @@ at at.foo.bar.Main$FooBar.main(Native Method)
["punctuation", ")"] ["punctuation", ")"]
]], ]],
"\n\n// not to forget our swiss friends\n", "\r\n\r\n// not to forget our swiss friends\r\n",
["stack-frame", [ ["stack-frame", [
["keyword", "at"], ["keyword", "at"],
["namespace", [ ["namespace", [

View File

@ -18,6 +18,7 @@ println @ Console( "none" )()
" Third" " Third"
]] ]]
]], ]],
["keyword", "Redirects"], ["keyword", "Redirects"],
["operator", ":"], ["operator", ":"],
["redirects", [ ["redirects", [
@ -29,19 +30,22 @@ println @ Console( "none" )()
["symbol", "=>"], ["symbol", "=>"],
["function", "Fourth"] ["function", "Fourth"]
]], ]],
["keyword", "Jolie"], ["keyword", "Jolie"],
["operator", ":"], ["operator", ":"],
["string", "\"logger.ol\""], ["string", "\"logger.ol\""],
["keyword", "in"], ["keyword", "in"],
["function", "LoggerService"], ["function", "LoggerService"],
"\nlog",
"\r\nlog",
["symbol", "@"], ["symbol", "@"],
["function", "LoggerService"], ["function", "LoggerService"],
"( ", "( ",
["keyword", "new"], ["keyword", "new"],
" )()", " )()",
["symbol", ";"], ["symbol", ";"],
"\nprintln ",
"\r\nprintln ",
["symbol", "@"], ["symbol", "@"],
["function", "Console"], ["function", "Console"],
"( ", "( ",

View File

@ -28,14 +28,15 @@
---------------------------------------------------- ----------------------------------------------------
[ [
"/**\n * ", "/**\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
"number", "number",
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -44,7 +45,8 @@
" string", " string",
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -63,7 +65,8 @@
["punctuation", ">"], ["punctuation", ">"],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -87,7 +90,8 @@
["punctuation", "}"], ["punctuation", "}"],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -110,7 +114,8 @@
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -121,7 +126,8 @@
["number", "2"], ["number", "2"],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -130,7 +136,8 @@
" string", " string",
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -139,7 +146,8 @@
" Type2", " Type2",
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -152,7 +160,8 @@
"Bar", "Bar",
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -162,14 +171,16 @@
["punctuation", "]"], ["punctuation", "]"],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
["operator", "*"], ["operator", "*"],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -179,73 +190,63 @@
["keyword", "void"], ["keyword", "void"],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
"\n *\n * ",
"\r\n *\r\n * ",
["keyword", "@typedef"], ["keyword", "@typedef"],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@typedef"], ["keyword", "@typedef"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
"Bar", "Bar",
["punctuation", "}"] ["punctuation", "}"]
]], ]],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@template"], ["keyword", "@template"],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@template"], ["keyword", "@template"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
"Bar", "Bar",
["punctuation", "}"] ["punctuation", "}"]
]], ]],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@augments"], ["keyword", "@augments"],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@extends"], ["keyword", "@extends"],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@class"], ["keyword", "@class"],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@interface"], ["keyword", "@interface"],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@memberof"], ["keyword", "@memberof"],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@memberof"], ["keyword", "@memberof"],
"! ", "! ",
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n * ",
"\n * ",
["keyword", "@this"], ["keyword", "@this"],
["class-name", [ ["class-name", ["Foo"]],
"Foo"
]], "\r\n */"
"\n */"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -7,14 +7,16 @@
---------------------------------------------------- ----------------------------------------------------
[ [
"/**\n * ", "/**\r\n * ",
["keyword", "@example"], ["keyword", "@example"],
["example", [ ["example", [
"* ", "* ",
["code", [ ["code", [
["comment", "// returns 3"] ["comment", "// returns 3"]
]], ]],
"\n * ",
"\r\n * ",
["code", [ ["code", [
"globalNS", "globalNS",
["punctuation", "."], ["punctuation", "."],
@ -27,7 +29,8 @@
["punctuation", ";"] ["punctuation", ";"]
]] ]]
]], ]],
"\n */"
"\r\n */"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -89,92 +89,92 @@
---------------------------------------------------- ----------------------------------------------------
[ [
"/**\n * ", ["keyword", "@abstract"], "/**\r\n * ", ["keyword", "@abstract"],
"\n * ", ["keyword", "@virtual"], "\r\n * ", ["keyword", "@virtual"],
"\n * ", ["keyword", "@access"], "\r\n * ", ["keyword", "@access"],
"\n * ", ["keyword", "@alias"], "\r\n * ", ["keyword", "@alias"],
"\n * ", ["keyword", "@async"], "\r\n * ", ["keyword", "@async"],
"\n * ", ["keyword", "@augments"], "\r\n * ", ["keyword", "@augments"],
"\n * ", ["keyword", "@extends"], "\r\n * ", ["keyword", "@extends"],
"\n * ", ["keyword", "@author"], "\r\n * ", ["keyword", "@author"],
"\n * ", ["keyword", "@borrows"], "\r\n * ", ["keyword", "@borrows"],
"\n * ", ["keyword", "@callback"], "\r\n * ", ["keyword", "@callback"],
"\n * ", ["keyword", "@class"], "\r\n * ", ["keyword", "@class"],
"\n * ", ["keyword", "@constructor"], "\r\n * ", ["keyword", "@constructor"],
"\n * ", ["keyword", "@hideconstructor"], "\r\n * ", ["keyword", "@hideconstructor"],
"\n * ", ["keyword", "@classdesc"], "\r\n * ", ["keyword", "@classdesc"],
"\n * ", ["keyword", "@constant"], "\r\n * ", ["keyword", "@constant"],
"\n * ", ["keyword", "@const"], "\r\n * ", ["keyword", "@const"],
"\n * ", ["keyword", "@constructs"], "\r\n * ", ["keyword", "@constructs"],
"\n * ", ["keyword", "@copyright"], "\r\n * ", ["keyword", "@copyright"],
"\n * ", ["keyword", "@default"], "\r\n * ", ["keyword", "@default"],
"\n * ", ["keyword", "@defaultValue"], "\r\n * ", ["keyword", "@defaultValue"],
"\n * ", ["keyword", "@deprecated"], "\r\n * ", ["keyword", "@deprecated"],
"\n * ", ["keyword", "@description"], "\r\n * ", ["keyword", "@description"],
"\n * ", ["keyword", "@desc"], "\r\n * ", ["keyword", "@desc"],
"\n * ", ["keyword", "@enum"], "\r\n * ", ["keyword", "@enum"],
"\n * ", ["keyword", "@event"], "\r\n * ", ["keyword", "@event"],
"\n * ", ["keyword", "@exports"], "\r\n * ", ["keyword", "@exports"],
"\n * ", ["keyword", "@external"], "\r\n * ", ["keyword", "@external"],
"\n * ", ["keyword", "@host"], "\r\n * ", ["keyword", "@host"],
"\n * ", ["keyword", "@file"], "\r\n * ", ["keyword", "@file"],
"\n * ", ["keyword", "@overview"], "\r\n * ", ["keyword", "@overview"],
"\n * ", ["keyword", "@fileoverview"], "\r\n * ", ["keyword", "@fileoverview"],
"\n * ", ["keyword", "@fires"], "\r\n * ", ["keyword", "@fires"],
"\n * ", ["keyword", "@emits"], "\r\n * ", ["keyword", "@emits"],
"\n * ", ["keyword", "@function"], "\r\n * ", ["keyword", "@function"],
"\n * ", ["keyword", "@func"], "\r\n * ", ["keyword", "@func"],
"\n * ", ["keyword", "@method"], "\r\n * ", ["keyword", "@method"],
"\n * ", ["keyword", "@generator"], "\r\n * ", ["keyword", "@generator"],
"\n * ", ["keyword", "@global"], "\r\n * ", ["keyword", "@global"],
"\n * ", ["keyword", "@ignore"], "\r\n * ", ["keyword", "@ignore"],
"\n * ", ["keyword", "@implements"], "\r\n * ", ["keyword", "@implements"],
"\n * ", ["keyword", "@inheritdoc"], "\r\n * ", ["keyword", "@inheritdoc"],
"\n * ", ["keyword", "@inner"], "\r\n * ", ["keyword", "@inner"],
"\n * ", ["keyword", "@instance"], "\r\n * ", ["keyword", "@instance"],
"\n * ", ["keyword", "@interface"], "\r\n * ", ["keyword", "@interface"],
"\n * ", ["keyword", "@kind"], "\r\n * ", ["keyword", "@kind"],
"\n * ", ["keyword", "@lends"], "\r\n * ", ["keyword", "@lends"],
"\n * ", ["keyword", "@license"], "\r\n * ", ["keyword", "@license"],
"\n * ", ["keyword", "@listens"], "\r\n * ", ["keyword", "@listens"],
"\n * ", ["keyword", "@member"], "\r\n * ", ["keyword", "@member"],
"\n * ", ["keyword", "@var"], "\r\n * ", ["keyword", "@var"],
"\n * ", ["keyword", "@memberof"], "\r\n * ", ["keyword", "@memberof"],
"\n * ", ["keyword", "@mixes"], "\r\n * ", ["keyword", "@mixes"],
"\n * ", ["keyword", "@mixin"], "\r\n * ", ["keyword", "@mixin"],
"\n * ", ["keyword", "@module"], "\r\n * ", ["keyword", "@module"],
"\n * ", ["keyword", "@name"], "\r\n * ", ["keyword", "@name"],
"\n * ", ["keyword", "@namespace"], "\r\n * ", ["keyword", "@namespace"],
"\n * ", ["keyword", "@override"], "\r\n * ", ["keyword", "@override"],
"\n * ", ["keyword", "@package"], "\r\n * ", ["keyword", "@package"],
"\n * ", ["keyword", "@param"], "\r\n * ", ["keyword", "@param"],
"\n * ", ["keyword", "@arg"], "\r\n * ", ["keyword", "@arg"],
"\n * ", ["keyword", "@argument"], "\r\n * ", ["keyword", "@argument"],
"\n * ", ["keyword", "@private"], "\r\n * ", ["keyword", "@private"],
"\n * ", ["keyword", "@property"], "\r\n * ", ["keyword", "@property"],
"\n * ", ["keyword", "@prop"], "\r\n * ", ["keyword", "@prop"],
"\n * ", ["keyword", "@protected"], "\r\n * ", ["keyword", "@protected"],
"\n * ", ["keyword", "@public"], "\r\n * ", ["keyword", "@public"],
"\n * ", ["keyword", "@readonly"], "\r\n * ", ["keyword", "@readonly"],
"\n * ", ["keyword", "@requires"], "\r\n * ", ["keyword", "@requires"],
"\n * ", ["keyword", "@return"], "\r\n * ", ["keyword", "@return"],
"\n * ", ["keyword", "@returns"], "\r\n * ", ["keyword", "@returns"],
"\n * ", ["keyword", "@see"], "\r\n * ", ["keyword", "@see"],
"\n * ", ["keyword", "@since"], "\r\n * ", ["keyword", "@since"],
"\n * ", ["keyword", "@static"], "\r\n * ", ["keyword", "@static"],
"\n * ", ["keyword", "@summary"], "\r\n * ", ["keyword", "@summary"],
"\n * ", ["keyword", "@this"], "\r\n * ", ["keyword", "@this"],
"\n * ", ["keyword", "@throws"], "\r\n * ", ["keyword", "@throws"],
"\n * ", ["keyword", "@exception"], "\r\n * ", ["keyword", "@exception"],
"\n * ", ["keyword", "@todo"], "\r\n * ", ["keyword", "@todo"],
"\n * ", ["keyword", "@tutorial"], "\r\n * ", ["keyword", "@tutorial"],
"\n * ", ["keyword", "@type"], "\r\n * ", ["keyword", "@type"],
"\n * ", ["keyword", "@typedef"], "\r\n * ", ["keyword", "@typedef"],
"\n * ", ["keyword", "@variation"], "\r\n * ", ["keyword", "@variation"],
"\n * ", ["keyword", "@version"], "\r\n * ", ["keyword", "@version"],
"\n * ", ["keyword", "@yield"], "\r\n * ", ["keyword", "@yield"],
"\n * ", ["keyword", "@yields"], "\r\n * ", ["keyword", "@yields"],
"\n */" "\r\n */"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -10,27 +10,21 @@
---------------------------------------------------- ----------------------------------------------------
[ [
"/**\n * ", "/**\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["parameter", [ ["parameter", ["n"]],
"n" " - A number.\r\n * ",
]],
" - A number.\n * ",
["keyword", "@param"], ["keyword", "@param"],
["optional-parameter", [ ["optional-parameter", [
["punctuation", "["], ["punctuation", "["],
["parameter", [ ["parameter", ["n"]],
"n"
]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
" - A number.\n * ", " - A number.\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["optional-parameter", [ ["optional-parameter", [
["punctuation", "["], ["punctuation", "["],
["parameter", [ ["parameter", ["n"]],
"n"
]],
["punctuation", "="], ["punctuation", "="],
["code", [ ["code", [
["number", "1"], ["number", "1"],
@ -39,17 +33,15 @@
]], ]],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
" - A number.\n * ", " - A number.\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
"number", "number",
["punctuation", "}"] ["punctuation", "}"]
]], ]],
["parameter", [ ["parameter", ["n"]],
"n" " - A number.\r\n * ",
]],
" - A number.\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -73,10 +65,9 @@
["punctuation", "}"], ["punctuation", "}"],
["punctuation", "}"] ["punctuation", "}"]
]], ]],
["parameter", [ ["parameter", ["map"]],
"map"
]], "\r\n * ",
"\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["punctuation", "{"], ["punctuation", "{"],
@ -88,7 +79,8 @@
["punctuation", "."], ["punctuation", "."],
"bar" "bar"
]], ]],
"\n */"
"\r\n */"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -12,8 +12,11 @@ newline"
[ [
["string", "\"\""], ["string", "\"\""],
["string", "\"foo\""], ["string", "\"foo\""],
["string", "\"foo\\\"bar\\\"baz\""], ["string", "\"foo\\\"bar\\\"baz\""],
["string", "\"\\u2642\\\\ \""], ["string", "\"\\u2642\\\\ \""],
["punctuation", "{"], ["punctuation", "{"],
@ -27,8 +30,10 @@ newline"
["punctuation", "}"], ["punctuation", "}"],
["string", "'foo\"bar\"baz'"], ["string", "'foo\"bar\"baz'"],
["string", "'\\u0001'"], ["string", "'\\u0001'"],
["string", "\"\\\nnewline\""]
["string", "\"\\\r\nnewline\""]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -15,10 +15,10 @@ $1badb002
---------------------------------------------------- ----------------------------------------------------
[ [
"$\n", "$\r\n",
["number", "$1BADB002"], ["number", "$1BADB002"],
["number", "$1badb002"], ["number", "$1badb002"],
"\n.\n", "\r\n.\r\n",
["number", ".456"], ["number", ".456"],
["number", "123"], ["number", "123"],
["number", "123."], ["number", "123."],

View File

@ -8,7 +8,8 @@ multiple lines
[ [
["comment", "% single line"], ["comment", "% single line"],
["comment", "%{\nmultiple lines\n%}"]
["comment", "%{\r\nmultiple lines\r\n%}"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -14,16 +14,19 @@ h\fermata
["punctuation", "\\"], ["punctuation", "\\"],
"set" "set"
]], ]],
["keyword", [ ["keyword", [
["punctuation", "\\"], ["punctuation", "\\"],
"center-column" "center-column"
]], ]],
["number", "5"], ["number", "5"],
["keyword", [ ["keyword", [
["punctuation", "\\"], ["punctuation", "\\"],
"mm" "mm"
]], ]],
"\nh",
"\r\nh",
["keyword", [ ["keyword", [
["punctuation", "\\"], ["punctuation", "\\"],
"fermata" "fermata"

View File

@ -6,7 +6,7 @@ bar\""
[ [
["string", "\"foo\""], ["string", "\"foo\""],
["string", "\"foo\nbar\\\"\""] ["string", "\"foo\r\nbar\\\"\""]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -62,9 +62,7 @@ UnclosedExpression{ab{cndum dui dolor tincidu{nt [s[fa]sdf [
["command", [ ["command", [
["command-name", "@commandAndGenericTextOnNewLine"] ["command-name", "@commandAndGenericTextOnNewLine"]
]], ]],
["generic-text", [ ["generic-text", ["Massa ut elementum."]],
"Massa ut elementum."
]],
["command", [ ["command", [
["command-name", "@commandWithParameterAndGenericTextOnNewLine"], ["command-name", "@commandWithParameterAndGenericTextOnNewLine"],
@ -72,9 +70,7 @@ UnclosedExpression{ab{cndum dui dolor tincidu{nt [s[fa]sdf [
["command-param-value", "WideParam"] ["command-param-value", "WideParam"]
]] ]]
]], ]],
["generic-text", [ ["generic-text", ["Integer"]],
"Integer"
]],
["generic-text", [ ["generic-text", [
"Escaped braces inside generic text", "Escaped braces inside generic text",
@ -89,7 +85,7 @@ UnclosedExpression{ab{cndum dui dolor tincidu{nt [s[fa]sdf [
["bad-line", "UnclosedExpression{ab{cndum dui dolor tincidu{nt [s[fa]sdf ["], ["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\")},}"], ["bad-line", "\"Integer: a = {a} malesuada a + b = {a + b}\", Random(a, b) = {Random(a, b)}, Random(\"foo\", \"bar\", \"foobar\") = {Random(\"foo\", \"bar\", \"foobar\")},}"],
"\n#\n>\n@" "\r\n#\r\n>\r\n@"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -23,12 +23,16 @@ comment
---------------------------------------------------- ----------------------------------------------------
[ [
["comment", "/*\ncomment\n*/"], ["comment", "/*\r\ncomment\r\n*/"],
["comment", "REM comment;"], ["comment", "REM comment;"],
["comment", "REM comment\nstatement;"], ["comment", "REM comment\r\nstatement;"],
["comment", "<*\ncomment\n*>"],
["comment", "<*\n<*\ncomment\n*>\n*>"], ["comment", "<*\r\ncomment\r\n*>"],
["comment", "/+\ncomment\n+/"]
["comment", "<*\r\n<*\r\ncomment\r\n*>\r\n*>"],
["comment", "/+\r\ncomment\r\n+/"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -117,7 +117,7 @@
---------------------------------------------------- ----------------------------------------------------
[ [
["prolog", "<?\n\t// Session starten und confog.php includen\n\tsession_start();\n\tinclude (\"config.php\");\n\n\t// CaptchaCodes abfragen\n\t$CAPTCHA_RandomText = \"\";\n\tif (isset($_POST['txtCode'])){\n\t$CAPTCHA_EnteredText = str_replace(\"<\",\"\",str_replace(\">\",\"\",str_replace(\"'\",\"\",str_replace(\"[\",\"\",str_replace(\"]\",\"\",$_POST['txtCode'])))));\n\t}\n\tif (isset($_SESSION['CAPTCHA_RndText'])) {\n\t$CAPTCHA_RandomText = $_SESSION['CAPTCHA_RndText'];\n\t}\n\n\t// Eingabefelder abfragen\n\t$_SESSION['company'] = $_POST['company'];\n\t$_SESSION['name'] = $_POST['name'];\n\t$_SESSION['address'] = $_POST['address'];\n\t$_SESSION['zip_code'] = $_POST['zip_code'];\n\t$_SESSION['city'] = $_POST['city'];\n\t$_SESSION['county'] = $_POST['county'];\n\t$_SESSION['country'] = $_POST['country'];\n\t$_SESSION['phone'] = $_POST['phone'];\n\t$_SESSION['fax'] = $_POST['fax'];\n\t$_SESSION['email'] = $_POST['email'];\n\t$_SESSION['nachricht'] = $_POST['nachricht'];\n\n\t$email_i = $_SESSION['email'];\n\n\t// Email Funktion\n\tfunction pruefe_mail($email_i) {\n\t\t if(strstr($email_i, \"@\")) {\n\t\t\t$email_i = explode (\"@\", $email_i);\n\t\t\tif(strstr($email_i[1], \".\")) $ok = TRUE;\n\t\t }\n\t\t return $ok;\n\t\t}\n\n\t// Eingaben prüfen\n\t$fehler = \"\";\n\tif(!pruefe_mail($email_i) && !empty($email_i)) {\n\t\t\t$fehler .= \"<li>email</li>\";\n\t\t\t}\n\t\t\tif ($_SESSION['name'] == \"\"){\n\t\t\t$fehler .= \"<li>name</li>\";\n\t\t\t}\n\t\t\tif ($_SESSION['city'] == \"\"){\n\t\t\t$fehler .= \"<li>city</li>\";\n\t\t\t}\n\t\t\tif ($_SESSION['country'] == \"\"){\n\t\t\t$fehler .= \"<li>country</li>\";\n\t\t\t}\n\t\t\tif ($_SESSION['phone'] == \"\"){\n\t\t\t$fehler .= \"<li>phone</li>\";\n\t\t\t}\n\t\t\tif ($_SESSION['email'] == \"\"){\n\t\t\t$fehler .= \"<li>email</li>\";\n\t\t\t}\n\t\t\tif ($_SESSION['message'] == \"\"){\n\t\t\t$fehler .= \"<li>message</li>\";\n\t\t\t}\n\t\t\tif ($CAPTCHA_EnteredText == $CAPTCHA_RandomText and isset($_POST['txtCode']) == true and isset($_SESSION['CAPTCHA_RndText'])){\n\t\t\t$captcha = true;\n\t\t\t} else {\n\t\t\t$fehler .= \"<li>code</li>\";\n\t\t\t}\n\techo '<div>';\n\tif ($fehler == \"\"){\n\t// Email zumsammensetzen\n\t$email = \"From: \" . $_SESSION['email'];\n\n\n\t$nachrichtfertig =\n\t\"Company: \" . $_SESSION['company'] \"n\\\"\n\t\"Name: \" $_SESSION['name'] \"n\\\"\n\t\"Address: \" $_SESSION['address'] \"n\\\"\n\t\"ZIP Code: \" $_SESSION['zip_code'] \"n\\\"\n\t\"City: \" $_SESSION['city'] \"n\\\"\n\t\"County: \" $_SESSION['county'] \"n\\\"\n\t\"Country: \" $_SESSION['country'] \"n\\\"\n\t\"Phone: \" $_SESSION['phone'] \"n\\\"\n\t\"Fax: \" $_SESSION['fax'] \"n\\\"\n\t\"eMail: \" $_SESSION['email'] \"n\\n\\\"\n\t\"Message: \" $_SESSION['message'];\n\n\n\t$versand = mail($empfaenger, $betreff, $nachrichtfertig, $email);\n\t\t\tif ($versand) {\n\t\t\techo '<p class=titles>Thank you very much!</p>\n\t\t\t\t <p>The message were send successfully</p>';\n\n\t\t\t// Sessionvariablen löschen\n\t\t\tunset($_SESSION['company']);\n\t\t\tunset($_SESSION['name']);\n\t\t\tunset($_SESSION['address']);\n\t\t\tunset($_SESSION['zip_code']);\n\t\t\tunset($_SESSION['city']);\n\t\t\tunset($_SESSION['county']);\n\t\t\tunset($_SESSION['country']);\n\t\t\tunset($_SESSION['phone']);\n\t\t\tunset($_SESSION['fax']);\n\t\t\tunset($_SESSION['email']);\n\t\t\tunset($_SESSION['nachricht']);\n\t\t\t}\n\n\t} else {\n\techo '<p class=titles>Error</p>';\n\techo '<p>Please fill in all the $fehler field. <a href=\"contact.php\">back</a></p>';\n\t}\n\techo '</div>';\n\n\t// Session unset\n\tunset($_SESSION['CAPTCHA_RndText']);\n\n?>"] ["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 .= \"<li>email</li>\";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['name'] == \"\"){\r\n\t\t\t$fehler .= \"<li>name</li>\";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['city'] == \"\"){\r\n\t\t\t$fehler .= \"<li>city</li>\";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['country'] == \"\"){\r\n\t\t\t$fehler .= \"<li>country</li>\";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['phone'] == \"\"){\r\n\t\t\t$fehler .= \"<li>phone</li>\";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['email'] == \"\"){\r\n\t\t\t$fehler .= \"<li>email</li>\";\r\n\t\t\t}\r\n\t\t\tif ($_SESSION['message'] == \"\"){\r\n\t\t\t$fehler .= \"<li>message</li>\";\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 .= \"<li>code</li>\";\r\n\t\t\t}\r\n\techo '<div>';\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 '<p class=titles>Thank you very much!</p>\r\n\t\t\t\t <p>The message were send successfully</p>';\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 '<p class=titles>Error</p>';\r\n\techo '<p>Please fill in all the $fehler field. <a href=\"contact.php\">back</a></p>';\r\n\t}\r\n\techo '</div>';\r\n\r\n\t// Session unset\r\n\tunset($_SESSION['CAPTCHA_RndText']);\r\n\r\n?>"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -8,7 +8,7 @@
---------------------------------------------------- ----------------------------------------------------
[ [
"/**\n * ", "/**\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["keyword", "string"], ["keyword", "string"],
@ -16,12 +16,13 @@
["keyword", "null"] ["keyword", "null"]
]], ]],
["parameter", "$parameter"], ["parameter", "$parameter"],
" a parameter\n * ", " a parameter\r\n * ",
["keyword", "@return"], ["keyword", "@return"],
["class-name", [ ["class-name", [
["keyword", "self"] ["keyword", "self"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@var"], ["keyword", "@var"],
["class-name", [ ["class-name", [
"MyClass", "MyClass",
@ -29,7 +30,8 @@
["keyword", "int"], ["keyword", "int"],
["punctuation", "]"] ["punctuation", "]"]
]], ]],
"\n * ",
"\r\n * ",
["keyword", "@throws"], ["keyword", "@throws"],
["class-name", [ ["class-name", [
["punctuation", "\\"], ["punctuation", "\\"],
@ -37,7 +39,7 @@
["punctuation", "\\"], ["punctuation", "\\"],
"MyException" "MyException"
]], ]],
" if something bad happens\n */" " if something bad happens\r\n */"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -33,65 +33,36 @@
---------------------------------------------------- ----------------------------------------------------
[ [
"/**\n * ", "/**\r\n * ", ["keyword", "@api"],
["keyword", "@api"], "\r\n * ", ["keyword", "@author"],
"\n * ", "\r\n * ", ["keyword", "@category"],
["keyword", "@author"], "\r\n * ", ["keyword", "@copyright"],
"\n * ", "\r\n * ", ["keyword", "@deprecated"],
["keyword", "@category"], "\r\n * ", ["keyword", "@example"],
"\n * ", "\r\n * ", ["keyword", "@filesource"],
["keyword", "@copyright"], "\r\n * ", ["keyword", "@global"],
"\n * ", "\r\n * ", ["keyword", "@ignore"],
["keyword", "@deprecated"], "\r\n * ", ["keyword", "@internal"],
"\n * ", "\r\n * ", ["keyword", "@license"],
["keyword", "@example"], "\r\n * ", ["keyword", "@link"],
"\n * ", "\r\n * ", ["keyword", "@method"],
["keyword", "@filesource"], "\r\n * ", ["keyword", "@package"],
"\n * ", "\r\n * ", ["keyword", "@param"],
["keyword", "@global"], "\r\n * ", ["keyword", "@property"],
"\n * ", "\r\n * ", ["keyword", "@property-read"],
["keyword", "@ignore"], "\r\n * ", ["keyword", "@property-write"],
"\n * ", "\r\n * ", ["keyword", "@return"],
["keyword", "@internal"], "\r\n * ", ["keyword", "@see"],
"\n * ", "\r\n * ", ["keyword", "@since"],
["keyword", "@license"], "\r\n * ", ["keyword", "@source"],
"\n * ", "\r\n * ", ["keyword", "@subpackage"],
["keyword", "@link"], "\r\n * ", ["keyword", "@throws"],
"\n * ", "\r\n * ", ["keyword", "@todo"],
["keyword", "@method"], "\r\n * ", ["keyword", "@uses"],
"\n * ", "\r\n * ", ["keyword", "@used-by"],
["keyword", "@package"], "\r\n * ", ["keyword", "@var"],
"\n * ", "\r\n * ", ["keyword", "@version"],
["keyword", "@param"], "\r\n */"
"\n * ",
["keyword", "@property"],
"\n * ",
["keyword", "@property-read"],
"\n * ",
["keyword", "@property-write"],
"\n * ",
["keyword", "@return"],
"\n * ",
["keyword", "@see"],
"\n * ",
["keyword", "@since"],
"\n * ",
["keyword", "@source"],
"\n * ",
["keyword", "@subpackage"],
"\n * ",
["keyword", "@throws"],
"\n * ",
["keyword", "@todo"],
"\n * ",
["keyword", "@uses"],
"\n * ",
["keyword", "@used-by"],
"\n * ",
["keyword", "@var"],
"\n * ",
["keyword", "@version"],
"\n */"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -6,16 +6,16 @@
---------------------------------------------------- ----------------------------------------------------
[ [
"/**\n * ", "/**\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["class-name", [ ["class-name", [
["keyword", "string"] ["keyword", "string"]
]], ]],
["parameter", "$parameter"], ["parameter", "$parameter"],
" a parameter\n * ", " a parameter\r\n * ",
["keyword", "@param"], ["keyword", "@param"],
["parameter", "$arg2"], ["parameter", "$arg2"],
" a second parameter\n */" " a second parameter\r\n */"
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -7,13 +7,13 @@ import "componentCreation.js" as MyScript
[ [
["keyword", "import"], ["keyword", "import"],
" QtQuick 2.9\n", " QtQuick 2.9\r\n",
["keyword", "import"], ["keyword", "import"],
" QtQml.Models 2.2\n", " QtQml.Models 2.2\r\n",
["keyword", "import"], ["keyword", "import"],
" Person 1.0\n", " Person 1.0\r\n",
["keyword", "import"], ["keyword", "import"],
["string", "\"componentCreation.js\""], ["string", "\"componentCreation.js\""],

View File

@ -20,61 +20,75 @@ end
---------------------------------------------------- ----------------------------------------------------
[ [
["keyword", "class"], ["keyword", "class"],
["class-name", ["Circle"]], ["class-name", ["Circle"]],
["keyword", "def"],
["method-definition", [ ["keyword", "def"],
["keyword", "self"], ["method-definition", [
["punctuation", "."], ["keyword", "self"],
["function", "of_diameter"] ["punctuation", "."],
]], ["function", "of_diameter"]
["punctuation", "("], ]],
"diameter", ["punctuation", "("],
["punctuation", ")"], "diameter",
["keyword", "new"], ["punctuation", ")"],
" diameter ",
["operator", "/"], ["keyword", "new"],
["number", "2"], " diameter ",
["keyword", "end"], ["operator", "/"],
["keyword", "def"], ["number", "2"],
["method-definition", [
["function", "initialize"] ["keyword", "end"],
]],
["punctuation", "("], ["keyword", "def"],
"radius", ["method-definition", [
["punctuation", ")"], ["function", "initialize"]
["variable", "@radius"], ]],
["operator", "="], ["punctuation", "("],
" radius\n ", "radius",
["keyword", "end"], ["punctuation", ")"],
["keyword", "def"],
["method-definition", [ ["variable", "@radius"],
["function", "circumference"] ["operator", "="],
]], " radius\r\n ",
["constant", "Math"],
["punctuation", ":"], ["keyword", "end"],
["punctuation", ":"],
["constant", "PI"], ["keyword", "def"],
["operator", "*"], ["method-definition", [
" radius ", ["function", "circumference"]
["operator", "*"], ]],
["operator", "*"],
["number", "2"], ["constant", "Math"],
["keyword", "end"], ["punctuation", ":"],
["comment", "# Seattle style"], ["punctuation", ":"],
["keyword", "def"], ["constant", "PI"],
["method-definition", [ ["operator", "*"],
["function", "grow_by"] " radius ",
]], ["operator", "*"],
" factor", ["operator", "*"],
["punctuation", ":"], ["number", "2"],
["variable", "@radius"],
["operator", "="], ["keyword", "end"],
["variable", "@radius"],
["operator", "*"], ["comment", "# Seattle style"],
" factor\n ",
["keyword", "end"], ["keyword", "def"],
["keyword", "end"] ["method-definition", [
["function", "grow_by"]
]],
" factor",
["punctuation", ":"],
["variable", "@radius"],
["operator", "="],
["variable", "@radius"],
["operator", "*"],
" factor\r\n ",
["keyword", "end"],
["keyword", "end"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -29,6 +29,7 @@ enum Foo {
["punctuation", ":"], ["punctuation", ":"],
["class-name", "CStr"], ["class-name", "CStr"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "let"], ["keyword", "let"],
" foo", " foo",
["punctuation", ":"], ["punctuation", ":"],
@ -36,6 +37,7 @@ enum Foo {
["lifetime-annotation", "'a"], ["lifetime-annotation", "'a"],
["class-name", "CStr"], ["class-name", "CStr"],
["punctuation", ";"], ["punctuation", ";"],
["keyword", "let"], ["keyword", "let"],
" foo", " foo",
["punctuation", ":"], ["punctuation", ":"],
@ -47,6 +49,7 @@ enum Foo {
["class-name", "Bar"], ["class-name", "Bar"],
["operator", ">"], ["operator", ">"],
["punctuation", ";"], ["punctuation", ";"],
["class-name", "Option"], ["class-name", "Option"],
["punctuation", "::"], ["punctuation", "::"],
["class-name", "Some"], ["class-name", "Some"],
@ -54,18 +57,23 @@ enum Foo {
"foo", "foo",
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
["class-name", "Option"], ["class-name", "Option"],
["punctuation", "::"], ["punctuation", "::"],
["class-name", "None"], ["class-name", "None"],
["punctuation", ";"], ["punctuation", ";"],
["comment", "// we can differentiate between enum variants and class names"], ["comment", "// we can differentiate between enum variants and class names"],
["comment", "// so let's make the bug a feature!"], ["comment", "// so let's make the bug a feature!"],
["keyword", "enum"], ["keyword", "enum"],
["type-definition", "Foo"], ["type-definition", "Foo"],
["punctuation", "{"], ["punctuation", "{"],
["class-name", "Const"], ["class-name", "Const"],
["punctuation", ","], ["punctuation", ","],
["class-name", "Tuple"], ["class-name", "Tuple"],
["punctuation", "("], ["punctuation", "("],
["keyword", "i8"], ["keyword", "i8"],
@ -73,12 +81,16 @@ enum Foo {
["keyword", "i8"], ["keyword", "i8"],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ","], ["punctuation", ","],
["class-name", "Struct"], ["class-name", "Struct"],
["punctuation", "{"], ["punctuation", "{"],
"\n\t\tfoo",
"\r\n\t\tfoo",
["punctuation", ":"], ["punctuation", ":"],
["keyword", "u8"], ["keyword", "u8"],
["punctuation", "}"], ["punctuation", "}"],
["punctuation", "}"] ["punctuation", "}"]
] ]

View File

@ -23,12 +23,8 @@ Write down the passphrase. Store both at safe place(s).
["shell-symbol", "$"], ["shell-symbol", "$"],
["bash", [ ["bash", [
["builtin", "export"], ["builtin", "export"],
["assign-left", [ ["assign-left", ["BORG_PASSCOMMAND"]],
"BORG_PASSCOMMAND" ["operator", ["="]],
]],
["operator", [
"="
]],
["string", [ ["string", [
"\"security find-generic-password -a ", "\"security find-generic-password -a ",
["environment", "$USER"], ["environment", "$USER"],
@ -40,30 +36,20 @@ Write down the passphrase. Store both at safe place(s).
["shell-symbol", "$"], ["shell-symbol", "$"],
["bash", [ ["bash", [
["builtin", "export"], ["builtin", "export"],
["assign-left", [ ["assign-left", ["BORG_RSH"]],
"BORG_RSH" ["operator", ["="]],
]], ["string", ["\"ssh -i ~/.ssh/borg\""]]
["operator", [
"="
]],
["string", [
"\"ssh -i ~/.ssh/borg\""
]]
]] ]]
]], ]],
["command", [ ["command", [
["shell-symbol", "$"], ["shell-symbol", "$"],
["bash", [ ["bash", [
"borg init --encryption", "borg init --encryption",
["operator", [ ["operator", ["="]],
"="
]],
"keyfile-blake2 ", "keyfile-blake2 ",
["string", [ ["string", ["\"borg@1.2.3.4:backup\""]]
"\"borg@1.2.3.4:backup\""
]]
]] ]]
]], ]],
["output", "By default repositories initialized with this version will produce security\nerrors if written to with an older version (up to and including Borg 1.0.8).\n\nIf you want to use these older versions, you can disable the check by running:\nborg upgrade --disable-tam ssh://borg@1.2.3.4/./backup\n\nSee https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability for details about the security implications.\n\nIMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!\nUse \"borg key export\" to export the key, optionally in printable format.\nWrite down the passphrase. Store both at safe place(s).\n\n---"] ["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---"]
] ]

View File

@ -43,6 +43,7 @@ val systemStanzas: string -> string list list
["punctuation", ")"], ["punctuation", ")"],
" token" " token"
]], ]],
["keyword", "val"], ["keyword", "val"],
" FOO", " FOO",
["punctuation", ":"], ["punctuation", ":"],
@ -62,6 +63,7 @@ val systemStanzas: string -> string list list
["punctuation", ")"], ["punctuation", ")"],
" token" " token"
]], ]],
["keyword", "val"], ["keyword", "val"],
" FOO", " FOO",
["punctuation", ":"], ["punctuation", ":"],
@ -81,6 +83,7 @@ val systemStanzas: string -> string list list
["punctuation", ")"], ["punctuation", ")"],
" token" " token"
]], ]],
["keyword", "val"], ["keyword", "val"],
" FOO", " FOO",
["punctuation", ":"], ["punctuation", ":"],
@ -100,6 +103,7 @@ val systemStanzas: string -> string list list
["punctuation", ")"], ["punctuation", ")"],
" token" " token"
]], ]],
["keyword", "val"], ["keyword", "val"],
" FOO", " FOO",
["punctuation", ":"], ["punctuation", ":"],
@ -124,59 +128,54 @@ val systemStanzas: string -> string list list
["punctuation", "{"], ["punctuation", "{"],
"head ", "head ",
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["string list"]],
"string list"
]],
["punctuation", ","], ["punctuation", ","],
"\n decls ",
"\r\n decls ",
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["decl_ast list"]],
"decl_ast list"
]],
["punctuation", ","], ["punctuation", ","],
"\n rules ",
"\r\n rules ",
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["rule_ast list"]],
"rule_ast list"
]],
["punctuation", ","], ["punctuation", ","],
"\n tail ",
"\r\n tail ",
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["string list"]],
"string list"
]],
["punctuation", "}"], ["punctuation", "}"],
["keyword", "type"], ["keyword", "type"],
["class-name", "out_state"], ["class-name", "out_state"],
["operator", "="], ["operator", "="],
["punctuation", "{"], ["punctuation", "{"],
"\ntout ",
"\r\ntout ",
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["real"]],
"real"
]],
["punctuation", ","], ["punctuation", ","],
"\ndtout ",
"\r\ndtout ",
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["real"]],
"real"
]],
["punctuation", ","], ["punctuation", ","],
"\ndtime ",
"\r\ndtime ",
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["real"]],
"real"
]],
["punctuation", ","], ["punctuation", ","],
"\nstrm ",
"\r\nstrm ",
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", [
"TextIO", "TextIO",
["punctuation", "."], ["punctuation", "."],
"outstream" "outstream"
]], ]],
["punctuation", "}"], ["punctuation", "}"],
["keyword", "val"], ["keyword", "val"],
" outState ", " outState ",
["operator", "="], ["operator", "="],
@ -184,9 +183,7 @@ val systemStanzas: string -> string list list
["punctuation", "("], ["punctuation", "("],
"NONE ", "NONE ",
["punctuation", ":"], ["punctuation", ":"],
["class-name", [ ["class-name", ["out_state option"]],
"out_state option"
]],
["punctuation", ")"], ["punctuation", ")"],
["keyword", "val"], ["keyword", "val"],
@ -197,6 +194,7 @@ val systemStanzas: string -> string list list
["operator", "->"], ["operator", "->"],
" string list" " string list"
]], ]],
["keyword", "val"], ["keyword", "val"],
" systemCleanLines", " systemCleanLines",
["punctuation", ":"], ["punctuation", ":"],
@ -205,6 +203,7 @@ val systemStanzas: string -> string list list
["operator", "->"], ["operator", "->"],
" string list" " string list"
]], ]],
["keyword", "val"], ["keyword", "val"],
" systemStanzas", " systemStanzas",
["punctuation", ":"], ["punctuation", ":"],
@ -213,4 +212,4 @@ val systemStanzas: string -> string list list
["operator", "->"], ["operator", "->"],
" string list list" " string list list"
]] ]]
] ]

View File

@ -7,5 +7,5 @@
[ [
["comment", "(* comment *)"], ["comment", "(* comment *)"],
["comment", "(*\n (* nested comment *)\n*)"] ["comment", "(*\r\n (* nested comment *)\r\n*)"]
] ]

View File

@ -7,7 +7,7 @@ bar
[ [
["comment", "// foo"], ["comment", "// foo"],
["comment", "/*\nbar\n*/"] ["comment", "/*\r\nbar\r\n*/"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -9,7 +9,8 @@ def"
[ [
["string", "\"foo\\\"\\'\""], ["string", "\"foo\\\"\\'\""],
["string", "'bar\\'\\\"'"], ["string", "'bar\\'\\\"'"],
["string", "\"\\n\\\"\\'\\\\abc\\\ndef\""]
["string", "\"\\n\\\"\\'\\\\abc\\\r\ndef\""]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -9,7 +9,7 @@ comment
[ [
["comment", "# comment"], ["comment", "# comment"],
["comment", "// comment"], ["comment", "// comment"],
["comment", "/*\ncomment\n*/"] ["comment", "/*\r\ncomment\r\n*/"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -6,7 +6,7 @@ public class Bar {}
---------------------------------------------------- ----------------------------------------------------
[ [
"Foo\n", "Foo\r\n",
["block", [ ["block", [
["class-feature", [ ["class-feature", [
["delimiter", "<#+"], ["delimiter", "<#+"],

View File

@ -18,12 +18,12 @@ var b = new int[] { <#=
["delimiter", "#>"] ["delimiter", "#>"]
]] ]]
]], ]],
";\nvar b = new int[] { ", ";\r\nvar b = new int[] { ",
["block", [ ["block", [
["expression", [ ["expression", [
["delimiter", "<#="], ["delimiter", "<#="],
["content", [ ["content", [
"\n\tString", "\r\n\tString",
["punctuation", "."], ["punctuation", "."],
["function", "Join"], ["function", "Join"],
["punctuation", "("], ["punctuation", "("],

View File

@ -33,7 +33,9 @@ The number <#= i #> is even.
" i", " i",
["operator", "++"], ["operator", "++"],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", "{"], ["punctuation", "{"],
["keyword", "if"], ["keyword", "if"],
["punctuation", "("], ["punctuation", "("],
"i ", "i ",
@ -42,23 +44,22 @@ The number <#= i #> is even.
["operator", "=="], ["operator", "=="],
["number", "0"], ["number", "0"],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", "{"] ["punctuation", "{"]
]], ]],
["delimiter", "#>"] ["delimiter", "#>"]
]] ]]
]], ]],
"\nThe number ", "\r\nThe number ",
["block", [ ["block", [
["expression", [ ["expression", [
["delimiter", "<#="], ["delimiter", "<#="],
["content", [ ["content", [" i "]],
" i "
]],
["delimiter", "#>"] ["delimiter", "#>"]
]] ]]
]], ]],
" is even.\n", " is even.\r\n",
["block", [ ["block", [
["standard", [ ["standard", [

View File

@ -53,11 +53,8 @@ The number <#= i #> is even.
["class-feature", [ ["class-feature", [
["delimiter", "<#+"], ["delimiter", "<#+"],
["content", [ ["content", [
["keyword", "Public"], ["keyword", "Public"], ["keyword", "Class"], " Bar\r\n",
["keyword", "Class"], ["keyword", "End"], ["keyword", "Class"]
" Bar\n",
["keyword", "End"],
["keyword", "Class"]
]], ]],
["delimiter", "#>"] ["delimiter", "#>"]
]] ]]
@ -75,6 +72,7 @@ The number <#= i #> is even.
["number", "0"], ["number", "0"],
["keyword", "To"], ["keyword", "To"],
["number", "9"], ["number", "9"],
["keyword", "If"], ["keyword", "If"],
" i ", " i ",
["keyword", "Mod"], ["keyword", "Mod"],
@ -87,26 +85,22 @@ The number <#= i #> is even.
]] ]]
]], ]],
"\nThe number ", "\r\nThe number ",
["block", [ ["block", [
["expression", [ ["expression", [
["delimiter", "<#="], ["delimiter", "<#="],
["content", [ ["content", [" i "]],
" i "
]],
["delimiter", "#>"] ["delimiter", "#>"]
]] ]]
]], ]],
" is even.\n", " is even.\r\n",
["block", [ ["block", [
["standard", [ ["standard", [
["delimiter", "<#"], ["delimiter", "<#"],
["content", [ ["content", [
["keyword", "End"], ["keyword", "End"], ["keyword", "If"],
["keyword", "If"], ["keyword", "Next"], " i\r\n"
["keyword", "Next"],
" i\n"
]], ]],
["delimiter", "#>"] ["delimiter", "#>"]
]] ]]

View File

@ -15,32 +15,43 @@ ok
[ [
["pass", "ok"], ["pass", "ok"],
["yamlish", [ ["yamlish", [
["punctuation", "---"], ["punctuation", "---"],
["key", "message"], ["key", "message"],
["punctuation", ":"], ["punctuation", ":"],
["string", "\"Failed with error 'hostname peebles.example.com not found'\""], ["string", "\"Failed with error 'hostname peebles.example.com not found'\""],
["key", "severity"], ["key", "severity"],
["punctuation", ":"], ["punctuation", ":"],
" fail\n ", " fail\r\n ",
["key", "data"], ["key", "data"],
["punctuation", ":"], ["punctuation", ":"],
["key", "got"], ["key", "got"],
["punctuation", ":"], ["punctuation", ":"],
["key", "hostname"], ["key", "hostname"],
["punctuation", ":"], ["punctuation", ":"],
["string", "'peebles.example.com'"], ["string", "'peebles.example.com'"],
["key", "address"], ["key", "address"],
["punctuation", ":"], ["punctuation", ":"],
["null", "~"], ["null", "~"],
["key", "expected"], ["key", "expected"],
["punctuation", ":"], ["punctuation", ":"],
["key", "hostname"], ["key", "hostname"],
["punctuation", ":"], ["punctuation", ":"],
["string", "'peebles.example.com'"], ["string", "'peebles.example.com'"],
["key", "address"], ["key", "address"],
["punctuation", ":"], ["punctuation", ":"],
["string", "'85.193.201.85'"], ["string", "'85.193.201.85'"],
["punctuation", "..."] ["punctuation", "..."]
]] ]]
] ]

View File

@ -20,8 +20,8 @@
["string", "''"], ["string", "''"],
["string", "'#'"], ["string", "'#'"],
["string", "'\"abc\"'"], ["string", "'\"abc\"'"],
["string", "\"\"\"\n\tabc\n\t\"\"\""], ["string", "\"\"\"\r\n\tabc\r\n\t\"\"\""],
["string", "'''\n\tabc\n\t'''"] ["string", "'''\r\n\tabc\r\n\t'''"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -13,7 +13,7 @@ bob = new SqlCommand("Select * from test Where Code=Code");
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"], ["punctuation", ";"],
"\nbob ", "\r\nbob ",
["operator", "="], ["operator", "="],
["keyword", "new"], ["keyword", "new"],
" SqlCommand", " SqlCommand",
@ -21,4 +21,4 @@ bob = new SqlCommand("Select * from test Where Code=Code");
["string", "\"Select * from test Where Code=Code\""], ["string", "\"Select * from test Where Code=Code\""],
["punctuation", ")"], ["punctuation", ")"],
["punctuation", ";"] ["punctuation", ";"]
] ]

View File

@ -6,12 +6,15 @@ Console.WriteLine("Message: {0}", message)
---------------------------------------------------- ----------------------------------------------------
[ [
["keyword", "Dim"], " x ", ["operator", "="], ["string", "\"hello\nworld\""], ["keyword", "Dim"],
" x ",
["operator", "="],
["string", "\"hello\r\nworld\""],
"\n\nConsole.WriteLine", "\r\n\r\nConsole.WriteLine",
["punctuation", "("], ["punctuation", "("],
["string", "\"Message: {0}\""], ["string", "\"Message: {0}\""],
["punctuation", ","], ["punctuation", ","],
" message", " message",
["punctuation", ")"] ["punctuation", ")"]
] ]

View File

@ -11,7 +11,7 @@ title: Blogging Like a Hacker
["front-matter-block", [ ["front-matter-block", [
["punctuation", "---"], ["punctuation", "---"],
["font-matter", [ ["font-matter", [
["key", "layout"], ["punctuation", ":"], " post\n", ["key", "layout"], ["punctuation", ":"], " post\r\n",
["key", "title"], ["punctuation", ":"], " Blogging Like a Hacker" ["key", "title"], ["punctuation", ":"], " Blogging Like a Hacker"
]], ]],
["punctuation", "---"] ["punctuation", "---"]
@ -21,4 +21,4 @@ title: Blogging Like a Hacker
["punctuation", "#"], ["punctuation", "#"],
" Title" " Title"
]] ]]
] ]

View File

@ -71,7 +71,7 @@ tagb: !!tagb *tag-b
["punctuation", ":"], ["punctuation", ":"],
["important", "&sca-lar"], ["important", "&sca-lar"],
["punctuation", "|"], ["punctuation", "|"],
["scalar", "\n\tfoo\n\tbar"], ["scalar", "\r\n\tfoo\r\n\tbar"],
["key", "x-utf8"], ["key", "x-utf8"],
["punctuation", ":"], ["punctuation", ":"],
@ -113,7 +113,7 @@ tagb: !!tagb *tag-b
["important", "&tag-scalar"], ["important", "&tag-scalar"],
["tag", "!!tag-scalar"], ["tag", "!!tag-scalar"],
["punctuation", "|"], ["punctuation", "|"],
["scalar", "\n\tfoo\n\tbar"], ["scalar", "\r\n\tfoo\r\n\tbar"],
["key", "x-tag-string"], ["key", "x-tag-string"],
["punctuation", ":"], ["punctuation", ":"],
@ -150,7 +150,7 @@ tagb: !!tagb *tag-b
["tag", "!!tag-scalar"], ["tag", "!!tag-scalar"],
["important", "&tag-scalar"], ["important", "&tag-scalar"],
["punctuation", "|"], ["punctuation", "|"],
["scalar", "\n\tfoo\n\tbar"], ["scalar", "\r\n\tfoo\r\n\tbar"],
["key", "foobar"], ["key", "foobar"],
["punctuation", ":"], ["punctuation", ":"],
@ -182,7 +182,7 @@ tagb: !!tagb *tag-b
["punctuation", ":"], ["punctuation", ":"],
["tag", "!!str"], ["tag", "!!str"],
" bar\n", " bar\r\n",
["important", "&a2"], ["important", "&a2"],
["key", "baz"], ["key", "baz"],

View File

@ -7,7 +7,7 @@
[ [
["comment", "// comment"], ["comment", "// comment"],
["comment", "/*\n comment\n*/"] ["comment", "/*\r\n comment\r\n*/"]
] ]
---------------------------------------------------- ----------------------------------------------------

View File

@ -7,7 +7,8 @@ type _foo.-bar:type
["keyword", "type"], ["keyword", "type"],
["namespace", "foo"], ["namespace", "foo"],
["punctuation", ":"], ["punctuation", ":"],
"type\n", "type\r\n",
["keyword", "type"], ["keyword", "type"],
["namespace", "_foo.-bar"], ["namespace", "_foo.-bar"],
["punctuation", ":"], ["punctuation", ":"],

View File

@ -10,8 +10,8 @@ o'
---------------------------------------------------- ----------------------------------------------------
[ [
["string", "\"\n\n\\\"'foo'\\\"\n\n\""], ["string", "\"\r\n\r\n\\\"'foo'\\\"\r\n\r\n\""],
["string", "'fo\n\"\"\no'"] ["string", "'fo\r\n\"\"\r\no'"]
] ]
---------------------------------------------------- ----------------------------------------------------