Skip to content

Merge NODE_DEF_TEMP and NODE_DEF_TEMP2 #8542

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

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

yui-knk
Copy link
Contributor

@yui-knk yui-knk commented Sep 29, 2023

No description provided.

@nobu
Copy link
Member

nobu commented Sep 29, 2023

I thought using ctxt instead of VALUE nd_cval, but that struct isn’t visible in the header?

@yui-knk
Copy link
Contributor Author

yui-knk commented Sep 29, 2023

There are 2 options for using ctxt instead of VALUE nd_cval.

Option 1

Move these definitions to rubyparser.h from parse.y

  • enum shareability
  • enum rescue_context
  • struct lex_context

Option 2

Move these definitions to parse.y from rubyparser.h

  • struct RNode_DEF_TEMP
  • RNODE_DEF_TEMP

I prefer option 2 because NODE_DEF_TEMP is only used parse.y internal.

What you think about it?

@nobu
Copy link
Member

nobu commented Sep 29, 2023

I second option 2 too.

@yui-knk
Copy link
Contributor Author

yui-knk commented Sep 29, 2023

Added a commit for option 2.

@yui-knk yui-knk merged commit 7979f07 into ruby:master Sep 29, 2023
@yui-knk yui-knk deleted the merge_node_def_temp branch September 29, 2023 10:36
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