-
Notifications
You must be signed in to change notification settings - Fork 20
Add libuast, upgrade libuast API, bugfixing #23
Conversation
|
Looks like the new tests if failing with Python 3.4 which makes CI fails, I'll take a look. |
- Added error control which turns an ugly crash into a nice traceback (+ unittest).
- Migrated to `libuast` 0.2.0.
- Migrated to Google's C++ coding style
- Changed autorship to source{d} in the setup.py, updated email.
Whitespace
Fixed test
bblfsh/pyuast.c
Outdated
| PyMODINIT_FUNC PyInit_pyuast(void) | ||
| { | ||
| NodeIface iface = { | ||
| .InternalType = GetInternalType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use InternalType, etc. instead of GetInternalType, etc. so be consistent with code in both libuast, its examples, client-go, etc.
bblfsh/pyuast.c
Outdated
| } | ||
|
|
||
| static PyMethodDef extension_methods[] = { | ||
| {"find", PyFind, METH_VARARGS, "Find a node in the UAST"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rename find to filter for consistency (I changed the name since we're not looking for a node, we're filtering the nodes in the tree that match some predicate.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're not breaking backward compatibility 👍
|
Symbols renamed. |
Originally from: /pull/16 moved to my branch to continue the work.
All suggestions in the original PR have been implemented on this branch.
Other changes:
libuast0.2.0.