소스 검색

* kicked ignore_equal, usage was wrong anyways

git-svn-id: trunk@5763 -
florian 18 년 전
부모
커밋
11aa2b483e
5개의 변경된 파일3개의 추가작업 그리고 16개의 파일을 삭제
  1. 0 4
      compiler/parser.pas
  2. 1 4
      compiler/pbase.pas
  3. 0 2
      compiler/pdecl.pas
  4. 0 4
      compiler/pdecvar.pas
  5. 2 2
      compiler/ptype.pas

+ 0 - 4
compiler/parser.pas

@@ -55,10 +55,6 @@ implementation
 
     procedure initparser;
       begin
-         { ^M means a string or a char, because we don't parse a }
-         { type declaration                                      }
-         ignore_equal:=false;
-
          { we didn't parse a object or class declaration }
          { and no function header                        }
          testcurobject:=0;

+ 1 - 4
compiler/pbase.pas

@@ -41,7 +41,7 @@ interface
 
        { true, if we are parsing arguments }
        in_args : boolean = false;
-       
+
        { true, if we are parsing arguments allowing named parameters }
        named_args_allowed : boolean = false;
 
@@ -58,9 +58,6 @@ interface
        { true, if only routine headers should be parsed }
        parse_only : boolean;
 
-       { true, if we should ignore an equal in const x : 1..2=2 }
-       ignore_equal : boolean;
-       
        { true, if we found a name for a named arg }
        found_arg_name : boolean;
 

+ 0 - 2
compiler/pdecl.pas

@@ -196,9 +196,7 @@ implementation
                      caret, to support const s : ^string = nil }
                    block_type:=bt_type;
                    consume(_COLON);
-                   ignore_equal:=true;
                    read_anon_type(hdef,false);
-                   ignore_equal:=false;
                    block_type:=bt_const;
                    skipequal:=false;
                    { create symbol }

+ 0 - 4
compiler/pdecvar.pas

@@ -977,9 +977,7 @@ implementation
                read_gpc_name(sc);
 
              { read variable type def }
-             ignore_equal:=true;
              read_anon_type(hdef,false);
-             ignore_equal:=false;
              for i:=0 to sc.count-1 do
                begin
                  vs:=tabstractvarsym(sc[i]);
@@ -1142,9 +1140,7 @@ implementation
              { Don't search in the recordsymtable for types }
              if ([df_generic,df_specialization]*tdef(recst.defowner).defoptions=[]) then
                symtablestack.pop(recst);
-             ignore_equal:=true;
              read_anon_type(hdef,false);
-             ignore_equal:=false;
              if ([df_generic,df_specialization]*tdef(recst.defowner).defoptions=[]) then
                symtablestack.push(recst);
 

+ 2 - 2
compiler/ptype.pas

@@ -353,12 +353,12 @@ implementation
            if try_to_consume(_SPECIALIZE) then
              block_type:=bt_specialize;
            { we can't accept a equal in type }
-           pt1:=comp_expr(not(ignore_equal));
+           pt1:=comp_expr(false);
            if (block_type<>bt_specialize) and
               try_to_consume(_POINTPOINT) then
              begin
                { get high value of range }
-               pt2:=comp_expr(not(ignore_equal));
+               pt2:=comp_expr(false);
                { make both the same type or give an error. This is not
                  done when both are integer values, because typecasting
                  between -3200..3200 will result in a signed-unsigned