style: format the whole tree with cargo fmt (stock defaults, #35)
One-time, mechanical reformat — no functional changes. The tree was not rustfmt-clean (~1800 hunks across ~100 files); this brings it to stock `cargo fmt` defaults so a `cargo fmt --check` CI gate can follow. Behaviour-preserving: 2509 pass / 0 fail / 1 ignored (unchanged baseline), clippy clean. A .git-blame-ignore-revs entry follows so `git blame` skips this commit.
This commit is contained in:
+41
-30
@@ -9,8 +9,7 @@
|
||||
|
||||
use crate::dsl::command::{AppCommand, Command, CopyScope, MessagesValue, ModeValue};
|
||||
use crate::dsl::grammar::{
|
||||
CommandNode, HintMode, IdentSource, IdentValidator, Node, ValidationError,
|
||||
Word,
|
||||
CommandNode, HintMode, IdentSource, IdentValidator, Node, ValidationError, Word,
|
||||
};
|
||||
use crate::dsl::walker::outcome::{MatchedKind, MatchedPath};
|
||||
|
||||
@@ -60,19 +59,16 @@ const IMPORT_TARGET_IDENT: Node = Node::Ident {
|
||||
writes_table: false,
|
||||
writes_column: false,
|
||||
writes_user_listed_column: false,
|
||||
writes_table_alias: false,
|
||||
writes_cte_name: false,
|
||||
writes_projection_alias: false,
|
||||
writes_table_alias: false,
|
||||
writes_cte_name: false,
|
||||
writes_projection_alias: false,
|
||||
};
|
||||
const IMPORT_TARGET: Node = Node::Hinted {
|
||||
mode: HintMode::ForceProse("hint.ambient_typing_name"),
|
||||
inner: &IMPORT_TARGET_IDENT,
|
||||
};
|
||||
|
||||
const IMPORT_AS_TARGET: Node = Node::Seq(&[
|
||||
Node::Word(Word::keyword("as")),
|
||||
IMPORT_TARGET,
|
||||
]);
|
||||
const IMPORT_AS_TARGET: Node = Node::Seq(&[Node::Word(Word::keyword("as")), IMPORT_TARGET]);
|
||||
const IMPORT_AS_TARGET_OPT: Node = Node::Optional(&IMPORT_AS_TARGET);
|
||||
|
||||
const IMPORT_PATH_AND_TARGET: Node = Node::Seq(&[Node::BarePath, IMPORT_AS_TARGET_OPT]);
|
||||
@@ -101,9 +97,9 @@ const MODE_CHOICES: &[Node] = &[
|
||||
writes_table: false,
|
||||
writes_column: false,
|
||||
writes_user_listed_column: false,
|
||||
writes_table_alias: false,
|
||||
writes_cte_name: false,
|
||||
writes_projection_alias: false,
|
||||
writes_table_alias: false,
|
||||
writes_cte_name: false,
|
||||
writes_projection_alias: false,
|
||||
},
|
||||
];
|
||||
const MODE_VALUE: Node = Node::Choice(MODE_CHOICES);
|
||||
@@ -119,9 +115,9 @@ const MESSAGES_CHOICES: &[Node] = &[
|
||||
writes_table: false,
|
||||
writes_column: false,
|
||||
writes_user_listed_column: false,
|
||||
writes_table_alias: false,
|
||||
writes_cte_name: false,
|
||||
writes_projection_alias: false,
|
||||
writes_table_alias: false,
|
||||
writes_cte_name: false,
|
||||
writes_projection_alias: false,
|
||||
},
|
||||
];
|
||||
const MESSAGES_VALUE: Node = Node::Choice(MESSAGES_CHOICES);
|
||||
@@ -271,7 +267,8 @@ pub static QUIT: CommandNode = CommandNode {
|
||||
ast_builder: build_quit,
|
||||
help_id: Some("app.quit"),
|
||||
hint_ids: &["quit"],
|
||||
usage_ids: &["parse.usage.quit"],};
|
||||
usage_ids: &["parse.usage.quit"],
|
||||
};
|
||||
|
||||
pub static HELP: CommandNode = CommandNode {
|
||||
entry: Word::keyword("help"),
|
||||
@@ -279,7 +276,8 @@ pub static HELP: CommandNode = CommandNode {
|
||||
ast_builder: build_help,
|
||||
help_id: Some("app.help"),
|
||||
hint_ids: &["help"],
|
||||
usage_ids: &["parse.usage.help"],};
|
||||
usage_ids: &["parse.usage.help"],
|
||||
};
|
||||
|
||||
pub static HINT: CommandNode = CommandNode {
|
||||
entry: Word::keyword("hint"),
|
||||
@@ -288,7 +286,8 @@ pub static HINT: CommandNode = CommandNode {
|
||||
help_id: Some("app.hint"),
|
||||
// hint_id assigned in Phase C with the tier-3 corpus (ADR-0053).
|
||||
hint_ids: &["hint"],
|
||||
usage_ids: &["parse.usage.hint"],};
|
||||
usage_ids: &["parse.usage.hint"],
|
||||
};
|
||||
|
||||
pub static REBUILD: CommandNode = CommandNode {
|
||||
entry: Word::keyword("rebuild"),
|
||||
@@ -296,7 +295,8 @@ pub static REBUILD: CommandNode = CommandNode {
|
||||
ast_builder: build_rebuild,
|
||||
help_id: Some("app.rebuild"),
|
||||
hint_ids: &["rebuild"],
|
||||
usage_ids: &["parse.usage.rebuild"],};
|
||||
usage_ids: &["parse.usage.rebuild"],
|
||||
};
|
||||
|
||||
pub static VERSION: CommandNode = CommandNode {
|
||||
entry: Word::keyword("version"),
|
||||
@@ -304,7 +304,8 @@ pub static VERSION: CommandNode = CommandNode {
|
||||
ast_builder: build_version,
|
||||
help_id: Some("app.version"),
|
||||
hint_ids: &["version"],
|
||||
usage_ids: &["parse.usage.version"],};
|
||||
usage_ids: &["parse.usage.version"],
|
||||
};
|
||||
|
||||
pub static SAVE: CommandNode = CommandNode {
|
||||
entry: Word::keyword("save"),
|
||||
@@ -312,7 +313,8 @@ pub static SAVE: CommandNode = CommandNode {
|
||||
ast_builder: build_save,
|
||||
help_id: Some("app.save"),
|
||||
hint_ids: &["save"],
|
||||
usage_ids: &["parse.usage.save"],};
|
||||
usage_ids: &["parse.usage.save"],
|
||||
};
|
||||
|
||||
pub static NEW: CommandNode = CommandNode {
|
||||
entry: Word::keyword("new"),
|
||||
@@ -320,7 +322,8 @@ pub static NEW: CommandNode = CommandNode {
|
||||
ast_builder: build_new,
|
||||
help_id: Some("app.new"),
|
||||
hint_ids: &["new"],
|
||||
usage_ids: &["parse.usage.new"],};
|
||||
usage_ids: &["parse.usage.new"],
|
||||
};
|
||||
|
||||
pub static LOAD: CommandNode = CommandNode {
|
||||
entry: Word::keyword("load"),
|
||||
@@ -328,7 +331,8 @@ pub static LOAD: CommandNode = CommandNode {
|
||||
ast_builder: build_load,
|
||||
help_id: Some("app.load"),
|
||||
hint_ids: &["load"],
|
||||
usage_ids: &["parse.usage.load"],};
|
||||
usage_ids: &["parse.usage.load"],
|
||||
};
|
||||
|
||||
pub static EXPORT: CommandNode = CommandNode {
|
||||
entry: Word::keyword("export"),
|
||||
@@ -336,7 +340,8 @@ pub static EXPORT: CommandNode = CommandNode {
|
||||
ast_builder: build_export,
|
||||
help_id: Some("app.export"),
|
||||
hint_ids: &["export"],
|
||||
usage_ids: &["parse.usage.export"],};
|
||||
usage_ids: &["parse.usage.export"],
|
||||
};
|
||||
|
||||
pub static IMPORT: CommandNode = CommandNode {
|
||||
entry: Word::keyword("import"),
|
||||
@@ -344,7 +349,8 @@ pub static IMPORT: CommandNode = CommandNode {
|
||||
ast_builder: build_import,
|
||||
help_id: Some("app.import"),
|
||||
hint_ids: &["import"],
|
||||
usage_ids: &["parse.usage.import"],};
|
||||
usage_ids: &["parse.usage.import"],
|
||||
};
|
||||
|
||||
pub static MODE: CommandNode = CommandNode {
|
||||
entry: Word::keyword("mode"),
|
||||
@@ -352,7 +358,8 @@ pub static MODE: CommandNode = CommandNode {
|
||||
ast_builder: build_mode,
|
||||
help_id: Some("app.mode"),
|
||||
hint_ids: &["mode"],
|
||||
usage_ids: &["parse.usage.mode"],};
|
||||
usage_ids: &["parse.usage.mode"],
|
||||
};
|
||||
|
||||
pub static MESSAGES: CommandNode = CommandNode {
|
||||
entry: Word::keyword("messages"),
|
||||
@@ -360,7 +367,8 @@ pub static MESSAGES: CommandNode = CommandNode {
|
||||
ast_builder: build_messages,
|
||||
help_id: Some("app.messages"),
|
||||
hint_ids: &["messages"],
|
||||
usage_ids: &["parse.usage.messages"],};
|
||||
usage_ids: &["parse.usage.messages"],
|
||||
};
|
||||
|
||||
pub static UNDO: CommandNode = CommandNode {
|
||||
entry: Word::keyword("undo"),
|
||||
@@ -368,7 +376,8 @@ pub static UNDO: CommandNode = CommandNode {
|
||||
ast_builder: build_undo,
|
||||
help_id: Some("app.undo"),
|
||||
hint_ids: &["undo"],
|
||||
usage_ids: &["parse.usage.undo"],};
|
||||
usage_ids: &["parse.usage.undo"],
|
||||
};
|
||||
|
||||
pub static REDO: CommandNode = CommandNode {
|
||||
entry: Word::keyword("redo"),
|
||||
@@ -376,7 +385,8 @@ pub static REDO: CommandNode = CommandNode {
|
||||
ast_builder: build_redo,
|
||||
help_id: Some("app.redo"),
|
||||
hint_ids: &["redo"],
|
||||
usage_ids: &["parse.usage.redo"],};
|
||||
usage_ids: &["parse.usage.redo"],
|
||||
};
|
||||
|
||||
pub static COPY: CommandNode = CommandNode {
|
||||
entry: Word::keyword("copy"),
|
||||
@@ -384,4 +394,5 @@ pub static COPY: CommandNode = CommandNode {
|
||||
ast_builder: build_copy,
|
||||
help_id: Some("app.copy"),
|
||||
hint_ids: &["copy"],
|
||||
usage_ids: &["parse.usage.copy"],};
|
||||
usage_ids: &["parse.usage.copy"],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user