switched more integer overflows from error reporting to float casting
authorkramm <kramm>
Tue, 6 Jan 2009 21:37:11 +0000 (21:37 +0000)
committerkramm <kramm>
Tue, 6 Jan 2009 21:37:11 +0000 (21:37 +0000)
lib/as3/tokenizer.lex

index d2e277c..47dc605 100644 (file)
@@ -332,8 +332,10 @@ static inline int handleint()
     if(yyleng-l==10) {
         int t;
         for(t=0;t<yyleng-l;t++) {
-            if(yytext[l+t]>max[t])
-                syntaxerror("integer overflow %s > %s", s+l,max);
+            if(yytext[l+t]>max[t]) {
+                warning("integer overflow: %s", s);
+                return handlefloat();
+            }
             else if(yytext[l+t]<max[t])
                 break;
         }