コード例 #1
0
ファイル: TryStatement.cs プロジェクト: alesliehughes/olive
		public TryStatement(BlockStatement Block, CatchClause Catch, FinallyClause Finally, TextSpan Location)
			: base(Operation.Try, Location)
		{
			this.Block = Block;
			this.Catch = Catch;
			this.Finally = Finally;
		}
コード例 #2
0
ファイル: CatchClause.cs プロジェクト: alesliehughes/olive
		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;
		}
コード例 #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;
		}
コード例 #4
0
ファイル: FinallyClause.cs プロジェクト: alesliehughes/olive
		public FinallyClause(BlockStatement Handler, TextSpan Location)
		{
			this.Handler = Handler;
			this.Location = Location;
		}
コード例 #5
0
ファイル: Parser.cs プロジェクト: alesliehughes/olive
		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;
		}
コード例 #6
0
ファイル: FinallyClause.cs プロジェクト: krixkrix/olive
 public FinallyClause(BlockStatement Handler, TextSpan Location)
 {
     this.Handler  = Handler;
     this.Location = Location;
 }
コード例 #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");
		}