Example #1
0
 private static AstNode ParseWith(TokenStream stream)
 {
     WithStatement ret = new WithStatement (stream.Location);
     stream.Expect (TokenClass.Keyword, "with");
     stream.Expect (TokenClass.OpenParan);
     ret.Add (ParseExpression (stream));
     stream.Expect (TokenClass.CloseParan);
     ret.Add (ParseStatement (stream));
     return ret;
 }
Example #2
0
 public void Accept(WithStatement withStmt)
 {
     withStmt.Visit (functionCompiler);
 }
		public override void Accept (WithStatement withStmt)
		{
			symbolTable.NextScope ();
			withStmt.Expression.Visit (this);
			methodBuilder.EmitInstruction (withStmt.Location, Opcode.BeginWith);
			withStmt.Body.Visit (this);
			methodBuilder.EmitInstruction (withStmt.Location, Opcode.EndWith);
			symbolTable.LeaveScope ();
		}
Example #4
0
		public override void Accept (WithStatement withStmt)
		{
			errorLog.AddError (ErrorType.ParserError, withStmt.Location,
				"statement can not exist inside pattern!");
		}
 public virtual void Accept(WithStatement with)
 {
 }
Example #6
0
 public void Accept(WithStatement withStmt)
 {
     symbolTable.BeginScope ();
     withStmt.VisitChildren (this);
     symbolTable.EndScope ();
 }
Example #7
0
 public void Accept(WithStatement withStmt)
 {
     errorLog.AddError (ErrorType.ParserError, withStmt.Location,
         "Statement not allowed outside function body!");
 }
Example #8
0
 public void Accept(WithStatement withStmt)
 {
 }