Issue #109

Fixes issue #109 where nested parentheses within the parameter signature additional traits caused a failure to correctly recognise the signature as valid due to not matching the ParameterAbbrevDefinitionRegex.
I have removed the regex in favour of manually parsing the parameter signature so as to make the code clearer and more maintainable than what the regex would have had to become in order to match nested brackets within the additional traits as well as possible additional brackets in the signature description.
hmm I did think of doing that, that is, writing a SignatureParser in the
same vein as UriTemplateParser but I thought it may be a step too far as a
lot of the warnings generation was already in ParameterDefinitionParser.h
but you are right, the signature is a sub part of the definition and could
have its own parser. I will change what I have done to move to
SignatureParser


On 15 July 2014 09:15, Z <notifications@github.com> wrote:

> In src/ParameterDefinitonParser.h:
>
> > -                parameter.name = captureGroups[1];
> > -                TrimString(parameter.name);
> > -
> > -                // Default value
> > -                if (!captureGroups[3].empty())
> > -                    parameter.defaultValue = captureGroups[3];
> > -
> > -                // Additional Attributes
> > -                if (!captureGroups[5].empty())
> > -                    ProcessSignatureAdditionalTraits(section, cur, captureGroups[5], sourceData, result, parameter);
> > -
> > -                // Description
> > -                if (!captureGroups[7].empty())
> > -                    parameter.description = captureGroups[7];
> > +
> > +            if (IsValidParameterSignature(signature)) {
>
> OK. For your information: I plan to replace this "by-hand" signature
> processing later with something like SignatureParser
> <https://github.com/apiaryio/snowcrash/blob/zdne/mson-parser/src/Signature.h#L93>
> .
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/apiaryio/snowcrash/pull/146/files#r14921736>.
>