/** * Handle a union between a closed statement and a residual property chain. * @param node * @return */ protected ASTNode handleUnion(ASTNode node) { if (cursor != length) { skipWhitespace(); int union = -1; switch (expr[cursor]) { case '.': union = cursor + 1; break; case '[': union = cursor; } if (union != -1) { captureToEOT(); return lastNode = new Union(expr, union, cursor, fields, node); } } return lastNode = node; }
propVerifier.setCtx(((Union) tk).getLeftEgressType()); tk.setEgressType(returnType = propVerifier.analyze());
ASTNode main = ((Union)node).getMain(); Accessor accessor = node.getAccessor();
propVerifier.setCtx(((Union) tk).getLeftEgressType()); tk.setEgressType(returnType = propVerifier.analyze());
/** * Handle a union between a closed statement and a residual property chain. * * @param node an ast node * @return ASTNode */ protected ASTNode handleUnion(ASTNode node) { if (cursor != end) { skipWhitespace(); int union = -1; if (cursor < end) { switch (expr[cursor]) { case '.': union = cursor + 1; break; case '[': union = cursor; } } if (union != -1) { captureToEOT(); return lastNode = new Union(expr, union, cursor - union, fields, node, pCtx); } } return lastNode = node; }
propVerifier.setCtx(((Union) tk).getLeftEgressType()); tk.setEgressType(returnType = propVerifier.analyze());
/** * Handle a union between a closed statement and a residual property chain. * * @param node an ast node * @return ASTNode */ protected ASTNode handleUnion(ASTNode node) { if (cursor != end) { skipWhitespace(); int union = -1; if (cursor < end) { switch (expr[cursor]) { case '.': union = cursor + 1; break; case '[': union = cursor; } } if (union != -1) { captureToEOT(); return lastNode = new Union(expr, union, cursor - union, fields, node, pCtx); } } return lastNode = node; }
st = cursor; captureToEOT(); return lastNode = new Union(expr, st + 1, cursor, fields, lastNode, pCtx); if (expr[st = cursor] == '.') st++; captureToEOT(); return lastNode = new Union(expr, st = trimRight(st), cursor - st, fields, lastNode, pCtx); if (expr[st] == '.') st++; return lastNode = new Union(expr, st, cursor - st, fields, lastNode, pCtx);
st = cursor; captureToEOT(); return lastNode = new Union(expr, st + 1, cursor, fields, lastNode, pCtx); if (expr[st = cursor] == '.') st++; captureToEOT(); return lastNode = new Union(expr, st = trimRight(st), cursor - st, fields, lastNode, pCtx); if (expr[st] == '.') st++; return lastNode = new Union(expr, st, cursor - st, fields, lastNode, pCtx);
egressType, pCtx); captureToEOT(); return lastNode = new Union(expr, start + 1, cursor, fields, lastNode); if (expr[start = cursor] == '.') start++; captureToEOT(); return lastNode = new Union(expr, trimRight(start), cursor, fields, lastNode); captureToEOT(); if (expr[start] == '.') start++; return lastNode = new Union(expr, start, cursor, fields, lastNode);