code: private void createNodeMappings(MtasTokenIdFactory mtasTokenIdFactory,
        Level level, Level parentLevel) {
      MtasToken nodeToken;
      if (level.node != null && level.positionStart != null
          && level.positionEnd != null) {
        nodeToken = new MtasTokenString(mtasTokenIdFactory.createTokenId(),
            level.node, "");
        nodeToken.setOffset(level.offsetStart, level.offsetEnd);
        nodeToken.setRealOffset(level.realOffsetStart, level.realOffsetEnd);
        nodeToken.addPositionRange(level.positionStart, level.positionEnd);
        tokenCollection.add(nodeToken);
        if (parentLevel != null) {
          parentLevel.tokens.add(nodeToken);
        }
        // only for first mapping(?)
        for (MtasToken token : level.tokens) {
          token.setParentId(nodeToken.getId());
        }
      }
    }
docs: Creates the node mappings.
  
  @param mtasTokenIdFactory
  the mtas token id factory
  @param level
  the level
  @param parentLevel
  the parent level