示例#1
0
 private static AstNode ParseDoWhile(TokenStream stream)
 {
     DoStatement ret = new DoStatement (stream.Location);
     stream.Expect (TokenClass.Keyword, "do");
     ret.Add (ParseStatement (stream));
     stream.Expect (TokenClass.Keyword, "while");
     stream.Expect (TokenClass.OpenParan);
     ret.Add (ParseExpression (stream));
     stream.Expect (TokenClass.CloseParan);
     return ret;
 }
示例#2
0
 public void Accept(DoStatement doStmt)
 {
     doStmt.Visit (functionCompiler);
 }
示例#3
0
		public override void Accept (DoStatement doStmt)
		{
			IodineLabel doLabel = methodBuilder.CreateLabel ();
			IodineLabel breakLabel = methodBuilder.CreateLabel ();
			breakLabels.Push (breakLabel);
			continueLabels.Push (doLabel);
			methodBuilder.MarkLabelPosition (doLabel);
			doStmt.Body.Visit (this);
			doStmt.Condition.Visit (this);
			methodBuilder.EmitInstruction (doStmt.Condition.Location, Opcode.JumpIfTrue,
				doLabel);
			methodBuilder.MarkLabelPosition (breakLabel);
			breakLabels.Pop ();
			continueLabels.Pop ();
		}
示例#4
0
		public override void Accept (DoStatement doStmt)
		{
			errorLog.AddError (ErrorType.ParserError, doStmt.Location,
				"statement can not exist inside pattern!");
		}
示例#5
0
 public virtual void Accept(DoStatement doStmt)
 {
 }
示例#6
0
 public void Accept(DoStatement doStmt)
 {
     doStmt.VisitChildren (this);
 }
示例#7
0
 public void Accept(DoStatement doStmt)
 {
     errorLog.AddError (ErrorType.ParserError, doStmt.Location,
         "Statement not allowed outside function body!");
 }
示例#8
0
 public void Accept(DoStatement doStmt)
 {
 }