Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macros.quote: document hard to use op; add more useful examples #16489

Merged
merged 6 commits into from
Jan 6, 2021

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Dec 27, 2020

#11722 (or a revived version addressing #11722 (comment)) should still be done but in the meantime this improves existing macros.quote by:

  • using runnableExamples
  • show how to escape a proc that needs backtick (eg =destroy)
  • showing how to use op which I doubt no-one ever used (?) because it was under-documented (doc comment was removed in a60305f; I'm adding it back here) and had no example

lib/core/macros.nim Outdated Show resolved Hide resolved
Copy link
Member

@ringabout ringabout left a comment

Choose a reason for hiding this comment

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

Nice

lib/core/macros.nim Outdated Show resolved Hide resolved
@ringabout ringabout closed this Dec 30, 2020
@ringabout ringabout reopened this Dec 30, 2020
@ringabout ringabout mentioned this pull request Dec 30, 2020
@ringabout ringabout closed this Jan 5, 2021
@ringabout ringabout reopened this Jan 5, 2021
@timotheecour
Copy link
Member Author

PTAL

lib/core/macros.nim Outdated Show resolved Hide resolved
@Clyybber Clyybber merged commit c21360e into nim-lang:devel Jan 6, 2021
@timotheecour timotheecour deleted the pr_quote_nnkAccQuoted_example branch January 10, 2021 19:21
mildred pushed a commit to mildred/Nim that referenced this pull request Jan 11, 2021
…m-lang#16489)

* macros.quote: document hard to use `op`; add more useful examples

* add back doc comment removed in a60305f

* address comment

* fixup

* clarify quoting rules

* Update lib/core/macros.nim

Co-authored-by: Clyybber <[email protected]>

Co-authored-by: Clyybber <[email protected]>
ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
…m-lang#16489)

* macros.quote: document hard to use `op`; add more useful examples

* add back doc comment removed in a60305f

* address comment

* fixup

* clarify quoting rules

* Update lib/core/macros.nim

Co-authored-by: Clyybber <[email protected]>

Co-authored-by: Clyybber <[email protected]>
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.

4 participants