mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 18:24:19 +02:00
+ support for type a = (a=1); in Delphi mode added
+ procedure p(); in Delphi mode supported + on isn't keyword anymore, it can be used as id etc. now
This commit is contained in:
parent
942958770c
commit
1008d7faa0
@ -111,6 +111,14 @@ implementation
|
||||
{ parsing a proc or procvar ? }
|
||||
is_procvar:=(aktprocdef^.deftype=procvardef);
|
||||
consume(_LKLAMMER);
|
||||
{ Delphi/Kylix supports nonsense like }
|
||||
{ procedure p(); }
|
||||
if (token=_RKLAMMER) and
|
||||
(m_delphi in aktmodeswitches) then
|
||||
begin
|
||||
consume(_RKLAMMER);
|
||||
exit;
|
||||
end;
|
||||
inc(testcurobject);
|
||||
repeat
|
||||
if try_to_consume(_VAR) then
|
||||
@ -1887,7 +1895,13 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.13 2001-03-11 22:58:50 peter
|
||||
Revision 1.14 2001-03-22 22:35:42 florian
|
||||
+ support for type a = (a=1); in Delphi mode added
|
||||
+ procedure p(); in Delphi mode supported
|
||||
+ on isn't keyword anymore, it can be used as
|
||||
id etc. now
|
||||
|
||||
Revision 1.13 2001/03/11 22:58:50 peter
|
||||
* getsym redesign, removed the globals srsym,srsymtable
|
||||
|
||||
Revision 1.12 2001/03/06 18:28:02 peter
|
||||
|
@ -570,11 +570,11 @@ implementation
|
||||
block_type:=bt_except;
|
||||
ot:=pobjectdef(generrordef);
|
||||
p_specific:=nil;
|
||||
if token=_ON then
|
||||
if (token=_ID) and (idtoken=_ON) then
|
||||
{ catch specific exceptions }
|
||||
begin
|
||||
repeat
|
||||
consume(_ON);
|
||||
consume(_ID);
|
||||
if token=_ID then
|
||||
begin
|
||||
objname:=pattern;
|
||||
@ -1240,7 +1240,13 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.20 2001-03-11 22:58:50 peter
|
||||
Revision 1.21 2001-03-22 22:35:42 florian
|
||||
+ support for type a = (a=1); in Delphi mode added
|
||||
+ procedure p(); in Delphi mode supported
|
||||
+ on isn't keyword anymore, it can be used as
|
||||
id etc. now
|
||||
|
||||
Revision 1.20 2001/03/11 22:58:50 peter
|
||||
* getsym redesign, removed the globals srsym,srsymtable
|
||||
|
||||
Revision 1.19 2000/12/25 00:07:27 peter
|
||||
|
@ -109,9 +109,9 @@ implementation
|
||||
srsym:=searchsymonlyin(punitsym(srsym)^.unitsymtable,pattern);
|
||||
pos:=akttokenpos;
|
||||
s:=pattern;
|
||||
end
|
||||
end
|
||||
else
|
||||
srsym:=nil;
|
||||
srsym:=nil;
|
||||
consume(_ID);
|
||||
end;
|
||||
{ are we parsing a possible forward def ? }
|
||||
@ -461,6 +461,17 @@ implementation
|
||||
Message(parser_n_duplicate_enum);
|
||||
l:=v;
|
||||
end
|
||||
else if (m_delphi in aktmodeswitches) and
|
||||
(token=_EQUAL) then
|
||||
begin
|
||||
consume(_EQUAL);
|
||||
v:=get_intconst;
|
||||
{ please leave that a note, allows type save }
|
||||
{ declarations in the win32 units ! }
|
||||
if v<=l then
|
||||
Message(parser_n_duplicate_enum);
|
||||
l:=v;
|
||||
end
|
||||
else
|
||||
inc(l);
|
||||
storepos:=akttokenpos;
|
||||
@ -584,7 +595,13 @@ implementation
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.19 2001-03-12 12:49:01 michael
|
||||
Revision 1.20 2001-03-22 22:35:42 florian
|
||||
+ support for type a = (a=1); in Delphi mode added
|
||||
+ procedure p(); in Delphi mode supported
|
||||
+ on isn't keyword anymore, it can be used as
|
||||
id etc. now
|
||||
|
||||
Revision 1.19 2001/03/12 12:49:01 michael
|
||||
+ Patches from peter
|
||||
|
||||
Revision 1.18 2001/03/11 22:58:50 peter
|
||||
|
@ -309,7 +309,7 @@ const
|
||||
(str:'IN' ;special:false;keyword:m_all;op:_OP_IN),
|
||||
(str:'IS' ;special:false;keyword:m_class;op:_OP_IS),
|
||||
(str:'OF' ;special:false;keyword:m_all;op:NOTOKEN),
|
||||
(str:'ON' ;special:false;keyword:m_class;op:NOTOKEN),
|
||||
(str:'ON' ;special:false;keyword:m_none;op:NOTOKEN),
|
||||
(str:'OR' ;special:false;keyword:m_all;op:_OP_OR),
|
||||
(str:'TO' ;special:false;keyword:m_all;op:NOTOKEN),
|
||||
(str:'AND' ;special:false;keyword:m_all;op:_OP_AND),
|
||||
@ -478,7 +478,13 @@ end;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 2000-11-29 00:30:42 florian
|
||||
Revision 1.8 2001-03-22 22:35:43 florian
|
||||
+ support for type a = (a=1); in Delphi mode added
|
||||
+ procedure p(); in Delphi mode supported
|
||||
+ on isn't keyword anymore, it can be used as
|
||||
id etc. now
|
||||
|
||||
Revision 1.7 2000/11/29 00:30:42 florian
|
||||
* unused units removed from uses clause
|
||||
* some changes for widestrings
|
||||
|
||||
@ -499,4 +505,4 @@ end.
|
||||
Revision 1.2 2000/07/13 11:32:52 michael
|
||||
+ removed logs
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user