Merge pull request #68 from github/bump_ts

Bump tree-sitter-ruby revision to get operator_assignment field
This commit is contained in:
Nick Rolfe
2020-12-14 12:40:36 +00:00
committed by GitHub
5 changed files with 20 additions and 12 deletions

2
Cargo.lock generated
View File

@@ -535,7 +535,7 @@ dependencies = [
[[package]]
name = "tree-sitter-ruby"
version = "0.17.0"
source = "git+https://github.com/tree-sitter/tree-sitter-ruby.git?rev=b92e1f80e5a838aa78f19faab6350157beb6fcd6#b92e1f80e5a838aa78f19faab6350157beb6fcd6"
source = "git+https://github.com/tree-sitter/tree-sitter-ruby.git?rev=694f81cbc552d2c2e928d909652544e0a2d60613#694f81cbc552d2c2e928d909652544e0a2d60613"
dependencies = [
"cc",
"tree-sitter",

View File

@@ -10,7 +10,7 @@ edition = "2018"
flate2 = "1.0"
node-types = { path = "../node-types" }
tree-sitter = "0.17"
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "b92e1f80e5a838aa78f19faab6350157beb6fcd6" }
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "694f81cbc552d2c2e928d909652544e0a2d60613" }
clap = "2.33"
tracing = "0.1"
tracing-subscriber = { version = "0.2", features = ["env-filter"] }

View File

@@ -10,4 +10,4 @@ edition = "2018"
node-types = { path = "../node-types" }
tracing = "0.1"
tracing-subscriber = { version = "0.2", features = ["env-filter"] }
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "b92e1f80e5a838aa78f19faab6350157beb6fcd6" }
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "694f81cbc552d2c2e928d909652544e0a2d60613" }

View File

@@ -898,19 +898,22 @@ module Generated {
class OperatorAssignment extends @operator_assignment, AstNode {
override string getAPrimaryQlClass() { result = "OperatorAssignment" }
override Location getLocation() { operator_assignment_def(this, _, _, _, _, result) }
override Location getLocation() { operator_assignment_def(this, _, _, _, _, _, result) }
UnderscoreLhs getLeft() { operator_assignment_def(this, _, _, result, _, _) }
UnderscoreLhs getLeft() { operator_assignment_def(this, _, _, result, _, _, _) }
AstNode getRight() { operator_assignment_def(this, _, _, _, result, _) }
AstNode getOperator() { operator_assignment_def(this, _, _, _, result, _, _) }
override AstNode getParent() { operator_assignment_def(this, result, _, _, _, _) }
AstNode getRight() { operator_assignment_def(this, _, _, _, _, result, _) }
override int getParentIndex() { operator_assignment_def(this, _, result, _, _, _) }
override AstNode getParent() { operator_assignment_def(this, result, _, _, _, _, _) }
override int getParentIndex() { operator_assignment_def(this, _, result, _, _, _, _) }
override AstNode getAFieldOrChild() {
operator_assignment_def(this, _, _, result, _, _) or
operator_assignment_def(this, _, _, _, result, _)
operator_assignment_def(this, _, _, result, _, _, _) or
operator_assignment_def(this, _, _, _, result, _, _) or
operator_assignment_def(this, _, _, _, _, result, _)
}
}
@@ -1012,7 +1015,7 @@ module Generated {
override Location getLocation() { rational_def(this, _, _, _, result) }
Integer getChild() { rational_def(this, _, _, result, _) }
AstNode getChild() { rational_def(this, _, _, result, _) }
override AstNode getParent() { rational_def(this, result, _, _, _) }

View File

@@ -828,6 +828,8 @@ next_def(
int loc: @location ref
);
@operator_assignment_operator_type = @reserved_word
@operator_assignment_right_type = @break | @call | @method_call | @next | @return | @underscore_arg | @yield
#keyset[parent, parent_index]
@@ -836,6 +838,7 @@ operator_assignment_def(
int parent: @ast_node_parent ref,
int parent_index: int ref,
int left: @underscore_lhs ref,
int operator: @operator_assignment_operator_type ref,
int right: @operator_assignment_right_type ref,
int loc: @location ref
);
@@ -922,12 +925,14 @@ range_def(
int loc: @location ref
);
@rational_child_type = @token_float | @token_integer
#keyset[parent, parent_index]
rational_def(
unique int id: @rational,
int parent: @ast_node_parent ref,
int parent_index: int ref,
int child: @token_integer ref,
int child: @rational_child_type ref,
int loc: @location ref
);