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

feat(mox): add inline method call syntax #277

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

cakekindel
Copy link

@cakekindel cakekindel commented Jun 1, 2021

closes #276

MoxBlock - intermediate representation of a "syn-rsx block that needs to be transformed", was an artifact of my tooling around that I left in to easily support more transformations in the future

MoxAttr - now an enum representing the three kinds of attributes supported: <foo bar=123 baz {bingus()}> -> foo().bar(123).baz(baz).bingus().build()

@cakekindel
Copy link
Author

@anp would love some 👀 and feedback whenever you have some time 😊

@cakekindel cakekindel marked this pull request as ready for review June 1, 2021 22:12
@cakekindel cakekindel changed the title feat: add inline method call syntax feat(mox): add inline method call syntax Jun 2, 2021
Copy link
Owner

@anp anp left a comment

Choose a reason for hiding this comment

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

This looks great to me! Sorry for the delay in reviewing, getting vaccinated put a big dent in my open source free time 😅 .

Aside from the doc nit this seems fine to land. Can you run cargo ofl versions to bump the patch version for mox and add an entry to its CHANGELOG.md? That way it will release to crates.io on merge.

/// To allow calling methods with 0 or more than 1 arguments,
/// an inline method call syntax is available
///
/// e.g. `<foo {bar()} {baz(123)} />` expands to `foo().bar().baz(123).build()`
Copy link
Owner

Choose a reason for hiding this comment

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

Can the 123 example have 2 args to motivate usage?

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.

mox: How to invoke nullary functions (functions with 0 arguments)?
2 participants