MCPcopy
hub / github.com/hylang/hy / compile_index_expression

Function compile_index_expression

hy/core/result_macros.py:637–646  ·  view source on GitHub ↗
(compiler, expr, name, obj, indices)

Source from the content-addressed store, hash-verified

635
636@pattern_macro("get", [FORM, oneplus(FORM)], shadow=True)
637def compile_index_expression(compiler, expr, name, obj, indices):
638 indices, ret, _ = compiler._compile_collect(indices)
639 ret += compiler.compile(obj)
640
641 for ix in indices:
642 ret += asty.Subscript(
643 expr, value=ret.force_expr, slice=ast.Index(value=ix), ctx=ast.Load()
644 )
645
646 return ret
647
648
649notsym = lambda *dissallowed: some(

Callers

nothing calls this directly

Calls 2

_compile_collectMethod · 0.80
compileMethod · 0.80

Tested by

no test coverage detected