function setInTypeScope(key, value) {
    stack[stack.length - 1][key] = value;
    return value;
  }
Sets the new value in the scope.
@param {string} key The name of the identifier to access
@param {ASTNode} value The new value for the identifier.
@returns {ASTNode} The ASTNode associated with the given identifier.