mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-04 18:07:13 +01:00
+ new parser-only node class to handle Delphi-mode inline specializations
git-svn-id: trunk@31588 -
This commit is contained in:
parent
09a4efe5d3
commit
4f5fc66298
@ -48,6 +48,15 @@ interface
|
||||
end;
|
||||
terrornodeclass = class of terrornode;
|
||||
|
||||
tspecializenode = class(tunarynode)
|
||||
sym:tsym;
|
||||
getaddr:boolean;
|
||||
constructor create(l:tnode;g:boolean;s:tsym);virtual;
|
||||
function pass_1:tnode;override;
|
||||
function pass_typecheck:tnode;override;
|
||||
end;
|
||||
tspecializenodeclass = class of tspecializenode;
|
||||
|
||||
tasmnode = class(tnode)
|
||||
p_asm : TAsmList;
|
||||
currenttai : tai;
|
||||
@ -248,6 +257,7 @@ interface
|
||||
var
|
||||
cnothingnode : tnothingnodeclass = tnothingnode;
|
||||
cerrornode : terrornodeclass = terrornode;
|
||||
cspecializenode : tspecializenodeclass = tspecializenode;
|
||||
casmnode : tasmnodeclass = tasmnode;
|
||||
cstatementnode : tstatementnodeclass = tstatementnode;
|
||||
cblocknode : tblocknodeclass = tblocknode;
|
||||
@ -379,6 +389,36 @@ implementation
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
TSPECIALIZENODE
|
||||
*****************************************************************************}
|
||||
|
||||
constructor tspecializenode.create(l:tnode;g:boolean;s:tsym);
|
||||
begin
|
||||
inherited create(specializen,l);
|
||||
sym:=s;
|
||||
getaddr:=g;
|
||||
end;
|
||||
|
||||
|
||||
function tspecializenode.pass_typecheck:tnode;
|
||||
begin
|
||||
result:=nil;
|
||||
resultdef:=cundefinedtype;
|
||||
end;
|
||||
|
||||
|
||||
function tspecializenode.pass_1:tnode;
|
||||
begin
|
||||
{ such a node should not reach pass_1 }
|
||||
internalerror(2015071704);
|
||||
result:=nil;
|
||||
expectloc:=LOC_VOID;
|
||||
codegenerror:=true;
|
||||
end;
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
TSTATEMENTNODE
|
||||
*****************************************************************************}
|
||||
|
||||
@ -110,7 +110,8 @@ interface
|
||||
loadparentfpn, { Load the framepointer of the parent for nested procedures }
|
||||
dataconstn, { node storing some binary data }
|
||||
objcselectorn, { node for an Objective-C message selector }
|
||||
objcprotocoln { node for an Objective-C @protocol() expression (returns metaclass associated with protocol) }
|
||||
objcprotocoln, { node for an Objective-C @protocol() expression (returns metaclass associated with protocol) }
|
||||
specializen { parser-only node to handle Delphi-mode inline specializations }
|
||||
);
|
||||
|
||||
tnodetypeset = set of tnodetype;
|
||||
@ -194,7 +195,8 @@ interface
|
||||
'loadparentfpn',
|
||||
'dataconstn',
|
||||
'objcselectorn',
|
||||
'objcprotocoln');
|
||||
'objcprotocoln',
|
||||
'specializen');
|
||||
|
||||
{ a set containing all const nodes }
|
||||
nodetype_const = [ordconstn,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user