From: Michael Stapelberg Date: Sat, 19 Sep 2009 17:39:06 +0000 (+0200) Subject: lexer: Implement workspace "" X-Git-Tag: 3.d~88 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0e8b87e9da8e0a574cb2c2852773534f70292564;p=i3%2Fi3 lexer: Implement workspace "" --- diff --git a/src/cfgparse.y b/src/cfgparse.y index 4b7224b5..7875f86e 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -257,6 +257,16 @@ workspace: workspace_set_name(&(workspaces[ws_num - 1]), $8); } } + | TOKWORKSPACE WHITESPACE NUMBER workspace_name + { + int ws_num = $3; + if (ws_num < 1 || ws_num > 10) { + LOG("Invalid workspace assignment, workspace number %d out of range\n", ws_num); + } else { + if ($4 != NULL) + workspace_set_name(&(workspaces[ws_num - 1]), $4); + } + } ; workspace_name: