コード例 #1
0
ファイル: Parser.cs プロジェクト: splitandthechro/nginz
 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
ファイル: ModuleCompiler.cs プロジェクト: iwatakeshi/Iodine
 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
ファイル: FunctionAnalyser.cs プロジェクト: iwatakeshi/Iodine
 public void Accept(DoStatement doStmt)
 {
     doStmt.VisitChildren (this);
 }
コード例 #7
0
ファイル: RootAnalyser.cs プロジェクト: iwatakeshi/Iodine
 public void Accept(DoStatement doStmt)
 {
     errorLog.AddError (ErrorType.ParserError, doStmt.Location,
         "Statement not allowed outside function body!");
 }
コード例 #8
0
ファイル: PatternCompiler.cs プロジェクト: iwatakeshi/Iodine
 public void Accept(DoStatement doStmt)
 {
 }