Created
December 19, 2011 11:09
-
-
Save lmt-swallow/1496684 to your computer and use it in GitHub Desktop.
パースできたか試すために関数書いたのはいいんだけどいろいろアレ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void debug(Expression exp, int indent) | |
{ | |
Expression seenow = exp; | |
string indentStr = ""; | |
for (int i = 0; i < indent; i++) indentStr += " "; | |
CanReadMessage.gotMessage(indentStr + "-TokenValue = " + seenow.rootToken.tokenValue + "(" + seenow.rootToken.t_type.ToString() + ")"); | |
if (seenow.rightToken != null) | |
{ | |
CanReadMessage.gotMessage(indentStr + "-Right-expr"); | |
debug(seenow.rightToken, indent + 1); | |
CanReadMessage.gotMessage(indentStr + "-End"); | |
} | |
if (seenow.leftToken != null) | |
{ | |
if (seenow.leftToken.rootToken != null) | |
{ | |
CanReadMessage.gotMessage(indentStr + "-Left-expr"); | |
debug(seenow.leftToken, indent + 1); | |
CanReadMessage.gotMessage(indentStr + "-End" + (indent == 0 ? "(EOE)" : "")); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment