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

Accommodate JuliaSyntax in tests #38

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

c42f
Copy link
Contributor

@c42f c42f commented Jun 21, 2023

JuliaSyntax generates more consistent syntax trees for obscure versions of long and short form anonymous function argument lists. For the cases which are different and lead to errors, adjust the tests to use explicit Exprs here so that we're testing ExprTools code rather than the Julia parser itself.

  • function (x)::Integer; x end is now parsed correctly
  • Use an explicit Expr for the old (;) -> nothing syntax

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #38 (553c498) into master (f38002a) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #38   +/-   ##
=======================================
  Coverage   97.39%   97.39%           
=======================================
  Files           5        5           
  Lines         230      230           
=======================================
  Hits          224      224           
  Misses          6        6           

JuliaSyntax generates more consistent syntax trees for obscure versions
of long and short form anonymous function argument lists. For the cases
which are different and lead to errors, adjust the tests to use explicit
`Expr`s here so that we're testing ExprTools code rather than the Julia
parser itself.

* `function (x)::Integer; x end` is now parsed correctly
* Use an explicit Expr for the old `(;) -> nothing` syntax
@c42f
Copy link
Contributor Author

c42f commented Jun 22, 2023

I don't think the remaining formatting suggestion is any good so I didn't fix it.

(Can fix if people actually want to obey the formatter over all else)

@oxinabox
Copy link
Member

The coverage of parser behavour in our tests is kinda amazing.

@oxinabox oxinabox merged commit 124baaa into invenia:master Jun 22, 2023
@c42f
Copy link
Contributor Author

c42f commented Jun 24, 2023

Absolutely! Apparently including a bunch of cases which were actually bugs in the reference parser :)

@c42f c42f deleted the caf/juliasyntax-fixes branch June 25, 2023 05:02
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