渲染zh-Hant

操作數

Translation status: 繁體中文 reader-locale proof. Term names and code fences follow the zh-Hant pack; supporting prose may still be English.

Declares a CLI operand annotation.

Syntax: @ 操作數 [其餘] <type> <binding> [描述 \"...\"] [ubique] [vel <default>]

Category#

cli

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 {
}