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

Parser and emit_forward_arg #44

Closed
marcandre opened this issue Jun 19, 2020 · 1 comment
Closed

Parser and emit_forward_arg #44

marcandre opened this issue Jun 19, 2020 · 1 comment
Milestone

Comments

@marcandre
Copy link
Contributor

marcandre commented Jun 19, 2020

I'd like to use the latest version of parser with emit_forward_arg turned on.

We could avoid this "hack" of redefining to_a as different from children

$ ruby-parse --legacy-forward-arg -e "def foo(...);end; def bar(*rest); end"
(begin
  (def :foo
    (forward-args) nil)
  (def :bar
    (args
      (restarg :rest)) nil))

$ ruby-parse -e "def foo(...);end; def bar(*rest); end"
(begin
  (def :foo
    (args
      (forward-arg)) nil)
  (def :bar
    (args
      (restarg :rest)) nil))

The later form is much improved as an argument signature is always inside an args node.

I doubt it would be much incompatibility, but v1 would be perfect for this.

Comments / objections?

@marcandre marcandre added this to the 1.0.0 milestone Jun 19, 2020
@bbatsov
Copy link
Contributor

bbatsov commented Jun 23, 2020

Fine by me.

marcandre added a commit to marcandre/rubocop-ast that referenced this issue Jun 26, 2020
marcandre added a commit to marcandre/rubocop-ast that referenced this issue Jul 1, 2020
marcandre added a commit to marcandre/rubocop-ast that referenced this issue Jul 3, 2020
marcandre added a commit to marcandre/rubocop-ast that referenced this issue Jul 3, 2020
marcandre added a commit to marcandre/rubocop-ast that referenced this issue Jul 6, 2020
marcandre added a commit to marcandre/rubocop-ast that referenced this issue Aug 1, 2020
marcandre added a commit to marcandre/rubocop-ast that referenced this issue Aug 1, 2020
Bump minimum RuboCop supported as we need the following commit:
rubocop/rubocop@3aeadd921fb526
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

No branches or pull requests

2 participants