docs: private int lineBeginningFor(int pos) {
          if (sourceChars == null) {
              return -1;
          }
          if (pos <= 0) {
              return 0;
          }
          char[] buf = sourceChars;
          if (pos >= buf.length) {
              pos = buf.length - 1;
          }
          while (--pos >= 0) {
              char c = buf[pos];
              if (ScriptRuntime.isJSLineTerminator(c)) {
                  return pos + 1; // want position after the newline
              }
          }
          return 0;
      }