summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁkos Kőrösi <korakos99@gmail.com>2026-05-12 16:57:42 +0200
committerÁkos Kőrösi <korakos99@gmail.com>2026-05-12 16:57:42 +0200
commite097a4306efd2a45a531d2da09de634f80ba30f1 (patch)
treed9f0ced15d043269844dbf5544b7645e8f1e7102
parent89625d33abbdb99659ad6d8fa3df0de0b7a72f10 (diff)
start outlining execution
-rw-r--r--exec.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/exec.c b/exec.c
new file mode 100644
index 0000000..e2fbbb3
--- /dev/null
+++ b/exec.c
@@ -0,0 +1,39 @@
+#include "lex.h"
+#include "parse.h"
+#include "typeutils.h"
+
+
+
+DECLARE_VEC(char*, StdStrVec)
+
+
+typedef struct {
+ QuotationMode qmode;
+ char* content;
+} ExpandedChunk;
+
+
+ExpandedChunk expand_chunk(Chunk chunk) {
+ char* content;
+ if (chunk.qmode == SINGLE_Q || chunk.kind == LITERAL) {
+ if (chunk.qmode == SINGLE_Q && chunk.kind != LITERAL) exit(69);
+ content = chunk.as.literal_str;
+ } else if (chunk.kind == VAR_EXP) {
+ // TODO: we need a ShellState to query
+ }
+
+ match (chunk.kind) {
+ case L
+ }
+ switch (chunk.qmode) {
+ case SINGLE_Q:
+
+
+ }
+}
+
+
+
+void run_pipeline(Pipeline pl) {
+
+}