@@ -80,7 +80,7 @@ module Twirp {
8080 exists ( ServiceInterfaceType i , PointerType p , TypeEntity te |
8181 p .implements ( i ) and
8282 this = p .getBaseType ( ) and
83- this .getName ( ) .toLowerCase ( ) = i .getName ( ) . toLowerCase ( ) + [ "protobuf" , " json" ] + "client" and
83+ this .getName ( ) .regexpMatch ( "(?i)" + i .getName ( ) + [ "( protobuf| json)" + "client" ) and
8484 te .getType ( ) = this and
8585 te .getDeclaration ( ) .getLocation ( ) .getFile ( ) instanceof ServicesGeneratedFile
8686 )
@@ -94,7 +94,7 @@ module Twirp {
9494 ServiceServerType ( ) {
9595 exists ( ServiceInterfaceType i , TypeEntity te |
9696 this .implements ( i ) and
97- this .getName ( ) .toLowerCase ( ) = i .getName ( ) . toLowerCase ( ) + "server" and
97+ this .getName ( ) .regexpMatch ( "(?i)" + i .getName ( ) + "server" ) and
9898 te .getType ( ) = this and
9999 te .getDeclaration ( ) .getLocation ( ) .getFile ( ) instanceof ServicesGeneratedFile
100100 )
@@ -107,7 +107,7 @@ module Twirp {
107107 class ClientConstructor extends Function {
108108 ClientConstructor ( ) {
109109 exists ( ServiceClientType c |
110- this .getName ( ) .toLowerCase ( ) = " new" + c .getName ( ) . toLowerCase ( ) and
110+ this .getName ( ) .regexpMatch ( "(?i) new" + c .getName ( ) ) and
111111 this .getParameterType ( 0 ) instanceof StringType and
112112 this .getParameterType ( 1 ) .getName ( ) = "HTTPClient" and
113113 this .getDeclaration ( ) .getLocation ( ) .getFile ( ) instanceof ServicesGeneratedFile
@@ -123,7 +123,7 @@ module Twirp {
123123 class ServerConstructor extends Function {
124124 ServerConstructor ( ) {
125125 exists ( ServiceServerType c , ServiceInterfaceType i |
126- this .getName ( ) .toLowerCase ( ) = " new" + c .getName ( ) . toLowerCase ( ) and
126+ this .getName ( ) .regexpMatch ( "(?i) new" + c .getName ( ) ) and
127127 this .getParameterType ( 0 ) = i .getNamedType ( ) and
128128 this .getDeclaration ( ) .getLocation ( ) .getFile ( ) instanceof ServicesGeneratedFile
129129 )
0 commit comments