Java: Improved package and class name detection (#2599)

This commit is contained in:
Michael Schmidt 2020-11-04 21:44:48 +01:00 committed by GitHub
parent fc60282207
commit 0889bc7c2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 322 additions and 81 deletions

View File

@ -2,22 +2,40 @@
var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/;
// full package (optional) + parent classes (optional)
var classNamePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source;
// based on the java naming conventions
var className = /\b[A-Z](?:\w*[a-z]\w*)?\b/;
var className = {
pattern: RegExp(classNamePrefix + /[A-Z](?:\w*[a-z]\w*)?\b/.source),
lookbehind: true,
inside: {
'namespace': {
pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
inside: {
'punctuation': /\./
}
},
'punctuation': /\./
}
};
Prism.languages.java = Prism.languages.extend('clike', {
'class-name': [
className,
// variables and parameters
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/
{
// variables and parameters
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
pattern: RegExp(classNamePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=())])/.source),
lookbehind: true,
inside: className.inside
}
],
'keyword': keywords,
'function': [
Prism.languages.clike.function,
{
pattern: /(\:\:)[a-z_]\w*/,
pattern: /(\:\:\s*)[a-z_]\w*/,
lookbehind: true
}
],
@ -39,18 +57,9 @@
Prism.languages.insertBefore('java', 'class-name', {
'annotation': {
alias: 'punctuation',
pattern: /(^|[^.])@\w+/,
lookbehind: true
},
'namespace': {
pattern: RegExp(
/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/
.source.replace(/<keyword>/g, function () { return keywords.source; })),
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
lookbehind: true,
inside: {
'punctuation': /\./,
}
alias: 'punctuation'
},
'generics': {
pattern: /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
@ -60,6 +69,15 @@
'punctuation': /[<>(),.:]/,
'operator': /[?&|]/
}
},
'namespace': {
pattern: RegExp(
/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/
.source.replace(/<keyword>/g, function () { return keywords.source; })),
lookbehind: true,
inside: {
'punctuation': /\./,
}
}
});
}(Prism));

View File

@ -1 +1 @@
!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,a=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[a,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism);
!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",a={pattern:RegExp(n+"[A-Z](?:\\w*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{"class-name":[a,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=())])"),lookbehind:!0,inside:a.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism);

View File

@ -0,0 +1,32 @@
@Override
@Documented
@java.long.annotation.Documented
@Retention(value=SOURCE)
@Target(value={PACKAGE,TYPE})
----------------------------------------------------
[
["annotation", "@Override"],
["annotation", "@Documented"],
["annotation", "@java.long.annotation.Documented"],
["annotation", "@Retention"],
["punctuation", "("],
"value",
["operator", "="],
"SOURCE",
["punctuation", ")"],
["annotation", "@Target"],
["punctuation", "("],
"value",
["operator", "="],
["punctuation", "{"],
"PACKAGE",
["punctuation", ","],
"TYPE",
["punctuation", "}"],
["punctuation", ")"]
]

View File

@ -0,0 +1,94 @@
class Foo extends foo.bar.Foo {
java.util.List<foo.bar.Foo.Bar> bar(foo.bar.Baz bat) throws java.lang.IOException {
throw new java.lang.UnsupportedOperationException("Not implemented");
}
}
----------------------------------------------------
[
["keyword", "class"],
["class-name", [
"Foo"
]],
["keyword", "extends"],
["class-name", [
["namespace", [
"foo",
["punctuation", "."],
"bar",
["punctuation", "."]
]],
"Foo"
]],
["punctuation", "{"],
["class-name", [
["namespace", [
"java",
["punctuation", "."],
"util",
["punctuation", "."]
]],
"List"
]],
["generics", [
["punctuation", "<"],
["class-name", [
["namespace", [
"foo",
["punctuation", "."],
"bar",
["punctuation", "."]
]],
"Foo",
["punctuation", "."],
"Bar"
]],
["punctuation", ">"]
]],
["function", "bar"],
["punctuation", "("],
["class-name", [
["namespace", [
"foo",
["punctuation", "."],
"bar",
["punctuation", "."]
]],
"Baz"
]],
" bat",
["punctuation", ")"],
["keyword", "throws"],
["class-name", [
["namespace", [
"java",
["punctuation", "."],
"lang",
["punctuation", "."]
]],
"IOException"
]],
["punctuation", "{"],
["keyword", "throw"],
["keyword", "new"],
["class-name", [
["namespace", [
"java",
["punctuation", "."],
"lang",
["punctuation", "."]
]],
"UnsupportedOperationException"
]],
["punctuation", "("],
["string", "\"Not implemented\""],
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", "}"]
]

View File

@ -20,7 +20,9 @@ Bar::foo;
["punctuation", ")"],
["punctuation", ";"],
["class-name", "Bar"],
["class-name", [
"Bar"
]],
["operator", "::"],
["function", "foo"],
["punctuation", ";"]

View File

@ -1,5 +1,5 @@
public class Solo<T> {}
Solo<Integer> val = new Solo<Integer>();
public class Solo<T extends com.foo.Foo.Bar> {}
Solo<Integer> val = new Solo<>();
Duo<Double, Character> dual = new Duo<Double, Character>(12.2585, 'C');
----------------------------------------------------
@ -7,51 +7,84 @@ Duo<Double, Character> dual = new Duo<Double, Character>(12.2585, 'C');
[
["keyword", "public"],
["keyword", "class"],
["class-name", "Solo"],
["class-name", [
"Solo"
]],
["generics", [
["punctuation", "<"],
["class-name", "T"],
["class-name", [
"T"
]],
["keyword", "extends"],
["class-name", [
["namespace", [
"com",
["punctuation", "."],
"foo",
["punctuation", "."]
]],
"Foo",
["punctuation", "."],
"Bar"
]],
["punctuation", ">"]
]],
["punctuation", "{"],
["punctuation", "}"],
["class-name", "Solo"],
["class-name", [
"Solo"
]],
["generics", [
["punctuation", "<"],
["class-name", "Integer"],
["class-name", [
"Integer"
]],
["punctuation", ">"]
]],
" val ",
["operator", "="],
["keyword", "new"],
["class-name", "Solo"],
["class-name", [
"Solo"
]],
["generics", [
["punctuation", "<"],
["class-name", "Integer"],
["punctuation", ">"]
]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", ";"],
["class-name", "Duo"],
["class-name", [
"Duo"
]],
["generics", [
["punctuation", "<"],
["class-name", "Double"],
["class-name", [
"Double"
]],
["punctuation", ","],
["class-name", "Character"],
["class-name", [
"Character"
]],
["punctuation", ">"]
]],
" dual ",
["operator", "="],
["keyword", "new"],
["class-name", "Duo"],
["class-name", [
"Duo"
]],
["generics", [
["punctuation", "<"],
["class-name", "Double"],
["class-name", [
"Double"
]],
["punctuation", ","],
["class-name", "Character"],
["class-name", [
"Character"
]],
["punctuation", ">"]
]],
["punctuation", "("],

View File

@ -5,18 +5,28 @@ public class AllChangesIndexer extends SiteIndexer<Change.Id, ChangeData, Change
[
["keyword", "public"],
["keyword", "class"],
["class-name", "AllChangesIndexer"],
["class-name", [
"AllChangesIndexer"
]],
["keyword", "extends"],
["class-name", "SiteIndexer"],
["class-name", [
"SiteIndexer"
]],
["generics", [
["punctuation", "<"],
["class-name", "Change"],
["punctuation", "."],
["class-name", "Id"],
["class-name", [
"Change",
["punctuation", "."],
"Id"
]],
["punctuation", ","],
["class-name", "ChangeData"],
["class-name", [
"ChangeData"
]],
["punctuation", ","],
["class-name", "ChangeIndex"],
["class-name", [
"ChangeIndex"
]],
["punctuation", ">"]
]],
["punctuation", "{"]
@ -24,4 +34,4 @@ public class AllChangesIndexer extends SiteIndexer<Change.Id, ChangeData, Change
----------------------------------------------------
Checks for generics. See #1351
Checks for generics. See #1351

View File

@ -78,7 +78,9 @@ module com.js.prism {
"net",
["punctuation", "."]
]],
["class-name", "ContentHandlerFactory"],
["class-name", [
"ContentHandlerFactory"
]],
["punctuation", ";"],
["keyword", "opens"],
@ -88,7 +90,9 @@ module com.js.prism {
"time",
["punctuation", "."]
]],
["class-name", "DateTime"],
["class-name", [
"DateTime"
]],
["punctuation", ";"],
["keyword", "opens"],
@ -98,7 +102,9 @@ module com.js.prism {
"time",
["punctuation", "."]
]],
["class-name", "LocalDateTime"],
["class-name", [
"LocalDateTime"
]],
["keyword", "to"],
["namespace", [
"java",
@ -116,7 +122,9 @@ module com.js.prism {
"hello",
["punctuation", "."]
]],
["class-name", "HelloInterface"],
["class-name", [
"HelloInterface"
]],
["keyword", "with"],
["namespace", [
"com",
@ -126,7 +134,9 @@ module com.js.prism {
"hello",
["punctuation", "."]
]],
["class-name", "HelloModules"],
["class-name", [
"HelloModules"
]],
["punctuation", ";"],
["punctuation", "}"]

View File

@ -31,7 +31,9 @@ import static java.lang.Math.*;
"foo",
["punctuation", "."]
]],
["class-name", "Bar"],
["class-name", [
"Bar"
]],
["punctuation", ";"],
["keyword", "import"],
["namespace", [
@ -40,9 +42,10 @@ import static java.lang.Math.*;
"lang",
["punctuation", "."]
]],
["class-name", "Math"],
["class-name", [
"Math"
]],
["punctuation", ";"],
["keyword", "import"],
["namespace", [
"java",
@ -52,17 +55,19 @@ import static java.lang.Math.*;
]],
["operator", "*"],
["punctuation", ";"],
["keyword", "import"],
["keyword", "static"],
["namespace", [
"foo",
["punctuation", "."]
]],
["class-name", "Bar"],
["class-name", [
"Bar"
]],
["punctuation", "."],
"BAZ",
["punctuation", ";"],
["keyword", "import"],
["keyword", "static"],
["namespace", [
@ -71,11 +76,12 @@ import static java.lang.Math.*;
"lang",
["punctuation", "."]
]],
["class-name", "Math"],
["class-name", [
"Math"
]],
["punctuation", "."],
"PI",
["punctuation", ";"],
["keyword", "import"],
["keyword", "static"],
["namespace", [
@ -84,7 +90,9 @@ import static java.lang.Math.*;
"lang",
["punctuation", "."]
]],
["class-name", "Math"],
["class-name", [
"Math"
]],
["punctuation", "."],
"sin",
["punctuation", ";"],
@ -96,7 +104,9 @@ import static java.lang.Math.*;
"lang",
["punctuation", "."]
]],
["class-name", "Math"],
["class-name", [
"Math"
]],
["punctuation", "."],
"*",
["punctuation", ";"]
@ -104,4 +114,4 @@ import static java.lang.Math.*;
----------------------------------------------------
Checks for packages.
Checks for packages.

View File

@ -17,7 +17,6 @@ jumps over the lazy dog
String empty = """
""";
----------------------------------------------------
[
@ -38,7 +37,9 @@ String empty = """
["operator", "+"],
["triple-quoted-string", "\"\"\"\njumps over the lazy dog\n\"\"\""],
["class-name", "String"],
["class-name", [
"String"
]],
" empty ",
["operator", "="],
["triple-quoted-string", "\"\"\"\n\"\"\""],
@ -47,4 +48,4 @@ String empty = """
----------------------------------------------------
Checks for strings.
Checks for strings.

View File

@ -77,7 +77,7 @@
["code-section", [
["line", [
["code", [
["class-name", "Foo"],
["class-name", ["Foo"]],
["punctuation", "."],
["function", "bar"],
["punctuation", "("],
@ -93,6 +93,7 @@
]],
["punctuation", ">"]
]],
"\r\n * ",
["tag", [
["tag", [
@ -104,7 +105,7 @@
["code-section", [
["line", [
["code", [
["class-name", "Foo"]
["class-name", ["Foo"]]
]]
]]
]],
@ -115,6 +116,7 @@
]],
["punctuation", ">"]
]],
"\r\n *\r\n * ",
["tag", [
["tag", [
@ -130,6 +132,7 @@
]],
["punctuation", ">"]
]],
["code-section", [
"* ",
["line", [
@ -153,6 +156,7 @@
["punctuation", "{"]
]]
]],
"\r\n * ",
["line", [
["code", [
@ -165,12 +169,14 @@
["punctuation", ";"]
]]
]],
"\r\n * ",
["line", [
["code", [
["punctuation", "}"]
]]
]],
"\r\n * ",
["line", [
["code", [
@ -179,6 +185,7 @@
["punctuation", ";"]
]]
]],
"\r\n *"
]],
["tag", [
@ -195,6 +202,7 @@
]],
["punctuation", ">"]
]],
"\r\n *\r\n * ",
["tag", [
["tag", [
@ -205,13 +213,14 @@
]],
["punctuation", "{"],
["keyword", "@code"],
["code-section", [
"* ",
["code", [
["class-name", "String"],
["class-name", ["String"]],
" message ",
["operator", "="],
["class-name", "String"],
["class-name", ["String"]],
["punctuation", "."],
["function", "join"],
["punctuation", "("],
@ -225,10 +234,12 @@
["punctuation", ")"],
["punctuation", ";"]
]],
"\r\n * ",
["code", [
["comment", "// message returned is: \"Java-is-cool\""]
]],
"\r\n *"
]],
["punctuation", "}"],
@ -239,6 +250,7 @@
]],
["punctuation", ">"]
]],
"\r\n *\r\n * ",
["tag", [
["tag", [
@ -247,6 +259,7 @@
]],
["punctuation", ">"]
]],
["code-section", [
"* ",
["line", [
@ -262,6 +275,7 @@
["number", "1"]
]]
]],
"\r\n *"
]],
["tag", [
@ -271,6 +285,7 @@
]],
["punctuation", ">"]
]],
"\r\n *\r\n * ",
["tag", [
["tag", [
@ -279,6 +294,7 @@
]],
["punctuation", ">"]
]],
["code-section", [
"* ",
["line", [
@ -296,9 +312,7 @@
]],
["punctuation", ">"]
]],
["code", [
"c"
]],
["code", ["c"]],
["tag", [
["tag", [
["punctuation", "</"],
@ -335,6 +349,7 @@
["punctuation", ")"]
]]
]],
"\r\n * ",
["line", [
["code", [
@ -355,9 +370,7 @@
]],
["punctuation", ">"]
]],
["code", [
"b"
]],
["code", ["b"]],
["tag", [
["tag", [
["punctuation", "</"],
@ -381,6 +394,7 @@
["punctuation", ")"]
]]
]],
"\r\n *"
]],
["tag", [
@ -390,6 +404,7 @@
]],
["punctuation", ">"]
]],
"\r\n *\r\n * ",
["tag", [
["tag", [
@ -400,53 +415,59 @@
]],
["punctuation", "{"],
["keyword", "@code"],
["code-section", [
"* ",
["code", [
["keyword", "interface"],
["class-name", "ArchiveSearcher"],
["class-name", ["ArchiveSearcher"]],
["punctuation", "{"],
["class-name", "String"],
["class-name", ["String"]],
["function", "search"],
["punctuation", "("],
["class-name", "String"],
["class-name", ["String"]],
" target",
["punctuation", ")"],
["punctuation", ";"],
["punctuation", "}"]
]],
"\r\n * ",
["code", [
["keyword", "class"],
["class-name", "App"],
["class-name", ["App"]],
["punctuation", "{"]
]],
"\r\n * ",
["code", [
["keyword", "void"],
["function", "showSearch"],
["punctuation", "("],
["keyword", "final"],
["class-name", "String"],
["class-name", ["String"]],
" target",
["punctuation", ")"]
]],
"\r\n * ",
["code", [
["keyword", "throws"],
["class-name", "InterruptedException"],
["class-name", ["InterruptedException"]],
["punctuation", "{"]
]],
"\r\n * ",
["code", [
["class-name", "Future"],
["class-name", ["Future"]],
["generics", [
["punctuation", "<"],
["class-name", "String"],
["class-name", ["String"]],
["punctuation", ">"]
]],
" future"
]],
"\r\n * ",
["code", [
["operator", "="],
@ -455,25 +476,27 @@
["function", "submit"],
["punctuation", "("],
["keyword", "new"],
["class-name", "Callable"],
["class-name", ["Callable"]],
["generics", [
["punctuation", "<"],
["class-name", "String"],
["class-name", ["String"]],
["punctuation", ">"]
]],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"]
]],
"\r\n * ",
["code", [
["keyword", "public"],
["class-name", "String"],
["class-name", ["String"]],
["function", "call"],
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"]
]],
"\r\n * ",
["code", [
["keyword", "return"],
@ -485,6 +508,7 @@
["punctuation", ")"],
["punctuation", ";"]
]],
"\r\n * ",
["code", [
["punctuation", "}"],
@ -492,6 +516,7 @@
["punctuation", ")"],
["punctuation", ";"]
]],
"\r\n * ",
["code", [
["function", "displayOtherThings"],
@ -500,11 +525,13 @@
["punctuation", ";"],
["comment", "// do other things while searching"]
]],
"\r\n * ",
["code", [
["keyword", "try"],
["punctuation", "{"]
]],
"\r\n * ",
["code", [
["function", "displayText"],
@ -518,12 +545,13 @@
["punctuation", ";"],
["comment", "// use future"]
]],
"\r\n * ",
["code", [
["punctuation", "}"],
["keyword", "catch"],
["punctuation", "("],
["class-name", "ExecutionException"],
["class-name", ["ExecutionException"]],
" ex",
["punctuation", ")"],
["punctuation", "{"],
@ -535,10 +563,12 @@
["punctuation", ";"],
["punctuation", "}"]
]],
"\r\n * ",
["code", [
["punctuation", "}"]
]],
"\r\n * ",
["code", [
["punctuation", "}"]
@ -552,6 +582,7 @@
]],
["punctuation", ">"]
]],
"\r\n */"
]