|
@@ -104,8 +104,9 @@ var sp:stringid;
|
|
begin
|
|
begin
|
|
{ Save the position where this procedure really starts and set col to 1 which
|
|
{ Save the position where this procedure really starts and set col to 1 which
|
|
looks nicer }
|
|
looks nicer }
|
|
- procstartfilepos:=aktfilepos;
|
|
|
|
- procstartfilepos.column:=1;
|
|
|
|
|
|
+ procstartfilepos:=tokenpos;
|
|
|
|
+{ procstartfilepos.column:=1; I do not agree here !!
|
|
|
|
+ lets keep excat position PM }
|
|
|
|
|
|
if (options=potype_operator) then
|
|
if (options=potype_operator) then
|
|
begin
|
|
begin
|
|
@@ -122,11 +123,13 @@ begin
|
|
{ method ? }
|
|
{ method ? }
|
|
if not(parse_only) and try_to_consume(_POINT) then
|
|
if not(parse_only) and try_to_consume(_POINT) then
|
|
begin
|
|
begin
|
|
|
|
+ tokenpos:=procstartfilepos;
|
|
getsym(sp,true);
|
|
getsym(sp,true);
|
|
sym:=srsym;
|
|
sym:=srsym;
|
|
{ load proc name }
|
|
{ load proc name }
|
|
sp:=pattern;
|
|
sp:=pattern;
|
|
realname:=orgpattern;
|
|
realname:=orgpattern;
|
|
|
|
+ procstartfilepos:=tokenpos;
|
|
{ qualifier is class name ? }
|
|
{ qualifier is class name ? }
|
|
if (sym^.typ<>typesym) or
|
|
if (sym^.typ<>typesym) or
|
|
(ptypesym(sym)^.definition^.deftype<>objectdef) then
|
|
(ptypesym(sym)^.definition^.deftype<>objectdef) then
|
|
@@ -139,9 +142,9 @@ begin
|
|
begin
|
|
begin
|
|
{ used to allow private syms to be seen }
|
|
{ used to allow private syms to be seen }
|
|
aktobjectdef:=pobjectdef(ptypesym(sym)^.definition);
|
|
aktobjectdef:=pobjectdef(ptypesym(sym)^.definition);
|
|
- consume(_ID);
|
|
|
|
procinfo^._class:=pobjectdef(ptypesym(sym)^.definition);
|
|
procinfo^._class:=pobjectdef(ptypesym(sym)^.definition);
|
|
aktprocsym:=pprocsym(procinfo^._class^.symtable^.search(sp));
|
|
aktprocsym:=pprocsym(procinfo^._class^.symtable^.search(sp));
|
|
|
|
+ consume(_ID);
|
|
{The procedure has been found. So it is
|
|
{The procedure has been found. So it is
|
|
a global one. Set the flags to mark this.}
|
|
a global one. Set the flags to mark this.}
|
|
procinfo^.flags:=procinfo^.flags or pi_is_global;
|
|
procinfo^.flags:=procinfo^.flags or pi_is_global;
|
|
@@ -158,6 +161,7 @@ begin
|
|
(options in [potype_constructor,potype_destructor]) then
|
|
(options in [potype_constructor,potype_destructor]) then
|
|
Message(parser_e_constructors_always_objects);
|
|
Message(parser_e_constructors_always_objects);
|
|
|
|
|
|
|
|
+ tokenpos:=procstartfilepos;
|
|
aktprocsym:=pprocsym(symtablestack^.search(sp));
|
|
aktprocsym:=pprocsym(symtablestack^.search(sp));
|
|
|
|
|
|
if not(parse_only) then
|
|
if not(parse_only) then
|
|
@@ -229,6 +233,7 @@ begin
|
|
begin
|
|
begin
|
|
DuplicateSym(aktprocsym);
|
|
DuplicateSym(aktprocsym);
|
|
{ try to recover by creating a new aktprocsym }
|
|
{ try to recover by creating a new aktprocsym }
|
|
|
|
+ tokenpos:=procstartfilepos;
|
|
aktprocsym:=new(pprocsym,init(sp));
|
|
aktprocsym:=new(pprocsym,init(sp));
|
|
end
|
|
end
|
|
else
|
|
else
|
|
@@ -244,6 +249,7 @@ begin
|
|
begin
|
|
begin
|
|
Message1(parser_e_overloaded_no_procedure,aktprocsym^.name);
|
|
Message1(parser_e_overloaded_no_procedure,aktprocsym^.name);
|
|
{ try to recover by creating a new aktprocsym }
|
|
{ try to recover by creating a new aktprocsym }
|
|
|
|
+ tokenpos:=procstartfilepos;
|
|
aktprocsym:=new(pprocsym,init(sp));
|
|
aktprocsym:=new(pprocsym,init(sp));
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -251,6 +257,7 @@ begin
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
{ create a new procsym and set the real filepos }
|
|
{ create a new procsym and set the real filepos }
|
|
|
|
+ tokenpos:=procstartfilepos;
|
|
aktprocsym:=new(pprocsym,init(sp));
|
|
aktprocsym:=new(pprocsym,init(sp));
|
|
{ for operator we have only one definition for each overloaded
|
|
{ for operator we have only one definition for each overloaded
|
|
operation }
|
|
operation }
|
|
@@ -314,13 +321,11 @@ begin
|
|
|
|
|
|
pd^.nextoverloaded:=aktprocsym^.definition;
|
|
pd^.nextoverloaded:=aktprocsym^.definition;
|
|
aktprocsym^.definition:=pd;
|
|
aktprocsym^.definition:=pd;
|
|
|
|
+ { this is probably obsolete now PM }
|
|
aktprocsym^.definition^.fileinfo:=procstartfilepos;
|
|
aktprocsym^.definition^.fileinfo:=procstartfilepos;
|
|
aktprocsym^.definition^.setmangledname(hs);
|
|
aktprocsym^.definition^.setmangledname(hs);
|
|
aktprocsym^.definition^.procsym:=aktprocsym;
|
|
aktprocsym^.definition^.procsym:=aktprocsym;
|
|
|
|
|
|
- { update also the current filepos for aktprocsym }
|
|
|
|
- aktprocsym^.fileinfo:=procstartfilepos;
|
|
|
|
-
|
|
|
|
if not parse_only then
|
|
if not parse_only then
|
|
begin
|
|
begin
|
|
overloaded_level:=0;
|
|
overloaded_level:=0;
|
|
@@ -1902,7 +1907,10 @@ end.
|
|
|
|
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.32 1999-11-09 23:06:45 peter
|
|
|
|
|
|
+ Revision 1.33 1999-11-09 23:43:08 pierre
|
|
|
|
+ * better browser info
|
|
|
|
+
|
|
|
|
+ Revision 1.32 1999/11/09 23:06:45 peter
|
|
* esi_offset -> selfpointer_offset to be newcg compatible
|
|
* esi_offset -> selfpointer_offset to be newcg compatible
|
|
* hcogegen -> cgbase fixes for newcg
|
|
* hcogegen -> cgbase fixes for newcg
|
|
|
|
|