Support footnote indexing inside interpolated call args and strings
Parse `` `var`[^key] `` in `` *…* `` segments and quoted strings as an Index part (chained `` [^a][^b] `` folds into one part) in both the tree-walk interpreter and the bytecode compiler, and render it back in `view`. Also make bytecode `_type` stamping always overwrite like the interpreter does, so child constructors yield the most specific type. Adds gold/unit tests for interp footnote indexing and a bytecode inherit-explicit-super case. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
d7924ea8c7
commit
b84e82eb56
10 files changed
+247
-6
No files matched your search
@@ -1296,6 +1296,16 @@ fn expr_prec(expr: &Expr, parent_prec: u8) -> String {
|
||||
s.push_str(n);
|
||||
s.push('`');
|
||||
}
|
||||
InterpPart::Index { base, labels } => {
|
||||
s.push('`');
|
||||
s.push_str(base);
|
||||
s.push('`');
|
||||
for label in labels {
|
||||
s.push_str("[^");
|
||||
s.push_str(label);
|
||||
s.push(']');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
s
|
||||
|
||||
Reference in new issue
Block a user