def _parse_from_token_parser(token_parser: TokenParser) -> NameAndValue[Actor]: token_parser.consume_mandatory_keyword( instruction_arguments.ASSIGNMENT_OPERATOR, False) ret_val = token_parser.parse_mandatory_command( _actor_parsers_setup(), concepts.ACTOR_CONCEPT_INFO.singular_name.upper()) token_parser.report_superfluous_arguments_if_not_at_eol() return ret_val
def _parse_from_tokens( self, token_parser: TokenParser) -> InstructionEmbryo[None]: try: token_parser.consume_mandatory_keyword(defs.ASSIGNMENT_IDENTIFIER, False) value = self._parse_value(token_parser) token_parser.report_superfluous_arguments_if_not_at_eol() return _impl.TheInstructionEmbryo(value) except TokenSyntaxError as ex: raise SingleInstructionInvalidArgumentException( std_error_message_text_for_token_syntax_error_from_exception( ex))
def _parse_set(self, token_parser: TokenParser) -> _impl.ModifierSdv: var_name = self._name_parser.parse(token_parser) token_parser.consume_mandatory_keyword(defs.ASSIGNMENT_IDENTIFIER, False) value = self._value_parser.parse_from_token_parser(token_parser) return _impl.ModifierSdvOfSet(var_name, value)