@@ -12,6 +12,7 @@ abstract class SwiftTarget < Target
12
12
when AST ::BoolPrimitiveType ; " Bool"
13
13
when AST ::BytesPrimitiveType ; " Data"
14
14
when AST ::VoidPrimitiveType ; " NoReply"
15
+ when AST ::MoneyPrimitiveType ; " Int64"
15
16
else
16
17
raise " BUG! Should handle primitive #{ t.class } "
17
18
end
@@ -38,6 +39,7 @@ abstract class SwiftTarget < Target
38
39
when AST ::StringPrimitiveType ; path
39
40
when AST ::IntPrimitiveType ; path
40
41
when AST ::UIntPrimitiveType ; path
42
+ when AST ::MoneyPrimitiveType ; path
41
43
when AST ::FloatPrimitiveType ; path
42
44
when AST ::DatePrimitiveType ; path
43
45
when AST ::DateTimePrimitiveType ; path
158
160
case t
159
161
when AST ::StringPrimitiveType
160
162
" \"\" "
161
- when AST ::IntPrimitiveType , AST ::UIntPrimitiveType , AST ::FloatPrimitiveType
163
+ when AST ::IntPrimitiveType , AST ::UIntPrimitiveType , AST ::FloatPrimitiveType , AST :: MoneyPrimitiveType
162
164
" 0"
163
165
when AST ::BoolPrimitiveType
164
166
" false"
185
187
186
188
def type_to_json (t : AST ::Type , src : String )
187
189
case t
188
- when AST ::StringPrimitiveType , AST ::IntPrimitiveType , AST ::UIntPrimitiveType , AST ::FloatPrimitiveType , AST ::BoolPrimitiveType
190
+ when AST ::StringPrimitiveType , AST ::IntPrimitiveType , AST ::UIntPrimitiveType , AST ::FloatPrimitiveType , AST ::BoolPrimitiveType , AST :: MoneyPrimitiveType
189
191
" #{ src } "
190
192
when AST ::DatePrimitiveType
191
193
" apiInternal.encodeDate(date: #{ src } )"
0 commit comments