except EOFError:
pass
except UnexpectedCharacters as e:
# In the contextual lexer, UnexpectedCharacters can mean that the terminal is defined, but not in the current context.
# This tests the input against the global context, to provide a nicer error.
try:
last_token = lexer_state.last_token # Save last_token. Calling root_lexer.next_token will change this to the wrong token
token = self.root_lexer.next_token(lexer_state, parser_state)
> raise UnexpectedToken(token, e.allowed, state=parser_state, token_history=[last_token], terminals_by_name=self.root_lexer.terminals_by_name)
E lark.exceptions.UnexpectedToken: Unexpected token Token('DOT', '.') at line 7, column 28.
E Expected one of:
E * LSQB
E * COMMA
E * RPAR
E Previous tokens: [Token('NAME', 'lib1')]
venv/lib/python3.11/site-packages/lark/lexer.py:674: UnexpectedToken
How can it be fixed?
Not sure, but it seems that the tuple_def in the grammar isn't correct because it doesn't allow for imported types:
Version Information
vyper --version
):0.4.0b6+commit.e29a584c
What's your issue about?
Parsing:
leads to:
How can it be fixed?
Not sure, but it seems that the
tuple_def
in the grammar isn't correct because it doesn't allow for imported types:smth like this might work? didn't test