feat(markup): bracket-marked calls with pre_modifiers
Stabilize `mod… [callee] args` (modifiers → name=True) alongside link-index disambiguation; expand in interp/bytecode, show in view, and document lib/view code-as-docs waves before stdlib rewrite. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
5058f5ddcf
commit
0e0655b316
17 files changed
+676
-56
No files matched your search
@@ -601,7 +601,18 @@ impl Interpreter {
|
||||
call.callee = callee;
|
||||
}
|
||||
|
||||
for m in &call.pre_modifiers {
|
||||
if call.args.iter().any(|a| matches!(a, Arg::Named { name, .. } if name == m)) {
|
||||
return Err(self.err(format!(
|
||||
"pre-bracket modifier `{m}` conflicts with named argument `{m}`"
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
let mut ev_args = Vec::new();
|
||||
for m in &call.pre_modifiers {
|
||||
ev_args.push(EvArg::Named(m.clone(), Value::Bool(true)));
|
||||
}
|
||||
for arg in &call.args {
|
||||
match arg {
|
||||
Arg::Positional(e) => {
|
||||
|
||||
Reference in new issue
Block a user