Exemplo n.º 1
0
		public TryStatement(BlockStatement Block, CatchClause Catch, FinallyClause Finally, TextSpan Location)
			: base(Operation.Try, Location)
		{
			this.Block = Block;
			this.Catch = Catch;
			this.Finally = Finally;
		}
Exemplo n.º 2
0
		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;
		}
Exemplo n.º 3
0
		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;
		}
Exemplo n.º 4
0
		public FinallyClause(BlockStatement Handler, TextSpan Location)
		{
			this.Handler = Handler;
			this.Location = Location;
		}
Exemplo n.º 5
0
		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;
		}
Exemplo n.º 6
0
 public FinallyClause(BlockStatement Handler, TextSpan Location)
 {
     this.Handler  = Handler;
     this.Location = Location;
 }
Exemplo n.º 7
0
		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");
		}