Skip to content

Conversation

@presidentbeef
Copy link

like { x: }

(I guess at this point ruby2ruby is pretty far behind on Ruby syntax...)

@zenspider
Copy link
Member

I'm adding a positive test case cribbed off your negative test case:

  def test_hash_shorthand
    inn = s(:hash, s(:lit, :k), nil)
    out = '{ k: }'

    assert_parse inn, out
  end

@zenspider
Copy link
Member

(I guess at this point ruby2ruby is pretty far behind on Ruby syntax...)

It is... Most of the tests come in via pt_testcase.rb from sexp_processor. I have not bothered porting new tests from ruby_parser to pt_testcase.rb and that's caused some slippage.

2.7 is probably covered pretty well (tho, maybe not **kws?)... but the 3.0+ tests could use an audit.

@zenspider
Copy link
Member

Added! Thanks!

@zenspider zenspider closed this Apr 15, 2022
@presidentbeef
Copy link
Author

Huh, I have no idea where my positive test went. I know I wrote it and I wrote it before I wrote what ended up in this PR. Sorry about that!

Thanks!

@zenspider
Copy link
Member

zenspider commented Apr 15, 2022 via email

@zenspider
Copy link
Member

zenspider commented Apr 15, 2022 via email

@presidentbeef
Copy link
Author

@zenspider I think that last comment was for seattlerb/sexp_processor#30?

@seattlerb seattlerb locked and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants