def list(self):
start = self.tokens.matched.start<EOL>if self.tokens.accept(common_grammar.rbracket):<EOL><INDENT>return ast.Tuple(start=start, end=self.tokens.matched.end,<EOL>source=self.original)<EOL><DEDENT>elements = [self.expression()]<EOL>while self.tokens.accept(common_grammar.comma):<EOL><INDENT>elements.append(self.expression())<EOL><DEDENT>self.tokens.expect(common_grammar.rbracket)<EOL>return ast.Tuple(*elements, start=start, end=self.tokens.matched.end,<EOL>source=self.original)<EOL>
Parse a list (tuple) which can contain any combination of types.