public IMPORT_DECLARATION find(IMPORT_DECLARATION import) { IMPORT_DECLARATION result = null; for (int i = 0, n = Length; i < n; i++) { if (imports[i] == import) { result = imports[i]; break; } } return(result); }
public IMPORT_DECLARATION find(Identifier name) { IMPORT_DECLARATION result = null; for (int i = 0, n = Length; i < n; i++) { if (imports[i].name.Name == name.Name) { result = imports[i]; break; } } return(result); }
public void Add(IMPORT_DECLARATION import) { int n = this.imports.Length; int i = this.length++; if (i == n) { IMPORT_DECLARATION[] newImports = new IMPORT_DECLARATION[n + 8]; for (int j = 0; j < n; j++) { newImports[j] = imports[j]; } this.imports = newImports; } this.imports[i] = import; }