home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 August / PCO0897.ISO / filesbbs / os2 / fp1os2.arj / OS2 / DATA / 49 / C / 0 / F_26836 / JScriptParserStructItem.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-05-15  |  1.3 KB  |  58 lines

  1. class JScriptParserStructItem extends JSbxBase {
  2.    private short nTokID;
  3.    private JSbxStack nBreakPCStack;
  4.    private JSbxStack nContinuePCStack;
  5.  
  6.    public short GetTokID() {
  7.       return this.nTokID;
  8.    }
  9.  
  10.    public JScriptParserStructItem(short var1) {
  11.       this.nTokID = var1;
  12.    }
  13.  
  14.    private JSbxStack GetBreakStack() {
  15.       if (this.nBreakPCStack == null) {
  16.          this.nBreakPCStack = new JSbxStack(5);
  17.       }
  18.  
  19.       return this.nBreakPCStack;
  20.    }
  21.  
  22.    private JSbxStack GetContinueStack() {
  23.       if (this.nContinuePCStack == null) {
  24.          this.nContinuePCStack = new JSbxStack(5);
  25.       }
  26.  
  27.       return this.nContinuePCStack;
  28.    }
  29.  
  30.    public void AddBreak(int var1) throws JSbxException {
  31.       this.GetBreakStack().Push(new Integer(var1));
  32.    }
  33.  
  34.    public void GenBreakJumps(JScriptCodeBlock var1, int var2) throws JSbxException {
  35.       if (this.nBreakPCStack != null) {
  36.          Integer var3;
  37.          while((var3 = (Integer)this.nBreakPCStack.Pop()) != null) {
  38.             var1.SetPCode(var3, new JSP_Jmp(var2));
  39.          }
  40.  
  41.       }
  42.    }
  43.  
  44.    public void AddContinue(int var1) throws JSbxException {
  45.       this.GetContinueStack().Push(new Integer(var1));
  46.    }
  47.  
  48.    public void GenContinueJumps(JScriptCodeBlock var1, int var2) throws JSbxException {
  49.       if (this.nContinuePCStack != null) {
  50.          Integer var3;
  51.          while((var3 = (Integer)this.nContinuePCStack.Pop()) != null) {
  52.             var1.SetPCode(var3, new JSP_Jmp(var2));
  53.          }
  54.  
  55.       }
  56.    }
  57. }
  58.