system/src/sc/layer/LayeredSystem.java
public Object parseSrcBuffer(SrcEntry srcEnt, boolean enablePartialValues, String buffer, boolean dummy, boolean doInit) {
      long modTimeStart = srcEnt.getLastModified();
      IFileProcessor processor = getFileProcessorForSrcEnt(srcEnt, null, false);
      if (processor == null && srcEnt.layer != null && !srcEnt.layer.isStarted()) {
         // For the sctjs extension, we need to start the layer before the processor is registered
         srcEnt.layer.ensureStarted(false);
         processor = getFileProcessorForSrcEnt(srcEnt, null, false);
      }
      if (processor instanceof Language) {
         Language lang = (Language) processor;
         Object result = lang.parseString(srcEnt.absFileName, buffer, enablePartialValues);
         if (result instanceof ParseError) {
            if (enablePartialValues) {
               Object val = ((ParseError) result).getRootPartialValue();
               initNewBufferModel(srcEnt, val, modTimeStart, dummy, false, doInit);
            }
            return result;
         }
         else {
            Object modelObj = ParseUtil.nodeToSemanticValue(result);

            if (!(modelObj instanceof IFileProcessorResult))
               return modelObj;

            initNewBufferModel(srcEnt, modelObj, modTimeStart, dummy, false, doInit);

            return modelObj;
         }
      }
      throw new IllegalArgumentException(("No language processor for file: " + srcEnt.relFileName));
   }
/**
    * For IDE-like operations where we need to parse a file but using the current-in memory copy for fast model validation.  This method
    * should not alter the runtime code model
    */
For IDE-like operations where we need to parse a file but using the current-in memory copy for fast model validation.  This method
should not alter the runtime code model
For IDE - like operations where we need to parse a file but using the current - in memory copy for fast model validation . This method should not alter the runtime code model
public Object parseSrcBuffer(SrcEntry srcEnt, boolean enablePartialValues, String buffer, boolean dummy, boolean doInit) {
      long modTimeStart = srcEnt.getLastModified();
      IFileProcessor processor = getFileProcessorForSrcEnt(srcEnt, null, false);
      if (processor == null && srcEnt.layer != null && !srcEnt.layer.isStarted()) {
         srcEnt.layer.ensureStarted(false);
         processor = getFileProcessorForSrcEnt(srcEnt, null, false);
      }
      if (processor instanceof Language) {
         Language lang = (Language) processor;
         Object result = lang.parseString(srcEnt.absFileName, buffer, enablePartialValues);
         if (result instanceof ParseError) {
            if (enablePartialValues) {
               Object val = ((ParseError) result).getRootPartialValue();
               initNewBufferModel(srcEnt, val, modTimeStart, dummy, false, doInit);
            }
            return result;
         }
         else {
            Object modelObj = ParseUtil.nodeToSemanticValue(result);
            if (!(modelObj instanceof IFileProcessorResult))
               return modelObj;
            initNewBufferModel(srcEnt, modelObj, modTimeStart, dummy, false, doInit);
            return modelObj;
         }
      }
      throw new IllegalArgumentException(("No language processor for file: " + srcEnt.relFileName));
   }
public Object parseSrcBuffer ( SrcEntry srcEnt , boolean enablePartialValues , String buffer , boolean dummy , boolean doInit ) { long modTimeStart = srcEnt . getLastModified ( ) ; IFileProcessor processor = getFileProcessorForSrcEnt ( srcEnt , null , false ) ; if ( processor == null && srcEnt . layer != null && ! srcEnt . layer . isStarted ( ) ) { srcEnt . layer . ensureStarted ( false ) ; processor = getFileProcessorForSrcEnt ( srcEnt , null , false ) ; } if ( processor instanceof Language ) { Language lang = ( Language ) processor ; Object result = lang . parseString ( srcEnt . absFileName , buffer , enablePartialValues ) ; if ( result instanceof ParseError ) { if ( enablePartialValues ) { Object val = ( ( ParseError ) result ) . getRootPartialValue ( ) ; initNewBufferModel ( srcEnt , val , modTimeStart , dummy , false , doInit ) ; } return result ; } else { Object modelObj = ParseUtil . nodeToSemanticValue ( result ) ; if ( ! ( modelObj instanceof IFileProcessorResult ) ) return modelObj ; initNewBufferModel ( srcEnt , modelObj , modTimeStart , dummy , false , doInit ) ; return modelObj ; } } throw new IllegalArgumentException ( ( "No language processor for file: " + srcEnt . relFileName ) ) ; }
For IDE-like operations where we need to parse a file but using the current-in memory copy for fast model validation.
For IDE - like operations where we need to parse a file but using the current - in memory copy for fast model validation .
// For the sctjs extension, we need to start the layer before the processor is registered