本文整理汇总了C#中Tokens.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Tokens.ToString方法的具体用法?C# Tokens.ToString怎么用?C# Tokens.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tokens
的用法示例。
在下文中一共展示了Tokens.ToString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: intern
internal static string intern(Tokens token)
{
switch (token)
{
case Tokens.tDOT2: return "..";
case Tokens.tDOT3: return "...";
case Tokens.tPOW: return "**";
case Tokens.tUPLUS: return "[email protected]";
case Tokens.tUMINUS: return "[email protected]";
case Tokens.tCMP: return "<=>";
case Tokens.tGEQ: return ">=";
case Tokens.tLEQ: return "<=";
case Tokens.tEQ: return "==";
case Tokens.tEQQ: return "===";
case Tokens.tNEQ: return "!=";
case Tokens.tMATCH: return "=~";
case Tokens.tNMATCH: return "!~";
case Tokens.tAREF: return "[]";
case Tokens.tASET: return "[]=";
case Tokens.tLSHFT: return "<<";
case Tokens.tRSHFT: return ">>";
case Tokens.tCOLON2: return "::";
case Tokens.tOROP: return "||";
case Tokens.tANDOP: return "&&";
default: return token.ToString();
}
}
示例2: GetTokenName
public static string GetTokenName(Tokens token)
{
return token.ToString();
}
示例3: ReplaceTokenInput
public static string ReplaceTokenInput(NameValueCollection serverVariables, string input, Tokens token)
{
input = input.Replace(token.Formatted(), serverVariables[token.ToString()]);
return input;
}
示例4: UnknownToken
static public Exception UnknownToken(Tokens tokExpected, Tokens tokCurr, int position) {
return _Syntax(Res.GetString(Res.Expr_UnknownToken1, tokExpected.ToString(), tokCurr.ToString(), position.ToString(CultureInfo.InvariantCulture)));
}
示例5: FirstCharToLower
static internal string FirstCharToLower(Tokens attrKind)
{
var attrString = attrKind.ToString();
attrString = attrString.Substring(0, 1).ToLower(CultureInfo.InvariantCulture) + attrString.Substring(1, attrString.Length - 1);
return attrString;
}
示例6: WriteStringElement
private void WriteStringElement(Tokens t, object s) {
xmlWriter.WriteElementString(t.ToString(), s.ToString());
}
示例7: WriteStartElement
private void WriteStartElement(Tokens t) {
xmlWriter.WriteStartElement(t.ToString());
}
示例8: TokenIs
private bool TokenIs(Tokens t) {
return xmlReader.IsStartElement(t.ToString());
}
示例9: CheckToken
private void CheckToken(Tokens t) {
if (!xmlReader.IsStartElement(t.ToString())) {
throw new InvalidDataException(String.Format("expecting {0}", t));
}
}