public override void Visit(VariableReferenceExpression node)
 {
     if (_pass == 0)
     {
         var decl = (VariableDeclaration)node.Scope.ResolveVariable(node.Name).Declaration;
         decl.Used = true;
     }
 }
 public override void Visit(VariableReferenceExpression node)
 {
     HandleExpressionOrStatementNode(node);
 }
Example #3
0
 public override void Visit(VariableReferenceExpression node)
 {
     var variableSymbol = node.Scope.ResolveVariable(node.Name);
     if (variableSymbol == null) return; // resolving error has already been reported
 }
 private bool ErrorsAlreadyReported(VariableReferenceExpression reference, VariableDeclaration declaration)
 {
     return _parent._errors.HasErrorReportForReferenceTo(ErrorTypes.UninitializedLocal, declaration) ||
         _parent._errors.HasErrorReportForNode(ErrorTypes.LvalueReference, reference);
 }