dotty.tools.dotc.parsing

Members list

Packages

Type members

Classlikes

abstract class CharArrayReader

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
Self type
object JavaParsers

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object JavaScanners

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object JavaTokens extends TokensCommon

Attributes

Supertypes
class TokensCommon
class Object
trait Matchable
class Any
Self type
JavaTokens.type
class Parser extends Phase

Attributes

Companion
object
Supertypes
class Phase
class Object
trait Matchable
class Any
object Parser

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Parser.type
object Parsers

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Parsers.type
object Scanners

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Scanners.type
object ScriptParsers

Performs the following context-free rewritings:

Performs the following context-free rewritings:

  • Places all pattern variables in Bind nodes. In a pattern, for identifiers x:
               x  => x @ _
             x:T  => x @ (_ : T)
  • Removes pattern definitions (PatDef's) as follows: If pattern is a simple (typed) identifier:
      val x = e     ==>  val x = e
      val x: T = e  ==>  val x: T = e
if there are no variables in pattern
      val p = e  ==>  e match (case p => ())
if there is exactly one variable in pattern
      val x_1 = e match (case p => (x_1))
if there is more than one variable in pattern
      val p = e  ==>  private synthetic val t$ = e match (case p => (x_1, ..., x_N))
                      val x_1 = t$._1
                      ...
                      val x_N = t$._N
  • Removes function types as follows:
      (argtpes) => restpe   ==>   scala.Function_n[argtpes, restpe]
  • Wraps naked case definitions in a match as follows:
      { cases }   ==>   (x => x.match {cases}), except when already argument to match

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object Tokens extends TokensCommon

Attributes

Supertypes
class TokensCommon
class Object
trait Matchable
class Any
Self type
Tokens.type
abstract class TokensCommon

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object JavaTokens.type
object Tokens.type

Value members

Concrete methods

def maxPrec: Int
def minPrec: Int
def precedence(operator: Name): Int

Compute the precedence of infix operator operator according to the SLS § 6.12.3. We implement SIP-33 and give type operators the same precedence as term operators.

Compute the precedence of infix operator operator according to the SLS § 6.12.3. We implement SIP-33 and give type operators the same precedence as term operators.

Attributes