本文整理汇总了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;
}