mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Python: fix downgrade script
When new kinds are inserted, new indices exists that do not correspond to any old indices. These were previously mapped, now they are not.
This commit is contained in:
@@ -26,7 +26,12 @@ class ExprParent_ extends @py_expr_parent {
|
||||
*/
|
||||
bindingset[new_index]
|
||||
int old_index(int new_index) {
|
||||
if new_index < 18 then result = new_index else result + (19 - 18) = new_index
|
||||
if new_index < 18
|
||||
then result = new_index
|
||||
else
|
||||
if new_index >= 19
|
||||
then result + (19 - 18) = new_index
|
||||
else none()
|
||||
}
|
||||
|
||||
// The schema for py_exprs is:
|
||||
|
||||
@@ -26,7 +26,12 @@ class StmtList_ extends @py_stmt_list {
|
||||
*/
|
||||
bindingset[new_index]
|
||||
int old_index(int new_index) {
|
||||
if new_index < 14 then result = new_index else result + (16 - 14) = new_index
|
||||
if new_index < 14
|
||||
then result = new_index
|
||||
else
|
||||
if new_index >= 16
|
||||
then result + (16 - 14) = new_index
|
||||
else none()
|
||||
}
|
||||
|
||||
// The schema for py_stmts is:
|
||||
|
||||
Reference in New Issue
Block a user