mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
Implement JSTraceable for more types.
This commit is contained in:
parent
8ce9ca6243
commit
3613e8f231
3 changed files with 9 additions and 1 deletions
|
@ -4103,6 +4103,7 @@ class CGUnionStruct(CGThing):
|
|||
% (self.type, v["name"]) for v in templateVars
|
||||
]
|
||||
return ("""\
|
||||
#[derive(JSTraceable)]
|
||||
pub enum %s {
|
||||
%s
|
||||
}
|
||||
|
@ -5881,6 +5882,7 @@ class CGDictionary(CGThing):
|
|||
for m in self.memberInfo]
|
||||
|
||||
return (string.Template(
|
||||
"#[derive(JSTraceable)]\n"
|
||||
"pub struct ${selfName} {\n" +
|
||||
"${inheritance}" +
|
||||
"\n".join(memberDecls) + "\n" +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue