From 6d2b92996d10983f9d42943cb04dd272fea9130b Mon Sep 17 00:00:00 2001 From: "claude@clouddev1" Date: Fri, 15 May 2026 22:54:24 +0000 Subject: [PATCH] Grammar: remove the dead CommandNode.hint_mode field HintMode became per-node (Node::Hinted) in the node-attached refactor; the per-command hint_mode field was never the mechanism and is now read by nothing. Removed the field and its 20 `None` initialisers. --- src/dsl/grammar/app.rs | 40 ++++++++++------------------------------ src/dsl/grammar/data.rs | 20 +++++--------------- src/dsl/grammar/ddl.rs | 20 +++++--------------- src/dsl/grammar/mod.rs | 2 -- 4 files changed, 20 insertions(+), 62 deletions(-) diff --git a/src/dsl/grammar/app.rs b/src/dsl/grammar/app.rs index 89c6424..fdee2ef 100644 --- a/src/dsl/grammar/app.rs +++ b/src/dsl/grammar/app.rs @@ -192,87 +192,67 @@ pub static QUIT: CommandNode = CommandNode { shape: EMPTY_SEQ, ast_builder: build_quit, help_id: Some("app.quit"), - usage_ids: &["parse.usage.quit"], - hint_mode: None, -}; + usage_ids: &["parse.usage.quit"],}; pub static HELP: CommandNode = CommandNode { entry: Word::keyword("help"), shape: EMPTY_SEQ, ast_builder: build_help, help_id: Some("app.help"), - usage_ids: &["parse.usage.help"], - hint_mode: None, -}; + usage_ids: &["parse.usage.help"],}; pub static REBUILD: CommandNode = CommandNode { entry: Word::keyword("rebuild"), shape: EMPTY_SEQ, ast_builder: build_rebuild, help_id: Some("app.rebuild"), - usage_ids: &["parse.usage.rebuild"], - hint_mode: None, -}; + usage_ids: &["parse.usage.rebuild"],}; pub static SAVE: CommandNode = CommandNode { entry: Word::keyword("save"), shape: SAVE_AS_OPT, ast_builder: build_save, help_id: Some("app.save"), - usage_ids: &["parse.usage.save"], - hint_mode: None, -}; + usage_ids: &["parse.usage.save"],}; pub static NEW: CommandNode = CommandNode { entry: Word::keyword("new"), shape: EMPTY_SEQ, ast_builder: build_new, help_id: Some("app.new"), - usage_ids: &["parse.usage.new"], - hint_mode: None, -}; + usage_ids: &["parse.usage.new"],}; pub static LOAD: CommandNode = CommandNode { entry: Word::keyword("load"), shape: EMPTY_SEQ, ast_builder: build_load, help_id: Some("app.load"), - usage_ids: &["parse.usage.load"], - hint_mode: None, -}; + usage_ids: &["parse.usage.load"],}; pub static EXPORT: CommandNode = CommandNode { entry: Word::keyword("export"), shape: EXPORT_PATH_OPT, ast_builder: build_export, help_id: Some("app.export"), - usage_ids: &["parse.usage.export"], - hint_mode: None, -}; + usage_ids: &["parse.usage.export"],}; pub static IMPORT: CommandNode = CommandNode { entry: Word::keyword("import"), shape: IMPORT_BODY_OPT, ast_builder: build_import, help_id: Some("app.import"), - usage_ids: &["parse.usage.import"], - hint_mode: None, -}; + usage_ids: &["parse.usage.import"],}; pub static MODE: CommandNode = CommandNode { entry: Word::keyword("mode"), shape: MODE_VALUE, ast_builder: build_mode, help_id: Some("app.mode"), - usage_ids: &["parse.usage.mode"], - hint_mode: None, -}; + usage_ids: &["parse.usage.mode"],}; pub static MESSAGES: CommandNode = CommandNode { entry: Word::keyword("messages"), shape: MESSAGES_VALUE_OPT, ast_builder: build_messages, help_id: Some("app.messages"), - usage_ids: &["parse.usage.messages"], - hint_mode: None, -}; + usage_ids: &["parse.usage.messages"],}; diff --git a/src/dsl/grammar/data.rs b/src/dsl/grammar/data.rs index 950c1c0..a350710 100644 --- a/src/dsl/grammar/data.rs +++ b/src/dsl/grammar/data.rs @@ -653,42 +653,32 @@ pub static SHOW: CommandNode = CommandNode { shape: SHOW_SHAPE, ast_builder: build_show, help_id: Some("data.show"), - usage_ids: &["parse.usage.show_data", "parse.usage.show_table"], - hint_mode: None, -}; + usage_ids: &["parse.usage.show_data", "parse.usage.show_table"],}; pub static INSERT: CommandNode = CommandNode { entry: Word::keyword("insert"), shape: INSERT_SHAPE, ast_builder: build_insert, help_id: Some("data.insert"), - usage_ids: &["parse.usage.insert"], - hint_mode: None, -}; + usage_ids: &["parse.usage.insert"],}; pub static UPDATE: CommandNode = CommandNode { entry: Word::keyword("update"), shape: UPDATE_SHAPE, ast_builder: build_update, help_id: Some("data.update"), - usage_ids: &["parse.usage.update"], - hint_mode: None, -}; + usage_ids: &["parse.usage.update"],}; pub static DELETE: CommandNode = CommandNode { entry: Word::keyword("delete"), shape: DELETE_SHAPE, ast_builder: build_delete, help_id: Some("data.delete"), - usage_ids: &["parse.usage.delete"], - hint_mode: None, -}; + usage_ids: &["parse.usage.delete"],}; pub static REPLAY: CommandNode = CommandNode { entry: Word::keyword("replay"), shape: REPLAY_PATH, ast_builder: build_replay, help_id: Some("data.replay"), - usage_ids: &["parse.usage.replay"], - hint_mode: None, -}; + usage_ids: &["parse.usage.replay"],}; diff --git a/src/dsl/grammar/ddl.rs b/src/dsl/grammar/ddl.rs index 3c06e56..be56ae3 100644 --- a/src/dsl/grammar/ddl.rs +++ b/src/dsl/grammar/ddl.rs @@ -638,36 +638,28 @@ pub static DROP: CommandNode = CommandNode { "parse.usage.drop_table", "parse.usage.drop_column", "parse.usage.drop_relationship", - ], - hint_mode: None, -}; + ],}; pub static ADD: CommandNode = CommandNode { entry: Word::keyword("add"), shape: ADD_SHAPE, ast_builder: build_add, help_id: Some("ddl.add"), - usage_ids: &["parse.usage.add_column", "parse.usage.add_relationship"], - hint_mode: None, -}; + usage_ids: &["parse.usage.add_column", "parse.usage.add_relationship"],}; pub static RENAME: CommandNode = CommandNode { entry: Word::keyword("rename"), shape: RENAME_COLUMN, ast_builder: build_rename_column, help_id: Some("ddl.rename"), - usage_ids: &["parse.usage.rename_column"], - hint_mode: None, -}; + usage_ids: &["parse.usage.rename_column"],}; pub static CHANGE: CommandNode = CommandNode { entry: Word::keyword("change"), shape: CHANGE_COLUMN, ast_builder: build_change_column, help_id: Some("ddl.change"), - usage_ids: &["parse.usage.change_column"], - hint_mode: None, -}; + usage_ids: &["parse.usage.change_column"],}; // ================================================================= // create_table — `create table [with pk [:[, ...]]]` @@ -799,6 +791,4 @@ pub static CREATE: CommandNode = CommandNode { shape: CREATE_TABLE, ast_builder: build_create_table, help_id: Some("ddl.create"), - usage_ids: &["parse.usage.create_table"], - hint_mode: None, -}; + usage_ids: &["parse.usage.create_table"],}; diff --git a/src/dsl/grammar/mod.rs b/src/dsl/grammar/mod.rs index 82bf6bb..902230b 100644 --- a/src/dsl/grammar/mod.rs +++ b/src/dsl/grammar/mod.rs @@ -364,8 +364,6 @@ pub struct CommandNode { /// carry every variant so the user sees the full family on a /// generic-entry-word failure. pub usage_ids: &'static [&'static str], - #[allow(dead_code)] - pub hint_mode: Option, } /// Look up the usage catalog keys for the entry word at the start