File tree 2 files changed +6
-2
lines changed
src/dotty/tools/dotc/parsing
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,8 @@ object JavaParsers {
175
175
176
176
/** Consume one token of the specified type, or
177
177
* signal an error if it is not there.
178
+ *
179
+ * @return The offset at the start of the token to accept
178
180
*/
179
181
def accept (token : Int ): Int = {
180
182
val offset = in.offset
Original file line number Diff line number Diff line change @@ -227,14 +227,16 @@ object Parsers {
227
227
228
228
/** Consume one token of the specified type, or
229
229
* signal an error if it is not there.
230
+ *
231
+ * @return The offset at the start of the token to accept
230
232
*/
231
233
def accept (token : Int ): Int = {
232
234
val offset = in.offset
233
235
if (in.token != token) {
234
236
syntaxErrorOrIncomplete(expectedMsg(token))
235
237
}
236
238
if (in.token == token) in.nextToken()
237
- in. offset
239
+ offset
238
240
}
239
241
240
242
/** semi = nl {nl} | `;'
@@ -1019,7 +1021,7 @@ object Parsers {
1019
1021
val uscoreStart = in.skipToken()
1020
1022
if (isIdent(nme.raw.STAR )) {
1021
1023
in.nextToken()
1022
- if (in.token != RPAREN ) syntaxError(" `_*' can be used only for last argument" )
1024
+ if (in.token != RPAREN ) syntaxError(" `_*' can be used only for last argument" , uscoreStart )
1023
1025
Typed (t, atPos(uscoreStart) { Ident (tpnme.WILDCARD_STAR ) })
1024
1026
} else {
1025
1027
syntaxErrorOrIncomplete(" `*' expected" ); t
You can’t perform that action at this time.
0 commit comments