summaryrefslogtreecommitdiff
path: root/expand.h
diff options
context:
space:
mode:
authorÁkos Kőrösi <korakos99@gmail.com>2026-05-18 16:23:26 +0200
committerÁkos Kőrösi <korakos99@gmail.com>2026-05-18 16:23:26 +0200
commitca675175742174d6bfcd0263583f840e250fc58f (patch)
treecd11ec9f8345fa31dddb2a5f0c21d59bb19816b1 /expand.h
parent24ba34266cc977b22d777bceca9683a45dd73042 (diff)
quicksaving
Diffstat (limited to 'expand.h')
-rw-r--r--expand.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/expand.h b/expand.h
new file mode 100644
index 0000000..8d00a72
--- /dev/null
+++ b/expand.h
@@ -0,0 +1,32 @@
+# pragma once
+
+#include "exec.h"
+#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);