CommonTokenFactory.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:Scratch-ApuC 作者:
@Override
public CommonToken create(Pair<TokenSource, CharStream> source, int type, String text,
                          int channel, int start, int stop,
                          int line, int charPositionInLine)
{
    CommonToken t = new CommonToken(source, type, channel, start, stop);
    t.setLine(line);
    t.setCharPositionInLine(charPositionInLine);
    if ( text!=null ) {
        t.setText(text);
    }
    else if ( copyText && source.b != null ) {
        t.setText(source.b.getText(Interval.of(start,stop)));
    }

    return t;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号