Esempio n. 1
0
        public override void Visit(VariableAssignAST variableAssign)
        {
            var identInfo = _symTableManager.LookupIdentifierInfo(_currentFileName, variableAssign.VariableName,
                                                                  _currentScopeId, _currentNodePosition);

            var exprType = _exprTypeVisitor.GetAstNodeType(_currentFileName, _currentScopeId,
                                                           _currentNodePosition, variableAssign.ExpressionValue);

            if (!IsSameTypeOrNullPtr(identInfo.typeAST, exprType))
            {
                throw new Exception(string.Format("Type mismatch : variable '{0}' have type '{1}' but assigned '{2}' type",
                                                  variableAssign.VariableName, identInfo.typeAST.ToString(), exprType));
            }
        }
Esempio n. 2
0
 public override void Visit(VariableAssignAST variableAssign)
 {
 }
Esempio n. 3
0
 public virtual void Visit(VariableAssignAST variableAssign)
 {
 }