>
in type context is always reduced to the numerical comparison operator
#31
Labels
bug
Something isn't working
Without this rule for > characters, two consecutive > brackets in a type such as List would be tokenized as the signed right shift operator >>, while three consecutive > brackets in a type such as List<List> would be tokenized as the unsigned right shift operator >>>. Worse, the tokenization of four or more consecutive > brackets in a type such as List<List<List>> would be ambiguous, as various combinations of >, >>, and >>> tokens could represent the >>>> characters.
Ref.: https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html
From agcom/lex-java#8.
The text was updated successfully, but these errors were encountered: