lexer: Implement workspace <number> "<name>"

This commit is contained in:
Michael Stapelberg 2009-09-19 19:39:06 +02:00
parent 0ed2d62263
commit 0e8b87e9da
1 changed files with 10 additions and 0 deletions

View File

@ -257,6 +257,16 @@ workspace:
workspace_set_name(&(workspaces[ws_num - 1]), $<string>8);
}
}
| TOKWORKSPACE WHITESPACE NUMBER workspace_name
{
int ws_num = $<number>3;
if (ws_num < 1 || ws_num > 10) {
LOG("Invalid workspace assignment, workspace number %d out of range\n", ws_num);
} else {
if ($<string>4 != NULL)
workspace_set_name(&(workspaces[ws_num - 1]), $<string>4);
}
}
;
workspace_name: