use endbasic_core::*;
use std::borrow::Cow;
use std::rc::Rc;
pub(super) struct DefineArgCommand {
metadata: Rc<CallableMetadata>,
}
impl DefineArgCommand {
pub(super) fn new() -> Rc<Self> {
Rc::from(Self {
metadata: CallableMetadataBuilder::new("DEFINE_ARG")
.with_syntax(&[(
&[SingularArgSyntax::RequiredRef(
RequiredRefSyntax {
name: Cow::Borrowed("arg"),
require_array: false,
define_undefined: true,
},
ArgSepSyntax::End,
)],
None,
)])
.test_build(),
})
}
}
impl Callable for DefineArgCommand {
fn metadata(&self) -> Rc<CallableMetadata> {
self.metadata.clone()
}
fn exec(&self, _scope: Scope<'_>) -> CallResult<()> {
Ok(())
}
}