Open JBontes opened 7 years ago
var x: integer; y: integer absolute x;
The absolute is not recorded. and the x is recorded as if it was a value assigned to the variable.
absolute
x
The fix:
procedure TPasSyntaxTreeBuilder.VarAbsolute; var AbsoluteNode: TSyntaxNode; ValueNode: TSyntaxNode; begin AbsoluteNode:= TSyntaxNode.Create(ntUnknown); FStack.Push(AbsoluteNode); try inherited; finally FStack.Pop; ValueNode:= AbsoluteNode.ExtractChild(AbsoluteNode.ChildNode[0]); ValueNode.Attribute[anKind]:= AttributeValues[atAbsolute]; AbsoluteNode.Free; FStack.Peek.AddChild(ValueNode); end; end;
The
absolute
is not recorded. and thex
is recorded as if it was a value assigned to the variable.The fix: