From 11aa2b483ee103382596a0d6c8b24d93c1e0d31a Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 31 Dec 2006 00:48:52 +0000 Subject: [PATCH] * kicked ignore_equal, usage was wrong anyways git-svn-id: trunk@5763 - --- compiler/parser.pas | 4 ---- compiler/pbase.pas | 5 +---- compiler/pdecl.pas | 2 -- compiler/pdecvar.pas | 4 ---- compiler/ptype.pas | 4 ++-- 5 files changed, 3 insertions(+), 16 deletions(-) diff --git a/compiler/parser.pas b/compiler/parser.pas index 249d3497fb..b8a5d6af42 100644 --- a/compiler/parser.pas +++ b/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; diff --git a/compiler/pbase.pas b/compiler/pbase.pas index 42b0e51f4f..bc7e5a5e53 100644 --- a/compiler/pbase.pas +++ b/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; diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas index 4994c27066..ae34e3dfb4 100644 --- a/compiler/pdecl.pas +++ b/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 } diff --git a/compiler/pdecvar.pas b/compiler/pdecvar.pas index b0ee06b8ec..ddd51de157 100644 --- a/compiler/pdecvar.pas +++ b/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); diff --git a/compiler/ptype.pas b/compiler/ptype.pas index 7028170f28..2616ebc860 100644 --- a/compiler/ptype.pas +++ b/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