summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec.c')
-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) {
+
+}