Inheritance: ICSharpCode.NRefactory.Ast.StatementWithEmbeddedStatement
示例#1
0
文件: Parser.cs 项目: Altaxo/Altaxo
	void OnErrorStatement(
//#line  3413 "VBNET.ATG" 
out OnErrorStatement stmt) {

//#line  3415 "VBNET.ATG" 
		stmt = null;
		Location startLocation = la.Location;
		GotoStatement goToStatement = null;
		
		Expect(171);
		Expect(118);
		if (
//#line  3422 "VBNET.ATG" 
IsNegativeLabelName()) {
			Expect(132);
			Expect(30);
			Expect(5);

//#line  3424 "VBNET.ATG" 
			long intLabel = Int64.Parse(t.val);
			if(intLabel != 1) {
				Error("invalid label in on error statement.");
			}
			stmt = new OnErrorStatement(new GotoStatement((intLabel * -1).ToString()));
			
		} else if (la.kind == 132) {
			GotoStatement(
//#line  3430 "VBNET.ATG" 
out goToStatement);

//#line  3432 "VBNET.ATG" 
			string val = goToStatement.Label;
			
			// if value is numeric, make sure that is 0
			try {
				long intLabel = Int64.Parse(val);
				if(intLabel != 0) {
					Error("invalid label in on error statement.");
				}
			} catch {
			}
			stmt = new OnErrorStatement(goToStatement);
			
		} else if (la.kind == 194) {
			lexer.NextToken();
			Expect(163);

//#line  3446 "VBNET.ATG" 
			stmt = new OnErrorStatement(new ResumeStatement(true));
			
		} else SynErr(319);

//#line  3450 "VBNET.ATG" 
		if (stmt != null) {
		stmt.StartLocation = startLocation;
		stmt.EndLocation = t.EndLocation;
		}
		
	}
		public sealed override object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) {
			this.BeginVisit(onErrorStatement);
			object result = this.TrackedVisitOnErrorStatement(onErrorStatement, data);
			this.EndVisit(onErrorStatement);
			return result;
		}
 public override object TrackedVisitOnErrorStatement(OnErrorStatement onErrorStatement, object data)
 {
     return null;
 }
示例#4
0
		public virtual object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) {
			throw new global::System.NotImplementedException("OnErrorStatement");
		}
		public virtual object TrackedVisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) {
			return base.VisitOnErrorStatement(onErrorStatement, data);
		}
示例#6
0
文件: Parser.cs 项目: almazik/ILSpy
	void OnErrorStatement(
#line  2596 "VBNET.ATG" 
out OnErrorStatement stmt) {

#line  2598 "VBNET.ATG" 
		stmt = null;
		GotoStatement goToStatement = null;
		
		Expect(135);
		Expect(92);
		if (
#line  2604 "VBNET.ATG" 
IsNegativeLabelName()) {
			Expect(104);
			Expect(15);
			Expect(5);

#line  2606 "VBNET.ATG" 
			long intLabel = Int64.Parse(t.val);
			if(intLabel != 1) {
				Error("invalid label in on error statement.");
			}
			stmt = new OnErrorStatement(new GotoStatement((intLabel * -1).ToString()));
			
		} else if (la.kind == 104) {
			GotoStatement(
#line  2612 "VBNET.ATG" 
out goToStatement);

#line  2614 "VBNET.ATG" 
			string val = goToStatement.Label;
			
			// if value is numeric, make sure that is 0
			try {
				long intLabel = Int64.Parse(val);
				if(intLabel != 0) {
					Error("invalid label in on error statement.");
				}
			} catch {
			}
			stmt = new OnErrorStatement(goToStatement);
			
		} else if (la.kind == 153) {
			lexer.NextToken();
			Expect(128);

#line  2628 "VBNET.ATG" 
			stmt = new OnErrorStatement(new ResumeStatement(true));
			
		} else SynErr(265);
	}
示例#7
0
	void OnErrorStatement(
#line  3081 "VBNET.ATG" 
out OnErrorStatement stmt) {

#line  3083 "VBNET.ATG" 
		stmt = null;
		GotoStatement goToStatement = null;
		
		Expect(157);
		Expect(105);
		if (
#line  3089 "VBNET.ATG" 
IsNegativeLabelName()) {
			Expect(119);
			Expect(18);
			Expect(5);

#line  3091 "VBNET.ATG" 
			long intLabel = Int64.Parse(t.val);
			if(intLabel != 1) {
				Error("invalid label in on error statement.");
			}
			stmt = new OnErrorStatement(new GotoStatement((intLabel * -1).ToString()));
			
		} else if (la.kind == 119) {
			GotoStatement(
#line  3097 "VBNET.ATG" 
out goToStatement);

#line  3099 "VBNET.ATG" 
			string val = goToStatement.Label;
			
			// if value is numeric, make sure that is 0
			try {
				long intLabel = Int64.Parse(val);
				if(intLabel != 0) {
					Error("invalid label in on error statement.");
				}
			} catch {
			}
			stmt = new OnErrorStatement(goToStatement);
			
		} else if (la.kind == 179) {
			lexer.NextToken();
			Expect(149);

#line  3113 "VBNET.ATG" 
			stmt = new OnErrorStatement(new ResumeStatement(true));
			
		} else SynErr(283);
	}
		public virtual object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) {
			Debug.Assert((onErrorStatement != null));
			Debug.Assert((onErrorStatement.EmbeddedStatement != null));
			nodeStack.Push(onErrorStatement.EmbeddedStatement);
			onErrorStatement.EmbeddedStatement.AcceptVisitor(this, data);
			onErrorStatement.EmbeddedStatement = ((Statement)(nodeStack.Pop()));
			return null;
		}
示例#9
0
 public virtual object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) {
     throw CreateException(onErrorStatement);
 }
 public object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data)
 {
     throw new NotImplementedException ();
 }
示例#11
0
 public virtual object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data)
 {
     Debug.Assert((onErrorStatement != null));
     Debug.Assert((onErrorStatement.EmbeddedStatement != null));
     return onErrorStatement.EmbeddedStatement.AcceptVisitor(this, data);
 }
 public virtual bool VisitOnErrorStatement(OnErrorStatement onErrorStatement, object d)
 {
     if ((onErrorStatement == null)) {
         return SetFailure();
     }
     if ((d == null)) {
         return SetFailure();
     }
     if ((onErrorStatement.EmbeddedStatement == null)) {
         return SetFailure();
     }
     if(onErrorStatement.GetType() != d.GetType()) {return SetFailure();}
     var data = (OnErrorStatement)d;
     if (!IsMatch(onErrorStatement, data)) {
         return SetFailure();
     }
     return onErrorStatement.EmbeddedStatement.AcceptVisitor(this, data.EmbeddedStatement);
 }
示例#13
0
		public override object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data)
		{
			return base.VisitOnErrorStatement(onErrorStatement, data);
		}
 private bool IsMatch(OnErrorStatement left, OnErrorStatement data)
 {
     return false;
 }
		public object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data)
		{
			AddError(onErrorStatement, "old VB-style exception handling is not supported.");
			return null;
		}
示例#16
0
	void OnErrorStatement(
#line  3320 "VBNET.ATG" 
out OnErrorStatement stmt) {

#line  3322 "VBNET.ATG" 
		stmt = null;
		GotoStatement goToStatement = null;
		
		Expect(171);
		Expect(118);
		if (
#line  3328 "VBNET.ATG" 
IsNegativeLabelName()) {
			Expect(132);
			Expect(30);
			Expect(5);

#line  3330 "VBNET.ATG" 
			long intLabel = Int64.Parse(t.val);
			if(intLabel != 1) {
				Error("invalid label in on error statement.");
			}
			stmt = new OnErrorStatement(new GotoStatement((intLabel * -1).ToString()));
			
		} else if (la.kind == 132) {
			GotoStatement(
#line  3336 "VBNET.ATG" 
out goToStatement);

#line  3338 "VBNET.ATG" 
			string val = goToStatement.Label;
			
			// if value is numeric, make sure that is 0
			try {
				long intLabel = Int64.Parse(val);
				if(intLabel != 0) {
					Error("invalid label in on error statement.");
				}
			} catch {
			}
			stmt = new OnErrorStatement(goToStatement);
			
		} else if (la.kind == 194) {
			lexer.NextToken();
			Expect(163);

#line  3352 "VBNET.ATG" 
			stmt = new OnErrorStatement(new ResumeStatement(true));
			
		} else SynErr(319);
	}