Skip to content

Conversation

@cbecerescu
Copy link
Contributor

No description provided.

&& isType(tokens[1..$])
&& ((tokens[0] == Token(Token.Kind.Keyword, "const")
&& isType(tokens[1..$]))
|| (tokens[$-1] == Token(Token.Kind.Keyword, "const")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sure that we treat all the cases with const + pointers, and view them as casts.

However, DPP does not currently translate the C cast within a macro. So that means that "(struct foo const *)" or "(struct foo * const)" are not going to be translated to valid D types (although now they are at least going to be seen as casts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant