def parse_all(self):
assert self.current.value == "<STR_LIT>"<EOL>self.consume(tk.NAME)<EOL>if self.current.value != "<STR_LIT:=>":<EOL><INDENT>raise AllError("<STR_LIT>")<EOL><DEDENT>self.consume(tk.OP)<EOL>if self.current.value not in "<STR_LIT>":<EOL><INDENT>raise AllError("<STR_LIT>")<EOL><DEDENT>self.consume(tk.OP)<EOL>self.all = []<EOL>all_content = "<STR_LIT:(>"<EOL>while self.current.kind != tk.OP or self.current.value not in "<STR_LIT>":<EOL><INDENT>if self.current.kind in (tk.NL, tk.COMMENT):<EOL><INDENT>pass<EOL><DEDENT>elif self.current.kind == tk.STRING or self.current.value == "<STR_LIT:U+002C>":<EOL><INDENT>all_content += self.current.value<EOL><DEDENT>else:<EOL><INDENT>raise AllError(<EOL>"<STR_LIT>".format(<EOL>self.current.kind<EOL>)<EOL>)<EOL><DEDENT>self.stream.move()<EOL><DEDENT>self.consume(tk.OP)<EOL>all_content += "<STR_LIT:)>"<EOL>try:<EOL><INDENT>self.all = eval(all_content, {})<EOL><DEDENT>except BaseException as e:<EOL><INDENT>raise AllError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(all_content, e)<EOL>)<EOL><DEDENT>
Parse the __all__ definition in a module.