def value_assign(self, end_token=None):
while True:<EOL><INDENT>token = self.next()<EOL>t_value = token["<STR_LIT:value>"]<EOL>if end_token:<EOL><INDENT>if t_value == end_token:<EOL><INDENT>raise self.ParseEnd()<EOL><DEDENT>elif t_value == "<STR_LIT:\n>":<EOL><INDENT>continue<EOL><DEDENT><DEDENT>if token["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>return self.make_value(t_value)<EOL><DEDENT>if token["<STR_LIT:type>"] == "<STR_LIT>":<EOL><INDENT>return self.config_function(token)<EOL><DEDENT>elif t_value == "<STR_LIT:[>":<EOL><INDENT>return self.make_list()<EOL><DEDENT>elif t_value == "<STR_LIT:{>":<EOL><INDENT>return self.make_dict()<EOL><DEDENT>elif t_value == "<STR_LIT:(>":<EOL><INDENT>return tuple(self.make_list(end_token="<STR_LIT:)>"))<EOL><DEDENT>else:<EOL><INDENT>self.error("<STR_LIT>", previous=not (end_token))<EOL><DEDENT><DEDENT>
We are expecting a value (literal, list, dict, tuple).
If end_token then we are inside a list, dict or tuple so we are allow
newlines and also check for the end token.