code: private boolean onBol(Source source) {
          int offset = source.getOffset();
          if (offset == 0) {
              return true;
          } else {
              char c = source.charAt(offset);
              char p = source.charAt(offset - 1);
              return c != '\n' && c != '\r' && (p == '\n' || p == '\r');
          }
      }
docs: Check we are on the beginning of line
  
  @param source the text source
  @return true if we are on the beginning of line