本文整理汇总了C++中pANTLR3_COMMON_TOKEN::setCharPositionInLine方法的典型用法代码示例。如果您正苦于以下问题:C++ pANTLR3_COMMON_TOKEN::setCharPositionInLine方法的具体用法?C++ pANTLR3_COMMON_TOKEN::setCharPositionInLine怎么用?C++ pANTLR3_COMMON_TOKEN::setCharPositionInLine使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pANTLR3_COMMON_TOKEN
的用法示例。
在下文中一共展示了pANTLR3_COMMON_TOKEN::setCharPositionInLine方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
ANTLR3_API void
antlr3SetTokenAPI(pANTLR3_COMMON_TOKEN token)
{
token->getText = getText;
token->setText = setText;
token->setText8 = setText8;
token->getType = getType;
token->setType = setType;
token->getLine = getLine;
token->setLine = setLine;
token->setLine = setLine;
token->getCharPositionInLine = getCharPositionInLine;
token->setCharPositionInLine = setCharPositionInLine;
token->getChannel = getChannel;
token->setChannel = setChannel;
token->getTokenIndex = getTokenIndex;
token->setTokenIndex = setTokenIndex;
token->getStartIndex = getStartIndex;
token->setStartIndex = setStartIndex;
token->getStopIndex = getStopIndex;
token->setStopIndex = setStopIndex;
token->toString = toString;
/* Set defaults
*/
token->setCharPositionInLine(token, -1);
token->custom = NULL;
token->freeCustom = NULL;
token->type = ANTLR3_TOKEN_INVALID;
token->text = NULL;
token->start = 0;
token->stop = 0;
token->channel = ANTLR3_TOKEN_DEFAULT_CHANNEL;
token->line = 0;
token->index = 0;
token->input = NULL;
return;
}