Browse Source

[PATCH 077/188] scanning numbers properly

From c2c3c6286a6be5fbe83ea39b79d52b0bfcb9efa0 Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <[email protected]>
Date: Fri, 6 Mar 2020 16:09:47 -0500

git-svn-id: branches/wasm@46073 -
nickysn 5 years ago
parent
commit
c70f9ec15d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      utils/wasmbin/watscanner.pas

+ 3 - 3
utils/wasmbin/watscanner.pas

@@ -240,13 +240,13 @@ begin
       end else if buf[idx] = IdStart then begin
         token:=weIdent;
         resText:=ScanWhile(buf, idx, IdBody);
+      end else if buf[idx] in NumericChars then begin
+        token:=weNumber;
+        resText:=ScanWhile(buf, idx, NumericChars);
       end else if buf[idx] in AlphaNumChars then begin
         resText:=ScanWhile(buf, idx, GrammarChars);
         GetGrammar(resText, token, instrCode);
         done:=true;
-      end else if buf[idx] in NumericChars then begin
-        token:=weNumber;
-        resText:=ScanWhile(buf, idx, NumericChars);
       end else begin
         token:=weError;
         inc(idx);