mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Ruby: update tree-sitter grammar
This commit is contained in:
BIN
ruby/Cargo.lock
generated
BIN
ruby/Cargo.lock
generated
Binary file not shown.
@@ -11,7 +11,7 @@ flate2 = "1.0"
|
|||||||
node-types = { path = "../node-types" }
|
node-types = { path = "../node-types" }
|
||||||
tree-sitter = "0.19"
|
tree-sitter = "0.19"
|
||||||
tree-sitter-embedded-template = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template.git", rev = "1a538da253d73f896b9f6c0c7d79cda58791ac5c" }
|
tree-sitter-embedded-template = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template.git", rev = "1a538da253d73f896b9f6c0c7d79cda58791ac5c" }
|
||||||
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "e75d04404c9dd71ad68850d5c672b226d5e694f3" }
|
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "ad1043283b1f9daf4aad381b6a81f18a5a27fe7e" }
|
||||||
clap = "3.0"
|
clap = "3.0"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ node-types = { path = "../node-types" }
|
|||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
|
||||||
tree-sitter-embedded-template = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template.git", rev = "1a538da253d73f896b9f6c0c7d79cda58791ac5c" }
|
tree-sitter-embedded-template = { git = "https://github.com/tree-sitter/tree-sitter-embedded-template.git", rev = "1a538da253d73f896b9f6c0c7d79cda58791ac5c" }
|
||||||
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "e75d04404c9dd71ad68850d5c672b226d5e694f3" }
|
tree-sitter-ruby = { git = "https://github.com/tree-sitter/tree-sitter-ruby.git", rev = "ad1043283b1f9daf4aad381b6a81f18a5a27fe7e" }
|
||||||
|
|||||||
@@ -51,25 +51,35 @@ class Ensure extends StmtSequence, TEnsure {
|
|||||||
|
|
||||||
// Not defined by dispatch, as it should not be exposed
|
// Not defined by dispatch, as it should not be exposed
|
||||||
Ruby::AstNode getBodyStmtChild(TBodyStmt b, int i) {
|
Ruby::AstNode getBodyStmtChild(TBodyStmt b, int i) {
|
||||||
result = any(Ruby::Method g | b = TMethod(g)).getChild(i)
|
exists(Ruby::Method g, Ruby::AstNode body | b = TMethod(g) and body = g.getBody() |
|
||||||
or
|
result = body.(Ruby::BodyStatement).getChild(i)
|
||||||
result = any(Ruby::SingletonMethod g | b = TSingletonMethod(g)).getChild(i)
|
or
|
||||||
or
|
i = 0 and result = body and not body instanceof Ruby::BodyStatement
|
||||||
exists(Ruby::Lambda g | b = TLambda(g) |
|
|
||||||
result = g.getBody().(Ruby::DoBlock).getChild(i) or
|
|
||||||
result = g.getBody().(Ruby::Block).getChild(i)
|
|
||||||
)
|
)
|
||||||
or
|
or
|
||||||
result = any(Ruby::DoBlock g | b = TDoBlock(g)).getChild(i)
|
exists(Ruby::SingletonMethod g, Ruby::AstNode body |
|
||||||
|
b = TSingletonMethod(g) and body = g.getBody()
|
||||||
|
|
|
||||||
|
result = body.(Ruby::BodyStatement).getChild(i)
|
||||||
|
or
|
||||||
|
i = 0 and result = body and not body instanceof Ruby::BodyStatement
|
||||||
|
)
|
||||||
|
or
|
||||||
|
exists(Ruby::Lambda g | b = TLambda(g) |
|
||||||
|
result = g.getBody().(Ruby::DoBlock).getBody().getChild(i) or
|
||||||
|
result = g.getBody().(Ruby::Block).getBody().getChild(i)
|
||||||
|
)
|
||||||
|
or
|
||||||
|
result = any(Ruby::DoBlock g | b = TDoBlock(g)).getBody().getChild(i)
|
||||||
or
|
or
|
||||||
result = any(Ruby::Program g | b = TToplevel(g)).getChild(i) and
|
result = any(Ruby::Program g | b = TToplevel(g)).getChild(i) and
|
||||||
not result instanceof Ruby::BeginBlock
|
not result instanceof Ruby::BeginBlock
|
||||||
or
|
or
|
||||||
result = any(Ruby::Class g | b = TClassDeclaration(g)).getChild(i)
|
result = any(Ruby::Class g | b = TClassDeclaration(g)).getBody().getChild(i)
|
||||||
or
|
or
|
||||||
result = any(Ruby::SingletonClass g | b = TSingletonClass(g)).getChild(i)
|
result = any(Ruby::SingletonClass g | b = TSingletonClass(g)).getBody().getChild(i)
|
||||||
or
|
or
|
||||||
result = any(Ruby::Module g | b = TModuleDeclaration(g)).getChild(i)
|
result = any(Ruby::Module g | b = TModuleDeclaration(g)).getBody().getChild(i)
|
||||||
or
|
or
|
||||||
result = any(Ruby::Begin g | b = TBeginExpr(g)).getChild(i)
|
result = any(Ruby::Begin g | b = TBeginExpr(g)).getChild(i)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class BraceBlockReal extends BraceBlock, TBraceBlockReal {
|
|||||||
toGenerated(result) = g.getParameters().getChild(n)
|
toGenerated(result) = g.getParameters().getChild(n)
|
||||||
}
|
}
|
||||||
|
|
||||||
final override Stmt getStmt(int i) { toGenerated(result) = g.getChild(i) }
|
final override Stmt getStmt(int i) { toGenerated(result) = g.getBody().getChild(i) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -311,15 +311,15 @@ module Ruby {
|
|||||||
/** Gets the name of the primary QL class for this element. */
|
/** Gets the name of the primary QL class for this element. */
|
||||||
final override string getAPrimaryQlClass() { result = "Block" }
|
final override string getAPrimaryQlClass() { result = "Block" }
|
||||||
|
|
||||||
|
/** Gets the node corresponding to the field `body`. */
|
||||||
|
final BlockBody getBody() { ruby_block_body(this, result) }
|
||||||
|
|
||||||
/** Gets the node corresponding to the field `parameters`. */
|
/** Gets the node corresponding to the field `parameters`. */
|
||||||
final BlockParameters getParameters() { ruby_block_parameters(this, result) }
|
final BlockParameters getParameters() { ruby_block_parameters(this, result) }
|
||||||
|
|
||||||
/** Gets the `i`th child of this node. */
|
|
||||||
final AstNode getChild(int i) { ruby_block_child(this, i, result) }
|
|
||||||
|
|
||||||
/** Gets a field or child node of this node. */
|
/** Gets a field or child node of this node. */
|
||||||
final override AstNode getAFieldOrChild() {
|
final override AstNode getAFieldOrChild() {
|
||||||
ruby_block_parameters(this, result) or ruby_block_child(this, _, result)
|
ruby_block_body(this, result) or ruby_block_parameters(this, result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,6 +335,18 @@ module Ruby {
|
|||||||
final override AstNode getAFieldOrChild() { ruby_block_argument_child(this, result) }
|
final override AstNode getAFieldOrChild() { ruby_block_argument_child(this, result) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** A class representing `block_body` nodes. */
|
||||||
|
class BlockBody extends @ruby_block_body, AstNode {
|
||||||
|
/** Gets the name of the primary QL class for this element. */
|
||||||
|
final override string getAPrimaryQlClass() { result = "BlockBody" }
|
||||||
|
|
||||||
|
/** Gets the `i`th child of this node. */
|
||||||
|
final AstNode getChild(int i) { ruby_block_body_child(this, i, result) }
|
||||||
|
|
||||||
|
/** Gets a field or child node of this node. */
|
||||||
|
final override AstNode getAFieldOrChild() { ruby_block_body_child(this, _, result) }
|
||||||
|
}
|
||||||
|
|
||||||
/** A class representing `block_parameter` nodes. */
|
/** A class representing `block_parameter` nodes. */
|
||||||
class BlockParameter extends @ruby_block_parameter, AstNode {
|
class BlockParameter extends @ruby_block_parameter, AstNode {
|
||||||
/** Gets the name of the primary QL class for this element. */
|
/** Gets the name of the primary QL class for this element. */
|
||||||
@@ -364,6 +376,18 @@ module Ruby {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** A class representing `body_statement` nodes. */
|
||||||
|
class BodyStatement extends @ruby_body_statement, AstNode {
|
||||||
|
/** Gets the name of the primary QL class for this element. */
|
||||||
|
final override string getAPrimaryQlClass() { result = "BodyStatement" }
|
||||||
|
|
||||||
|
/** Gets the `i`th child of this node. */
|
||||||
|
final AstNode getChild(int i) { ruby_body_statement_child(this, i, result) }
|
||||||
|
|
||||||
|
/** Gets a field or child node of this node. */
|
||||||
|
final override AstNode getAFieldOrChild() { ruby_body_statement_child(this, _, result) }
|
||||||
|
}
|
||||||
|
|
||||||
/** A class representing `break` nodes. */
|
/** A class representing `break` nodes. */
|
||||||
class Break extends @ruby_break, AstNode {
|
class Break extends @ruby_break, AstNode {
|
||||||
/** Gets the name of the primary QL class for this element. */
|
/** Gets the name of the primary QL class for this element. */
|
||||||
@@ -468,20 +492,20 @@ module Ruby {
|
|||||||
/** Gets the name of the primary QL class for this element. */
|
/** Gets the name of the primary QL class for this element. */
|
||||||
final override string getAPrimaryQlClass() { result = "Class" }
|
final override string getAPrimaryQlClass() { result = "Class" }
|
||||||
|
|
||||||
|
/** Gets the node corresponding to the field `body`. */
|
||||||
|
final BodyStatement getBody() { ruby_class_body(this, result) }
|
||||||
|
|
||||||
/** Gets the node corresponding to the field `name`. */
|
/** Gets the node corresponding to the field `name`. */
|
||||||
final AstNode getName() { ruby_class_def(this, result) }
|
final AstNode getName() { ruby_class_def(this, result) }
|
||||||
|
|
||||||
/** Gets the node corresponding to the field `superclass`. */
|
/** Gets the node corresponding to the field `superclass`. */
|
||||||
final Superclass getSuperclass() { ruby_class_superclass(this, result) }
|
final Superclass getSuperclass() { ruby_class_superclass(this, result) }
|
||||||
|
|
||||||
/** Gets the `i`th child of this node. */
|
|
||||||
final AstNode getChild(int i) { ruby_class_child(this, i, result) }
|
|
||||||
|
|
||||||
/** Gets a field or child node of this node. */
|
/** Gets a field or child node of this node. */
|
||||||
final override AstNode getAFieldOrChild() {
|
final override AstNode getAFieldOrChild() {
|
||||||
|
ruby_class_body(this, result) or
|
||||||
ruby_class_def(this, result) or
|
ruby_class_def(this, result) or
|
||||||
ruby_class_superclass(this, result) or
|
ruby_class_superclass(this, result)
|
||||||
ruby_class_child(this, _, result)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -592,15 +616,15 @@ module Ruby {
|
|||||||
/** Gets the name of the primary QL class for this element. */
|
/** Gets the name of the primary QL class for this element. */
|
||||||
final override string getAPrimaryQlClass() { result = "DoBlock" }
|
final override string getAPrimaryQlClass() { result = "DoBlock" }
|
||||||
|
|
||||||
|
/** Gets the node corresponding to the field `body`. */
|
||||||
|
final BodyStatement getBody() { ruby_do_block_body(this, result) }
|
||||||
|
|
||||||
/** Gets the node corresponding to the field `parameters`. */
|
/** Gets the node corresponding to the field `parameters`. */
|
||||||
final BlockParameters getParameters() { ruby_do_block_parameters(this, result) }
|
final BlockParameters getParameters() { ruby_do_block_parameters(this, result) }
|
||||||
|
|
||||||
/** Gets the `i`th child of this node. */
|
|
||||||
final AstNode getChild(int i) { ruby_do_block_child(this, i, result) }
|
|
||||||
|
|
||||||
/** Gets a field or child node of this node. */
|
/** Gets a field or child node of this node. */
|
||||||
final override AstNode getAFieldOrChild() {
|
final override AstNode getAFieldOrChild() {
|
||||||
ruby_do_block_parameters(this, result) or ruby_do_block_child(this, _, result)
|
ruby_do_block_body(this, result) or ruby_do_block_parameters(this, result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1106,20 +1130,20 @@ module Ruby {
|
|||||||
/** Gets the name of the primary QL class for this element. */
|
/** Gets the name of the primary QL class for this element. */
|
||||||
final override string getAPrimaryQlClass() { result = "Method" }
|
final override string getAPrimaryQlClass() { result = "Method" }
|
||||||
|
|
||||||
|
/** Gets the node corresponding to the field `body`. */
|
||||||
|
final AstNode getBody() { ruby_method_body(this, result) }
|
||||||
|
|
||||||
/** Gets the node corresponding to the field `name`. */
|
/** Gets the node corresponding to the field `name`. */
|
||||||
final UnderscoreMethodName getName() { ruby_method_def(this, result) }
|
final UnderscoreMethodName getName() { ruby_method_def(this, result) }
|
||||||
|
|
||||||
/** Gets the node corresponding to the field `parameters`. */
|
/** Gets the node corresponding to the field `parameters`. */
|
||||||
final MethodParameters getParameters() { ruby_method_parameters(this, result) }
|
final MethodParameters getParameters() { ruby_method_parameters(this, result) }
|
||||||
|
|
||||||
/** Gets the `i`th child of this node. */
|
|
||||||
final AstNode getChild(int i) { ruby_method_child(this, i, result) }
|
|
||||||
|
|
||||||
/** Gets a field or child node of this node. */
|
/** Gets a field or child node of this node. */
|
||||||
final override AstNode getAFieldOrChild() {
|
final override AstNode getAFieldOrChild() {
|
||||||
|
ruby_method_body(this, result) or
|
||||||
ruby_method_def(this, result) or
|
ruby_method_def(this, result) or
|
||||||
ruby_method_parameters(this, result) or
|
ruby_method_parameters(this, result)
|
||||||
ruby_method_child(this, _, result)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1140,15 +1164,15 @@ module Ruby {
|
|||||||
/** Gets the name of the primary QL class for this element. */
|
/** Gets the name of the primary QL class for this element. */
|
||||||
final override string getAPrimaryQlClass() { result = "Module" }
|
final override string getAPrimaryQlClass() { result = "Module" }
|
||||||
|
|
||||||
|
/** Gets the node corresponding to the field `body`. */
|
||||||
|
final BodyStatement getBody() { ruby_module_body(this, result) }
|
||||||
|
|
||||||
/** Gets the node corresponding to the field `name`. */
|
/** Gets the node corresponding to the field `name`. */
|
||||||
final AstNode getName() { ruby_module_def(this, result) }
|
final AstNode getName() { ruby_module_def(this, result) }
|
||||||
|
|
||||||
/** Gets the `i`th child of this node. */
|
|
||||||
final AstNode getChild(int i) { ruby_module_child(this, i, result) }
|
|
||||||
|
|
||||||
/** Gets a field or child node of this node. */
|
/** Gets a field or child node of this node. */
|
||||||
final override AstNode getAFieldOrChild() {
|
final override AstNode getAFieldOrChild() {
|
||||||
ruby_module_def(this, result) or ruby_module_child(this, _, result)
|
ruby_module_body(this, result) or ruby_module_def(this, result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1504,15 +1528,15 @@ module Ruby {
|
|||||||
/** Gets the name of the primary QL class for this element. */
|
/** Gets the name of the primary QL class for this element. */
|
||||||
final override string getAPrimaryQlClass() { result = "SingletonClass" }
|
final override string getAPrimaryQlClass() { result = "SingletonClass" }
|
||||||
|
|
||||||
|
/** Gets the node corresponding to the field `body`. */
|
||||||
|
final BodyStatement getBody() { ruby_singleton_class_body(this, result) }
|
||||||
|
|
||||||
/** Gets the node corresponding to the field `value`. */
|
/** Gets the node corresponding to the field `value`. */
|
||||||
final UnderscoreArg getValue() { ruby_singleton_class_def(this, result) }
|
final UnderscoreArg getValue() { ruby_singleton_class_def(this, result) }
|
||||||
|
|
||||||
/** Gets the `i`th child of this node. */
|
|
||||||
final AstNode getChild(int i) { ruby_singleton_class_child(this, i, result) }
|
|
||||||
|
|
||||||
/** Gets a field or child node of this node. */
|
/** Gets a field or child node of this node. */
|
||||||
final override AstNode getAFieldOrChild() {
|
final override AstNode getAFieldOrChild() {
|
||||||
ruby_singleton_class_def(this, result) or ruby_singleton_class_child(this, _, result)
|
ruby_singleton_class_body(this, result) or ruby_singleton_class_def(this, result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1521,6 +1545,9 @@ module Ruby {
|
|||||||
/** Gets the name of the primary QL class for this element. */
|
/** Gets the name of the primary QL class for this element. */
|
||||||
final override string getAPrimaryQlClass() { result = "SingletonMethod" }
|
final override string getAPrimaryQlClass() { result = "SingletonMethod" }
|
||||||
|
|
||||||
|
/** Gets the node corresponding to the field `body`. */
|
||||||
|
final AstNode getBody() { ruby_singleton_method_body(this, result) }
|
||||||
|
|
||||||
/** Gets the node corresponding to the field `name`. */
|
/** Gets the node corresponding to the field `name`. */
|
||||||
final UnderscoreMethodName getName() { ruby_singleton_method_def(this, result, _) }
|
final UnderscoreMethodName getName() { ruby_singleton_method_def(this, result, _) }
|
||||||
|
|
||||||
@@ -1530,15 +1557,12 @@ module Ruby {
|
|||||||
/** Gets the node corresponding to the field `parameters`. */
|
/** Gets the node corresponding to the field `parameters`. */
|
||||||
final MethodParameters getParameters() { ruby_singleton_method_parameters(this, result) }
|
final MethodParameters getParameters() { ruby_singleton_method_parameters(this, result) }
|
||||||
|
|
||||||
/** Gets the `i`th child of this node. */
|
|
||||||
final AstNode getChild(int i) { ruby_singleton_method_child(this, i, result) }
|
|
||||||
|
|
||||||
/** Gets a field or child node of this node. */
|
/** Gets a field or child node of this node. */
|
||||||
final override AstNode getAFieldOrChild() {
|
final override AstNode getAFieldOrChild() {
|
||||||
|
ruby_singleton_method_body(this, result) or
|
||||||
ruby_singleton_method_def(this, result, _) or
|
ruby_singleton_method_def(this, result, _) or
|
||||||
ruby_singleton_method_def(this, _, result) or
|
ruby_singleton_method_def(this, _, result) or
|
||||||
ruby_singleton_method_parameters(this, result) or
|
ruby_singleton_method_parameters(this, result)
|
||||||
ruby_singleton_method_child(this, _, result)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -200,18 +200,18 @@ private module Cached {
|
|||||||
or
|
or
|
||||||
i = any(Ruby::Binary x).getRight()
|
i = any(Ruby::Binary x).getRight()
|
||||||
or
|
or
|
||||||
i = any(Ruby::Block x).getChild(_)
|
|
||||||
or
|
|
||||||
i = any(Ruby::BlockArgument x).getChild()
|
i = any(Ruby::BlockArgument x).getChild()
|
||||||
or
|
or
|
||||||
|
i = any(Ruby::BlockBody x).getChild(_)
|
||||||
|
or
|
||||||
|
i = any(Ruby::BodyStatement x).getChild(_)
|
||||||
|
or
|
||||||
i = any(Ruby::Call x).getReceiver()
|
i = any(Ruby::Call x).getReceiver()
|
||||||
or
|
or
|
||||||
i = any(Ruby::Case x).getValue()
|
i = any(Ruby::Case x).getValue()
|
||||||
or
|
or
|
||||||
i = any(Ruby::CaseMatch x).getValue()
|
i = any(Ruby::CaseMatch x).getValue()
|
||||||
or
|
or
|
||||||
i = any(Ruby::Class x).getChild(_)
|
|
||||||
or
|
|
||||||
i = any(Ruby::Conditional x).getCondition()
|
i = any(Ruby::Conditional x).getCondition()
|
||||||
or
|
or
|
||||||
i = any(Ruby::Conditional x).getConsequence()
|
i = any(Ruby::Conditional x).getConsequence()
|
||||||
@@ -220,8 +220,6 @@ private module Cached {
|
|||||||
or
|
or
|
||||||
i = any(Ruby::Do x).getChild(_)
|
i = any(Ruby::Do x).getChild(_)
|
||||||
or
|
or
|
||||||
i = any(Ruby::DoBlock x).getChild(_)
|
|
||||||
or
|
|
||||||
i = any(Ruby::ElementReference x).getChild(_)
|
i = any(Ruby::ElementReference x).getChild(_)
|
||||||
or
|
or
|
||||||
i = any(Ruby::ElementReference x).getObject()
|
i = any(Ruby::ElementReference x).getObject()
|
||||||
@@ -250,9 +248,7 @@ private module Cached {
|
|||||||
or
|
or
|
||||||
i = any(Ruby::KeywordParameter x).getValue()
|
i = any(Ruby::KeywordParameter x).getValue()
|
||||||
or
|
or
|
||||||
i = any(Ruby::Method x).getChild(_)
|
i = any(Ruby::Method x).getBody()
|
||||||
or
|
|
||||||
i = any(Ruby::Module x).getChild(_)
|
|
||||||
or
|
or
|
||||||
i = any(Ruby::OperatorAssignment x).getRight()
|
i = any(Ruby::OperatorAssignment x).getRight()
|
||||||
or
|
or
|
||||||
@@ -282,9 +278,7 @@ private module Cached {
|
|||||||
or
|
or
|
||||||
i = any(Ruby::SingletonClass x).getValue()
|
i = any(Ruby::SingletonClass x).getValue()
|
||||||
or
|
or
|
||||||
i = any(Ruby::SingletonClass x).getChild(_)
|
i = any(Ruby::SingletonMethod x).getBody()
|
||||||
or
|
|
||||||
i = any(Ruby::SingletonMethod x).getChild(_)
|
|
||||||
or
|
or
|
||||||
i = any(Ruby::SingletonMethod x).getObject()
|
i = any(Ruby::SingletonMethod x).getObject()
|
||||||
or
|
or
|
||||||
|
|||||||
@@ -247,20 +247,16 @@ ruby_binary_def(
|
|||||||
int right: @ruby_underscore_expression ref
|
int right: @ruby_underscore_expression ref
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ruby_block_body(
|
||||||
|
unique int ruby_block: @ruby_block ref,
|
||||||
|
unique int body: @ruby_block_body ref
|
||||||
|
);
|
||||||
|
|
||||||
ruby_block_parameters(
|
ruby_block_parameters(
|
||||||
unique int ruby_block: @ruby_block ref,
|
unique int ruby_block: @ruby_block ref,
|
||||||
unique int parameters: @ruby_block_parameters ref
|
unique int parameters: @ruby_block_parameters ref
|
||||||
);
|
);
|
||||||
|
|
||||||
@ruby_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
|
|
||||||
|
|
||||||
#keyset[ruby_block, index]
|
|
||||||
ruby_block_child(
|
|
||||||
int ruby_block: @ruby_block ref,
|
|
||||||
int index: int ref,
|
|
||||||
unique int child: @ruby_block_child_type ref
|
|
||||||
);
|
|
||||||
|
|
||||||
ruby_block_def(
|
ruby_block_def(
|
||||||
unique int id: @ruby_block
|
unique int id: @ruby_block
|
||||||
);
|
);
|
||||||
@@ -274,6 +270,19 @@ ruby_block_argument_def(
|
|||||||
unique int id: @ruby_block_argument
|
unique int id: @ruby_block_argument
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ruby_block_body_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
|
||||||
|
|
||||||
|
#keyset[ruby_block_body, index]
|
||||||
|
ruby_block_body_child(
|
||||||
|
int ruby_block_body: @ruby_block_body ref,
|
||||||
|
int index: int ref,
|
||||||
|
unique int child: @ruby_block_body_child_type ref
|
||||||
|
);
|
||||||
|
|
||||||
|
ruby_block_body_def(
|
||||||
|
unique int id: @ruby_block_body
|
||||||
|
);
|
||||||
|
|
||||||
ruby_block_parameter_name(
|
ruby_block_parameter_name(
|
||||||
unique int ruby_block_parameter: @ruby_block_parameter ref,
|
unique int ruby_block_parameter: @ruby_block_parameter ref,
|
||||||
unique int name: @ruby_token_identifier ref
|
unique int name: @ruby_token_identifier ref
|
||||||
@@ -303,6 +312,19 @@ ruby_block_parameters_def(
|
|||||||
unique int id: @ruby_block_parameters
|
unique int id: @ruby_block_parameters
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ruby_body_statement_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement
|
||||||
|
|
||||||
|
#keyset[ruby_body_statement, index]
|
||||||
|
ruby_body_statement_child(
|
||||||
|
int ruby_body_statement: @ruby_body_statement ref,
|
||||||
|
int index: int ref,
|
||||||
|
unique int child: @ruby_body_statement_child_type ref
|
||||||
|
);
|
||||||
|
|
||||||
|
ruby_body_statement_def(
|
||||||
|
unique int id: @ruby_body_statement
|
||||||
|
);
|
||||||
|
|
||||||
ruby_break_child(
|
ruby_break_child(
|
||||||
unique int ruby_break: @ruby_break ref,
|
unique int ruby_break: @ruby_break ref,
|
||||||
unique int child: @ruby_argument_list ref
|
unique int child: @ruby_argument_list ref
|
||||||
@@ -391,6 +413,11 @@ ruby_chained_string_def(
|
|||||||
unique int id: @ruby_chained_string
|
unique int id: @ruby_chained_string
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ruby_class_body(
|
||||||
|
unique int ruby_class: @ruby_class ref,
|
||||||
|
unique int body: @ruby_body_statement ref
|
||||||
|
);
|
||||||
|
|
||||||
@ruby_class_name_type = @ruby_scope_resolution | @ruby_token_constant
|
@ruby_class_name_type = @ruby_scope_resolution | @ruby_token_constant
|
||||||
|
|
||||||
ruby_class_superclass(
|
ruby_class_superclass(
|
||||||
@@ -398,15 +425,6 @@ ruby_class_superclass(
|
|||||||
unique int superclass: @ruby_superclass ref
|
unique int superclass: @ruby_superclass ref
|
||||||
);
|
);
|
||||||
|
|
||||||
@ruby_class_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement
|
|
||||||
|
|
||||||
#keyset[ruby_class, index]
|
|
||||||
ruby_class_child(
|
|
||||||
int ruby_class: @ruby_class ref,
|
|
||||||
int index: int ref,
|
|
||||||
unique int child: @ruby_class_child_type ref
|
|
||||||
);
|
|
||||||
|
|
||||||
ruby_class_def(
|
ruby_class_def(
|
||||||
unique int id: @ruby_class,
|
unique int id: @ruby_class,
|
||||||
int name: @ruby_class_name_type ref
|
int name: @ruby_class_name_type ref
|
||||||
@@ -478,20 +496,16 @@ ruby_do_def(
|
|||||||
unique int id: @ruby_do
|
unique int id: @ruby_do
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ruby_do_block_body(
|
||||||
|
unique int ruby_do_block: @ruby_do_block ref,
|
||||||
|
unique int body: @ruby_body_statement ref
|
||||||
|
);
|
||||||
|
|
||||||
ruby_do_block_parameters(
|
ruby_do_block_parameters(
|
||||||
unique int ruby_do_block: @ruby_do_block ref,
|
unique int ruby_do_block: @ruby_do_block ref,
|
||||||
unique int parameters: @ruby_block_parameters ref
|
unique int parameters: @ruby_block_parameters ref
|
||||||
);
|
);
|
||||||
|
|
||||||
@ruby_do_block_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement
|
|
||||||
|
|
||||||
#keyset[ruby_do_block, index]
|
|
||||||
ruby_do_block_child(
|
|
||||||
int ruby_do_block: @ruby_do_block ref,
|
|
||||||
int index: int ref,
|
|
||||||
unique int child: @ruby_do_block_child_type ref
|
|
||||||
);
|
|
||||||
|
|
||||||
ruby_do_block_def(
|
ruby_do_block_def(
|
||||||
unique int id: @ruby_do_block
|
unique int id: @ruby_do_block
|
||||||
);
|
);
|
||||||
@@ -724,7 +738,7 @@ ruby_in_clause_def(
|
|||||||
int pattern: @ruby_underscore_pattern_top_expr_body ref
|
int pattern: @ruby_underscore_pattern_top_expr_body ref
|
||||||
);
|
);
|
||||||
|
|
||||||
@ruby_interpolation_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
|
@ruby_interpolation_child_type = @ruby_token_empty_statement | @ruby_underscore_nonlocal_variable | @ruby_underscore_statement
|
||||||
|
|
||||||
#keyset[ruby_interpolation, index]
|
#keyset[ruby_interpolation, index]
|
||||||
ruby_interpolation_child(
|
ruby_interpolation_child(
|
||||||
@@ -797,20 +811,18 @@ ruby_left_assignment_list_def(
|
|||||||
unique int id: @ruby_left_assignment_list
|
unique int id: @ruby_left_assignment_list
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ruby_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg
|
||||||
|
|
||||||
|
ruby_method_body(
|
||||||
|
unique int ruby_method: @ruby_method ref,
|
||||||
|
unique int body: @ruby_method_body_type ref
|
||||||
|
);
|
||||||
|
|
||||||
ruby_method_parameters(
|
ruby_method_parameters(
|
||||||
unique int ruby_method: @ruby_method ref,
|
unique int ruby_method: @ruby_method ref,
|
||||||
unique int parameters: @ruby_method_parameters ref
|
unique int parameters: @ruby_method_parameters ref
|
||||||
);
|
);
|
||||||
|
|
||||||
@ruby_method_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_arg | @ruby_underscore_statement
|
|
||||||
|
|
||||||
#keyset[ruby_method, index]
|
|
||||||
ruby_method_child(
|
|
||||||
int ruby_method: @ruby_method ref,
|
|
||||||
int index: int ref,
|
|
||||||
unique int child: @ruby_method_child_type ref
|
|
||||||
);
|
|
||||||
|
|
||||||
ruby_method_def(
|
ruby_method_def(
|
||||||
unique int id: @ruby_method,
|
unique int id: @ruby_method,
|
||||||
int name: @ruby_underscore_method_name ref
|
int name: @ruby_underscore_method_name ref
|
||||||
@@ -829,17 +841,13 @@ ruby_method_parameters_def(
|
|||||||
unique int id: @ruby_method_parameters
|
unique int id: @ruby_method_parameters
|
||||||
);
|
);
|
||||||
|
|
||||||
@ruby_module_name_type = @ruby_scope_resolution | @ruby_token_constant
|
ruby_module_body(
|
||||||
|
unique int ruby_module: @ruby_module ref,
|
||||||
@ruby_module_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement
|
unique int body: @ruby_body_statement ref
|
||||||
|
|
||||||
#keyset[ruby_module, index]
|
|
||||||
ruby_module_child(
|
|
||||||
int ruby_module: @ruby_module ref,
|
|
||||||
int index: int ref,
|
|
||||||
unique int child: @ruby_module_child_type ref
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ruby_module_name_type = @ruby_scope_resolution | @ruby_token_constant
|
||||||
|
|
||||||
ruby_module_def(
|
ruby_module_def(
|
||||||
unique int id: @ruby_module,
|
unique int id: @ruby_module,
|
||||||
int name: @ruby_module_name_type ref
|
int name: @ruby_module_name_type ref
|
||||||
@@ -1074,13 +1082,9 @@ ruby_setter_def(
|
|||||||
int name: @ruby_token_identifier ref
|
int name: @ruby_token_identifier ref
|
||||||
);
|
);
|
||||||
|
|
||||||
@ruby_singleton_class_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement
|
ruby_singleton_class_body(
|
||||||
|
unique int ruby_singleton_class: @ruby_singleton_class ref,
|
||||||
#keyset[ruby_singleton_class, index]
|
unique int body: @ruby_body_statement ref
|
||||||
ruby_singleton_class_child(
|
|
||||||
int ruby_singleton_class: @ruby_singleton_class ref,
|
|
||||||
int index: int ref,
|
|
||||||
unique int child: @ruby_singleton_class_child_type ref
|
|
||||||
);
|
);
|
||||||
|
|
||||||
ruby_singleton_class_def(
|
ruby_singleton_class_def(
|
||||||
@@ -1088,6 +1092,13 @@ ruby_singleton_class_def(
|
|||||||
int value: @ruby_underscore_arg ref
|
int value: @ruby_underscore_arg ref
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ruby_singleton_method_body_type = @ruby_body_statement | @ruby_rescue_modifier | @ruby_underscore_arg
|
||||||
|
|
||||||
|
ruby_singleton_method_body(
|
||||||
|
unique int ruby_singleton_method: @ruby_singleton_method ref,
|
||||||
|
unique int body: @ruby_singleton_method_body_type ref
|
||||||
|
);
|
||||||
|
|
||||||
@ruby_singleton_method_object_type = @ruby_underscore_arg | @ruby_underscore_variable
|
@ruby_singleton_method_object_type = @ruby_underscore_arg | @ruby_underscore_variable
|
||||||
|
|
||||||
ruby_singleton_method_parameters(
|
ruby_singleton_method_parameters(
|
||||||
@@ -1095,15 +1106,6 @@ ruby_singleton_method_parameters(
|
|||||||
unique int parameters: @ruby_method_parameters ref
|
unique int parameters: @ruby_method_parameters ref
|
||||||
);
|
);
|
||||||
|
|
||||||
@ruby_singleton_method_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_arg | @ruby_underscore_statement
|
|
||||||
|
|
||||||
#keyset[ruby_singleton_method, index]
|
|
||||||
ruby_singleton_method_child(
|
|
||||||
int ruby_singleton_method: @ruby_singleton_method ref,
|
|
||||||
int index: int ref,
|
|
||||||
unique int child: @ruby_singleton_method_child_type ref
|
|
||||||
);
|
|
||||||
|
|
||||||
ruby_singleton_method_def(
|
ruby_singleton_method_def(
|
||||||
unique int id: @ruby_singleton_method,
|
unique int id: @ruby_singleton_method,
|
||||||
int name: @ruby_underscore_method_name ref,
|
int name: @ruby_underscore_method_name ref,
|
||||||
@@ -1344,7 +1346,7 @@ case @ruby_token.kind of
|
|||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
@ruby_ast_node = @ruby_alias | @ruby_alternative_pattern | @ruby_argument_list | @ruby_array | @ruby_array_pattern | @ruby_as_pattern | @ruby_assignment | @ruby_bare_string | @ruby_bare_symbol | @ruby_begin | @ruby_begin_block | @ruby_binary | @ruby_block | @ruby_block_argument | @ruby_block_parameter | @ruby_block_parameters | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_complex | @ruby_conditional | @ruby_delimited_symbol | @ruby_destructured_left_assignment | @ruby_destructured_parameter | @ruby_do | @ruby_do_block | @ruby_element_reference | @ruby_else | @ruby_elsif | @ruby_end_block | @ruby_ensure | @ruby_exception_variable | @ruby_exceptions | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_for | @ruby_hash | @ruby_hash_pattern | @ruby_hash_splat_argument | @ruby_hash_splat_parameter | @ruby_heredoc_body | @ruby_if | @ruby_if_guard | @ruby_if_modifier | @ruby_in | @ruby_in_clause | @ruby_interpolation | @ruby_keyword_parameter | @ruby_keyword_pattern | @ruby_lambda | @ruby_lambda_parameters | @ruby_left_assignment_list | @ruby_method | @ruby_method_parameters | @ruby_module | @ruby_next | @ruby_operator_assignment | @ruby_optional_parameter | @ruby_pair | @ruby_parenthesized_pattern | @ruby_parenthesized_statements | @ruby_pattern | @ruby_program | @ruby_range | @ruby_rational | @ruby_redo | @ruby_regex | @ruby_rescue | @ruby_rescue_modifier | @ruby_rest_assignment | @ruby_retry | @ruby_return | @ruby_right_assignment_list | @ruby_scope_resolution | @ruby_setter | @ruby_singleton_class | @ruby_singleton_method | @ruby_splat_argument | @ruby_splat_parameter | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_superclass | @ruby_symbol_array | @ruby_then | @ruby_token | @ruby_unary | @ruby_undef | @ruby_unless | @ruby_unless_guard | @ruby_unless_modifier | @ruby_until | @ruby_until_modifier | @ruby_variable_reference_pattern | @ruby_when | @ruby_while | @ruby_while_modifier | @ruby_yield
|
@ruby_ast_node = @ruby_alias | @ruby_alternative_pattern | @ruby_argument_list | @ruby_array | @ruby_array_pattern | @ruby_as_pattern | @ruby_assignment | @ruby_bare_string | @ruby_bare_symbol | @ruby_begin | @ruby_begin_block | @ruby_binary | @ruby_block | @ruby_block_argument | @ruby_block_body | @ruby_block_parameter | @ruby_block_parameters | @ruby_body_statement | @ruby_break | @ruby_call | @ruby_case__ | @ruby_case_match | @ruby_chained_string | @ruby_class | @ruby_complex | @ruby_conditional | @ruby_delimited_symbol | @ruby_destructured_left_assignment | @ruby_destructured_parameter | @ruby_do | @ruby_do_block | @ruby_element_reference | @ruby_else | @ruby_elsif | @ruby_end_block | @ruby_ensure | @ruby_exception_variable | @ruby_exceptions | @ruby_expression_reference_pattern | @ruby_find_pattern | @ruby_for | @ruby_hash | @ruby_hash_pattern | @ruby_hash_splat_argument | @ruby_hash_splat_parameter | @ruby_heredoc_body | @ruby_if | @ruby_if_guard | @ruby_if_modifier | @ruby_in | @ruby_in_clause | @ruby_interpolation | @ruby_keyword_parameter | @ruby_keyword_pattern | @ruby_lambda | @ruby_lambda_parameters | @ruby_left_assignment_list | @ruby_method | @ruby_method_parameters | @ruby_module | @ruby_next | @ruby_operator_assignment | @ruby_optional_parameter | @ruby_pair | @ruby_parenthesized_pattern | @ruby_parenthesized_statements | @ruby_pattern | @ruby_program | @ruby_range | @ruby_rational | @ruby_redo | @ruby_regex | @ruby_rescue | @ruby_rescue_modifier | @ruby_rest_assignment | @ruby_retry | @ruby_return | @ruby_right_assignment_list | @ruby_scope_resolution | @ruby_setter | @ruby_singleton_class | @ruby_singleton_method | @ruby_splat_argument | @ruby_splat_parameter | @ruby_string__ | @ruby_string_array | @ruby_subshell | @ruby_superclass | @ruby_symbol_array | @ruby_then | @ruby_token | @ruby_unary | @ruby_undef | @ruby_unless | @ruby_unless_guard | @ruby_unless_modifier | @ruby_until | @ruby_until_modifier | @ruby_variable_reference_pattern | @ruby_when | @ruby_while | @ruby_while_modifier | @ruby_yield
|
||||||
|
|
||||||
@ruby_ast_node_parent = @file | @ruby_ast_node
|
@ruby_ast_node_parent = @file | @ruby_ast_node
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user