@@ -0,0 +1,2158 @@
+package som.langserv;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A%0Apublic class Helpers %7B%0A  public static List%3Cint%5B%5D%3E splitIntoTokenDetails(final List%3CInteger%3E tokenDetails) %7B%0A    assertTrue(%22It's expected that the token details come as 5-tuples, but length is: %22%0A        + tokenDetails.size(), tokenDetails.size() %25 5 == 0);%0A%0A    List%3Cint%5B%5D%3E result = new ArrayList%3C%3E();%0A    for (int i = 0; i %3C tokenDetails.size(); i += 5) %7B%0A      int%5B%5D tuple = new int%5B5%5D;%0A      tuple%5B0%5D = tokenDetails.get(i);%0A      tuple%5B1%5D = tokenDetails.get(i + 1);%0A      tuple%5B2%5D = tokenDetails.get(i + 2);%0A      tuple%5B3%5D = tokenDetails.get(i + 3);%0A      tuple%5B4%5D = tokenDetails.get(i + 4);%0A      result.add(tuple);%0A    %7D%0A%0A    return result;%0A  %7D%0A%0A  public static void printAllToken(final List%3Cint%5B%5D%3E tokens) %7B%0A    for (int%5B%5D t : tokens) %7B%0A      printToken(t);%0A    %7D%0A  %7D%0A%0A  public static void printToken(final int%5B%5D tuple) %7B%0A    System.out.println(%22line: %22 + tuple%5B0%5D + %22 col: %22 + tuple%5B1%5D + %22 len: %22 + tuple%5B2%5D%0A        + %22 type: %22 + SemanticTokenType.from(tuple%5B3%5D).name + %22 mod: unsupported %22%0A        + tuple%5B4%5D);%0A    // TODO: to support the modifiers, I need to parse the bitmap%0A    // SemanticTokenModifier.values()%5Btuple%5B4%5D%5D.name%0A  %7D%0A%0A  public static void assertToken(final int expectedLine, final int expectedCol,%0A      final String token, final SemanticTokenType expectedType, final int%5B%5D actualTuple) %7B%0A    String error = %22%22;%0A%0A    if (expectedLine != actualTuple%5B0%5D) %7B%0A      error += %22line expected %22 + expectedLine + %22, but was %22 + actualTuple%5B0%5D + %22%5Cn%22;%0A    %7D%0A%0A    if (expectedCol != actualTuple%5B1%5D) %7B%0A      error += %22col expected %22 + expectedCol + %22, but was %22 + actualTuple%5B1%5D + %22%5Cn%22;%0A    %7D%0A%0A    if (token.length() != actualTuple%5B2%5D) %7B%0A      error += %22expected %22 + token + %22 with %22 + token.length() + %22chars, but got %22%0A          + actualTuple%5B2%5D + %22%5Cn%22;%0A    %7D%0A%0A    if (expectedType.ordinal() != actualTuple%5B3%5D) %7B%0A      error += %22expected %22 + expectedType.name + %22, but got %22%0A          + SemanticTokenType.from(actualTuple%5B3%5D) + %22%5Cn%22;%0A    %7D%0A%0A    if (!error.equals(%22%22)) %7B%0A      throw new AssertionError(error);%0A    %7D%0A  %7D%0A%7D%0A

Add helper file for dealing with semantic highlighting tokens in tests