/* class comment */!!

inherit(CLIItemList, #CLIStmtList, nil, 2, nil)!!

now(class(CLIStmtList))!!

now(CLIStmtList)!!

/* Compile the statement list. */
Def CLICodeCompile(self | errorMessage)
{
  /* avoid executing a long command */
  if size(list) > 150  /* empirically determined */
    errorMessage := getFormattedError(ErrorTextLibClass$Inst, 
       ER_CLI_LINE_COUNT, asciiz(asStringRadix(size(list), 10)),
       nil, nil);
    syntaxError(self, nil, errorMessage );
  endif;
  
  do(list,
    {using(el)
      if(el)
      then
        CLICodeCompile(el);
        CLICodeCompile("; ");
      endif;
    }
  );
}!!

/* Compile the statement list. */
Def CLICompile(self)
{
  do(list,
    {using(el)
      if(el) then
        CLICodeCompile(el);
        CLICodeCompile("; ");
        /* check for abort statement */
        CLICodeCompile("cA(self);");
      endif;
    }
  );
}!!
