Prepend a node to a member expression.
171167
function prependToMemberExpression(member, prepend) {
  member.object = t.memberExpression(prepend, member.object);
  return member;
}
635453
private static function addTreeNode(array &$tree, $parent, $node, $prepend = false)
    {
        if ($parent === null) {
            if (array_key_exists($node, $tree)) {
                throw new \Exception('Node already exists');
            }
            if ($prepend) {
                $tree = array_merge([$node => []], $tree);
            } else {
                $tree[$node] = [];
            }

            return true;
        }
        foreach ($tree as $key => &$value) {
            if ($key === $parent) {
                return self::addTreeNode($value, null, $node, $prepend);
            } else {
                if (self::addTreeNode($value, $parent, $node, $prepend)) {
                    return true;
                }
            }
        }

        return false;
    }
1113882
private void addElementToNextFreeSlot(@Nonnull final ExpressionTreeElement element) {
    if (element == null) {
      throw new PreprocessorException("[Expression]Element is null", this.sourceString, this.includeStack, null);
    }

    if (childElements.length == 0) {
      throw new PreprocessorException("[Expression]Unexpected element, may be unknown function [" + savedItem.toString() + ']', this.sourceString, this.includeStack, null);
    } else if (isFull()) {
      throw new PreprocessorException("[Expression]There is not any possibility to add new argument [" + savedItem.toString() + ']', this.sourceString, this.includeStack, null);
    } else {
      childElements[nextChildSlot++] = element;
    }
    element.parentTreeElement = this;
  }
653660
def make_node(cls, node, *args):
        ''' 
        '''
        if node is None:
            return cls.make_node(SymbolBOUNDLIST(), *args)

        if node.token != 'BOUNDLIST':
            return cls.make_node(None, node, *args)

        for arg in args:
            if arg is None:
                continue
            node.appendChild(arg)

        return node
591098
def node_insert_before(self, node, new_node):
        """"""

        assert(not self.node_is_on_list(new_node))
        assert(node is not new_node)

        prev = self.node_prev(node)
        assert(prev is not None)
        self.node_set_prev(node, new_node)
        self.node_set_next(new_node, node)

        self.node_set_prev(new_node, prev)
        self.node_set_next(prev, new_node)
761195
def prepend_string(t, string):
    """"""
    node = t.tree
    if node.text is not None:
        node.text += string
    else:
        node.text = string
343370
def prepare(self, node):
        ''''''
        if isinstance(node, ast.Module):
            self.ctx.module = node
        elif isinstance(node, ast.FunctionDef):
            self.ctx.function = node

        for D in self.deps:
            d = D()
            d.attach(self.passmanager, self.ctx)
            result = d.run(node)
            setattr(self, uncamel(D.__name__), result)
135417
def before(self, *nodes: Union[AbstractNode, str]) -> None:
        
        if self.parentNode:
            node = _to_node_list(nodes)
            self.parentNode.insertBefore(node, self)
437594
def Preprocess(self, data):
    """"""
    # Add whitespace to line continuations.
    data = data.replace(":\\", ": \\")

    # Strip comments manually because sudoers has multiple meanings for '#'.
    data = SudoersFieldParser.COMMENTS_RE.sub("", data)
    return data
975243
public StringExpression prepend(Expression<String> str) {
        return Expressions.stringOperation(Ops.CONCAT, str, mixin);
    }
627520
def prepare(self, node):
        
        super(GlobalEffects, self).prepare(node)

        def register_node(module):
            """ Recursively save globals effect for all functions. """
            for v in module.values():
                if isinstance(v, dict):  # Submodule case
                    register_node(v)
                else:
                    fe = GlobalEffects.FunctionEffect(v)
                    self.node_to_functioneffect[v] = fe
                    self.result.add_node(fe)
                    if isinstance(v, intrinsic.Class):
                        register_node(v.fields)

        register_node(self.global_declarations)
        for module in MODULES.values():
            register_node(module)
        self.node_to_functioneffect[intrinsic.UnboundValue] = \
            GlobalEffects.FunctionEffect(intrinsic.UnboundValue)
181797
def append(self, value):
        
        nodes = parse_anything(value).nodes
        for node in nodes:
            self.nodes.append(node)
612039
public void insertStringBefore(Node node, String str){
        boolean startingNode = this.node==node;
        int cp[] = StringUtil.toCodePoints(str);
        for(int i=cp.length-1; i>=0; i--){
            Node newNode = new Node();
            for(Edge edge: node.incoming()){
                if(!edge.loop())
                    edge.setTarget(newNode);
            }
            newNode.addEdgeTo(node).matcher = new Any(cp[i]);
            node = newNode;
        }
        if(startingNode)
            this.node = node;
    }
12303
private AstNode memberExpr(boolean allowCallSyntax)
        throws IOException
    {
        int tt = peekToken(), lineno = ts.lineno;
        AstNode pn;

        if (tt != Token.NEW) {
            pn = primaryExpr();
        } else {
            consumeToken();
            int pos = ts.tokenBeg;
            NewExpression nx = new NewExpression(pos);

            AstNode target = memberExpr(false);
            int end = getNodeEnd(target);
            nx.setTarget(target);

            int lp = -1;
            if (matchToken(Token.LP, true)) {
                lp = ts.tokenBeg;
                List<AstNode> args = argumentList();
                if (args != null && args.size() > ARGC_LIMIT)
                    reportError("msg.too.many.constructor.args");
                int rp = ts.tokenBeg;
                end = ts.tokenEnd;
                if (args != null)
                    nx.setArguments(args);
                nx.setParens(lp - pos, rp - pos);
            }

            // Experimental syntax: allow an object literal to follow a new
            // expression, which will mean a kind of anonymous class built with
            // the JavaAdapter.  the object literal will be passed as an
            // additional argument to the constructor.
            if (matchToken(Token.LC, true)) {
                ObjectLiteral initializer = objectLiteral();
                end = getNodeEnd(initializer);
                nx.setInitializer(initializer);
            }
            nx.setLength(end - pos);
            pn = nx;
        }
        pn.setLineno(lineno);
        AstNode tail = memberExprTail(allowCallSyntax, pn);
        return tail;
    }
737657
function appendToMemberExpression(member, append, computed) {
  member.object = t.memberExpression(member.object, member.property, member.computed);
  member.property = append;
  member.computed = !!computed;
  return member;
}
432817
def visit_expr(self, node, parent):
        """"""
        newnode = nodes.Expr(node.lineno, node.col_offset, parent)
        newnode.postinit(self.visit(node.value, newnode))
        return newnode
358276
public function prepend(): void
    {
        $script = $this->parseArgs(func_get_args());
        if ($script !== false) {
            array_unshift($this->members, $script);
        }
    }