Exemple #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;
 }
Exemple #2
0
 public void Accept(DoStatement doStmt)
 {
     doStmt.Visit (functionCompiler);
 }
		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 ();
		}
		public override void Accept (DoStatement doStmt)
		{
			errorLog.AddError (ErrorType.ParserError, doStmt.Location,
				"statement can not exist inside pattern!");
		}
 public virtual void Accept(DoStatement doStmt)
 {
 }
 public void Accept(DoStatement doStmt)
 {
     doStmt.VisitChildren (this);
 }
Exemple #7
0
 public void Accept(DoStatement doStmt)
 {
     errorLog.AddError (ErrorType.ParserError, doStmt.Location,
         "Statement not allowed outside function body!");
 }
Exemple #8
0
 public void Accept(DoStatement doStmt)
 {
 }