code: protected ParserRuleContext getParentSourceElement(ParserRuleContext node) {
          if (node == null) return null;
          ParserRuleContext parent = node.getParent();
          if (parent instanceof QueryParser.SourceElementContext) {
              return parent;
          }
          return getParentSourceElement(parent);
      }
docs: <p>getParentSourceElement.</p>
  
  @param node a {@link org.antlr.v4.runtime.ParserRuleContext} object.
  @return a {@link org.antlr.v4.runtime.ParserRuleContext} object.