操作数
Translation status: 简体中文 reader-locale proof. Term names and code fences follow the zh-Hans pack; supporting prose may still be English.
Declares a CLI operand annotation.
Syntax: @ 操作数 [其余] <type> <binding> [描述 \"...\"] [ubique] [vel <default>]
Category#
cli
Related#
Examples#
radix/corpus/operandus/operandus.fab (canonical · keyword)#
Declares a CLI operand annotation.
# =============================================================================
# 操作数 — Declares a CLI operand annotation.
# =============================================================================
#
# What this teaches:
# • CLI operands — `@操作数` declares positional arguments for CLI subcommands.
# • Binding and description — Each operand specifies a type, binding name, and description.
# • Variadic operands — The `其余` keyword marks an operand that consumes remaining arguments.
#
# Common mistakes:
# • Duplicate operand bindings or type mismatches — each operand name must be unique and match its declared type.
#
# See also: 选项, cli, 命令, 其余, 全局
# =============================================================================
# 操作数 — CLI positional operand
#
# GRAMMAR:
# annotation :← '@' '操作数' operandSpec
#
# EXPECTED OUTPUT:
# No 入口 — declaration or test-runner surface only.
#
# BACKEND:
# declaration-only CLI metadata (whitelist: 操作数/operandus.fab).
#
@ 命令行 "operandus-smoke"
@ operand string input description "Input path"
@ operand rest string files description "Extra files"
main args args {
}