[PING] [PATCH] D: Fix classification of module.type in lexer

Iain Buclaw ibuclaw@gdcproject.org
Sat Mar 4 22:15:00 GMT 2017


Small ping on this.  I'm confident about the source change is pretty
much obvious, just want to make sure that the test is ok too.

---
The two-tier lexer, whose job is to resolve fully qualified names
missed a case where 'module.type' was not being classified as one
token.  And so when the Yacc grammar kicks in, it resolved the tokens
as "TypeExp . IdentifierExp", which then will never match the rule for
cast expressions "( TypeExp ) UnaryExpression".

Adding a case for TYPE_CODE_MODULE in type_aggregate_p means that
classify_inner_name will get a chance to look-up the symbol.

This was noticed when someone tried 'watch -l', and got the rather
confusing response:

A syntax error in expression, near `) 0x000000010'.

So it's been included in the testsuite, along with another test that
does effectively the same expression explicitly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlang-watch-location.patch
Type: text/x-patch
Size: 4447 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20170304/38d8da02/attachment.bin>


More information about the Gdb-patches mailing list