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

add __lark_meta__ dunder #10

Merged
merged 4 commits into from
Nov 2, 2022
Merged

Conversation

ernestoarbitrio
Copy link
Contributor

@ernestoarbitrio ernestoarbitrio commented Oct 25, 2022

TBH I don't know how to test it better and write more meaningful test.
Any suggestion is more than welcome

FIXES #9

@erezsh
Copy link
Member

erezsh commented Oct 25, 2022

It's a good start, but make sure the meta attributes are filled in correctly. line, column, end_line, etc. Doesn't need to be thorough, but just to show it gets written correctly.

@erezsh
Copy link
Member

erezsh commented Oct 25, 2022

Thanks.

Sorry I forgot to mention, can you also make sure to test it with a Tree instance? (you can just add a rule to the grammar, and check its meta has attributes too)

@erezsh
Copy link
Member

erezsh commented Oct 25, 2022

It's odd that the tests are passing.. how can that be if I didn't merge the Lark PR yet?

@ernestoarbitrio
Copy link
Contributor Author

It's odd that the tests are passing.. how can that be if I didn't merge the Lark PR yet?

I think this is not odd since I did not send the meta through the Tree. The token has the line etc... but the Tree still has meta empty. So I wonder how can I exercise a test for this scenario

@ernestoarbitrio
Copy link
Contributor Author

It's odd that the tests are passing.. how can that be if I didn't merge the Lark PR yet?

maybe i got it ... writing a test

@ernestoarbitrio
Copy link
Contributor Author

ok now it should fail. FYI on my machine it passes cause I have the parse_tree edited as you PR in lark

@erezsh
Copy link
Member

erezsh commented Oct 25, 2022

Looks good! I'll merge it after next Lark release.

@erezsh
Copy link
Member

erezsh commented Nov 2, 2022

@ernestoarbitrio The tests are still failling after releasing 1.1.4, any idea why?

@ernestoarbitrio
Copy link
Contributor Author

@ernestoarbitrio The tests are still failling after releasing 1.1.4, any idea why?

looking into it

@ernestoarbitrio
Copy link
Contributor Author

Now it should work

@erezsh erezsh merged commit 6df944a into lark-parser:master Nov 2, 2022
@erezsh
Copy link
Member

erezsh commented Nov 2, 2022

Great, thank you for contributing!

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.

Meta is always empty while using cython lark
2 participants