MCPcopy Index your code
hub / github.com/nodejs/node / parse_with

Method parse_with

tools/inspector_protocol/jinja2/parser.py:227–244  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

225 return result
226
227 def parse_with(self):
228 node = nodes.With(lineno=next(self.stream).lineno)
229 targets = []
230 values = []
231 while self.stream.current.type != 'block_end':
232 lineno = self.stream.current.lineno
233 if targets:
234 self.stream.expect('comma')
235 target = self.parse_assign_target()
236 target.set_ctx('param')
237 targets.append(target)
238 self.stream.expect('assign')
239 values.append(self.parse_expression())
240 node.targets = targets
241 node.values = values
242 node.body = self.parse_statements(('name:endwith',),
243 drop_needle=True)
244 return node
245
246 def parse_autoescape(self):
247 node = nodes.ScopedEvalContextModifier(lineno=next(self.stream).lineno)

Callers

nothing calls this directly

Calls 7

parse_assign_targetMethod · 0.95
parse_expressionMethod · 0.95
parse_statementsMethod · 0.95
nextFunction · 0.50
expectMethod · 0.45
set_ctxMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected