Skip to content

Indention of function declarations #94

Closed

Description

@krlmlr

Example:

a <- function(x, y,
              z)
{
}

To achieve this, we could:

  1. When processing z, memoize the ID of x as a reference for the indent depth (because we can't know how deep x will be indented)
  2. After applying all transformers, convert relative indents to absolute indents with a "pre" visitor
  3. Flatten the nested structure with a "post" visitor
  4. In the flat structure, update the absolute indention depth of z with that of x with a lookup in the flat structure
  5. Serialize

We could omit step 3 if the reference token is always at the same level in the nested structure.

Activity

  1. lorenzwalthert commented on Jul 31, 2017

    @lorenzwalthert
    Collaborator

    Closed in favour of the more general #66

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions