Post

Replies

Boosts

Views

Activity

Reply to Weird prefix spaces added when processing my macro
Issue solved. I was missing get keyword. The return statement of AccessorMacro should look like this: return [ """ get { .init(url: url + "\(raw: params[0])", method: "\(raw: params[1])") """ ]
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Weird prefix spaces added when processing my macro
One more thing - I tried with hardcoded values like """ .init(url: url + "/test", method: "get") """ and it still added those whitespaces
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Weird prefix spaces added when processing my macro
PS: It's worth mentioning I tried to do it with (literal:) instead of (raw:) too but the result was the same
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’23