Exemple #1
0
        private StmtRaw ParseCatch() //例:处理异常EX
        {
            StmtCatchRaw catchStmt = new StmtCatchRaw();

            catchStmt.CatchToken = (LexTokenText)currLineTokenTape.Current;
            currLineTokenTape.MoveNext();
            catchStmt.ExceptionTypeVarToken = (LexTokenText)currLineTokenTape.Current;
            currLineTokenTape.MoveNext();
            TapeMoveNext();
            catchStmt.CatchBody = ParseStmtBlockRaw(catchStmt.CatchToken.Position.Col);
            return(catchStmt);
        }
Exemple #2
0
 public StmtCatch(StmtCatchRaw raw, Stmt parentStmt)
 {
     Raw        = raw;
     ParentStmt = parentStmt;
     StmtBody   = new StmtBlock(this, raw.CatchBody);
 }