So far I figured that what I typically want to do is

printf("Type: %s", e->type->toChars());

whenever I find a type-deduced expression e that fulfils

(e->loc->linnum == QUERY_LINE &&
 e->loc->charnum <= QUERY_COLUMN &&
 QUERY_COLUMN < (e->loc->charnum +
                 e->length_of_expression_in_code))

Can I somehow query the source code range (start end begin offset/row-column) of an expression?

This of course has to handle sub-expression types which is a complication I haven't covered here.

So maybe a better feature would be to query for type of expression before or after point.

Reply via email to