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

V3 actual consistent naming #1

Merged
merged 6 commits into from
Oct 17, 2018
Merged

Conversation

bzz
Copy link

@bzz bzz commented Oct 17, 2018

Refactoring for clarity and consistency, as discussed IRL:

  • NodeExtType => PyNodeExtType, NodeExt => PyNodeExt
  • PyUastType => PyContextType, PyUast => PyContext

Part of the bblfsh#128

Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
Signed-off-by: Alexander Bezzubov <bzz@apache.org>
bblfsh/pyuast.cc Outdated
return node->ctx->Iterate(obj, (TreeOrder)order);
}
// Python object -> create a new context and attach it to an iterator
Context* ctx = new Context();
return ctx->Iterate(obj, (TreeOrder)order, true);
}

static PyObject *PyUastDecode(PyObject *self, PyObject *args) {
static PyObject *PyContextDecode(PyObject *self, PyObject *args) {
Copy link
Owner

Choose a reason for hiding this comment

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

Py_Decode, since it's a global method, or PyContextExt_decode since it's a constructor specifically for PyContextExt

Copy link
Author

@bzz bzz Oct 17, 2018

Choose a reason for hiding this comment

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

👍 this is a perfect example how we could benefit from new github feature :) https://blog.github.com/category/all/#suggested-changes-public-beta

Copy link
Author

Choose a reason for hiding this comment

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

addressed in 2785a60

bblfsh/pyuast.cc Outdated Show resolved Hide resolved
Copy link
Owner

@dennwc dennwc left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! :)

@dennwc dennwc merged commit 9e88733 into dennwc:v3 Oct 17, 2018
@bzz
Copy link
Author

bzz commented Oct 17, 2018

🎉 :shipit:

@bzz bzz deleted the v3-actual-consistent-naming branch October 17, 2018 10: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