Permalink
ae827dc Oct 5, 2018
2 contributors

Users who have contributed to this file

@ilyapuchka @Antondomashnev
executable file 11 lines (10 sloc) 360 Bytes
{% for enum in types.implementing.AutoCases|enum %}
{{ enum.accessLevel }} extension {{ enum.name }} {
static let count: Int = {{ enum.cases.count }}
{% if not enum.hasAssociatedValues %}
static let allCases: [{{ enum.name }}] = [
{% for case in enum.cases %} .{{ case.name }}{{ ',' if not forloop.last }}
{% endfor %}]
{% endif %}
}
{% endfor %}