예제 #1
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 object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) {
			throw new global::System.NotImplementedException("OnErrorStatement");
		}
예제 #3
0
		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;
		}
예제 #4
0
	void OnErrorStatement(out OnErrorStatement stmt) {
		stmt = null;
		Location startLocation = la.Location;
		GotoStatement goToStatement = null;

		Expect(171);
		Expect(118);
		if (IsNegativeLabelName()) {
			Expect(132);
			Expect(30);
			Expect(5);
			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(out goToStatement);
			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) {
			Get();
			Expect(163);
			stmt = new OnErrorStatement(new ResumeStatement(true));

		} else SynErr(311);
		if (stmt != null) {
				stmt.StartLocation = startLocation;
				stmt.EndLocation = t.EndLocation;
			}

	}
예제 #5
0
		public sealed override object VisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) {
			this.BeginVisit(onErrorStatement);
			object result = this.TrackedVisitOnErrorStatement(onErrorStatement, data);
			this.EndVisit(onErrorStatement);
			return result;
		}
예제 #6
0
		public virtual object TrackedVisitOnErrorStatement(OnErrorStatement onErrorStatement, object data) {
			return base.VisitOnErrorStatement(onErrorStatement, data);
		}