Closed wqh17101 closed 2 years ago
It's a "contextual" decorator whose variable name is just _
. It's defined here : https://github.com/dabeaz/sly/blob/f8fcbb080c4bc4ff14bd30876386edd63d8362cb/sly/yacc.py#L1815
Yeah @hadware I found a red underscore there in pycharm. Although the program works well, i wonder is there anything to remove the red underscore,such as some settings or other alias instead of _
@wqh17101 In PyCharm you can add the following to the top of the Lexer
and Parser
classes to have it ignore those warnings.
# noinspection PyUnresolvedReferences
class MyLexer(sly.Lexer):
@jpsnyder right
such as @_('expr') i don`t know which decorator it used