private IfStatement GetElif(SuiteStatement s) { if (s.stmts.Count != 1) { return(null); } return(s.stmts[0] as IfStatement); }
public IfStatement( Exp test, SuiteStatement then, SuiteStatement orelse, string filename, int start, int end) : base(filename, start, end) { this.Test = test; this.Then = then; this.Else = orelse; }
public void VisitSuite(SuiteStatement s) { foreach (var stm in s.stmts) { stm.Accept(this); if (!(stm is SuiteStatement)) { w.WriteLine(); } } }
public TryStatement( SuiteStatement body, List <ExceptHandler> exHandlers, Statement elseHandler, Statement finallyHandler, string filename, int start, int end) : base(filename, start, end) { this.body = body; this.exHandlers = exHandlers; this.elseHandler = elseHandler; this.finallyHandler = finallyHandler; }
public ForStatement( Exp exprs, Exp tests, SuiteStatement body, SuiteStatement orelse, string filename, int start, int end) : base(filename, start, end) { this.exprs = exprs; this.tests = tests; this.Body = body; this.Else = orelse; }
public FunctionDef( Identifier name, List <Parameter> parameters, Identifier vararg, Identifier kwarg, Exp annotation, SuiteStatement body, string filename, int start, int end) : base(filename, start, end) { this.name = name; this.parameters = parameters; this.vararg = vararg; this.kwarg = kwarg; this.annotation = annotation; this.body = body; }
public ClassDef(Identifier name, List <Exp> baseClasses, SuiteStatement body, string filename, int start, int end) : base(filename, start, end) { this.name = name; this.args = baseClasses; this.body = body; }
public WithStatement(List <WithItem> ws, SuiteStatement s, string filename, int pos, int end) : base(filename, pos, end) { this.items = ws; this.body = s; }
public Module(string moduleName, SuiteStatement body, string filename, int begin, int end) : base(filename, begin, end) { this.Name = moduleName; this.body = body; }
public ExceptHandler(Exp type, Identifier name, SuiteStatement body, string filename, int start, int end) : base(filename, start, end) { this.type = type; this.name = name; this.body = body; }