SqlParserPos pos = SqlParserPos.sum(posList); if (star) { {if (true) return SqlIdentifier.star(list, pos, posList);}
SqlParserPos pos = SqlParserPos.sum(posList); if (star) { {if (true) return SqlIdentifier.star(list, pos, posList);}
{if (true) return frags.get(0);} // just the head fragment } else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} unicodeEscapeChar); SqlParserPos pos2 = SqlParserPos.sum(rands); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
{if (true) return frags.get(0);} // just the head fragment } else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} unicodeEscapeChar); SqlParserPos pos2 = SqlParserPos.sum(rands); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
SqlParserPos pos = SqlParserPos.sum(posList); if (star) { {if ("" != null) return SqlIdentifier.star(list, pos, posList);}
/** * Combines the parser positions of a list of nodes to create a position * which spans from the beginning of the first to the end of the last. */ public static SqlParserPos sum(final List<? extends SqlNode> nodes) { return sum(Lists.transform(nodes, SqlNode::getParserPosition)); }
/** * Combines the parser positions of a list of nodes to create a position * which spans from the beginning of the first to the end of the last. */ public static SqlParserPos sum(final List<? extends SqlNode> nodes) { return sum(Lists.transform(nodes, SqlNode::getParserPosition)); }
/** Returns a position spanning the earliest position to the latest. * Does not assume that the positions are sorted. * Throws if the list is empty. */ public SqlParserPos pos() { switch (posList.size()) { case 0: throw new AssertionError(); case 1: return posList.get(0); default: return SqlParserPos.sum(posList); } }
/** Returns a position spanning the earliest position to the latest. * Does not assume that the positions are sorted. * Throws if the list is empty. */ public SqlParserPos pos() { switch (posList.size()) { case 0: throw new AssertionError(); case 1: return posList.get(0); default: return SqlParserPos.sum(posList); } }
/** * Combines the parser positions of an array of nodes to create a position * which spans from the beginning of the first to the end of the last. */ public static SqlParserPos sum(final SqlNode[] nodes) { return sum(toPos(nodes)); }
/** * Combines the parser positions of an array of nodes to create a position * which spans from the beginning of the first to the end of the last. */ public static SqlParserPos sum(final SqlNode[] nodes) { return sum(toPos(nodes)); }
{if ("" != null) return frags.get(0);} // just the head fragment } else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if ("" != null) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} unicodeEscapeChar); SqlParserPos pos2 = SqlParserPos.sum(rands); {if ("" != null) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
public SqlIdentifier getComponent(int from, int to) { final SqlParserPos pos; final ImmutableList<SqlParserPos> pos2; if (componentPositions == null) { pos2 = null; pos = this.pos; } else { pos2 = componentPositions.subList(from, to); pos = SqlParserPos.sum(pos2); } return new SqlIdentifier(names.subList(from, to), collation, pos, pos2); }
public SqlIdentifier getComponent(int from, int to) { final SqlParserPos pos; final ImmutableList<SqlParserPos> pos2; if (componentPositions == null) { pos2 = null; pos = this.pos; } else { pos2 = componentPositions.subList(from, to); pos = SqlParserPos.sum(pos2); } return new SqlIdentifier(names.subList(from, to), collation, pos, pos2); }
/** * Combines this parser position with a list of positions. */ public SqlParserPos plusAll(Collection<SqlNode> nodeList) { int line = getLineNum(); int column = getColumnNum(); int endLine = getEndLineNum(); int endColumn = getEndColumnNum(); return sum(toPos(nodeList), line, column, endLine, endColumn); }
/** * Combines this parser position with a list of positions. */ public SqlParserPos plusAll(Collection<SqlNode> nodeList) { int line = getLineNum(); int column = getColumnNum(); int endLine = getEndLineNum(); int endColumn = getEndColumnNum(); return sum(toPos(nodeList), line, column, endLine, endColumn); }
@Override public ReduceResult reduceExpr(int ordinal, TokenSequence list) { SqlNode left = list.node(ordinal - 1); SqlNode right = list.node(ordinal + 1); return new ReduceResult(ordinal - 1, ordinal + 2, createCall( SqlParserPos.sum( Arrays.asList(left.getParserPosition(), right.getParserPosition(), list.pos(ordinal))), left, right)); }
@Override public ReduceResult reduceExpr(int ordinal, TokenSequence list) { SqlNode left = list.node(ordinal - 1); SqlNode right = list.node(ordinal + 1); return new ReduceResult(ordinal - 1, ordinal + 2, createCall( SqlParserPos.sum( Arrays.asList(left.getParserPosition(), right.getParserPosition(), list.pos(ordinal))), left, right)); }
@Override public ReduceResult reduceExpr(int ordinal, TokenSequence list) { SqlNode left = list.node(ordinal - 1); SqlNode right = list.node(ordinal + 1); return new ReduceResult(ordinal - 1, ordinal + 2, createCall( SqlParserPos.sum( Arrays.asList(left.getParserPosition(), right.getParserPosition(), list.pos(ordinal))), left, right)); }
@Override public ReduceResult reduceExpr(int ordinal, TokenSequence list) { SqlNode left = list.node(ordinal - 1); SqlNode right = list.node(ordinal + 1); return new ReduceResult(ordinal - 1, ordinal + 2, createCall( SqlParserPos.sum( Arrays.asList(left.getParserPosition(), right.getParserPosition(), list.pos(ordinal))), left, right)); }