mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Ruby printAst: order by start line and column before synth index
This counteracts the movement of synth children away from the node from which they take their location, following the decision to take the index of synth children of real parents into account.
This commit is contained in:
@@ -142,8 +142,8 @@ class PrintRegularAstNode extends PrintAstNode, TPrintRegularAstNode {
|
||||
|
|
||||
p
|
||||
order by
|
||||
f.getBaseName(), f.getAbsolutePath(), l.getStartLine(), p.getSynthAstNodeIndex(),
|
||||
l.getStartColumn(), l.getEndLine(), l.getEndColumn()
|
||||
f.getBaseName(), f.getAbsolutePath(), l.getStartLine(), l.getStartColumn(),
|
||||
p.getSynthAstNodeIndex(), l.getEndLine(), l.getEndColumn()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -915,8 +915,8 @@ control/cases.rb:
|
||||
# 56| getValue: [IntegerLiteral] 5
|
||||
# 56| getKey: [SymbolLiteral] :b
|
||||
# 56| getComponent: [StringTextComponent] b
|
||||
# 56| getRestVariableAccess: [LocalVariableAccess] map
|
||||
# 56| getValue: [LocalVariableAccess] b
|
||||
# 56| getRestVariableAccess: [LocalVariableAccess] map
|
||||
# 57| getBranch: [InClause] in ... then ...
|
||||
# 57| getPattern: [HashPattern] { ..., ** }
|
||||
# 57| getKey: [SymbolLiteral] :a
|
||||
@@ -1006,8 +1006,8 @@ control/cases.rb:
|
||||
# 75| getValue: [IntegerLiteral] 5
|
||||
# 75| getKey: [SymbolLiteral] :b
|
||||
# 75| getComponent: [StringTextComponent] b
|
||||
# 75| getRestVariableAccess: [LocalVariableAccess] map
|
||||
# 75| getValue: [LocalVariableAccess] b
|
||||
# 75| getRestVariableAccess: [LocalVariableAccess] map
|
||||
# 76| getBranch: [InClause] in ... then ...
|
||||
# 76| getPattern: [HashPattern] { ..., ** }
|
||||
# 76| getKey: [SymbolLiteral] :a
|
||||
@@ -1209,8 +1209,8 @@ control/cases.rb:
|
||||
# 141| getValue: [IntegerLiteral] 1
|
||||
# 141| getKey: [SymbolLiteral] :a
|
||||
# 141| getComponent: [StringTextComponent] a
|
||||
# 141| getRestVariableAccess: [LocalVariableAccess] rest
|
||||
# 141| getValue: [LocalVariableAccess] a
|
||||
# 141| getRestVariableAccess: [LocalVariableAccess] rest
|
||||
# 142| getBranch: [InClause] in ... then ...
|
||||
# 142| getPattern: [HashPattern] { ..., ** }
|
||||
# 142| getClass: [ConstantReadAccess] Foo
|
||||
|
||||
Reference in New Issue
Block a user