fix a horrible perf mistake in genCaseTrie
This commit is contained in:
parent
ba5d9d6775
commit
8d8d72dfe5
|
@ -393,7 +393,6 @@ L_advance:
|
||||||
// since this branch at most is taken once per file
|
// since this branch at most is taken once per file
|
||||||
_empty = true;
|
_empty = true;
|
||||||
return;
|
return;
|
||||||
// pragma(msg, generateCaseTrie(
|
|
||||||
mixin(generateCaseTrie(
|
mixin(generateCaseTrie(
|
||||||
"=", "TokenType.assign",
|
"=", "TokenType.assign",
|
||||||
"@", "TokenType.at",
|
"@", "TokenType.at",
|
||||||
|
@ -2962,7 +2961,7 @@ string printCaseStatements(K, V)(TrieNode!(K,V) node, string indentString)
|
||||||
caseStatement ~= indentString;
|
caseStatement ~= indentString;
|
||||||
caseStatement ~= "\t{\n";
|
caseStatement ~= "\t{\n";
|
||||||
caseStatement ~= indentString;
|
caseStatement ~= indentString;
|
||||||
caseStatement ~= "\t\tcurrent.value = getTokenValue(current.type);\n";
|
caseStatement ~= "\t\tcurrent.value = tokenValue!("~node.children[k].value~");\n";
|
||||||
caseStatement ~= indentString;
|
caseStatement ~= indentString;
|
||||||
caseStatement ~= "\t\tcurrent.type = " ~ node.children[k].value;
|
caseStatement ~= "\t\tcurrent.type = " ~ node.children[k].value;
|
||||||
caseStatement ~= ";\n";
|
caseStatement ~= ";\n";
|
||||||
|
|
Loading…
Reference in New Issue