Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Define Bool node (boolean literal) #338

Merged
merged 1 commit into from
Jan 14, 2019
Merged

Conversation

dennwc
Copy link
Member

@dennwc dennwc commented Dec 5, 2018

We already have a String literal node, and this PR goes one step further and defines a boolean literal node (Bool) in SemUAST.

The definition of the node is pretty streightforward: it's a boolean value that can be either "true" or "false".

This node type is useless for some drivers without #337.

Signed-off-by: Denys Smirnov denys@sourced.tech

Signed-off-by: Denys Smirnov <denys@sourced.tech>
@dennwc dennwc self-assigned this Dec 5, 2018
@juanjux
Copy link
Contributor

juanjux commented Dec 6, 2018

I approved, since this is worthy, simple and backwards compatible, but my approval doesn't imply I think we should upgrade all the drivers' annotations to use it immediately (see my comment here: #337 (comment)).

Copy link
Contributor

@bzz bzz left a comment

Choose a reason for hiding this comment

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

Did I get it right, that this change is a part of bigger scope of work on having better semantic annotations in UAST?

👍 but I concur with what @juanjux mentioned above on priorities.

@dennwc
Copy link
Member Author

dennwc commented Dec 6, 2018

Right. I don't think we should update all drivers immediately. I will probably update 2-3 of them when I have some time just to make sure it works.

@bzz Correct, this is a part of a bigger change, but this change may span a few years. We can gradually improve the coverage of SemUAST types when it makes sense.

For Bool the definition is clear, but for other things, it won't be that easy. So right now I identified few common nodes across drivers that are low-hanging fruits and will try to define a schema for them to keep things going. But we have other more important tasks, of course.

@dennwc dennwc merged commit 95957ad into bblfsh:master Jan 14, 2019
@dennwc dennwc deleted the type_bool_literal branch January 14, 2019 15:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants