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

[doc] Fix #1300. Document with-input-to-string and with-output-to-string macros #1554

Merged
merged 2 commits into from
Feb 8, 2024
Merged

[doc] Fix #1300. Document with-input-to-string and with-output-to-string macros #1554

merged 2 commits into from
Feb 8, 2024

Conversation

fraya
Copy link
Member

@fraya fraya commented Feb 8, 2024

Document macros with-input-to-string and with-output-to-string

@fraya fraya requested review from cgay and housel February 8, 2024 18:56
Copy link
Member

@cgay cgay left a comment

Choose a reason for hiding this comment

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

Looks good, after a few minor fixes.

write-element(stream, 'k');
end;

The symmetric macro :macro:`with-input-to-string` creates a
Copy link
Member

Choose a reason for hiding this comment

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

"to" should be "from" here.

:parameter stream-name: A Dylan variable-name *bnf*.
:parameter string-expression: A Dylan string expression *bnf*.
:parameter classname: A Dylan class.
:parameter body: A Dylan body *bnf*.
Copy link
Member

Choose a reason for hiding this comment

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

A couple of consistency issues:

  • The examples use "name" but the parameter is stream-name.
  • classname should use a hyphen to match stream-name and Dylan naming style in general.

.. macro:: with-output-to-string
:statement:

Provides a convenient way of returning a :class:`<string>` after
Copy link
Member

Choose a reason for hiding this comment

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

For names that are exported from the dylan module (i.e., defined in the DRM) use :drm: instead of :class:. (There are a few other places where this needs to be fixed.)

:parameter stream-name: A Dylan variable-name *bnf*.
:parameter body: A Dylan body *bnf*.
:value string: Instance of :class:`<string>`.
:
Copy link
Member

Choose a reason for hiding this comment

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

Extra colon?

@fraya fraya merged commit 2cd441a into dylan-lang:master Feb 8, 2024
1 check passed
@fraya fraya deleted the fix-with-stream-to-string branch February 8, 2024 21:02
cgay pushed a commit to cgay/opendylan that referenced this pull request Apr 8, 2024
…ing macros (dylan-lang#1554)

Document macros `with-input-to-string` and `with-output-to-string`

Co-authored-by: @cgay
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.

2 participants