@@ -80,7 +80,7 @@ module Twirp {
80
80
exists ( ServiceInterfaceType i , PointerType p , TypeEntity te |
81
81
p .implements ( i ) and
82
82
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
84
84
te .getType ( ) = this and
85
85
te .getDeclaration ( ) .getLocation ( ) .getFile ( ) instanceof ServicesGeneratedFile
86
86
)
@@ -94,7 +94,7 @@ module Twirp {
94
94
ServiceServerType ( ) {
95
95
exists ( ServiceInterfaceType i , TypeEntity te |
96
96
this .implements ( i ) and
97
- this .getName ( ) .toLowerCase ( ) = i .getName ( ) . toLowerCase ( ) + "server" and
97
+ this .getName ( ) .regexpMatch ( "(?i)" + i .getName ( ) + "server" ) and
98
98
te .getType ( ) = this and
99
99
te .getDeclaration ( ) .getLocation ( ) .getFile ( ) instanceof ServicesGeneratedFile
100
100
)
@@ -107,7 +107,7 @@ module Twirp {
107
107
class ClientConstructor extends Function {
108
108
ClientConstructor ( ) {
109
109
exists ( ServiceClientType c |
110
- this .getName ( ) .toLowerCase ( ) = " new" + c .getName ( ) . toLowerCase ( ) and
110
+ this .getName ( ) .regexpMatch ( "(?i) new" + c .getName ( ) ) and
111
111
this .getParameterType ( 0 ) instanceof StringType and
112
112
this .getParameterType ( 1 ) .getName ( ) = "HTTPClient" and
113
113
this .getDeclaration ( ) .getLocation ( ) .getFile ( ) instanceof ServicesGeneratedFile
@@ -123,7 +123,7 @@ module Twirp {
123
123
class ServerConstructor extends Function {
124
124
ServerConstructor ( ) {
125
125
exists ( ServiceServerType c , ServiceInterfaceType i |
126
- this .getName ( ) .toLowerCase ( ) = " new" + c .getName ( ) . toLowerCase ( ) and
126
+ this .getName ( ) .regexpMatch ( "(?i) new" + c .getName ( ) ) and
127
127
this .getParameterType ( 0 ) = i .getNamedType ( ) and
128
128
this .getDeclaration ( ) .getLocation ( ) .getFile ( ) instanceof ServicesGeneratedFile
129
129
)
0 commit comments