_do_pi(self, node) -> None
        Process a PI node. Render a leading or trailing #xA if the
        document order of the PI is greater or lesser (respectively)
        than the document element.
180822
def _do_pi(self, node):
        '''
        '''
        if not _in_subset(self.subset, node): return
        W = self.write
        if self.documentOrder == _GreaterElement: W('\n')
        W('<?')
        W(node.nodeName)
        s = node.data
        if s:
            W(' ')
            W(s)
        W('?>')
        if self.documentOrder == _LesserElement: W('\n')
113327
function process(node) {
          var children, i, l, lastContentEditable, hasContentEditableState;

          // Node has a contentEditable value
          if (node.nodeType === 1 && getContentEditable(node)) {
            lastContentEditable = contentEditable;
            contentEditable = getContentEditable(node) === "true";
            hasContentEditableState = true; // We don't want to wrap the container only it's children
          }

          // Grab the children first since the nodelist might be changed
          children = grep(node.childNodes);

          // Process current node
          if (contentEditable && !hasContentEditableState) {
            for (i = 0, l = formatList.length; i < l; i++) {
              if (removeFormat(formatList[i], vars, node, node)) {
                break;
              }
            }
          }

          // Process the children
          if (format.deep) {
            if (children.length) {
              for (i = 0, l = children.length; i < l; i++) {
                process(children[i]);
              }

              if (hasContentEditableState) {
                contentEditable = lastContentEditable; // Restore last contentEditable state from stack
              }
            }
          }
        }
833786
def process_into(self, node, obj):
        
        if isinstance(node, BeautifulSoup.NavigableString):
            text = self.process_text(node)
            if text:
                obj.append(text)
            return
        if node.name == 'p':
            # add a new paragraph into the pyth object
            new_obj = document.Paragraph()
            obj.append(new_obj)
            obj = new_obj
        elif node.name == 'ul':
            # add a new list
            new_obj = document.List()
            obj.append(new_obj)
            obj = new_obj
        elif node.name == 'li':
            # add a new list entry
            new_obj = document.ListEntry()
            obj.append(new_obj)
            obj = new_obj
        for child in node:
            self.process_into(child, obj)
864174
def process_document(self, doc, std):
        """"""
        if doc.url not in self.blacklist:
            print("Indexing '%s' %s..." % (doc.url, std))
            name = self.extract_name(doc.text)
            self.results.add((name, doc.url, std))
        else:
            print("Skipping blacklisted page '%s' ..." % doc.url)
            return None
434105
def process_text_p( element, output_node )
      style_name = register_style( element )

      # always include class attribute
      attr_hash = {"class" => style_name}

      # If this paragraph has the same style as the previous one,
      # and a top border, and doesn't have style:join-border set to false
      # then eliminate the top border to merge it with previous paragraph
      if (style_name != nil && @previous_para_style == style_name) then
        if (@style_info[style_name].has_top_border? &&
          element.attribute_value("#{@style_ns}:join-border") !=
          false) then
          attr_hash["style"] = "border-top: none"
          modify_style_attribute( @previous_para,
            "border-bottom", "none")
        end
      end
      para  = emit_element( output_node, "p", attr_hash )
      @previous_para_style = style_name
      @previous_para = para
      if (element.has_elements? || element.has_text?) then
        process_children( element, para )
      # else
      #   para.add_element("br")
      end
    end
940077
public String render(Node root, boolean processExtendRoots) {
    OutputList output = new OutputList(config.getMaxOutputSize());

    for (Node node : root.getChildren()) {
      lineNumber = node.getLineNumber();
      position = node.getStartPosition();
      String renderStr = node.getMaster().getImage();
      if (context.doesRenderStackContain(renderStr)) {
        // This is a circular rendering. Stop rendering it here.
        addError(new TemplateError(ErrorType.WARNING, ErrorReason.EXCEPTION, ErrorItem.TAG,
            "Rendering cycle detected: '" + renderStr + "'", null, getLineNumber(), node.getStartPosition(),
            null, BasicTemplateErrorCategory.IMPORT_CYCLE_DETECTED, ImmutableMap.of("string", renderStr)));
        output.addNode(new RenderedOutputNode(renderStr));
      } else {
        OutputNode out;
        context.pushRenderStack(renderStr);
        try {
          out = node.render(this);
        } catch (DeferredValueException e) {
          out = new RenderedOutputNode(node.getMaster().getImage());
        }
        context.popRenderStack();
        output.addNode(out);
      }
    }

    // render all extend parents, keeping the last as the root output
    if (processExtendRoots) {
      while (!extendParentRoots.isEmpty()) {
        context.getCurrentPathStack().push(context.getExtendPathStack().peek().orElse(""), lineNumber, position);
        Node parentRoot = extendParentRoots.removeFirst();
        output = new OutputList(config.getMaxOutputSize());

        for (Node node : parentRoot.getChildren()) {
          OutputNode out = node.render(this);
          output.addNode(out);
        }

        context.getExtendPathStack().pop();
        context.getCurrentPathStack().pop();
      }
    }

    resolveBlockStubs(output);

    return output.getValue();
  }
108086
function (node) {
    var x = document.documentElement.offsetLeft,
        y = document.documentElement.offsetTop;

    if (node.offsetParent || document.body) {
        do {
            x += node.offsetLeft;
            y += node.offsetTop;
        } while (node = node.offsetParent);
    }

    return {x: x, y: y};
}
391635
function isEofNode(document, root) {
  if (!document || document.constructor.name !== "Document") {
    return true;
  }

  // In the `postcss-html` and `postcss-jsx` syntax, checks that there is text after the given node.
  let after;

  if (root === document.last) {
    after = _.get(document, "raws.afterEnd");
  } else {
    const rootIndex = document.index(root);

    after = _.get(document.nodes[rootIndex + 1], "raws.beforeStart");
  }

  return !(after + "").trim();
}
626233
private void doPI(Node received) {
        if (log.isDebugEnabled()) {
            log.debug("Ignored processing instruction (" + received.getLocalName() + "=" + received.getNodeValue() + ")");
        }
    }
1268054
function processNode(node) {
    var func  = node.func
    var depth = node.depth
    var etime = node.etime
    var stime = node.stime
    var factor = opts.factor
    var countName = opts.countname
    var isRoot = !func.length && depth === 0

    if (isRoot) etime = timeMax

    var samples = Math.round((etime - stime * factor) * 10) / 10
    var samplesTxt = samples.toLocaleString()
    var pct
    var pctTxt
    var escapedFunc
    var name
    var sampleInfo

    if (isRoot) {
      name = 'all'
      sampleInfo = format('(%s %s, 100%)', samplesTxt, countName)
    } else {
      pct = Math.round((100 * samples) / (timeMax * factor) * 10) / 10
      pctTxt = pct.toLocaleString()
      escapedFunc = htmlEscape(func)

      name = escapedFunc
      sampleInfo = format('(%s %s), %s%%)', samplesTxt, countName, pctTxt)
    }

    var x1 = oneDecimal(xpad + stime * widthPerTime)
    var x2 = oneDecimal(xpad + etime * widthPerTime)
    var y1 = oneDecimal(imageHeight - ypadBottom - (depth + 1) * frameHeight + 1)
    var y2 = oneDecimal(imageHeight - ypadBottom - depth * frameHeight)
    var chars = (x2 - x1) / (opts.fontsize * opts.fontwidth)
    var showText = false
    var text

    if (chars >= 3) { // enough room to display function name?
      showText = true
      text = func.slice(0, chars)
      if (chars < func.length) text = text.slice(0, chars - 2) + '..'
      text = htmlEscape(text)
    }

    return {
        name      : name
      , search    : name.toLowerCase()
      , samples   : sampleInfo
      , rect_x    : x1
      , rect_y    : y1
      , rect_w    : x2 - x1
      , rect_h    : y2 - y1
      , rect_fill : colorMap(paletteMap, opts.colors, opts.hash, func)
      , text      : text
      , text_x    : x1 + (showText ? 3 : 0)
      , text_y    : 3 + (y1 + y2) / 2
      , narrow    : node.narrow
      , func      : htmlEscape(func)
    }
  }
135968
def check_preceding_node(node, type)
      case prev_node(node)
      when
        nil,
        Sass::Tree::FunctionNode,
        Sass::Tree::MixinNode,
        Sass::Tree::MixinDefNode,
        Sass::Tree::RuleNode,
        Sass::Tree::CommentNode
        # Ignore
        nil
      else
        unless engine.lines[node.line - 2].strip.empty?
          add_lint(node.line, MESSAGE_FORMAT % [type, 'preceded'])
        end
      end
    end
1083131
def parse_Element(self, node):
        
        name = node.tagName
        ignores = self.ignores
        if name in ignores:
            return
        attr = "do_%s" % name
        if hasattr(self, attr):
            handlerMethod = getattr(self, attr)
            handlerMethod(node)
        else:
            self.generic_parse(node)
184589
def _handle_node(self, data):
    
    next_options = self.graph[self.last_node_type]
    for node_type in next_options:
      checker, handler, *_ = node_type
      if checker(data):
        self.last_node_type = node_type
        self.handle(handler(data), node_type, data)
        return
    raise Exception("Unable to handle data: {}".format(data))
86009
def process_text(self, node):
        
        text = node.string.strip()
        if not text:
            return

        # Set all the properties
        properties=dict()
        if self.is_bold(node):
            properties['bold'] = True
        if self.is_italic(node):
            properties['italic'] = True
        if self.url(node):
            properties['url'] = self.url(node)
        if self.is_sub(node):
            properties['sub'] = True
        if self.is_super(node):
            properties['super'] = True

        content=[node.string]

        return document.Text(properties, content)
724428
function processNode(node) {
            const entity = node.code.trim()
            if (!entity) {
                context.report({
                    node,
                    messageId: "missing",
                })
            }
        }
967364
def _process_getitem(self, node, **kwargs):
        

        with self._interpolation():
            with self._python_bool_wrapper(**kwargs) as new_kwargs:
                self._process_node(node.node, **new_kwargs)

                if isinstance(node.arg, nodes.Slice):
                    self.output.write('.slice(')

                    if node.arg.step is not None:
                        raise Exception('The step argument is not supported when slicing.')

                    if node.arg.start is None:
                        self.output.write('0')
                    else:
                        self._process_node(node.arg.start, **new_kwargs)

                    if node.arg.stop is None:
                        self.output.write(')')
                    else:
                        self.output.write(',')
                        self._process_node(node.arg.stop, **new_kwargs)
                        self.output.write(')')
                else:
                    self.output.write('[')
                    self._process_node(node.arg, **new_kwargs)
                    self.output.write(']')
458150
public void processNode(INode node) throws ContextPreprocessorException {
        try {
            // reset old preprocessing
            node.getNodeData().setcLabFormula("");
            node.getNodeData().setcNodeFormula("");
            while (0 < node.getNodeData().getACoLCount()) {
                node.getNodeData().removeACoL(0);
            }

            boolean isEmpty = true;
            String labelOfNode = node.getNodeData().getName().trim();

            if (debugLabels) {
                log.debug("preprocessing: " + labelOfNode);
            }

            labelOfNode = labelOfNode.toLowerCase();
            List<ISense> wnSense = new ArrayList<ISense>();
            if (!(("top".equals(labelOfNode) || "thing".equals(labelOfNode)) && !node.hasParent()) && (!meaninglessWords.contains(labelOfNode + " ")) && (isTokenMeaningful(labelOfNode))) {
                wnSense = linguisticOracle.getSenses(labelOfNode);
            }
            if ((0 == wnSense.size()) && !(("top".equals(labelOfNode) || "thing".equals(labelOfNode)) && !node.hasParent()) && (!meaninglessWords.contains(labelOfNode + " ")) && (isTokenMeaningful(labelOfNode))) {
                labelOfNode = replacePunctuation(labelOfNode);
                wnSense = linguisticOracle.getSenses(labelOfNode);
            }

            // identifiers of meaningful tokens in
            String meaningfulTokens = " ";
            // tokens of the label of node
            List<String> tokensOfNodeLabel = new ArrayList<String>();

            // is the label a WordNet entry?
            int id_tok = 0;
            if (0 < wnSense.size()) {
                // add to list of processed labels
                tokensOfNodeLabel.add(labelOfNode);
                List<String> lemmas = linguisticOracle.getBaseForms(labelOfNode);
                String lemma = labelOfNode;
                if (0 < lemmas.size()) {
                    lemma = lemmas.get(0);
                }

                // create atomic node of label
                IAtomicConceptOfLabel ACoL = createACoL(node, id_tok, labelOfNode, lemma);
                // to token ids
                meaningfulTokens = meaningfulTokens + id_tok + " ";
                // add senses to ACoL
                for (ISense sense : wnSense) {
                    ACoL.addSense(sense);
                }
                isEmpty = false;
                id_tok++;
            } else {
                // The label of node is not in WN
                // Split the label by words
                StringTokenizer lemmaTokenizer = new StringTokenizer(labelOfNode, " _()[]/'\\#1234567890");
                ArrayList<String> tokens = new ArrayList<String>();
                while (lemmaTokenizer.hasMoreElements()) {
                    tokens.add(lemmaTokenizer.nextToken());
                }

                // perform multiword recognition
                tokens = multiwordRecognition(tokens);
                // for all tokens in label
                for (int i = 0; i < tokens.size(); i++) {
                    String token = tokens.get(i).trim();
                    // if the token is not meaningless
                    if ((!meaninglessWords.contains(token + " ")) && (isTokenMeaningful(token))) {
                        // add to list of processed tokens
                        tokensOfNodeLabel.add(token);
                        // if not logical connective
                        if ((!andWords.contains(token)) && ((orWords.indexOf(token)) == -1)
                                && ((notWords.indexOf(token)) == -1) && (!isNumber(token))) {
                            // get WN senses for token
                            if (!(("top".equals(token) || "thing".equals(token)) && !node.hasParent())) {
                                wnSense = linguisticOracle.getSenses(token);
                            } else {
                                wnSense = new ArrayList<ISense>();
                            }
                            if (0 == wnSense.size()) {
                                List<String> newTokens = complexWordsRecognition(token);
                                if (0 < newTokens.size()) {
                                    tokensOfNodeLabel.remove(tokensOfNodeLabel.size() - 1);
                                    tokensOfNodeLabel.add(newTokens.get(0));
                                    wnSense = linguisticOracle.getSenses(newTokens.get(0));
                                    tokens.remove(i);
                                    tokens.add(i, newTokens.get(0));
                                    for (int j = 1; j < newTokens.size(); j++) {
                                        String s = newTokens.get(j);
                                        tokens.add(i + j, s);
                                    }
                                }
                            }
                            List<String> lemmas = linguisticOracle.getBaseForms(token);
                            String lemma = token;
                            if (0 < lemmas.size()) {
                                lemma = lemmas.get(0);
                            }

                            // create atomic node of label
                            IAtomicConceptOfLabel ACoL = createACoL(node, id_tok, token, lemma);
                            // mark id as meaningful
                            meaningfulTokens = meaningfulTokens + id_tok + " ";
                            // if there no WN senses
                            if (0 == wnSense.size() && !(("top".equals(labelOfNode) || "thing".equals(labelOfNode)) && !node.hasParent())) {
                                unrecognizedWords.add(token);
                            }
                            // add senses to ACoL
                            for (ISense sense : wnSense) {
                                ACoL.addSense(sense);
                            }
                            isEmpty = false;
                        }
                        id_tok++;
                    }
                }
            }

            if (isEmpty) {
                String token = labelOfNode.replaceAll(" ", "_");
                // add to list of processed labels
                tokensOfNodeLabel.add(token);
                // create atomic node of label
                createACoL(node, id_tok, token, token);
                // to token ids
                meaningfulTokens = meaningfulTokens + id_tok + " ";
            }
            // build complex formula of a node
            buildComplexConcept(node, tokensOfNodeLabel, meaningfulTokens);
            node.getNodeData().setIsPreprocessed(true);
        } catch (LinguisticOracleException e) {
            final String errMessage = e.getClass().getSimpleName() + ": " + e.getMessage();
            log.error(errMessage, e);
            throw new ContextPreprocessorException(errMessage, e);
        }
    }