Given the following input, the RobotFramework lexer throws away the empty index (empty braces):
Input:
*** Variables ***
@{test}[]
Output:
*** Variables ***
@{test}
Note the missing braces at the end.
This can easily be verified using the pygments online demo by selecting the RobotFramework lexer and feeding it with the input above.
A fix is available here: #1921