8000 Add `define` macro with first argument treated as `this` to enable chaining · Issue #121 · qwertie/ecsharp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Add define macro with first argument treated as this to enable chaining #121
Open
@dadhi

Description

@dadhi

I want to be able chain the output produced by define macro, e.g.

define AppendCsv($strBuilder, $list, $itemStr) {
     for (var i = 0; i < $list.Count, ++i)
         (i == 0 ? strBuilder : strBuilder.Append(", "))
             .Append($itemStr($list[i]));
     return $strBuilder;
}

string Curly(string x) => "{"+x+"}";
s.Append("(").AppendCsv(args, Curly).Append(")");

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0