]> git.feebdaed.xyz Git - 0xmirror/gcc.git/commitdiff
a68: scope access clauses
authorJose E. Marchesi <jose.marchesi@oracle.com>
Sat, 27 Dec 2025 10:14:02 +0000 (11:14 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Sat, 27 Dec 2025 10:52:48 +0000 (11:52 +0100)
Signed-off-by: Jose E. Marchesi <jemarch@gnu.org>
gcc/algol68/ChangeLog

* a68-parser-scope.cc (scope_access_clause): New function.
(scope_enclosed_clause): Use scope_access_clause.

gcc/algol68/a68-parser-scope.cc

index e76a3c04409736ab39f7c356424a0af3da97d9f9..e04704e25b620379735ccebe53f687160aff8749 100644 (file)
@@ -54,6 +54,7 @@ static void scope_statement (NODE_T *, SCOPE_T **);
 static void scope_enclosed_clause (NODE_T *, SCOPE_T **);
 static void scope_formula (NODE_T *, SCOPE_T **);
 static void scope_routine_text (NODE_T *, SCOPE_T **);
+static void scope_access_clause (NODE_T *, SCOPE_T **);
 
 /*
  * Static scope checker.
@@ -898,6 +899,18 @@ scope_loop_clause (NODE_T *p)
     }
 }
 
+/* Scope and access-clause.  */
+
+static void
+scope_access_clause (NODE_T *p, SCOPE_T **s)
+{
+  for (; p != NO_NODE; FORWARD (p))
+    {
+      if (IS (p, ENCLOSED_CLAUSE))
+       scope_enclosed_clause (SUB (p), s);
+    }
+}
+
 /* Scope_enclosed_clause.  */
 
 static void
@@ -915,6 +928,8 @@ scope_enclosed_clause (NODE_T *p, SCOPE_T **s)
     scope_case_clause (SUB (p), s);
   else if (IS (p, LOOP_CLAUSE))
     scope_loop_clause (SUB (p));
+  else if (IS (p, ACCESS_CLAUSE))
+    scope_access_clause (SUB (p), s);
 }
 
 /* Whether a symbol table contains no (anonymous) definition.  */