Hi, A Starlark "string list" looks like this: ["a", "b", "c"]
I'm converting this into a Scheme vector of c-objects; the custom c-object lets me keep track of position metadata (line,col), so my parser/emitter can round-trip, emitting output that exactly matches the input. The problem is that I need to keep track of the positions for the string list brackets. Those are nodes in the AST, as are the commas in the list, but I'm omitting them from the vector, it doesn't make much sense for a string vector to include punctuation. I can add metadata for the commas to the custom string nodes, but that leaves the bracket delimiters. The easy way to do that would be to add the info as metadata on the Scheme vector. Is there a way to do that with s7? I've been looking at the "let" stuff but I don't see a way to do it. I see that c-objects have an "object-let", and (object->let myvec) returns an inlet, but I don't see how to elaborate the object-let of a Scheme vector. (I'm trying to avoid writing custom c-type code for my lists.) Thanks, Gregg
_______________________________________________ Cmdist mailing list [email protected] https://cm-mail.stanford.edu/mailman/listinfo/cmdist
