This fixes a bug where the grammar allowed dot accessors to be any
variable type. This results in the filters that were meant for the
variable that was being accessed to be captured by the accessor
itself, which generated an unexpected and invalid AST.
variable_accessor_dot\r
=\r
accessor_type:`dot`\r
- "." parameter:variable_identifier\r
+ "." parameter:IDENTIFIER\r
;\r
\r
variable_accessor_call_parameters\r
accessor_node.arg = parse_variable(ast['parameter'])\r
elif accessor_type == 'dot':\r
accessor_node = nodes.Getattr()\r
- accessor_node.attr = ast['parameter']['variable']\r
+ accessor_node.attr = ast['parameter']\r
\r
accessor_node.node = node\r
accessor_node.ctx = "load"\r