Ruby: add upgrade scripts

This commit is contained in:
Arthur Baars
2022-01-25 16:06:46 +01:00
parent c85012460a
commit e5eb01ca45
6 changed files with 3001 additions and 0 deletions

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,7 @@
class AstNode extends @ruby_ast_node {
string toString() { none() }
}
from AstNode ruby_block_argument, AstNode child
where ruby_block_argument_def(ruby_block_argument, child, _)
select ruby_block_argument, child

View File

@@ -0,0 +1,7 @@
class AstNode extends @ruby_ast_node {
string toString() { none() }
}
from AstNode ruby_block_parameter, AstNode name
where ruby_block_parameter_def(ruby_block_parameter, name, _)
select ruby_block_parameter, name

View File

@@ -0,0 +1,7 @@
class AstNode extends @ruby_ast_node {
string toString() { none() }
}
from AstNode ruby_pair, AstNode value
where ruby_pair_def(ruby_pair, _, value, _)
select ruby_pair, value

View File

@@ -0,0 +1,8 @@
description: Update grammar
compatibility: full
ruby_block_argument_child.rel: run ruby_block_argument_child.qlo
ruby_block_parameter_name.rel: run ruby_block_parameter_name.qlo
ruby_pair_value.rel: run ruby_pair_value.qlo
ruby_block_argument_def.rel: reorder ruby_block_argument_def.rel ( int id, int child, int loc ) id loc
ruby_block_parameter_def.rel: reorder ruby_block_parameter_def.rel ( int id, int name, int loc ) id loc
ruby_pair_def.rel: reorder ruby_pair_def.rel (int id, int key__, int value, int loc) id key__ loc