@Override
    public Object visitStream_reference(@NotNull SiddhiQLParser.Stream_referenceContext ctx) {

        StreamReference streamReference = new StreamReference();
        if (ctx.hash != null) {
            streamReference.isInnerStream = true;
        }
        if (ctx.not != null) {
            streamReference.isFaultStream = true;
        }
        if (streamReference.isFaultStream && streamReference.isInnerStream) {
            throw newSiddhiParserException(ctx, "Found '" + ctx.getText() + "', but only inner or fault " +
                    "can be supported at one!");
        }
        streamReference.streamId = (String) visit(ctx.name());
        if (ctx.attribute_index() != null) {
            streamReference.streamIndex = (Integer) visit(ctx.attribute_index());
        }
        return streamReference;
    }
{@inheritDoc}
<p>The default implementation returns the result of calling
{@link #visitChildren} on {@code ctx}.</p>

@param ctx
modules/siddhi-query-compiler/src/main/java/io/siddhi/query/compiler/internal/SiddhiQLBaseVisitorImpl.java