File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,10 @@ class AstNode extends TAstNode {
77
77
final File getFile ( ) { result = this .getLocation ( ) .getFile ( ) }
78
78
79
79
/** Gets a child node of this `AstNode`. */
80
- final AstNode getAChild ( ) { result = this .getAChild ( _) }
80
+ final AstNode getAChild ( ) {
81
+ result = this .getAChild ( _) or
82
+ none ( ) // TODO: Remove hack.
83
+ }
81
84
82
85
/** Gets the parent of this `AstNode`, if this node is not a root node. */
83
86
final AstNode getParent ( ) { result .getAChild ( ) = this }
Original file line number Diff line number Diff line change @@ -205,6 +205,8 @@ class BodyStmt extends StmtSequence, TBodyStmt {
205
205
/** Gets the `ensure` clause in this block, if any. */
206
206
final StmtSequence getEnsure ( ) {
207
207
result = unique( Ensure s | toGenerated ( s ) = getBodyStmtChild ( this , _) )
208
+ or
209
+ none ( ) // TODO: remove hack.
208
210
}
209
211
210
212
/** Holds if this block has an `ensure` block. */
Original file line number Diff line number Diff line change @@ -130,6 +130,8 @@ private AstNode specialParentOfInclSynth(AstNode n) {
130
130
result .( Namespace ) .getScopeExpr ( ) , result .( ClassDeclaration ) .getSuperclassExpr ( ) ,
131
131
result .( SingletonMethod ) .getObject ( ) , result .( SingletonClass ) .getValue ( )
132
132
]
133
+ or
134
+ none ( ) // TODO: Remove hack.
133
135
}
134
136
135
137
private AstNode parentOfInclSynth ( AstNode n ) {
You can’t perform that action at this time.
0 commit comments