Region

abstract class Region(val closedBy: Token)

A Region indicates what encloses the current token. It can be one of the following

InString a string interpolation InParens a pair of parentheses (...) or brackets [...] InBraces a pair of braces { ... } Indented a pair of ... tokens

class Object
trait Matchable
class Any
class InBraces
class InCase
class InParens
class InString
class Indented

Value members

Abstract methods

def outer: Region | Null

The region enclosing this one, or null for the outermost region

The region enclosing this one, or null for the outermost region

Concrete methods

protected def coversIndent(w: IndentWidth): Boolean

A region "covers" an indentation with width if it has width as known indentation width (either as primary, or in case of an Indent region as alternate width).

A region "covers" an indentation with width if it has width as known indentation width (either as primary, or in case of an Indent region as alternate width).

The enclosing region, which is required to exist

The enclosing region, which is required to exist

The indentation width, Zero if not known

The indentation width, Zero if not known

Does width represent an undent of an enclosing indentation region? This is the case if there is an indentation region that goes deeper than width and that is enclosed in a region that contains width as an indentation width.

Does width represent an undent of an enclosing indentation region? This is the case if there is an indentation region that goes deeper than width and that is enclosed in a region that contains width as an indentation width.

Is this region the outermost region?

Is this region the outermost region?

def proposeKnownWidth(width: IndentWidth, lastToken: Token): Unit
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Returns:

a string representation of the object.

Definition Classes
Any

Show open regions as list of lines with decreasing indentations

Show open regions as list of lines with decreasing indentations

inline def withCommasExpected[T](inline op: => T): T

Concrete fields