Class

org.scalafmt.internal

FormatOps

Related Doc: package internal

Permalink

class FormatOps extends AnyRef

Helper functions for generating splits/policies for a given tree.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FormatOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FormatOps(tree: Tree, style: ScalaStyle)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def OneArgOneLineSplit(open: Delim)(implicit line: Line): Policy

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def chainOptimalToken(chain: Vector[Select]): Token

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def defnSiteLastToken(tree: Tree): Token

    Permalink
  9. val dequeueSpots: Set[TokenHash]

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def findFirst(start: FormatToken, end: Token)(f: (FormatToken) ⇒ Boolean): Option[FormatToken]

    Permalink
    Annotations
    @tailrec()
  14. def functionExpire(function: Function): Token

    Permalink
  15. def getArrow(caseStat: Case): Token

    Permalink
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getExcludeIfEndingWithBlock(end: Token): Set[Range]

    Permalink
  18. def getRightAttachedComment(token: Token): Token

    Permalink
  19. def getSelectsLastToken(dot: .): Token

    Permalink

    Returns last token of select, handles case when select's parent is apply.

    Returns last token of select, handles case when select's parent is apply.

    For example, in: foo.bar[T](1, 2) the last token is the final )

    dot

    the dot owned by the select.

  20. def gets2x(tok: FormatToken): Boolean

    Permalink
  21. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  22. def insideBlock(start: FormatToken, end: Token, matches: (Token) ⇒ Boolean): Set[Token]

    Permalink
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def isJsNative(jsToken: Token): Boolean

    Permalink

    js.native is very special in Scala.js.

    js.native is very special in Scala.js.

    Context: https://github.com/olafurpg/scalafmt/issues/108

  25. def isMarginizedString(token: Token): Boolean

    Permalink
  26. def isTripleQuote(token: Token): Boolean

    Permalink
  27. def lastTokenInChain(chain: Vector[Select]): Token

    Permalink
  28. lazy val leftTok2tok: Map[Token, FormatToken]

    Permalink
  29. val matchingParentheses: Map[TokenHash, Token]

    Permalink
  30. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. def next(tok: FormatToken): FormatToken

    Permalink
  32. final def nextNonComment(curr: FormatToken): FormatToken

    Permalink
    Annotations
    @tailrec()
  33. def noOptimizationZones(tree: Tree): Set[Token]

    Permalink
  34. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  36. def owners(token: Token): Tree

    Permalink
    Annotations
    @inline()
  37. val ownersMap: Map[TokenHash, Tree]

    Permalink
  38. val packageTokens: Set[Token]

    Permalink
  39. def parensRange(open: Token): Range

    Permalink
  40. def penalizeAllNewlines(expire: Token, penalty: Int)(implicit line: Line): Policy

    Permalink
  41. def penalizeNewlineByNesting(from: Token, to: Token)(implicit line: Line): Policy

    Permalink
  42. def prev(tok: FormatToken): FormatToken

    Permalink
  43. final def rhsOptimalToken(start: FormatToken): Token

    Permalink
    Annotations
    @tailrec()
  44. def selectExpire(dot: .): Token

    Permalink

    Returns the expire token for the owner of dot.

    Returns the expire token for the owner of dot.

    If the select is part of an apply like

    foo.bar { ... }

    the expire token is the closing }, otherwise it's bar.

  45. final def startsStatement(tok: FormatToken): Boolean

    Permalink
    Annotations
    @tailrec()
  46. val statementStarts: Map[TokenHash, Tree]

    Permalink
  47. val style: ScalaStyle

    Permalink
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  49. def templateCurly(template: Template): Option[Token]

    Permalink
  50. def templateCurly(owner: Tree): Token

    Permalink
  51. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  52. lazy val tok2idx: Map[FormatToken, Int]

    Permalink
  53. val tokens: Array[FormatToken]

    Permalink
  54. val tree: Tree

    Permalink
  55. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped