@classmethod<EOL><INDENT>def from_statement(cls, statement):<DEDENT>
components = list(statement)<EOL>if len(components) == <NUM_LIT:1>:<EOL><INDENT>return cls(parse_expression(components[<NUM_LIT:0>]))<EOL><DEDENT>while len(components) > <NUM_LIT:3>:<EOL><INDENT>replaced = False<EOL>for i in range(<NUM_LIT:1>, len(components), <NUM_LIT:2>):<EOL><INDENT>if components[i] in ["<STR_LIT:/>", "<STR_LIT:*>"]:<EOL><INDENT>components[i - <NUM_LIT:1> : i + <NUM_LIT:2>] = [<EOL>AttributeSelection.from_statement(components[i - <NUM_LIT:1> : i + <NUM_LIT:2>])<EOL>]<EOL>replaced = True<EOL>break<EOL><DEDENT><DEDENT>if not replaced:<EOL><INDENT>components[:<NUM_LIT:3>] = [AttributeSelection.from_statement(components[:<NUM_LIT:3>])]<EOL><DEDENT><DEDENT>return cls(<EOL>parse_expression(components[<NUM_LIT:0>]),<EOL>components[<NUM_LIT:1>],<EOL>parse_expression(components[<NUM_LIT:2>]),<EOL>)<EOL>
Factory for creating a Attribute expression