From 7ed010b7f01a5d5d7aa69e1876fbe255c12a6002 Mon Sep 17 00:00:00 2001 From: ferriarnus <61201275+ferriarnus@users.noreply.github.com> Date: Mon, 28 Oct 2024 22:22:44 +0100 Subject: [PATCH] add storage collector --- src/main/java/org/taumc/glsl/Transformer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/org/taumc/glsl/Transformer.java b/src/main/java/org/taumc/glsl/Transformer.java index 301d3d7..232e3db 100644 --- a/src/main/java/org/taumc/glsl/Transformer.java +++ b/src/main/java/org/taumc/glsl/Transformer.java @@ -221,4 +221,10 @@ public void rewriteStructArrays() { ParseTreeWalker.DEFAULT.walk(new StructArrayRewriter(), root); } + public List collectStorage() { + List tokens = new ArrayList<>(); + ParseTreeWalker.DEFAULT.walk(new StorageCollector(tokens), root); + return tokens; + } + }