MCPcopy Create free account
hub / github.com/astral-sh/ruff / parse_call_expression

Method parse_call_expression

crates/ruff_python_parser/src/parser/expression.rs:787–796  ·  view source on GitHub ↗

Parse a call expression. The function name is parsed by the caller and passed as `func` along with the `start` position of the call expression. # Panics If the parser isn't position at a `(` token. See:

(&mut self, func: Expr, start: TextSize)

Source from the content-addressed store, hash-verified

785 ///
786 /// See: <https://docs.python.org/3/reference/expressions.html#calls>
787 pub(super) fn parse_call_expression(&mut self, func: Expr, start: TextSize) -> ast::ExprCall {
788 let arguments = self.parse_arguments(ArgumentsContext::Call);
789
790 ast::ExprCall {
791 func: Box::new(func),
792 arguments,
793 range: self.node_range(start),
794 node_index: AtomicNodeIndex::NONE,
795 }
796 }
797
798 /// Parses an argument list.
799 ///

Callers 1

Calls 2

parse_argumentsMethod · 0.80
node_rangeMethod · 0.80

Tested by

no test coverage detected