system/src/sc/parser/GenerateContext.java
public int progress(Object obj) {
      if (debugError || generateStats) {
         if (obj == null)
            return 0;
         if (obj instanceof CharSequence)
            return ((CharSequence) obj).length();
         else if (obj instanceof GenerateError)
            return ((GenerateError) obj).progress;
         else if (obj instanceof PartialArrayResult) {
            PartialArrayResult par = (PartialArrayResult) obj;
            return progress(par.resultNode);
         }
            throw new UnsupportedOperationException();
      }
      return 0;
   }
/** Avoid computing the length unless we are debugging generation errors */
Avoid computing the length unless we are debugging generation errors
Avoid computing the length unless we are debugging generation errors
public int progress(Object obj) {
      if (debugError || generateStats) {
         if (obj == null)
            return 0;
         if (obj instanceof CharSequence)
            return ((CharSequence) obj).length();
         else if (obj instanceof GenerateError)
            return ((GenerateError) obj).progress;
         else if (obj instanceof PartialArrayResult) {
            PartialArrayResult par = (PartialArrayResult) obj;
            return progress(par.resultNode);
         }
            throw new UnsupportedOperationException();
      }
      return 0;
   }
public int progress ( Object obj ) { if ( debugError || generateStats ) { if ( obj == null ) return 0 ; if ( obj instanceof CharSequence ) return ( ( CharSequence ) obj ) . length ( ) ; else if ( obj instanceof GenerateError ) return ( ( GenerateError ) obj ) . progress ; else if ( obj instanceof PartialArrayResult ) { PartialArrayResult par = ( PartialArrayResult ) obj ; return progress ( par . resultNode ) ; } throw new UnsupportedOperationException ( ) ; } return 0 ; }
Avoid computing the length unless we are debugging generation errors
Avoid computing the length unless we are debugging generation errors