The source code to test.
Parses source, caches its symbols and compares the the cache content with the results.
Params: source = The source code to test. results = An array of string array. Each slot represents the variable name followed by the type strings.
auto tokens = lex(q{int a = 9;}); foreach(i, t; cast(IdType[]) [tok!"int", tok!"identifier", tok!"=", tok!"intLiteral", tok!";"]) { assert(tokens[i] == t); } assert(tokens[1].text == "a", tokens[1].text); assert(tokens[3].text == "9", tokens[3].text);
Parses source, caches its symbols and compares the the cache content with the results.