本文整理汇总了C#中DGrok.Framework.Token类的典型用法代码示例。如果您正苦于以下问题:C# Token类的具体用法?C# Token怎么用?C# Token使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Token类属于DGrok.Framework命名空间,在下文中一共展示了Token类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ArrayTypeNode
public ArrayTypeNode(Token arrayKeywordNode, Token openBracketNode, ListNode<DelimitedItemNode<AstNode>> indexListNode, Token closeBracketNode, Token ofKeywordNode, AstNode typeNode)
{
_arrayKeywordNode = arrayKeywordNode;
_openBracketNode = openBracketNode;
_indexListNode = indexListNode;
_closeBracketNode = closeBracketNode;
_ofKeywordNode = ofKeywordNode;
_typeNode = typeNode;
}
示例2: AnonMethodHeadingNode
public AnonMethodHeadingNode(Token methodType, Token openParenthesis, ListNode<DelimitedItemNode<ParameterNode>> parameterList, Token closeParenthesis, Token colon, AstNode returnType)
{
MethodType = methodType;
OpenParenthesis = openParenthesis;
ParameterList = parameterList;
CloseParenthesis = closeParenthesis;
Colon = colon;
ReturnType = returnType;
}
示例3: NextToken
public Token NextToken()
{
while(_index < _source.Length && Char.IsWhiteSpace(_source[_index]))
++_index;
if(_index >= _source.Length)
return null;
Match match = NextMatch();
if(match == null)
throw new LexException("Unrecognized character '" + _source[_index] + "'", Location);
string text = _source.Substring(_index, match.Length);
Token result = new Token(match.TokenType, Location, text, match.ParsedText);
_index += match.Length;
return result;
}
示例4: GetSourceTokensForInclude
private IEnumerable<Token> GetSourceTokensForInclude(Token token, string baseName)
{
string currentDirectory = token.Location.Directory;
string fileName = _fileLoader.ExpandFileName(currentDirectory, baseName);
string source = _fileLoader.Load(fileName);
Lexer lexer = new Lexer(source, fileName);
return lexer.Tokens;
}
示例5: VisitToken
public virtual void VisitToken(Token token)
{
}
示例6: ConstantDeclNode
public ConstantDeclNode(Token nameNode, Token colonNode, AstNode typeNode, Token equalSignNode, AstNode valueNode, ListNode<Token> portabilityDirectiveListNode, Token semicolonNode)
{
_nameNode = nameNode;
_colonNode = colonNode;
_typeNode = typeNode;
_equalSignNode = equalSignNode;
_valueNode = valueNode;
_portabilityDirectiveListNode = portabilityDirectiveListNode;
_semicolonNode = semicolonNode;
}
示例7: ClassOfNode
public ClassOfNode(Token classKeywordNode, Token ofKeywordNode, AstNode typeNode)
{
_classKeywordNode = classKeywordNode;
_ofKeywordNode = ofKeywordNode;
_typeNode = typeNode;
}
示例8: WhileStatementNode
public WhileStatementNode(Token whileKeywordNode, AstNode conditionNode, Token doKeywordNode, AstNode statementNode)
{
_whileKeywordNode = whileKeywordNode;
_conditionNode = conditionNode;
_doKeywordNode = doKeywordNode;
_statementNode = statementNode;
}
示例9: UnaryOperationNode
public UnaryOperationNode(Token operatorNode, AstNode operandNode)
{
_operatorNode = operatorNode;
_operandNode = operandNode;
}
示例10: CaseStatementNode
public CaseStatementNode(Token caseKeywordNode, AstNode expressionNode, Token ofKeywordNode, ListNode<CaseSelectorNode> selectorListNode, Token elseKeywordNode, ListNode<DelimitedItemNode<AstNode>> elseStatementListNode, Token endKeywordNode)
{
_caseKeywordNode = caseKeywordNode;
_expressionNode = expressionNode;
_ofKeywordNode = ofKeywordNode;
_selectorListNode = selectorListNode;
_elseKeywordNode = elseKeywordNode;
_elseStatementListNode = elseStatementListNode;
_endKeywordNode = endKeywordNode;
}
示例11: TypeSectionNode
public TypeSectionNode(Token typeKeywordNode, ListNode<AstNode> typeListNode)
{
_typeKeywordNode = typeKeywordNode;
_typeListNode = typeListNode;
}
示例12: TypeHelperNode
public TypeHelperNode(Token typeKeywordNode, Token helperSemikeywordNode, Token openParenthesisNode, AstNode baseHelperTypeNode, Token closeParenthesisNode, Token forKeywordNode, AstNode typeNode, ListNode<VisibilitySectionNode> contentListNode, Token endKeywordNode)
{
_typeKeywordNode = typeKeywordNode;
_helperSemikeywordNode = helperSemikeywordNode;
_openParenthesisNode = openParenthesisNode;
_baseHelperTypeNode = baseHelperTypeNode;
_closeParenthesisNode = closeParenthesisNode;
_forKeywordNode = forKeywordNode;
_typeNode = typeNode;
_contentListNode = contentListNode;
_endKeywordNode = endKeywordNode;
}
示例13: TypeForwardDeclarationNode
public TypeForwardDeclarationNode(Token nameNode, Token equalSignNode, Token typeNode, Token semicolonNode)
{
_nameNode = nameNode;
_equalSignNode = equalSignNode;
_typeNode = typeNode;
_semicolonNode = semicolonNode;
}
示例14: TypeDeclNode
public TypeDeclNode(Token nameNode, Token equalSignNode, Token typeKeywordNode, AstNode typeNode, ListNode<Token> portabilityDirectiveListNode, Token semicolonNode)
{
_nameNode = nameNode;
_equalSignNode = equalSignNode;
_typeKeywordNode = typeKeywordNode;
_typeNode = typeNode;
_portabilityDirectiveListNode = portabilityDirectiveListNode;
_semicolonNode = semicolonNode;
}
示例15: TryFinallyNode
public TryFinallyNode(Token tryKeywordNode, ListNode<DelimitedItemNode<AstNode>> tryStatementListNode, Token finallyKeywordNode, ListNode<DelimitedItemNode<AstNode>> finallyStatementListNode, Token endKeywordNode)
{
_tryKeywordNode = tryKeywordNode;
_tryStatementListNode = tryStatementListNode;
_finallyKeywordNode = finallyKeywordNode;
_finallyStatementListNode = finallyStatementListNode;
_endKeywordNode = endKeywordNode;
}