Use ToString on primitives

This commit is contained in:
Sam Harwell 2013-02-17 15:09:30 -06:00
parent 40994e34de
commit 7dd7ad030f
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ namespace Antlr4.Runtime
protected internal virtual string GetDecisionDescription(Parser recognizer, int decision protected internal virtual string GetDecisionDescription(Parser recognizer, int decision
) )
{ {
return Sharpen.Extensions.ToString(decision); return decision.ToString();
} }
} }
} }

View File

@ -304,7 +304,7 @@ namespace Antlr4.Runtime
{ {
int ruleIndex = p.GetRuleIndex(); int ruleIndex = p.GetRuleIndex();
string ruleName = ruleIndex >= 0 && ruleIndex < ruleNames.Count ? ruleNames[ruleIndex string ruleName = ruleIndex >= 0 && ruleIndex < ruleNames.Count ? ruleNames[ruleIndex
] : Sharpen.Extensions.ToString(ruleIndex); ] : ruleIndex.ToString();
buf.Append(ruleName); buf.Append(ruleName);
} }
if (p.parent != null && (ruleNames != null || !p.parent.IsEmpty())) if (p.parent != null && (ruleNames != null || !p.parent.IsEmpty()))