Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lexers/embedded/javascript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<token type="KeywordDeclaration"/>
<push state="slashstartsregex"/>
</rule>
<rule pattern="(abstract|async|await|boolean|byte|char|class|const|debugger|double|enum|export|extends|final|float|goto|implements|import|int|interface|long|native|package|private|protected|public|short|static|super|synchronized|throws|transient|volatile)\b">
<rule pattern="(abstract|async|await|boolean|byte|char|class|const|debugger|double|enum|export|extends|final|float|goto|implements|import|int|interface|long|native|package|private|protected|public|short|static|super|synchronized|throws|transient|using|volatile)\b">
<token type="KeywordReserved"/>
</rule>
<rule pattern="(true|false|null|NaN|Infinity|undefined)\b">
Expand Down
2 changes: 1 addition & 1 deletion lexers/embedded/typescript.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
<push state="slashstartsregex" />
</rule>
<rule
pattern="(abstract|async|boolean|class|const|debugger|enum|export|extends|from|get|global|goto|implements|import|interface|namespace|package|private|protected|public|readonly|require|set|static|super|type)\b"
pattern="(abstract|async|boolean|class|const|debugger|enum|export|extends|from|get|global|goto|implements|import|interface|namespace|package|private|protected|public|readonly|require|set|static|super|type|using)\b"
>
<token type="KeywordReserved" />
</rule>
Expand Down
2 changes: 2 additions & 0 deletions lexers/testdata/javascript.actual
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ const filePath = String.raw`C:\Development\profile\aboutme.html`;

let n = 0x21 + 1_000;
let n2 = 1e3;

using resource = new Resource();
11 changes: 11 additions & 0 deletions lexers/testdata/javascript.expected
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,16 @@
{"type":"Text","value":" "},
{"type":"LiteralNumberFloat","value":"1e3"},
{"type":"Punctuation","value":";"},
{"type":"Text","value":"\n\n"},
{"type":"KeywordReserved","value":"using"},
{"type":"Text","value":" "},
{"type":"NameOther","value":"resource"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"Keyword","value":"new"},
{"type":"Text","value":" "},
{"type":"NameOther","value":"Resource"},
{"type":"Punctuation","value":"();"},
{"type":"Text","value":"\n"}
]
4 changes: 3 additions & 1 deletion lexers/testdata/typescript.actual
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const moduleName = modules.map();

using resource = new Resource();

declare module "fs" {}
declare module "@custom/plugin" {}
declare module "../../compiler/types" {}
Expand All @@ -20,4 +22,4 @@ type FirstChar<K extends string> = K extends `${infer X}${infer _}`
: never
type SChar = FirstChar<"stuff">

export { TestComponent }
export { TestComponent }
14 changes: 13 additions & 1 deletion lexers/testdata/typescript.expected
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
{"type":"NameOther","value":"map"},
{"type":"Punctuation","value":"();"},
{"type":"Text","value":"\n\n"},
{"type":"KeywordReserved","value":"using"},
{"type":"Text","value":" "},
{"type":"NameOther","value":"resource"},
{"type":"Text","value":" "},
{"type":"Operator","value":"="},
{"type":"Text","value":" "},
{"type":"Keyword","value":"new"},
{"type":"Text","value":" "},
{"type":"NameOther","value":"Resource"},
{"type":"Punctuation","value":"();"},
{"type":"Text","value":"\n\n"},
{"type":"KeywordReserved","value":"declare"},
{"type":"Text","value":" "},
{"type":"KeywordReserved","value":"module"},
Expand Down Expand Up @@ -188,5 +199,6 @@
{"type":"Text","value":" "},
{"type":"NameOther","value":"TestComponent"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"}"}
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n"}
]