Skip to content

Commit e8855c3

Browse files
committed
Ruby: add db upgrade script
1 parent 388d361 commit e8855c3

File tree

5 files changed

+3152
-0
lines changed

5 files changed

+3152
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
class Location extends @location {
2+
string toString() { none() }
3+
}
4+
5+
class ErbAstNodeParent extends @erb_ast_node_parent {
6+
string toString() { none() }
7+
}
8+
9+
class ErbAstNode extends @erb_ast_node {
10+
string toString() { none() }
11+
12+
ErbAstNodeParent getParent(int index) { erb_ast_node_parent(this, result, index) }
13+
14+
Location getLocation() {
15+
erb_tokeninfo(this, _, _, result) or
16+
erb_comment_directive_def(this, _, result) or
17+
erb_directive_def(this, _, result) or
18+
erb_graphql_directive_def(this, _, result) or
19+
erb_output_directive_def(this, _, result) or
20+
erb_template_def(this, result)
21+
}
22+
}
23+
24+
from ErbAstNode node, ErbAstNodeParent parent, int index, Location loc
25+
where parent = node.getParent(index) and loc = node.getLocation()
26+
select node, parent, index, loc

0 commit comments

Comments
 (0)