public override string Deserialize(IList <ScopeVariable> stack, IList <ScopeInstruction> instructions, MethodBase body) { var newVar = new ScopeVariable { Value = stack[stack.Count - 1].Value, Type = CType.ResolveConv(_convCode) }; stack.RemoveAt(stack.Count - 1); stack.Add(newVar); return(""); }
private ScopeVariable AddVariable(ScopeVariable scopeVariable) { variables.Add(scopeVariable.Name, scopeVariable); return(scopeVariable); }
public MethodEntry DefineMethod(CompileUnitEntry comp_unit, int token, ScopeVariable[] scope_vars, LocalVariableEntry[] locals, LineNumberEntry[] lines, CodeBlockEntry[] code_blocks, string real_name, MethodEntry.Flags flags, int namespace_id) { if (reader != null) throw new InvalidOperationException (); MethodEntry method = new MethodEntry ( this, comp_unit, token, scope_vars, locals, lines, code_blocks, real_name, flags, namespace_id); AddMethod (method); return method; }
public ScopeVariable AddReferencedVariable(ScopeVariable baseVariable) => AddVariable(new ReferencedScopeVariable(this, baseVariable));
public ReferencedScopeVariable(Scope scope, ScopeVariable baseVariable) : base(scope, baseVariable.Name, baseVariable.Local) { }