# Path: lib/robot/parsing/comments.py
# class CommentCache(object):
# 
#     def __init__(self):
#         self._comments = []
# 
#     def add(self, comment):
#         self._comments.append(comment)
# 
#     def consume_with(self, function):
#         map(function, self._comments)
#         self.__init__()
# 
# class Comments(object):
# 
#     def __init__(self):
#         self._comments = []
# 
#     def add(self, row):
#         if row.comments:
#             self._comments.extend(c.strip() for c in row.comments if c.strip())
# 
#     @property
#     def value(self):
#         return self._comments
# 
# Path: lib/robot/parsing/settings.py
# class Documentation(Setting):
# 
#     def _set_initial_value(self):
#         self.value = ''
# 
#     def _populate(self, value):
#         self.value = self._concat_string_with_value(self.value, value)
# 
#     def _string_value(self, value):
#         return value if isinstance(value, basestring) else ''.join(value)
# 
#     def _data_as_list(self):
#         return [self.setting_name, self.value]
# 
# class MetadataList(_DataList):
# 
#     def populate(self, name, value, comment):
#         self._add(Metadata(self._parent, name, value, comment, joined=True))


import re
from .comments import CommentCache, Comments
from .settings import Documentation, MetadataList
                return NullPopulator()
            if setter.im_class is Documentation:
                return DocumentationPopulator(setter)
            return SettingPopulator(setter)
        if row.starts_for_loop():
            return ForLoopPopulator(self._test_or_uk.add_for_loop)
        return StepPopulator(self._test_or_uk.add_step)

    def _continues(self, row):
        return row.is_continuing() and self._populator or \
            (isinstance(self._populator, ForLoopPopulator) and row.is_indented())

    def _setting_setter(self, row):
        setting_name = row.test_or_user_keyword_setting_name()
        return self._test_or_uk.get_setter(setting_name)


class TestCasePopulator(_TestCaseUserKeywordPopulator):
    _item_type = 'test case'


class UserKeywordPopulator(_TestCaseUserKeywordPopulator):
    _item_type = 'keyword'


class _PropertyPopulator(Populator):

    def __init__(self, setter):
        self._setter = setter
        self._value = []

# Path: lib/robot/parsing/comments.py
# class CommentCache(object):
# 
#     def __init__(self):
#         self._comments = []
# 
#     def add(self, comment):
#         self._comments.append(comment)
# 
#     def consume_with(self, function):
#         map(function, self._comments)
#         self.__init__()
# 
# class Comments(object):
# 
#     def __init__(self):
#         self._comments = []
# 
#     def add(self, row):
#         if row.comments:
#             self._comments.extend(c.strip() for c in row.comments if c.strip())
# 
#     @property
#     def value(self):
#         return self._comments
# 
# Path: lib/robot/parsing/settings.py
# class Documentation(Setting):
# 
#     def _set_initial_value(self):
#         self.value = ''
# 
#     def _populate(self, value):
#         self.value = self._concat_string_with_value(self.value, value)
# 
#     def _string_value(self, value):
#         return value if isinstance(value, basestring) else ''.join(value)
# 
#     def _data_as_list(self):
#         return [self.setting_name, self.value]
# 
# class MetadataList(_DataList):
# 
#     def populate(self, name, value, comment):
#         self._add(Metadata(self._parent, name, value, comment, joined=True))


# Path: lib/robot/parsing/tablepopulators.py
import re
from .comments import CommentCache, Comments
from .settings import Documentation, MetadataList

                return NullPopulator()
            if setter.im_class is Documentation:
                return DocumentationPopulator(setter)
            return SettingPopulator(setter)
        if row.starts_for_loop():
            return ForLoopPopulator(self._test_or_uk.add_for_loop)
        return StepPopulator(self._test_or_uk.add_step)

    def _continues(self, row):
        return row.is_continuing() and self._populator or \
            (isinstance(self._populator, ForLoopPopulator) and row.is_indented())

    def _setting_setter(self, row):
        setting_name = row.test_or_user_keyword_setting_name()
        return self._test_or_uk.get_setter(setting_name)


class TestCasePopulator(_TestCaseUserKeywordPopulator):
    _item_type = 'test case'


class UserKeywordPopulator(_TestCaseUserKeywordPopulator):
    _item_type = 'keyword'


class _PropertyPopulator(Populator):

    def __init__(self, setter):
        self._setter = setter
        self._value = []

        self._comments = Comments()