コード例 #1
0
ファイル: Lexer.java プロジェクト: spurious/kawa-mirror
 /**
  * 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;
 }
コード例 #2
0
ファイル: Lexer.java プロジェクト: spurious/kawa-mirror
 /**
  * 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--;
 }