summaryrefslogtreecommitdiff
path: root/src/expand.h
diff options
context:
space:
mode:
authorÁkos Kőrösi <korakos99@gmail.com>2026-05-19 21:13:19 +0200
committerÁkos Kőrösi <korakos99@gmail.com>2026-05-19 21:13:19 +0200
commit2bdbf387261285d07e4b62d1e23c9e43efb14604 (patch)
tree92b81d300f3c17d072f2a30362dafd815e57a758 /src/expand.h
parent6a391a1180766ac5717c40efa70d46cacca83f91 (diff)
restructure dir, create makefile
Diffstat (limited to 'src/expand.h')
-rw-r--r--src/expand.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/expand.h b/src/expand.h
new file mode 100644
index 0000000..b353f39
--- /dev/null
+++ b/src/expand.h
@@ -0,0 +1,31 @@
+# pragma once
+
+#include "preproc.h"
+#include "utils.h"
+
+typedef enum {
+ SLOT_STR,
+ SLOT_SPEC,
+ SLOT_PROC_IN,
+ SLOT_PROC_OUT,
+} SlotKind;
+
+typedef struct {
+ SlotKind kind;
+ union {
+ char* str;
+ SpecialToken spec;
+ Region* proc_reg;
+ } as;
+} Slot;
+
+DECLARE_VEC(Slot, SlotVec)
+
+typedef struct {
+ SlotVec cmd_slots;
+ Connector conn;
+} ExpandedPipelineElement;
+
+DECLARE_VEC(ExpandedPipelineElement, ExpandedPipeline)
+
+ExpandedPipeline expand_pipeline(Pipeline* pl, ShellState* shstate);