annotations icon indicating copy to clipboard operation
annotations copied to clipboard

#126 Quotes failing tests - quotes outside an annotation make parsing fail

Open julienfalque opened this issue 7 years ago • 7 comments

See #126.

julienfalque avatar Mar 06 '17 07:03 julienfalque

@julienfalque I changed the base branch to master. Could you please rebase?

Ocramius avatar Mar 06 '17 07:03 Ocramius

Done.

julienfalque avatar Mar 06 '17 07:03 julienfalque

@julienfalque thanks! I won't get to it now, but at least this provides a decent base ground for fixing the issue :-)

Ocramius avatar Mar 06 '17 09:03 Ocramius

I can try to work on it if that would help.

It looks like all lexer tests assume that it only supports reading from the relevant Annotation part of the DocBlock, not the whole DocBlock itself. Is the lexer failing test case valid? Or should this be fixed in the parser only?

julienfalque avatar Mar 06 '17 09:03 julienfalque

@julienfalque the lexer is probably not where the bug is: just the parser may be affected. Same tokens, different result expected.

Ocramius avatar Mar 06 '17 09:03 Ocramius

With @Foo " @Bar " @Baz, the lexer does return a string token with " @Bar " as value, which is a bug to me.

As a workaround, the parser could simply pass @Foo, @Bar and @Baz successively. The parser already stips the beginning of the DocBlock until it finds the first @ character (which prevents the bug if the quote is before it). This is why I'm not sure this should be fixed in the lexer (and maybe removing the need to strip the DocBlock) or in the parser (stripping all irrelevant parts instead of just the beginning).

julienfalque avatar Mar 06 '17 10:03 julienfalque

master is probably no longer the right branch for this, I believe 1.8 is now.

greg0ire avatar Jan 24 '20 19:01 greg0ire

Closing as there's no progress to see here.

derrabus avatar Aug 14 '23 09:08 derrabus