private Emitter(NsxModuleBuilder moduleBuilder, SubroutineSymbol subroutine) { _module = moduleBuilder; _subroutine = subroutine; _checker = new Checker(subroutine, moduleBuilder.Diagnostics); _compilation = moduleBuilder.Compilation; _breakScopes = new ValueStack <BreakScope>(initialCapacity: 4); _code = default; _textId = 0; _supressConstantLookup = false; _clearPage = true; if (subroutine is FunctionSymbol function && function.Parameters.Length > 0) { foreach (ParameterSymbol p in function.Parameters) { _ = GetVariableToken(p.Name); } } }
public LookupResult(SubroutineSymbol subroutine) : this() => (Variant, Subroutine) = (LookupResultVariant.Subroutine, subroutine);
public ushort GetSubroutineToken(SubroutineSymbol subroutine) { return(_subroutines.GetOrAddToken(subroutine)); }