Region

dotty.tools.dotc.parsing.Scanners$.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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class InBraces
class InCase
class InParens
class InString
class Indented

Members list

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

Attributes

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).

Attributes

The enclosing region, which is required to exist

The enclosing region, which is required to exist

Attributes

The indentation width, Zero if not known

The indentation width, Zero if not known

Attributes

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.

Attributes

Is this region the outermost region?

Is this region the outermost region?

Attributes

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.

Attributes

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

Attributes

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

Concrete fields

var knownWidth: IndentWidth | Null