diff --git a/spec/csharp/ClassInsideNamespace.cs b/spec/csharp/ClassInsideNamespace.cs index cd74e6d..cad9c70 100644 --- a/spec/csharp/ClassInsideNamespace.cs +++ b/spec/csharp/ClassInsideNamespace.cs @@ -3,7 +3,7 @@ namespace MyNamespace { [SomeAttribute] - [SomeAttributeWithParameters(MyName = "Foo", 28, Framework.Blah)] + [SomeAttributeWithParameters(MyName = "Foo", 28, Framework.Blah, typeof(BlahBlah))] abstract class MyPoco where WithGenerics : new() { public string[] Name { get; set; } diff --git a/src/RegExHelper.ts b/src/RegExHelper.ts index eb45dfc..016addb 100644 --- a/src/RegExHelper.ts +++ b/src/RegExHelper.ts @@ -47,6 +47,10 @@ return this.wrapInGroup(capture, false, "'" + this.wrapInGroup(false, false, "\\\\?.") + "'"); } + public getTypeOfRegex(capture: boolean) { + return this.wrapInGroup(capture, false, "typeof" + this.wrapInGroup(false, true, this.getMethodParametersWrapperRegex(false, false))); + } + public getLiteralRegex(capture: boolean) { return this.wrapInGroup(capture, true, this.getLiteralNumberRegex(false) + "{1}?|" + @@ -289,7 +293,8 @@ var result = ""; result += this.wrapInGroup(false, true, this.getNameRegex(captureName) + "=") + "??"; - result += this.getLiteralRegex(captureValue); + result += this.getLiteralRegex(captureValue) + "|"; + result += this.getTypeOfRegex(captureValue); return this.wrapInGroup(capture, true, result); }