Esempio n. 1
0
 /**
  * Enter a nested expression. This is used in interactive mode to control whether to continue past
  * end of line, depending on whether the expression is incomplete.
  *
  * @param promptChar Used in prompt string to indicate type of nesting.
  * @return The previous value of promptChar, to be passed to popNesting.
  */
 public char pushNesting(char promptChar) {
   nesting++;
   InPort port = getPort();
   char save = port.readState;
   port.readState = promptChar;
   return save;
 }
Esempio n. 2
0
 /**
  * Exit a nested expression, reversing pushNesting
  *
  * @param save Saved values return by prior pushNesting
  */
 public void popNesting(char save) {
   InPort port = getPort();
   port.readState = save;
   nesting--;
 }