github krzysztofzablocki/Sourcery 0.5.2

latest releases: 2.2.4, 2.2.3, 2.2.2...
7 years ago

New Features

  • Added support for ImplicitlyUnwrappedOptional
  • actualTypeName property of Method.Parameter, Variable, Enum.Case.AssociatedValue, TupleType.Element now returns typeName if type is not a type alias
  • Enum now contains type information for its raw value type. rawType now return Type object, rawTypeName returns its TypeName
  • Added annotated filter to filter by annotations
  • Added negative filters counterparts
  • Added support for attributes, i.e. @escaping
  • Experimental support for Swift Templates
<% for type in types.classes { %>
    extension <%= type.name %>: Equatable {}

    <% if type.annotations["showComment"] != nil { %> // <%= type.name %> has Annotations <% } %>

        func == (lhs: <%= type.name %>, rhs: <%= type.name %>) -> Bool {
    <% for variable in type.variables { %> if lhs.<%= variable.name %> != rhs.<%= variable.name %> { return false }
        <% } %>
        return true
    }
<% } %>

Don't miss a new Sourcery release

NewReleases is sending notifications on new releases.