|
@@ -758,7 +758,7 @@ procedure TPasTreeContainer.FinishScope(ScopeType: TPasScopeType;
|
|
El: TPasElement);
|
|
El: TPasElement);
|
|
begin
|
|
begin
|
|
if ScopeType=stModule then ; // avoid compiler warning
|
|
if ScopeType=stModule then ; // avoid compiler warning
|
|
- if Assigned(El) then
|
|
|
|
|
|
+ if Assigned(El) and (CurrentParser<>nil) then
|
|
El.SourceEndLinenumber := CurrentParser.CurSourcePos.Row;
|
|
El.SourceEndLinenumber := CurrentParser.CurSourcePos.Row;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1280,7 +1280,7 @@ begin
|
|
end
|
|
end
|
|
else
|
|
else
|
|
UngetToken;
|
|
UngetToken;
|
|
- Result.DestType:=TPasStringType(CreateElement(TPasStringType,'string',Parent));
|
|
|
|
|
|
+ Result.DestType:=TPasStringType(CreateElement(TPasStringType,'string',Result));
|
|
TPasStringType(Result.DestType).LengthExpr:=LengthAsText;
|
|
TPasStringType(Result.DestType).LengthExpr:=LengthAsText;
|
|
ok:=true;
|
|
ok:=true;
|
|
finally
|
|
finally
|
|
@@ -1390,6 +1390,7 @@ begin
|
|
Result := TPasAliasType(CreateElement(TPasAliasType, TypeName, Parent, NamePos));
|
|
Result := TPasAliasType(CreateElement(TPasAliasType, TypeName, Parent, NamePos));
|
|
TPasAliasType(Result).DestType:=Ref;
|
|
TPasAliasType(Result).DestType:=Ref;
|
|
TPasAliasType(Result).Expr:=Expr;
|
|
TPasAliasType(Result).Expr:=Expr;
|
|
|
|
+ Expr.Parent:=Result;
|
|
if TypeName<>'' then
|
|
if TypeName<>'' then
|
|
Engine.FinishScope(stTypeDef,Result);
|
|
Engine.FinishScope(stTypeDef,Result);
|
|
end
|
|
end
|
|
@@ -2193,6 +2194,7 @@ begin
|
|
begin
|
|
begin
|
|
// an inline specialization (e.g. A<B,C>)
|
|
// an inline specialization (e.g. A<B,C>)
|
|
ISE:=TInlineSpecializeExpr(CreateElement(TInlineSpecializeExpr,'',AParent,SrcPos));
|
|
ISE:=TInlineSpecializeExpr(CreateElement(TInlineSpecializeExpr,'',AParent,SrcPos));
|
|
|
|
+ ISE.Kind:=pekSpecialize;
|
|
ST:=TPasSpecializeType(CreateElement(TPasSpecializeType,'',ISE,SrcPos));
|
|
ST:=TPasSpecializeType(CreateElement(TPasSpecializeType,'',ISE,SrcPos));
|
|
ISE.DestType:=ST;
|
|
ISE.DestType:=ST;
|
|
ReadSpecializeArguments(ST);
|
|
ReadSpecializeArguments(ST);
|