public T expectValue(Identifier name) throws InnerParseError {
        for (ScopeLayer<T> layer : scope) {
            if (layer.containsType(name)) {
                return layer.getType(name);
            }
        }
        throw new InnerParseError(String.format("No field named %s", name));
    }
Gets the first value in scope for the specified identifier, throwing
{@link InnerParseError} if the identifier is undefined in all the scope.

@param name the identifier to retrieve a declaration for.
@return the value for the identifier.
@throws InnerParseError when the identifier has no value in the scope.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/evaluation/Scope.java