mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 18:47:52 +02:00
* kicked ignore_equal, usage was wrong anyways
git-svn-id: trunk@5763 -
This commit is contained in:
parent
694b616975
commit
11aa2b483e
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 }
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user