本文整理匯總了C#中PerCederberg.Grammatica.Runtime.Token類的典型用法代碼示例。如果您正苦於以下問題:C# Token類的具體用法?C# Token怎麽用?C# Token使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Token類屬於PerCederberg.Grammatica.Runtime命名空間,在下文中一共展示了Token類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ExitQuotedString
public override Node ExitQuotedString(Token node)
{
string quotedString = node.GetImage();
// Remove first and last char which are both a quote.
string content = quotedString.Substring(1, quotedString.Length - 2);
node.AddValue(content);
return node;
}
示例2: ExitIdentifier
private void ExitIdentifier(Token node)
{
if (MyInFieldPropertyExpression == false) {
return;
}
if (MyIdentifiers.ContainsKey(MyMemberExpressionCount) == false) {
MyIdentifiers.Add(MyMemberExpressionCount, node.Image);
}
}
示例3: ExitSquareBracketRight
public override Node ExitSquareBracketRight(Token node)
{
node.Values.Add(ScriptKeyword.SQUARE_BRACKET_RIGHT);
return node;
}
示例4: ExitUserName
public override Node ExitUserName(Token node)
{
node.AddValue(node.GetImage().Substring(9).Trim());
return node;
}
示例5: ExitLevel
public override Node ExitLevel(Token node)
{
node.Values.Add(ScriptKeyword.LEVEL);
return node;
}
示例6: ExitVoice
public override Node ExitVoice(Token node)
{
node.Values.Add(ScriptKeyword.VOICE);
return node;
}
示例7: ExitWorld
public override Node ExitWorld(Token node)
{
node.Values.Add(ScriptKeyword.WORLD);
return node;
}
示例8: ExitText
public override Node ExitText(Token node)
{
node.Values.Add(node.Image);
return node;
}
示例9: ExitType
public override Node ExitType(Token node)
{
node.Values.Add(ScriptKeyword.TYPE);
return node;
}
示例10: ExitPeriod
public override Node ExitPeriod(Token node)
{
node.Values.Add(ScriptKeyword.PERIOD);
return node;
}
示例11: ExitPosition
public override Node ExitPosition(Token node)
{
node.Values.Add(ScriptKeyword.POSITION);
return node;
}
示例12: ExitOr
public override Node ExitOr(Token node)
{
node.Values.Add(ScriptKeyword.OR);
return node;
}
示例13: ExitParentheseRight
public override Node ExitParentheseRight(Token node)
{
node.Values.Add(ScriptKeyword.PARENTHESE_RIGHT);
return node;
}
示例14: ExitName
public override Node ExitName(Token node)
{
node.Values.Add(ScriptKeyword.NAME);
return node;
}
示例15: ExitMove
public override Node ExitMove(Token node)
{
node.Values.Add(ScriptKeyword.MOVE);
return node;
}