Table of Contents

Class SiemensInlineContextUtil

Namespace
Hi.NcParsers.EvaluationSyntaxs.Siemens
Assembly
HiMech.dll

Detects whether a block executes inside a P4 inlined body — an L/name-call subprogram splice or a REPEAT label section repetition. Both are PrependSource inlines whose “return to the caller / to the line after REPEAT” is the natural pipeline tail; the P5 control-flow redirects (ReplaceSource with a re-segmented host-file slice) would silently discard that pending tail — and, for a section repeat, re-execute the REPEAT statement itself, which has no watchdog (its count is eagerly known) and therefore no bound. The P5 jump syntaxes consult this guard and degrade to a structured warning + fall-through instead: control flow inside an inlined body is recognized but not simulated (corpus count zero; true support needs return-frame machinery, a future work item).

  • Subprogram context: the call syntax stamps a pushed CallStack on every inlined piece — any frame on the stack marks callee context.
  • Section-repeat context: SiemensRepeatSyntax stamps every inlined piece with a SiemensRepeat clone carrying a 1-based Iteration; the REPEAT host block itself never carries that field.
public static class SiemensInlineContextUtil
Inheritance
SiemensInlineContextUtil
Inherited Members

Methods

IsInlinedContext(JsonObject)

True when hostJson belongs to an inlined subprogram or section-repeat body (see class remarks).

public static bool IsInlinedContext(JsonObject hostJson)

Parameters

hostJson JsonObject

Returns

bool