001/* 002 * Copyright (c) 2012-2017 Institut National des Sciences Appliquées de Lyon (INSA-Lyon) 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 */ 009 010package org.eclipse.golo.compiler.ir; 011 012/** 013 * Interface for all IR elements that have a scope (a {@link ReferenceTable}) 014 * (or encapsulate something that have one). 015 */ 016public interface Scope { 017 018 /** 019 * Make the given table a parent of this scope. 020 */ 021 void relink(ReferenceTable table); 022 023 /** 024 * Make the given table the top-level parent of this scope. 025 * <p> 026 * Go up in the hierarchy of parent scope, and set the root to the given table. 027 */ 028 void relinkTopLevel(ReferenceTable topLevel); 029 030}