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

Refine corpus #16

Merged
merged 4 commits into from
Sep 26, 2024
Merged

Refine corpus #16

merged 4 commits into from
Sep 26, 2024

Conversation

bioball
Copy link
Contributor

@bioball bioball commented Sep 25, 2024

This removes snippet tests from test/corpus, because they were contributing more noise than useful information; it's not practical to review those tests because there's so much code being introduced.

This also adds some more tests that were previously only covered by snippet tests.


x = 10 // end-of-line comment

y = 20 /*
multi
line
/* nested */
Copy link
Contributor

Choose a reason for hiding this comment

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

Filed issue #17

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Filed some more issues that I found yesterday too.

Comment on lines +16 to +19
res8{foo = 1; bar = 2}
res9{nested{1}}
res10{["foo"] = 1 ["bar"] = 2}
res11 { new {} new {} new {} }
res10{["foo"] = 1; ["bar"] = 2}
res11 { new {}; new {}; new {} }
Copy link
Contributor

Choose a reason for hiding this comment

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

Keeping some negative (ERROR) cases in might be valuable too (considering allowing non-semi-colon-ed same-line object literals is explicitly undesirable)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's actually a bug that it's being parsed this way.

But: only pkl-core parses this correctly; both pkl-intellij and tree-sitter-pkl generate incorrect parse trees here.

@@ -1,5 +1,5 @@
================================================================================
multiline
string/multilineInterpolation
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
string/multilineInterpolation
string/multiLineInterpolation

(or rename the file)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Argh, I did this but of course GIt had trouble tracking this thanks to case insensitive file systems.

@bioball bioball merged commit 998a296 into apple:main Sep 26, 2024
3 checks passed
@bioball bioball deleted the refine-corpus branch September 26, 2024 15:00
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.

3 participants