MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / SubscriptExpr

Method SubscriptExpr

src/include/minja/minja.hpp:1238–1239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1236 std::shared_ptr<Expression> index;
1237public:
1238 SubscriptExpr(const Location & loc, std::shared_ptr<Expression> && b, std::shared_ptr<Expression> && i)
1239 : Expression(loc), base(std::move(b)), index(std::move(i)) {}
1240 Value do_evaluate(const std::shared_ptr<Context> & context) const override {
1241 if (!base) throw std::runtime_error("SubscriptExpr.base is null");
1242 if (!index) throw std::runtime_error("SubscriptExpr.index is null");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected