From 68d26922e31aad3cb34dd3b7689bcec75ad70fcb Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 25 Sep 2014 07:38:09 +0200 Subject: Add a python script to automatically generate disp_tree. --- nodes.adb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'nodes.adb') diff --git a/nodes.adb b/nodes.adb index 9885eb1bc..2dc7736ce 100644 --- a/nodes.adb +++ b/nodes.adb @@ -109,6 +109,18 @@ package body Nodes is end if; end Free_Node; + function Next_Node (N : Node_Type) return Node_Type is + begin + case Nodet.Table (N).Format is + when Format_Medium => + return N + 2; + when Format_Short + | Format_Int + | Format_Fp => + return N + 1; + end case; + end Next_Node; + function Get_Nkind (N : Node_Type) return Kind_Type is begin return Nodet.Table (N).Kind; -- cgit v1.2.3