public TryStatement(BlockStatement Block, CatchClause Catch, FinallyClause Finally, TextSpan Location) : base(Operation.Try, Location) { this.Block = Block; this.Catch = Catch; this.Finally = Finally; }
public CatchClause(Identifier Name, BlockStatement Handler, TextSpan Location, TextSpan NameLocation, TextPoint LeftParen, TextPoint RightParen) { this.Name = Name; this.Handler = Handler; this.Location = Location; this.NameLocation = NameLocation; this.leftParen = LeftParen; this.rightParen = RightParen; }
public FunctionDefinition(Identifier Name, List<Parameter> Parameters, BlockStatement Body, TextSpan Location, TextSpan HeaderLocation, TextPoint NameLocation, TextPoint LeftParenLocation, TextPoint RightParenLocation) { this.Name = Name; this.Parameters = Parameters; this.Body = Body; this.Location = Location; this.HeaderLocation = HeaderLocation; this.NameLocation = NameLocation; this.LeftParenLocation = LeftParenLocation; this.RightParenLocation = RightParenLocation; }
public FinallyClause(BlockStatement Handler, TextSpan Location) { this.Handler = Handler; this.Location = Location; }
private BlockStatement ParseBlock () { Token start = current; DList<Statement,BlockStatement> children = new DList<Statement,BlockStatement>(); CheckSyntaxExpected (Token.Type.LeftBrace); Next (); List<Statement> statements = ParseListStatement (); foreach (Statement statement in statements) children.Append (statement); CheckSyntaxExpected (Token.Type.RightBrace); BlockStatement block = new BlockStatement (children, new TextSpan (start, current)); children.Parent = block; return block; }
public void GenerateBlockStatement () { DList<MJCP.Statement, MJCP.BlockStatement> Children = new DList<MJCP.Statement, MJCP.BlockStatement> (); TextSpan Location = new TextSpan (0, 0, 0, 10, 0, 10); MJCP.BlockStatement input = new MJCP.BlockStatement (Children, Location); Children.Parent = input; MSIA.Statement result = gen.Generate (input); Assert.IsInstanceOfType(typeof(MSIA.BlockStatement), result, "#1"); }