Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

implements parse error #13

Open
eightyfive opened this issue Apr 13, 2021 · 5 comments
Open

implements parse error #13

eightyfive opened this issue Apr 13, 2021 · 5 comments

Comments

@eightyfive
Copy link

I guess it does not work with the latest vyper version/syntax:

$ blackadder contracts/NFT.vy

error: cannot format contracts/NFT.vy: cannot use --safe with this file; failed to parse source file.  AST error message: invalid syntax (<unknown>, line 8)
Oh no! 💥 💔 💥
1 file failed to reformat.

And at line 8:

implements: ERC721

What's the status of the library ? I am not a python developer myself, but I enjoy vyperlang. I am not sure the best way to help here, I come from JS, where prettier is very popular and well integrated everywhere.

I'll have a look at how easy is it to implement a prettier-vyper plugin for the JS community. I believe a lot of JS devs are tempted by vyperlang but having to switch all tooling can be a blocker.

@spinoch
Copy link
Contributor

spinoch commented Apr 16, 2021

Hey @eightyfive

I guess it does not work with the latest vyper version/syntax:

Yeah, that's a bug.

What's the status of the library ?

I've been meaning to work on this to get it to a minimally functional state, but have had too little time so far. Atm we're monkey-patching Python's black formatter. If we can use a language agnostic code formatter with Vyper's AST, that could be a great way to resolve #7. I didn't know these language agnostic formatters were a thing until you mentioned prettier here.

It'd be great if you can come up with a prettier-vyper plugin, I think such an approach would make more sense than what we're doing here atm. I probably won't be able to help you out directly but do reach out if you need support

@eightyfive
Copy link
Author

Will try to look into that as soon as possible.

Meanwhile what should I use to parse Vyper code and get the corresponding AST?

Cheers @spinoch

@spinoch
Copy link
Contributor

spinoch commented Apr 27, 2021

@spinoch
Copy link
Contributor

spinoch commented Jul 6, 2021

@eightyfive any progress on this?

@eightyfive
Copy link
Author

Unfortunately not. Still on my list though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants