Skip to content

WriterBase should allow writing to multiple locations in the string #8

@zspitz

Description

@zspitz

Currently, parameter declarations for the factory method formatter look like this:

Lambda(
    new [] {
        var s = Parameter(typeof(string), "s")
    }, 
    s
)

Ideally all the variable declarations should be either before the Lambda method call:

var s = Parameter(typeof(string), "s");

Lambda(
    ...

or perhaps after; not intermingled with the lambda call.

In order to do this, and still maintain the span for each expression tree node, we would have to either

  1. allow moving the insertion point to somewhere else in the string builder, and then continually modify the spans from these other texts as more text is inserted at the original point, OR
  2. allow creating another string builder, and then modifying the resulting span to be offset from the final results of the original string builder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions