CSTParser.jl icon indicating copy to clipboard operation
CSTParser.jl copied to clipboard

High-level stable API

Open KristofferC opened this issue 8 years ago • 4 comments

I'm in the progress of upgrading FemtoCleaner (the GitHub bot that fixes deprecations) from CSTParser 0.2.1 to the current version of CSTParser. However, progress is very slow because since CSTParser does not have an API, a lot of the code in FemtoCleaner depends on the internals of CSTParser, which are now completely changed.

If the idea is to use CSTParser to build nice tools, I feel there needs to be a more high-level API where some stability is expected.

KristofferC avatar Oct 26 '17 10:10 KristofferC

Yep I think things are fairly settled down now in terms of the backend. What sort access functions are you after?

ZacLN avatar Oct 26 '17 22:10 ZacLN

Some sort of API where I don't have to access any internals. For an If expression, getters like condition and body might make sense.

Basically, if you change the internals to be completely heterogeneous (no more .args field), the API would stay the same.

KristofferC avatar Oct 31 '17 10:10 KristofferC

Alright will do, I'll draw up a doc outlining proposed getters in the style of the current _get_fname and stick it in a wiki

ZacLN avatar Nov 01 '17 18:11 ZacLN

It'd also be good to think about the overlay tree stuff we'd discussed (created on demand with stored parents and absolute locations) and probably put it in this package. Deprecations.jl has an ad hoc version of it, but it's probably not the right approach.

Keno avatar Nov 02 '17 21:11 Keno