dlang.org icon indicating copy to clipboard operation
dlang.org copied to clipboard

[articles/mixin.dd] Add concatenation, statements, types, expressions

Open ntrel opened this issue 3 years ago • 2 comments

Change genStruct eponymous template to enum template. Add 5 sections: argument concatenation, declarations, statements, types, expressions. The examples added are all taken from the spec. Add Comparison with C preprocessor heading.

Also tweak spec examples: Split mixin statement spec examples into 2. Change for -> foreach and show mixin code reading a variable declared in current scope. Move mixin variable declaration example to MixinDeclaration from statement.dd.

Update: Add 'Domain Specific Languages' section with simple JS example.

ntrel avatar Feb 09 '22 17:02 ntrel

Thanks for your pull request and interest in making D better, @ntrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

dlang-bot avatar Feb 09 '22 17:02 dlang-bot

@maxhaton Thanks, I changed the wording as suggested.

I also:

  • Added a section on 'Domain Specific Languages'.
  • Moved the 'Generating Declarations' heading to the top.

ntrel avatar Feb 10 '22 18:02 ntrel