Test two objects for inequality.
Test two objects for inequality.
true
if !(this == that), false otherwise.
Equivalent to x.hashCode
except for boxed numeric types and null
.
Equivalent to x.hashCode
except for boxed numeric types and null
.
For numerics, it returns a hash value which is consistent
with value equality: if two value type instances compare
as true, then ## will produce the same hash value for each
of them.
For null
returns a hashcode where null.hashCode
throws a
NullPointerException
.
a hash value consistent with ==
The expression x == that
is equivalent to if (x eq null) that eq null else x.equals(that)
.
The expression x == that
is equivalent to if (x eq null) that eq null else x.equals(that)
.
true
if the receiver object is equivalent to the argument; false
otherwise.
Insert or delete a brace, if a patch exists for this offset
Insert or delete a brace, if a patch exists for this offset
Cast the receiver object to be of type T0
.
Cast the receiver object to be of type T0
.
Note that the success of a cast at runtime is modulo Scala's erasure semantics.
Therefore the expression 1.asInstanceOf[String]
will throw a ClassCastException
at
runtime, while the expression List(1).asInstanceOf[List[String]]
will not.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the requested type.
the receiver object.
ClassCastException
if the receiver object is not an instance of the erasure of type T0
.
the base of a number
the base of a number
The list of matching top-level brace pairs (each of which may contain nested brace pairs).
A character buffer for literals
A character buffer for literals
the last read character
the last read character
Parse character literal if current character is followed by \', or follow with given op and return a symbol literal token
Parse character literal if current character is followed by \', or follow with given op and return a symbol literal token
The offset one past the last read character
The offset one past the last read character
Convert current strVal to char value
Convert current strVal to char value
Create a copy of the receiver object.
Create a copy of the receiver object.
The default implementation of the clone
method is platform dependent.
a copy of the receiver object.
not specified by SLS as a member of AnyRef
To prevent doc comments attached to expressions from leaking out of scope onto the next documentable entity, they are discarded upon passing a right brace, bracket, or parenthesis.
To prevent doc comments attached to expressions from leaking out of scope onto the next documentable entity, they are discarded upon passing a right brace, bracket, or parenthesis.
Determines whether this scanner should emit identifier deprecation warnings, e.g.
Determines whether this scanner should emit identifier deprecation warnings,
e.g. when seeing macro
or then
, which are planned to become keywords in future versions of Scala.
Tests whether the argument (that
) is a reference to the receiver object (this
).
Tests whether the argument (that
) is a reference to the receiver object (this
).
The eq
method implements an equivalence relation on
non-null instances of AnyRef
, and has three additional properties:
x
and y
of type AnyRef
, multiple invocations of
x.eq(y)
consistently returns true
or consistently returns false
.x
of type AnyRef
, x.eq(null)
and null.eq(x)
returns false
.null.eq(null)
returns true
. When overriding the equals
or hashCode
methods, it is important to ensure that their behavior is
consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they
should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).
true
if the argument is a reference to the receiver object; false
otherwise.
The equality method for reference types.
An error routine to call on bad unicode escapes \\uxxxx.
An error routine to call on bad unicode escapes \\uxxxx.
read next token, filling TokenData fields of Scanner.
read next token, filling TokenData fields of Scanner.
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the finalize
method is invoked, as
well as the interaction between finalize
and non-local returns
and exceptions, are all platform dependent.
not specified by SLS as a member of AnyRef
Convert current strVal, base to double value
Convert current strVal, base to double value
A representation that corresponds to the dynamic class of the receiver object.
A representation that corresponds to the dynamic class of the receiver object.
The nature of the representation is platform dependent.
a representation that corresponds to the dynamic class of the receiver object.
not specified by SLS as a member of AnyRef
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.
copy current character into cbuf, interpreting any escape sequences, and advance to next character.
copy current character into cbuf, interpreting any escape sequences, and advance to next character.
Read a number into strVal.
Read a number into strVal.
The base
can be 8, 10 or 16, where base 8 flags a leading zero.
For ints, base 8 is legal only for the case of exactly one zero.
The hashCode method for reference types.
overridden in UnitScanners
overridden in UnitScanners
Can token start a statement?
Can token start a statement?
Can token end a statement?
Can token end a statement?
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
Initialization method: read first char, then first token
Initialization method: read first char, then first token
Convert current strVal, base to long value.
Convert current strVal, base to long value. This is tricky because of max negative value.
Conversions in base 10 and 16 are supported. As a permanent migration
path, attempts to write base 8 literals except 0
emit a verbose error.
Test whether the dynamic type of the receiver object is T0
.
Test whether the dynamic type of the receiver object is T0
.
Note that the result of the test is modulo Scala's erasure semantics.
Therefore the expression 1.isInstanceOf[String]
will return false
, while the
expression List(1).isInstanceOf[List[String]]
will return true
.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the specified type.
true
if the receiver object is an instance of erasure of type T0
; false
otherwise.
Is last character a unicode escape \\uxxxx?
Is last character a unicode escape \\uxxxx?
The start offset of the line before the current one
The start offset of the line before the current one
the offset of the character following the token preceding this one
the offset of the character following the token preceding this one
The offset of the first token on this line, or next following line if blank
The start offset of the current line
The start offset of the current line
A new reader that takes off at the current character position
A new reader that takes off at the current character position
the name of an identifier
the name of an identifier
Equivalent to !(this eq that)
.
Equivalent to !(this eq that)
.
true
if the argument is not a reference to the receiver object; false
otherwise.
we need one token lookahead and one token history
we need one token lookahead and one token history
Advance one character; reducing CR;LF pairs to just LF
Advance one character; reducing CR;LF pairs to just LF
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.
Produce next token, filling TokenData fields of Scanner.
Produce next token, filling TokenData fields of Scanner.
Get next token, and allow the otherwise deprecated ident name
Get next token, and allow the otherwise deprecated ident name
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
the offset of the first character of the current token
the offset of the first character of the current token
overridden in UnitScanners
overridden in UnitScanners
append Unicode character to "cbuf" buffer
append Unicode character to "cbuf" buffer
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).
read next token and return last offset
read next token and return last offset
the string value of a literal
the string value of a literal
generate an error at the current token offset
generate an error at the current token offset
generate an error at the given offset
generate an error at the given offset
Creates a String representation of this object.
the next token
the next token