Răsfoiți Sursa

+ some reference handling fixes

git-svn-id: branches/z80@44806 -
nickysn 5 ani în urmă
părinte
comite
a512b0cc99
1 a modificat fișierele cu 16 adăugiri și 16 ștergeri
  1. 16 16
      compiler/z80/raz80asm.pas

+ 16 - 16
compiler/z80/raz80asm.pas

@@ -1487,9 +1487,9 @@ Unit raz80asm;
         cse_in_flags: tconstsymbolexpressioninputflags;
         cse_out_flags: tconstsymbolexpressionoutputflags;
       begin
-        if actasmtoken=AS_LBRACKET then
+        if actasmtoken=AS_LPAREN then
           begin
-            Consume(AS_LBRACKET);
+            Consume(AS_LPAREN);
             BracketlessReference:=false;
           end
         else
@@ -1893,28 +1893,28 @@ Unit raz80asm;
                 GotStar:=(prevasmtoken=AS_STAR);
               end;
 
-            AS_LBRACKET :
-              begin
-                if (GotPlus and Negative) or GotStar then
-                  Message(asmr_e_invalid_reference_syntax);
-                tmpoper:=Tz80Operand.create;
-                BuildReference(tmpoper);
-                AddReferences(oper,tmpoper);
-                tmpoper.Free;
-                GotPlus:=false;
-                GotStar:=false;
-              end;
+            //AS_LBRACKET :
+            //  begin
+            //    if (GotPlus and Negative) or GotStar then
+            //      Message(asmr_e_invalid_reference_syntax);
+            //    tmpoper:=Tz80Operand.create;
+            //    BuildReference(tmpoper);
+            //    AddReferences(oper,tmpoper);
+            //    tmpoper.Free;
+            //    GotPlus:=false;
+            //    GotStar:=false;
+            //  end;
 
-            AS_RBRACKET :
+            AS_RPAREN :
               begin
                 if GotPlus or GotStar or BracketlessReference then
                   Message(asmr_e_invalid_reference_syntax);
 
-                Consume(AS_RBRACKET);
+                Consume(AS_RPAREN);
 
 
 
-                if actasmtoken=AS_LBRACKET then
+                if actasmtoken=AS_LPAREN then
                   begin
                     tmpoper:=Tz80Operand.create;
                     BuildReference(tmpoper);