protected void ResolveLocal(ResolvedIdent identifier, int lineNumber) { Debug.Assert(identifier.m_hops == ResolvedIdent.s_globalScopeOrUnresolved); for (int i = 0; i < m_scopes.Count; i++) { var scope = m_scopes[m_scopes.Count - 1 - i]; if (scope.ContainsKey(identifier.m_identifier)) { identifier.m_hops = i; return; } } // BB (andrews) Can't distinguish between unresolveable lookups and global variables, since // global resolves are done at runtime }
public bool Get(ResolvedIdent identifier, out object value) { Environment target = TargetEnvironment(identifier.m_hops); return(target.GetInternal(identifier.m_identifier, out value)); }
public bool Assign(ResolvedIdent identifier, object value) { Environment target = TargetEnvironment(identifier.m_hops); return(target.AssignInternal(identifier.m_identifier, value)); }
public AstThisExpr(int line) : base(EXPRK.This, line) { m_identifier = new ResolvedIdent(); m_identifier.m_identifier = "this"; }