-
Notifications
You must be signed in to change notification settings - Fork 19
/
template.stencil
56 lines (54 loc) · 2.89 KB
/
template.stencil
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// LanguageDSL.swift
// ModelGen
//
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen
// Copyright © {% now "yyyy" %} Tyler Thompson. All rights reserved.
//
{% for language in files[0].document.data %}
{% if not language == 'en' %}
//{{files[0].document.data[language].name}}
//Types
{% for featureName in files[0].document.data[language].feature %}
public typealias {{language | uppercase | swiftIdentifier }}_{{ featureName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = Feature
{% endfor %}
{% for scenarioName in files[0].document.data[language].scenario %}
public typealias {{language | uppercase | swiftIdentifier}}_{{ scenarioName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = Scenario
{% endfor %}
{% for scenarioOutlineName in files[0].document.data[language].scenarioOutline %}
public typealias {{language | uppercase | swiftIdentifier}}_{{ scenarioOutlineName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = ScenarioOutline
{% endfor %}
{% for backgroundName in files[0].document.data[language].background %}
public typealias {{language | uppercase | swiftIdentifier}}_{{ backgroundName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = Background
{% endfor %}
{% for ruleName in files[0].document.data[language].rule %}
public typealias {{language | uppercase | swiftIdentifier}}_{{ ruleName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = Rule
{% endfor %}
//Steps
{% for givenName in files[0].document.data[language].given %}
{% if not givenName == '* ' %}
public typealias {{language | uppercase | swiftIdentifier}}_{{ givenName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = GivenStep
{% endif %}
{% endfor %}
{% for whenName in files[0].document.data[language].when %}
{% if not whenName == '* ' %}
public typealias {{language | uppercase | swiftIdentifier}}_{{ whenName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = WhenStep
{% endif %}
{% endfor %}
{% for thenName in files[0].document.data[language].then %}
{% if not thenName == '* ' %}
public typealias {{language | uppercase | swiftIdentifier}}_{{ thenName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = ThenStep
{% endif %}
{% endfor %}
{% for andName in files[0].document.data[language].and %}
{% if not andName == '* ' %}
public typealias {{language | uppercase | swiftIdentifier}}_{{ andName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = AndStep
{% endif %}
{% endfor %}
{% for butName in files[0].document.data[language].but %}
{% if not butName == '* ' %}
public typealias {{language | uppercase | swiftIdentifier}}_{{ butName | swiftIdentifier | snakeToCamelCase | escapeReservedKeywords }} = ButStep
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}