@@ -91,7 +91,7 @@ public HighlighterTester(@NotNull String sourceCode, @NotNull ImmutableSeq<Highl
91
91
92
92
public void runTest () {
93
93
var sortedActual = actual .view ().distinct ().sorted ().toImmutableSeq ().view ();
94
- if (sortedActual .getLast () instanceof HighlightInfo .Lit (var $ , var kind ) && kind == HighlightInfo .LitKind .Eol )
94
+ if (sortedActual .getLast () instanceof HighlightInfo .Lit (_ , var kind ) && kind == HighlightInfo .LitKind .Eol )
95
95
// Remove the last Eol
96
96
sortedActual = sortedActual .dropLast (1 );
97
97
runTest (sortedActual .toImmutableSeq (), Seq .of (expected ));
@@ -120,13 +120,13 @@ public void runTest(@NotNull ImmutableSeq<HighlightInfo> actuals, @NotNull Seq<E
120
120
assertEquals (expectedText , actualText , "at " + sourcePos );
121
121
122
122
switch (actual ) {
123
- case HighlightInfo .Lit (var $ , var ty )
123
+ case HighlightInfo .Lit (_ , var ty )
124
124
when ty == HighlightInfo .LitKind .Keyword && expected .expected () instanceof ExpectedHighlightType .Keyword -> {
125
125
}
126
- case HighlightInfo .Lit (var $ , var ty )
126
+ case HighlightInfo .Lit (_ , var ty )
127
127
when ty == HighlightInfo .LitKind .Int && expected .expected () instanceof LitInt -> {
128
128
}
129
- case HighlightInfo .Lit (var $ , var ty )
129
+ case HighlightInfo .Lit (_ , var ty )
130
130
when ty == HighlightInfo .LitKind .String && expected .expected () instanceof ExpectedHighlightType .LitString -> {
131
131
}
132
132
@@ -138,7 +138,7 @@ public void runTest(@NotNull ImmutableSeq<HighlightInfo> actuals, @NotNull Seq<E
138
138
when expected .expected () instanceof ExpectedHighlightType .Ref expectedRef ->
139
139
assertRef (sourcePos , ref , expectedRef );
140
140
141
- case HighlightInfo .Err err -> throw new UnsupportedOperationException ("TODO" ); // TODO
141
+ case HighlightInfo .Err _ -> throw new UnsupportedOperationException ("TODO" ); // TODO
142
142
143
143
default ->
144
144
fail ("expected: " + expected .getClass ().getSimpleName () + ", but actual: " + actual .getClass ().getSimpleName ());
@@ -213,7 +213,7 @@ public static void highlightAndTest(@Language("Aya") @NotNull String code, @Null
213
213
Stmt .resolve (stmts , resolveInfo , EmptyModuleLoader .INSTANCE );
214
214
215
215
var result = SyntaxHighlight .highlight (null , Option .some (sourceFile ), stmts )
216
- .filterNot (it -> it instanceof HighlightInfo .Lit (var $ , var kind )
216
+ .filterNot (it -> it instanceof HighlightInfo .Lit (_ , var kind )
217
217
&& ignored .contains (kind ));
218
218
new HighlighterTester (code , result , expected ).runTest ();
219
219
}
0 commit comments