code: function popContext(state) {
          if (state.context) {
              var oldContext = state.context;
              state.context = oldContext.prev;
              return oldContext;
          }
          
          // we shouldn't be here - it means we didn't have a context to pop
          return null;
      }
docs: go up a level in the document