setNext method Null safety

  1. @override
Token setNext(
  1. Token token
)
inherited

Set the next token in the token stream to the given token. This has the side-effect of setting this token to be the previous token for the given token. Return the token that was passed in.

Implementation

@override
Token setNext(Token token) {
  next = token;
  token.previous = this;
  token.beforeSynthetic = this;
  return token;
}