Ruby: add downgrade scripts

This commit is contained in:
Arthur Baars
2022-01-25 16:11:49 +01:00
parent e5eb01ca45
commit 966b8be5f9
6 changed files with 3020 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
class AstNode extends @ruby_ast_node {
string toString() { none() }
}
class Location extends @location {
string toString() { none() }
}
from AstNode ruby_block_argument, AstNode child, Location location
where
ruby_block_argument_def(ruby_block_argument, location) and
ruby_block_argument_child(ruby_block_argument, child)
select ruby_block_argument, child, location

View File

@@ -0,0 +1,13 @@
class AstNode extends @ruby_ast_node {
string toString() { none() }
}
class Location extends @location {
string toString() { none() }
}
from AstNode ruby_block_parameter, AstNode name, Location location
where
ruby_block_parameter_def(ruby_block_parameter, location) and
ruby_block_parameter_name(ruby_block_parameter, name)
select ruby_block_parameter, name, location

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
class AstNode extends @ruby_ast_node {
string toString() { none() }
}
class Location extends @location {
string toString() { none() }
}
from AstNode ruby_pair, AstNode key, AstNode value, Location location
where
ruby_pair_def(ruby_pair, key, location) and
ruby_pair_value(ruby_pair, value)
select ruby_pair, key, value, location

View File

@@ -0,0 +1,9 @@
description: Update grammar
compatibility: backwards
ruby_expression_reference_pattern_def.rel: delete
ruby_block_argument_child.rel: delete
ruby_block_parameter_name.rel: delete
ruby_pair_value.rel: delete
ruby_block_argument_def.rel: run block_argument_def.qlo
ruby_block_parameter_def.rel: run block_parameter_def.qlo
ruby_pair_def.rel: run ruby_pair_def.qlo