-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Reviewed 12 of 215 files at r1. driver/normalizer/annotation.go, line 15 at r1 (raw file):
You may omit the whole driver/normalizer/annotation.go, line 62 at r1 (raw file):
same: driver/normalizer/annotation.go, line 102 at r1 (raw file):
This is exactly what driver/normalizer/annotation.go, line 357 at r1 (raw file):
Looks like a good place to use driver/normalizer/annotation.go, line 374 at r1 (raw file):
fixtures/var_global.rb.uast, line 8 at r1 (raw file):
fixtures/while.rb.uast, line 5 at r1 (raw file):
Looks like we now have an empty node as a root fixtures/while.rb.uast, line 30 at r1 (raw file):
missing fixtures/while.rb.uast, line 47 at r1 (raw file):
same for native/lib/ruby_driver/node_converter.rb, line 78 at r1 (raw file):
native/lib/ruby_driver/node_converter.rb, line 232 at r1 (raw file):
Maybe we can use new names for position fields here as well? Comments from Reviewable |
Review status: 12 of 215 files reviewed at latest revision, 11 unresolved discussions, some commit checks broke. fixtures/while.rb.uast, line 30 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Yes, I changed it to be in line with other annotations that doesn't replicate the parent role in the children (it's a tree anyway). fixtures/while.rb.uast, line 47 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Ditto. Comments from Reviewable |
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Review status: 11 of 215 files reviewed at latest revision, 11 unresolved discussions, some commit checks broke. driver/normalizer/annotation.go, line 374 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Done. Comments from Reviewable |
Review status: 11 of 215 files reviewed at latest revision, 11 unresolved discussions, some commit checks broke. driver/normalizer/annotation.go, line 374 at r1 (raw file): Previously, juanjux (Juanjo Alvarez Martinez) wrote…
Will probably review it anyway, my spider sense tells me there must be a better way (the "send" annotation is pretty complicated, but only the one for functions without parameters is failing, I'll need to check with you because probably finding the solution is a good test for the new DSL). Comments from Reviewable |
Review status: 11 of 215 files reviewed at latest revision, 11 unresolved discussions, some commit checks broke. fixtures/var_global.rb.uast, line 8 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Done. I'm not sure why reviewable still marks this as pending... Comments from Reviewable |
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
…nt work Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Review status: 9 of 226 files reviewed at latest revision, 7 unresolved discussions. driver/normalizer/annotation.go, line 15 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Done. fixtures/while.rb.uast, line 5 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Done. native/lib/ruby_driver/node_converter.rb, line 78 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Done. native/lib/ruby_driver/node_converter.rb, line 232 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Those are actually the names defined in legacy.go but, as talked on Slack, if I remove the ObjectToNoder mapping them they don't work. Comments from Reviewable |
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Review status: 5 of 226 files reviewed at latest revision, 7 unresolved discussions. driver/normalizer/annotation.go, line 102 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Fixed! (and a lot of cruft removed). driver/normalizer/annotation.go, line 357 at r1 (raw file): Previously, dennwc (Denys Smirnov) wrote…
Changed all that part with the last commit. Comments from Reviewable |
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
|
||
#when "mlhs" | ||
#return node.children.map{ |x| convert(x) }.compact | ||
return {@@typekey => node_type(node), "token" => node.to_s} |
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.
@token
hash["end_line"] = subelem.end.line | ||
hash["start_col"] = subelem.begin.column | ||
hash["end_col"] = subelem.end.column | ||
hash["pos_line_start"] = subelem.begin.line |
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.
We can use new names for position fields here as well.
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.
Aren't these the new names already?
(PS: at least those are the ones in sdk/uast/transformer/legacy.go
).
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.
These are variable names, it uses uast.KeyStart
in a separate node with a type ast:Position
.
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.
So something like: hash["type": "ast:Position"] = {"start": bla, "end": bla, "offset": bla}?
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.
Just saw the right format in the Java driver. Will change it.
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.
Done, works, 👍
native/exe/native
Outdated
@@ -1,4 +1,4 @@ | |||
#!/usr/bin/ruby -wU | |||
#!/usr/bin/ruby -wUI/opt/driver/src/build/dependencies |
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.
This won't work locally, right?
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.
Mmmm, I don't remember why I did that, but both make test
and rebuilding the docker image work without it, I'll remove it and see if CI works here.
"end_line" => comment.loc.last_line, | ||
"start_col" => comment.loc.column, | ||
"end_col" => comment.loc.last_column | ||
"pos_line_start" => comment.loc.first_line, |
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.
Same here
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
LGTM! Thanks! |
Signed-off-by: Juanjo Alvarez juanjo@sourced.tech