Page MenuHomePhabricator

C#: Consistently use `indent` instead of just `scope_tab` in generators
Open, NormalPublic

Description

With indent we can pass the initial scope size for the generator, allowing a consistent behavior instead of using multiple scope_tabs.

instead of:

bool generate(...)
{
   ...
   if (!as_generator(
       scope_tab << scope_tab << scope_tab << .....
   ...
}

Use

bool generate(...)
{
   auto indent = context_get_indent();
   ...
   if (!as_generator(
       indent << ...
   ...
}

This will make it easier to change the indentation of groups of generators.

lauromoura triaged this task as Normal priority.