Browse Source

VarList: add getIndexFromDeclaration()

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@11828 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Joachim Klein 9 years ago
parent
commit
937a6c2a43
  1. 13
      prism/src/parser/VarList.java

13
prism/src/parser/VarList.java

@ -229,6 +229,19 @@ public class VarList
return vars.get(i).decl;
}
/**
* Get the index in this VarList for a given declaration.
*/
public int getIndexFromDeclaration(Declaration d)
{
for (int i=0;i<vars.size();i++) {
if (vars.get(i).decl == d) {
return i;
}
}
return -1;
}
/**
* Get the name of the ith variable in this list.
*/

Loading…
Cancel
Save