ScannerCommon

dotty.tools.dotc.parsing.Scanners$.ScannerCommon
abstract class ScannerCommon(source: SourceFile)(using x$2: Context) extends CharArrayReader with TokenData

Attributes

Graph
Supertypes
trait TokenData
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Type members

Inherited classlikes

Attributes

Inherited from:
CharArrayReader
Graph
Supertypes
class Object
trait Matchable
class Any

Value members

Abstract methods

def nextToken(): Unit

The token for given name. Either IDENTIFIER or a keyword.

The token for given name. Either IDENTIFIER or a keyword.

Attributes

Concrete methods

def error(msg: String, off: Offset): Unit

Generate an error at the given offset

Generate an error at the given offset

Attributes

def errorButContinue(msg: String, off: Offset): Unit
inline def finishNamed(): Unit

Finish an IDENTIFIER with this.name.

Finish an IDENTIFIER with this.name.

Attributes

def finishNamedToken(idtoken: Token, target: TokenData): Unit

Clear buffer and set name and token. If target is different from this, don't treat identifiers as end tokens.

Clear buffer and set name and token. If target is different from this, don't treat identifiers as end tokens.

Attributes

def incompleteInputError(msg: String): Unit

signal an error where the input ended in the middle of a token

signal an error where the input ended in the middle of a token

Attributes

def isNumberSeparator(c: Char): Boolean
protected def putChar(c: Char): Unit

append Unicode character to "litBuf" buffer

append Unicode character to "litBuf" buffer

Attributes

def removeNumberSeparators(s: String): String
def setStrVal(): Unit

Clear buffer and set string

Clear buffer and set string

Attributes

Inherited methods

def copyFrom(td: TokenData): Unit

Attributes

Inherited from:
TokenData
protected def decodeUni: Boolean

Switch whether unicode should be decoded

Switch whether unicode should be decoded

Attributes

Inherited from:
CharArrayReader
def getc(): Char

Attributes

Inherited from:
CharArrayReader
def isAfterLineEnd: Boolean

Is current token first one after a newline?

Is current token first one after a newline?

Attributes

Inherited from:
TokenData
def isArrow: Boolean

Attributes

Inherited from:
TokenData
def isAtEnd: Boolean

Attributes

Inherited from:
CharArrayReader
def isColon: Boolean

Attributes

Inherited from:
TokenData
def isIdent(name: Name): Boolean

Attributes

Inherited from:
TokenData
def isIdent: Boolean

Attributes

Inherited from:
TokenData
def isNestedEnd: Boolean

Attributes

Inherited from:
TokenData
def isNestedStart: Boolean

Attributes

Inherited from:
TokenData
def isNewLine: Boolean

Attributes

Inherited from:
TokenData
def isOperator: Boolean

Attributes

Inherited from:
TokenData
def isStatSep: Boolean

Attributes

Inherited from:
TokenData
def isUnicodeEscape: Boolean

Is last character a unicode escape \uxxxx?

Is last character a unicode escape \uxxxx?

Attributes

Inherited from:
CharArrayReader
def lookaheadChar(): Char

Attributes

Inherited from:
CharArrayReader

A new reader that takes off at the current character position

A new reader that takes off at the current character position

Attributes

Inherited from:
CharArrayReader
final def nextChar(): Unit

Advance one character; reducing CR;LF pairs to just LF

Advance one character; reducing CR;LF pairs to just LF

Attributes

Inherited from:
CharArrayReader
final def nextRawChar(): Unit

Advance one character, leaving CR;LF pairs intact. This is for use in multi-line strings, so there are no "potential line ends" here.

Advance one character, leaving CR;LF pairs intact. This is for use in multi-line strings, so there are no "potential line ends" here.

Attributes

Inherited from:
CharArrayReader
protected def startFrom: Int

Attributes

Inherited from:
CharArrayReader

Concrete fields

val buf: Array[Char]

the last error offset

the last error offset

Attributes

protected val litBuf: CharBuffer

A character buffer for literals

A character buffer for literals

Attributes

Inherited fields

var base: Int

the base of a number

the base of a number

Attributes

Inherited from:
TokenData
var ch: Char

the last read character

the last read character

Attributes

Inherited from:
CharArrayReader
var charOffset: Int

The offset one past the last read character

The offset one past the last read character

Attributes

Inherited from:
CharArrayReader

The offset before the last read character

The offset before the last read character

Attributes

Inherited from:
CharArrayReader

the offset of the character following the token preceding this one

the offset of the character following the token preceding this one

Attributes

Inherited from:
TokenData

the offset of the newline immediately preceding the token, or -1 if token is not preceded by a newline.

the offset of the newline immediately preceding the token, or -1 if token is not preceded by a newline.

Attributes

Inherited from:
TokenData

The start offset of the current line

The start offset of the current line

Attributes

Inherited from:
CharArrayReader

the name of an identifier

the name of an identifier

Attributes

Inherited from:
TokenData

the offset of the first character of the current token

the offset of the first character of the current token

Attributes

Inherited from:
TokenData
var strVal: String

the string value of a literal

the string value of a literal

Attributes

Inherited from:
TokenData

the next token

the next token

Attributes

Inherited from:
TokenData