text stringlengths 0 234 |
|---|
return J; |
end if; |
end loop; |
return 0; |
end Child_Index; |
-------------------- |
-- Discard_Parent -- |
-------------------- |
overriding procedure Discard_Parent (Self : in out Node_With_Parent) is |
Changed : Boolean; |
Ignore : Integer := 0; |
Now : constant Version_Trees.Version := |
Self.Document.History.Changing; |
begin |
Changed := Self.Local_Changes > 0 or Self.Nested_Changes > 0; |
if Changed then |
Self.Propagate_Nested_Changes (-1); |
end if; |
Versioned_Nodes.Discard (Self.Parent, Now, Ignore); |
if Changed then |
Self.Propagate_Nested_Changes (1); |
end if; |
end Discard_Parent; |
----------------- |
-- First_Token -- |
----------------- |
function First_Token |
(Self : aliased in out Node'Class; |
Time : Version_Trees.Version) |
return Tokens.Token_Access |
is |
Child : Node_Access; |
begin |
if Self.Arity > 0 then |
Child := Self.Child (1, Time); |
if Child.Is_Token then |
return Tokens.Token_Access (Child); |
else |
return Child.First_Token (Time); |
end if; |
elsif Self.Is_Token then |
return Tokens.Token'Class (Self)'Access; |
else |
return null; |
end if; |
end First_Token; |
-------------- |
-- Get_Flag -- |
-------------- |
overriding function Get_Flag |
(Self : Node_With_Exist; |
Flag : Transient_Flags) return Boolean is |
begin |
return Self.Flag (Flag); |
end Get_Flag; |
---------------- |
-- Last_Token -- |
---------------- |
function Last_Token |
(Self : aliased in out Node'Class; |
Time : Version_Trees.Version) return Tokens.Token_Access |
is |
Child : Node_Access; |
begin |
if Self.Arity > 0 then |
Child := Self.Child (Self.Arity, Time); |
if Child.Is_Token then |
return Tokens.Token_Access (Child); |
else |
return Child.Last_Token (Time); |
end if; |
elsif Self.Is_Token then |
return Tokens.Token'Class (Self)'Access; |
else |
return null; |
end if; |
end Last_Token; |
------------------- |
-- Local_Changes -- |
------------------- |
overriding function Local_Changes |
(Self : Node_With_Exist; |
From : Version_Trees.Version; |
To : Version_Trees.Version) return Boolean |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.