예제 #1
0
        public override void CheckSemantics(Scope scope, List <SemanticError> errors)
        {
            int value;

            if (!int.TryParse(this.Text, out value))
            {
                errors.Add(SemanticError.InvalidNumber(this.Text, this));
                this.ExpressionType = PredefinedTypes.ErrorType;
            }
            else
            {
                this.ExpressionType = PredefinedTypes.IntType;
            }
        }