Generate the code for a while control structure

 @param node [Array] Node code generation data
 @param indent [Fixnum] Size of the indentation to be added
976876
def filter(node, indent)
      # Evaluate and generate node attributes, then process each one to
      # by generating the required attribute code
      attributes = {}
      node[@options].each do |key, attribute|
        attributes[key] = map_attribute key, attribute
      end

      # Get registered filter name
      name = node[@value]

      # Check if filter is registered
      self.error :filter_registered, name unless Filters.filters.has_key? name

      # Load the required filter
      Filters.filters[name].load_filter

      # Render output using the chosen engine
      output = Filters.filters[name].render node[@children]

      # Main output node which contains filter rendered value
      text_node = [:plain, :text, {value: output.rstrip, escaped: false, evaluate: false}, [], nil]

      # If we have a provided filter tag, wrap the text node in the wrapper
      # node tag and further indent
      if (wrapper_tag = Filters.filters[name].options[:tag])
        # Set wrapper tag attributes as evaluable expressions
        atts = {}
        Filters.filters[name].options[:attributes].each do |key, value|
          atts[key] = [:expression, value.inspect, {evaluate: false, escaped: false}]
        end

        # Create the wrapper node containing the output text node as a child
        wrapper_node = [:node, wrapper_tag, {attributes: atts}, [text_node], indent]

        # Begin code generation from the wrapper node
        root wrapper_node, indent
      else
        # Generate code for output text node
        root text_node, indent
      end
    end
1273240
def parse(node)
      node.attributes.each do |key, value|
        case key
        when 'firstLine'
          @first_line_indent = OoxmlSize.new(value.value.to_f)
        when 'left'
          @left_indent = OoxmlSize.new(value.value.to_f)
        when 'right'
          @right_indent = OoxmlSize.new(value.value.to_f)
        when 'hanging'
          @hanging_indent = OoxmlSize.new(value.value.to_f)
        end
      end
      self
    end
218131
private final void writeIndentation() throws IOException {

        // Write indentation only if there is any
        if (_indentation.length() > 0) {
            int count = _elementStackSize - 1;
            for (int i = 0; i < count; i++) {
                _out.write(_indentation);
            }
        }
    }
751545
def _indent(code, by=1):
    """"""
    return "".join(
        ("    " * by if line else "") + line for line in code.splitlines(True)
    )
176640
function indent(node) {
  var next = node;
  var i = 0;
  while (next) {
    ++i;
    next = next.suite || next.parent;
  }
  return Array(i).join('  ');
}
52378
def print_menuconfig_nodes(node, indent):
    
    while node:
        string = node_str(node)
        if string:
            indent_print(string, indent)

        if node.list:
            print_menuconfig_nodes(node.list, indent + 8)

        node = node.next
48362
def evaluate(node, indent)
      # Check if this is a substructure of a control block and remove the last
      # end evaluation if it is
      if node[@value] =~ Settings::END_REMOVAL
        @template.pop if @template[-1] == [:eval, 'end']
      end

      # Check for explicit end node
      if node[@value] =~ Settings::END_EXPLICIT
        Logger.error :compile, @template, :explicit_end, node
      end

      # Evaluate the current expression
      buffer_eval node[@value]

      # If the node has children, evaluate each one of them
      node[@children].each do |child|
        root child, indent + @settings[:indent]
      end if node[@children]

      # Check if the node is actually a block expression
      buffer_eval 'end' if node[@value] =~ Settings::END_INSERTION
    end
477478
def indent_line
      result = false
      level = calculate_indentation
      return result if level.nil?
      @buffer.save_excursion do
        @buffer.beginning_of_line
        @buffer.composite_edit do
          if @buffer.looking_at?(/[ \t]+/)
            s = @buffer.match_string(0)
            break if /\t/ !~ s && s.size == level
            @buffer.delete_region(@buffer.match_beginning(0),
                                  @buffer.match_end(0))
          else
            break if level == 0
          end
          @buffer.indent_to(level)
        end
        result = true
      end
      pos = @buffer.point
      @buffer.beginning_of_line
      @buffer.forward_char while /[ \t]/ =~ @buffer.char_after
      if @buffer.point < pos
        @buffer.goto_char(pos)
      end
      result
    end
79422
function (node) {

    // Search first caller in chain.
    // Ex.:
    //
    // Models <- Identifier
    //   .User
    //   .find()
    //   .exec(function () {
    //   // function body
    // });
    //
    // Looks for 'Models'
    var calleeNode = node.parent; // FunctionExpression
    while (calleeNode.parent &&
           calleeNode.parent.type === 'CallExpression') {
      calleeNode = calleeNode.parent;
    }

    var indent;

    if (calleeNode.parent &&
        (calleeNode.parent.type === 'Property' ||
         calleeNode.parent.type === 'ArrayExpression')) {
      // If function is part of array or object, comma can be put at left
      indent = getNodeIndent(calleeNode, false, true);
    } else {
      // If function is standalone, simple calculate indent
      indent = getNodeIndent(calleeNode);
    }

    indent += indentSize;
    // If function content is not empty
    if (node.body.length > 0) {
      // Calculate left shift position don't require strict indent
      // allow function body allign to (indentSize * X)
      while (getNodeIndent(node.body[0]) > indent) {
        indent += indentSize;
      }
    }

    checkNodesIndent(node.body, indent);

    checkLastNodeLineIndent(node, indent - indentSize);
  }
487659
def rewritten_code
      if rewritten_source.split("\n").length > 1
        "\n\n" + rewritten_source.split("\n").map { |line|
          indent(@node) + line
        }.join("\n")
      else
        "\n" + indent(@node) + rewritten_source
      end
    end
925421
public void setIndent(Integer indent) {
		if (indent == null) {
			remove(OutputKeys.INDENT);
			remove(INDENT_AMT);
			return;
		}

		if (indent < 0) {
			throw Messages.INSTANCE.getIllegalArgumentException(11);
		}

		put(OutputKeys.INDENT, "yes");
		put(INDENT_AMT, indent.toString());
	}
839031
private void indent() throws IOException {
        if (indent>=0) {
            out.write('\n');
            for (int i=indent*2; i>0; ) {
                int len = Math.min(i,INDENT.length);
                out.write(INDENT,0,len);
                i-=len;
            }
        }
    }
612070
private static <I, D> void markAndPropagate(AbstractBaseDTNode<I, D> node, D label) {
        AbstractBaseDTNode<I, D> curr = node;

        while (curr != null && curr.getSplitData() != null) {
            if (!curr.getSplitData().mark(label)) {
                return;
            }
            curr = curr.getParent();
        }
    }
1289625
protected static void indent(StringBuilder buffer, int number, String character) {
		for (int i = 0; i < number; ++i) {
			buffer.append(character);
		}
	}
578066
def _checkIndentationIssue(self, node, node_type, linenoDocstring):
        
        indentDocstring = node.col_offset and node.col_offset or 0
        indentDocstring += len(re.findall(r'\n( *)"""',
                                          node.as_string())[0])
        linesDocstring = node.doc.lstrip("\n").split("\n")
        for nline, lineDocstring in enumerate(linesDocstring):
            if (nline < len(linesDocstring) - 1
                and not lineDocstring.strip()):
                # It's a blank line.
                continue
            if indentDocstring != self._getLineIndent(lineDocstring):
                if node_type == "module":
                    lineno = linenoDocstring
                else:
                    lineno = linenoDocstring + nline + 1
                self.add_message('W9206', line=lineno, node=node)
818220
public void setIndentStep(int indentStep) {
    StringBuilder s = new StringBuilder();
    for (; indentStep > 0; indentStep--)
      s.append(' ');
    setIndentStep(s.toString());
  }
164856
function printNodes(node, indent) {
    indent = indent || 0;

    // This is hacky, but this is just a debugging function anyway
    function print(str, indent, inline) {
        var lines = str.split('\n');

        for(var i=0; i<lines.length; i++) {
            if(lines[i]) {
                if((inline && i > 0) || !inline) {
                    for(var j=0; j<indent; j++) {
                        process.stdout.write(' ');
                    }
                }
            }

            if(i === lines.length-1) {
                process.stdout.write(lines[i]);
            }
            else {
                process.stdout.write(lines[i] + '\n');
            }
        }
    }

    print(node.typename + ': ', indent);

    if(node instanceof NodeList) {
        print('\n');
        lib.each(node.children, function(n) {
            printNodes(n, indent + 2);
        });
    }
    else if(node instanceof CallExtension) {
        print(node.extName + '.' + node.prop);
        print('\n');

        if(node.args) {
            printNodes(node.args, indent + 2);
        }

        if(node.contentArgs) {
            lib.each(node.contentArgs, function(n) {
                printNodes(n, indent + 2);
            });
        }
    }
    else {
        var nodes = null;
        var props = null;

        node.iterFields(function(val, field) {
            if(val instanceof Node) {
                nodes = nodes || {};
                nodes[field] = val;
            }
            else {
                props = props || {};
                props[field] = val;
            }
        });

        if(props) {
            print(JSON.stringify(props, null, 2) + '\n', null, true);
        }
        else {
            print('\n');
        }

        if(nodes) {
            for(var k in nodes) {
                printNodes(nodes[k], indent + 2);
            }
        }

    }
}