This will return a node with the symbol as a function.
494176
def make_func_declaration(func_name, lineno, type_=None):
    
    return symbols.FUNCDECL.make_node(func_name, lineno, type_=type_)
354239
function() {
    var op
      , node = this.defined();
    while (op =
         this.accept('**')
      || this.accept('*')
      || this.accept('/')
      || this.accept('%')) {
      this.operand = true;
      if ('/' == op && this.inProperty && !this.parens) {
        this.stash.push(new Token('literal', new nodes.Literal('/')));
        this.operand = false;
        return node;
      } else {
        if (!node) this.error('illegal unary "' + op + '", missing left-hand operand');
        node = new nodes.BinOp(op.type, node, this.defined());
        this.operand = false;
      }
    }
    return node;
  }
797599
function(){
        var node = this.parseAdd();
        while(this.skipValue(lexer.TOKEN_TILDE, '~')) {
            var node2 = this.parseAdd();
            node = new nodes.Concat(node.lineno,
                                 node.colno,
                                 node,
                                 node2);
        }
        return node;
    }
564131
function createOperatorNode(operand, nodes = []) {
  return (scope, opts) => {
    const args = nodes.map(node => node(scope, opts));

    if (typeof operand === 'function') {
      return operand(...args);
    }

    const operator = get(opts.functions, operand);

    if (!operator) {
      throw new ReferenceError(`Function '${operand}' isn't declared`);
    }

    return operator(...args);
  };
}
459666
def get_function_signature(self, node):
        """"""
        name = self.extract_text(self.get_specific_subnodes(node, 'name'))
        if self.with_type_info:
            argsstring = self.extract_text(self.get_specific_subnodes(node, 'argsstring'))
        else:
            argsstring = []
            param_id = 1
            for n_param in self.get_specific_subnodes(node, 'param'):
                declname = self.extract_text(self.get_specific_subnodes(n_param, 'declname'))
                if not declname:
                    declname = 'arg' + str(param_id)
                defval = self.extract_text(self.get_specific_subnodes(n_param, 'defval'))
                if defval:
                    defval = '=' + defval
                argsstring.append(declname + defval)
                param_id = param_id + 1
            argsstring = '(' + ', '.join(argsstring) + ')'
        type = self.extract_text(self.get_specific_subnodes(node, 'type'))
        function_definition = name + argsstring
        if type != '' and type != 'void':
            function_definition = function_definition + ' -> ' + type
        return '`' + function_definition + '`  '
1196631
function (node, aChild) {
            $.each(aChild, function (idx, child) {
                node.appendChild(child);
            });
            return node;
        }
556906
def as_asciitree(self, str_func=None):
        """"""
        import asciitree
        from collections import defaultdict
        children = defaultdict(list)
        # since erased nodes may be missing, multiple tokens may have same
        # index (CCprocessed), etc.
        token_to_index = {}
        roots = []
        for token in self:
            children[token.head].append(token)
            token_to_index[token] = token.index
            if token.head == 0:
                roots.append(token)
        assert roots, "Couldn't find root Token(s)"

        if len(roots) > 1:
            # multiple roots so we make a fake one to be their parent
            root = Token(0, 'ROOT', 'ROOT-LEMMA', 'ROOT-CPOS', 'ROOT-POS',
                         None, None, 'ROOT-DEPREL', None, None, None)
            token_to_index[root] = 0
            children[0] = roots
        else:
            root = roots[0]

        def child_func(token):
            index = token_to_index[token]
            return children[index]
        if not str_func:
            def str_func(token):
                return ' %s [%s]' % (token.form, token.deprel)

        return asciitree.draw_tree(root, child_func, str_func)
193078
function() {
    var node = this.primary();
    if (node) {
      while (this.accept('.')) {
        var id = new nodes.Ident(this.expect('ident').val.string);
        node = new nodes.Member(node, id);
      }
      this.skipSpaces();
      if (this.accept('=')) {
        node.val = this.list();
        // @block support
        if (node.val.isEmpty) this.assignAtblock(node.val);
      }
    }
    return node;
  }
575500
function getOperator() {
  const type = NodeType.OperatorType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = token.value;

  pos++;

  return newNode(type, content, line, column);
}
1196286
function findEnd(node) {
	if (!node) {
		return undefined;
	}
	var {left, right, el} = node;
	findEnd(left);
	findEnd(right);
	node.high = Math.max(getHigh(left), getHigh(right), el.end);
	return node;
}
931022
def _get_chain_parent_symbol(self, symbol, fullsymbol):
        """"""
        #We are only interested in the type of the variable immediately preceding our symbol
        #in the chain so we can list its members.
        chain = fullsymbol.split("%")

        #We assume that if symbol != fullsymbol, we have at least a % at the end that 
        #tricked the symbol regex.
        if len(chain) < 2:
            return ([], None)
        previous = chain[-2].lower()

        #Now we need to use the name of the variable to find the actual type name
        target_name = ""
        if previous in self.element.members:
            target_name = self.element.members[previous].kind
        #The contextual element could be a module, in which case it has no parameters
        if hasattr(self.element, "parameters") and previous in self.element.parameters:
            target_name = self.element.parameters[previous].kind

        if target_name == "":
            return (None, None)

        return self.context.parser.tree_find(target_name, self.context.module, "types")
85812
def func(self, node):
        ''
        _, params, _, _, _, expr = node
        params = map(self.eval, params)
        def func(*args):
            env = dict(self.env.items() + zip(params, args))
            return Mini(env).eval(expr)
        return func
878855
def rewrite_return_as_assignments(func_node, interface):
    """"""
    func_node = _RewriteReturn(interface).visit(func_node)
    ast.fix_missing_locations(func_node)
    return func_node
940793
function() {
    var withBlock = this.accept('+');
    if ('url' == this.peek().val.name) return this.url();
    var name = this.expect('function').val.name;
    this.state.push('function arguments');
    this.parens++;
    var args = this.args();
    this.expect(')');
    this.parens--;
    this.state.pop();
    var call = new nodes.Call(name, args);
    if (withBlock) {
      this.state.push('function');
      call.block = this.block(call);
      this.state.pop();
    }
    return call;
  }
22785
def visit_Lambda(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        with self.op_man(node):
            src = f"lambda {self.visit(node.args)}: {self.visit(node.body)}"
            return self.wrap_expr(src, dfltChaining)
158104
def makenode(clss, symbol, *nexts):
        
        result = clss(symbol)
        for i in nexts:
            if i is None:
                continue
            if not isinstance(i, clss):
                raise NotAnAstError(i)
            result.appendChild(i)

        return result
1303238
def _ensure_node(node: Union[str, AbstractNode]) -> AbstractNode:
    
    if isinstance(node, str):
        return Text(node)
    elif isinstance(node, Node):
        return node
    else:
        raise TypeError('Invalid type to append: {}'.format(node))