Beispiel #1
0
        public override void Visit(ForAST forStatement)
        {
            var fromExprType = _exprTypeVisitor.GetAstNodeType(_currentFileName,
                                                               _currentScopeId, _currentNodePosition,
                                                               forStatement.FromExpr);

            var toExprType = _exprTypeVisitor.GetAstNodeType(_currentFileName,
                                                             _currentScopeId, _currentNodePosition,
                                                             forStatement.ToExpr);

            if (!Vocabulary.Ints.Contains(fromExprType.ToString()) ||
                !Vocabulary.Ints.Contains(toExprType.ToString()))
            {
                throw new Exception(string.Format("Type mismatch : For statement expression must be an integer type",
                                                  fromExprType.ToString()));
            }
        }
Beispiel #2
0
 public override void Visit(ForAST forStatement)
 {
 }
Beispiel #3
0
 public virtual void Visit(ForAST forStatement)
 {
 }