dotty.tools.dotc.parsing.Scanners

Scanner

Related Doc: package Scanners

class Scanner extends ScannerCommon

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Scanner
  2. ScannerCommon
  3. TokenData
  4. CharArrayReader
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Scanner(source: SourceFile, startFrom: Offset = 0)(implicit ctx: Context)

Type Members

  1. class CharArrayLookaheadReader extends CharArrayReader

    Definition Classes
    CharArrayReader

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. def adjustSepRegions(lastToken: Token): Unit

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. var base: Int

    the base of a number

    the base of a number

    Definition Classes
    TokenData
  7. val buf: Array[Char]

    Definition Classes
    ScannerCommonCharArrayReader
  8. var ch: Char

    the last read character

    the last read character

    Definition Classes
    CharArrayReader
  9. def charLitOr(op: () ⇒ Unit): Unit

    Parse character literal if current character is followed by \', or follow with given op and return a symbol literal token

  10. var charOffset: Int

    The offset one past the last read character

    The offset one past the last read character

    Definition Classes
    CharArrayReader
  11. def charVal: Char

    Convert current strVal to char value

    Convert current strVal to char value

    Definition Classes
    ScannerCommon
  12. def checkNoLetter(): Unit

  13. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. val commentBuf: StringBuilder

    A buffer for comments

  15. def copyFrom(td: TokenData): Unit

    Definition Classes
    TokenData
  16. def decodeUni: Boolean

    Switch whether unicode should be decoded

    Switch whether unicode should be decoded

    Attributes
    protected
    Definition Classes
    CharArrayReader
  17. def enterBlock(): Unit

    Adds level of nesting to docstrings

  18. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  20. var errOffset: Offset

    the last error offset

    the last error offset

    Definition Classes
    ScannerCommon
  21. def error(msg: String, off: Offset = offset): Unit

    Generate an error at the given offset

    Generate an error at the given offset

    Definition Classes
    ScannerCommonCharArrayReader
  22. def exitBlock(): Unit

    Removes level of nesting for docstrings

  23. final def fetchToken(): Unit

    read next token, filling TokenData fields of Scanner.

    read next token, filling TokenData fields of Scanner.

    Attributes
    protected
  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def finishNamed(idtoken: Token = IDENTIFIER, target: TokenData = this): Unit

    Clear buffer and set name and token

    Clear buffer and set name and token

    Definition Classes
    ScannerCommon
  26. def floatVal: Double

    Definition Classes
    ScannerCommon
  27. def floatVal(negated: Boolean): Double

    Convert current strVal, base to double value

    Convert current strVal, base to double value

    Definition Classes
    ScannerCommon
  28. def flushBuf(buf: StringBuilder): String

    Return buffer contents and clear

    Return buffer contents and clear

    Definition Classes
    ScannerCommon
  29. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  30. def getDocComment(pos: Int): Option[Comment]

    Returns the closest docstring preceding the position supplied

  31. def getFraction(): Unit

    read fractional part and exponent of floating point number if one is present.

    read fractional part and exponent of floating point number if one is present.

    Attributes
    protected
  32. def getLitChar(): Unit

    copy current character into litBuf, interpreting any escape sequences, and advance to next character.

    copy current character into litBuf, interpreting any escape sequences, and advance to next character.

    Attributes
    protected
  33. def getNumber(): Unit

    Read a number into strVal and set base

    Read a number into strVal and set base

    Attributes
    protected
  34. def getc(): Char

    Definition Classes
    CharArrayReader
  35. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  36. 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

    Definition Classes
    ScannerCommon
  37. def intVal: Long

    Definition Classes
    ScannerCommon
  38. def intVal(negated: Boolean): Long

    Convert current strVal, base to long value This is tricky because of max negative value.

    Convert current strVal, base to long value This is tricky because of max negative value.

    Definition Classes
    ScannerCommon
  39. def invalidEscape(): Unit

    Attributes
    protected
  40. def isAfterLineEnd(): Boolean

    Is current token first one after a newline?

  41. def isAtEnd: Boolean

    Definition Classes
    CharArrayReader
  42. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  43. def isUnicodeEscape: Boolean

    Is last character a unicode escape \\uxxxx?

    Is last character a unicode escape \\uxxxx?

    Definition Classes
    CharArrayReader
  44. val keepComments: Boolean

  45. var lastCharOffset: Int

    The offset before the last read character

    The offset before the last read character

    Definition Classes
    CharArrayReader
  46. var lastLineStartOffset: Int

    The start offset of the line before the current one

    The start offset of the line before the current one

    Definition Classes
    CharArrayReader
  47. var lastOffset: Offset

    the offset of the character following the token preceding this one

    the offset of the character following the token preceding this one

    Definition Classes
    TokenData
  48. var lineStartOffset: Int

    The start offset of the current line

    The start offset of the current line

    Definition Classes
    CharArrayReader
  49. val litBuf: StringBuilder

    A character buffer for literals

    A character buffer for literals

    Definition Classes
    ScannerCommon
  50. def lookaheadReader: CharArrayLookaheadReader

    A new reader that takes off at the current character position

    A new reader that takes off at the current character position

    Definition Classes
    CharArrayReader
  51. var name: TermName

    the name of an identifier

    the name of an identifier

    Definition Classes
    TokenData
  52. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  53. val next: TokenData

    we need one token lookahead and one token history

  54. final def nextChar(): Unit

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

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

    Definition Classes
    CharArrayReader
  55. final def nextRawChar(): Unit

    Advance one character, leaving CR;LF pairs intact.

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

    Definition Classes
    CharArrayReader
  56. def nextToken(): Unit

    Produce next token, filling TokenData fields of Scanner.

  57. final def notify(): Unit

    Definition Classes
    AnyRef
  58. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  59. var offset: Offset

    the offset of the first character of the current token

    the offset of the first character of the current token

    Definition Classes
    TokenData
  60. def postProcessToken(): Unit

  61. def putChar(c: Char): Unit

    append Unicode character to "litBuf" buffer

    append Unicode character to "litBuf" buffer

    Attributes
    protected
    Definition Classes
    ScannerCommon
  62. def resume(lastToken: Token): Unit

  63. var sepRegions: List[Token]

    a stack of tokens which indicates whether line-ends can be statement separators also used for keeping track of nesting levels.

    a stack of tokens which indicates whether line-ends can be statement separators also used for keeping track of nesting levels. We keep track of the closing symbol of a region. This can be RPAREN if region starts with '(' RBRACKET if region starts with '[' RBRACE if region starts with '{' ARROW if region starts with case' STRINGLIT if region is a string interpolation expression starting with '${' (the STRINGLIT appears twice in succession on the stack iff the expression is a multiline string literal).

  64. def setStrVal(): Unit

    Clear buffer and set string

    Clear buffer and set string

    Definition Classes
    ScannerCommon
  65. def show: String

  66. def skipToken(): Offset

    read next token and return last offset

  67. val startFrom: Offset

    Definition Classes
    ScannerCharArrayReader
  68. var strVal: String

    the string value of a literal

    the string value of a literal

    Definition Classes
    TokenData
  69. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  70. def toString(): String

    Definition Classes
    Scanner → AnyRef → Any
  71. def toToken(idx: Int): Token

    Definition Classes
    ScannerScannerCommon
  72. var token: Token

    the next token

    the next token

    Definition Classes
    TokenData
  73. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ScannerCommon

Inherited from TokenData

Inherited from CharArrayReader

Inherited from AnyRef

Inherited from Any

Ungrouped