public void EnterMethodDefinition( ScopeBuilder /*!*/ locals, MSA.Expression /*!*/ selfParameter, MSA.ParameterExpression /*!*/ runtimeScopeVariable, MSA.Expression blockParameter, string /*!*/ methodName, Parameters parameters) { Assert.NotNull(locals, selfParameter, runtimeScopeVariable); MethodScope method = new MethodScope( locals, selfParameter, runtimeScopeVariable, blockParameter, methodName, parameters ); method.Parent = _currentElement; method.ParentRescue = _currentRescue; method.ParentLoop = _currentLoop; method.ParentBlock = _currentBlock; method.ParentVariableScope = _currentVariableScope; method.ParentMethod = _currentMethod; _currentElement = method; _currentRescue = null; _currentLoop = null; _currentBlock = null; _currentVariableScope = method; _currentMethod = method; }
public void LeaveBlockDefinition() { Debug.Assert(_currentElement == _currentBlock); BlockScope oldBlock = _currentBlock; _currentElement = oldBlock.Parent; _currentRescue = oldBlock.ParentRescue; _currentLoop = oldBlock.ParentLoop; _currentVariableScope = oldBlock.ParentVariableScope; _currentBlock = oldBlock.ParentBlock; }
public void EnterRescueClause(MSA.Expression /*!*/ retryingVariable, MSA.LabelTarget /*!*/ breakLabel, MSA.LabelTarget /*!*/ continueLabel) { Assert.NotNull(retryingVariable, breakLabel, continueLabel); RescueScope body = new RescueScope(retryingVariable, breakLabel, continueLabel); body.Parent = _currentElement; body.ParentRescue = _currentRescue; _currentElement = _currentRescue = body; }
public void LeaveMethodDefinition() { Debug.Assert(_currentElement == _currentMethod); MethodScope oldMethod = _currentMethod; _currentElement = oldMethod.Parent; _currentRescue = oldMethod.ParentRescue; _currentLoop = oldMethod.ParentLoop; _currentBlock = oldMethod.ParentBlock; _currentVariableScope = oldMethod.ParentVariableScope; _currentMethod = oldMethod.ParentMethod; }
public void EnterBlockDefinition( ScopeBuilder /*!*/ locals, MSA.Expression /*!*/ bfcVariable, MSA.Expression /*!*/ selfVariable, MSA.Expression /*!*/ runtimeScopeVariable, MSA.LabelTarget /*!*/ redoLabel) { Assert.NotNull(locals, bfcVariable, selfVariable); Assert.NotNull(redoLabel); BlockScope block = new BlockScope(locals, selfVariable, runtimeScopeVariable, bfcVariable, redoLabel); block.Parent = _currentElement; block.ParentRescue = _currentRescue; block.ParentLoop = _currentLoop; block.ParentBlock = _currentBlock; block.ParentVariableScope = _currentVariableScope; _currentElement = block; _currentRescue = null; _currentLoop = null; _currentBlock = block; _currentVariableScope = block; }
public void EnterMethodDefinition( ScopeBuilder/*!*/ locals, MSA.Expression/*!*/ selfParameter, MSA.ParameterExpression/*!*/ runtimeScopeVariable, MSA.Expression blockParameter, string/*!*/ methodName, Parameters parameters) { Assert.NotNull(locals, selfParameter, runtimeScopeVariable); MethodScope method = new MethodScope( locals, selfParameter, runtimeScopeVariable, blockParameter, methodName, parameters ); method.Parent = _currentElement; method.ParentRescue = _currentRescue; method.ParentLoop = _currentLoop; method.ParentBlock = _currentBlock; method.ParentVariableScope = _currentVariableScope; method.ParentMethod = _currentMethod; _currentElement = method; _currentRescue = null; _currentLoop = null; _currentBlock = null; _currentVariableScope = method; _currentMethod = method; }
public void EnterBlockDefinition( ScopeBuilder/*!*/ locals, MSA.Expression/*!*/ bfcVariable, MSA.Expression/*!*/ selfVariable, MSA.ParameterExpression/*!*/ runtimeScopeVariable, MSA.LabelTarget/*!*/ redoLabel) { Assert.NotNull(locals, bfcVariable, selfVariable); Assert.NotNull(redoLabel); BlockScope block = new BlockScope(locals, selfVariable, runtimeScopeVariable, bfcVariable, redoLabel); block.Parent = _currentElement; block.ParentRescue = _currentRescue; block.ParentLoop = _currentLoop; block.ParentBlock = _currentBlock; block.ParentVariableScope = _currentVariableScope; _currentElement = block; _currentRescue = null; _currentLoop = null; _currentBlock = block; _currentVariableScope = block; }
public void LeaveRescueClause() { Debug.Assert(_currentElement == _currentRescue); _currentElement = _currentRescue.Parent; _currentRescue = _currentRescue.ParentRescue; }
public void EnterRescueClause(MSA.Expression/*!*/ retryingVariable, MSA.LabelTarget/*!*/ retryLabel) { Assert.NotNull(retryingVariable, retryLabel); RescueScope body = new RescueScope(retryingVariable, retryLabel); body.Parent = _currentElement; body.ParentRescue = _currentRescue; _currentElement = _currentRescue = body; }