internal Raise(RaiseStatement stmt) : this() { if (stmt.ExceptType != null) _type = Convert(stmt.ExceptType); if (stmt.Value != null) _inst = Convert(stmt.Value); if (stmt.Traceback != null) _tback = Convert(stmt.Traceback); }
//raise_stmt: 'raise' [expression [',' expression [',' expression]]] private RaiseStatement ParseRaiseStmt() { Eat(TokenKind.KeywordRaise); var start = GetStart(); Expression type = null, _value = null, traceback = null; if (!NeverTestToken(PeekToken())) { type = ParseExpression(); if (MaybeEat(TokenKind.Comma)) { _value = ParseExpression(); if (MaybeEat(TokenKind.Comma)) { traceback = ParseExpression(); } } } RaiseStatement ret = new RaiseStatement(type, _value, traceback); ret.SetLoc(_globalParent, start, GetEnd()); return ret; }
// *** END GENERATED CODE *** #endregion public override bool Walk(RaiseStatement node) { node.Parent = _currentScope; node.InFinally = _finallyCount[_finallyCount.Count - 1] != 0; return(base.Walk(node)); }
public override bool Walk(RaiseStatement node) { node.Parent = _currentScope; node.InFinally = _finallyCount[_finallyCount.Count - 1] != 0; return base.Walk(node); }
public override bool Walk(RaiseStatement node) { CommonWalk(node); return true; }
public override void PostWalk(RaiseStatement node) { CommonPostWalk(node); }
public void PostWalk(RaiseStatement node) { PostProcess(node); }
// RaiseStatement public bool Walk(RaiseStatement node) { return Process(node); }
public static string Format(RaiseStatement node) { return("raise " + Format(node.ExceptType) + "(" + Format(node.Value) + ")"); }
public override bool Walk(RaiseStatement node) { Emit(node); return false; }
public virtual void PostWalk(RaiseStatement node) { }
// RaiseStatement public virtual bool Walk(RaiseStatement node) { return true; }
//public void Visit(PyAst.PythonAst node)=> throw CreateNotImplementedEx(); public void Visit(PyAst.RaiseStatement node) { AppendLineWithIndentation("raise" + (node.Value is null ? "" : " " + Visit(node.Value))); }