]> git.sur5r.net Git - i3/i3/blobdiff - src/cmdparse.y
Implement a new parser for commands. (+test)
[i3/i3] / src / cmdparse.y
index 5400d76509d72be4ad5d4d98ee172308af0957d0..4a2c6ab378968ac4af02cb931a775f4f1f7e08ab 100644 (file)
@@ -55,6 +55,14 @@ int cmdyywrap() {
 }
 
 char *parse_cmd(const char *new) {
+    cmd_MIGRATION_enable();
+    char *output = parse_command(new);
+    if (output != NULL) {
+        printf("MIGRATION: new output != NULL: %s\n", output);
+        free(output);
+    }
+    cmd_MIGRATION_disable();
+
     json_output = NULL;
     LOG("COMMAND: *%s*\n", new);
     cmdyy_scan_string(new);
@@ -73,6 +81,8 @@ char *parse_cmd(const char *new) {
     }
     printf("done, json output = %s\n", json_output);
 
+    cmd_MIGRATION_validate();
+
     cmdyylex_destroy();
     FREE(context->line_copy);
     FREE(context->compact_error);
@@ -276,7 +286,7 @@ operation:
 exec:
     TOK_EXEC optional_no_startup_id STR
     {
-        json_output = cmd_exec(&current_match, ($2 ? "nosn" : NULL), $3);
+        json_output = cmd_exec(&current_match, ($2 ? "--no-startup-id" : NULL), $3);
         free($3);
     }
     ;