98d38ffb4a1c7137cf48aa716178e8f12b79319b
[mono.git] / mcs / class / Microsoft.JScript / Microsoft.JScript / ASTList.cs
1 //
2 // ASTList.cs: Representation of a collection of source elements 
3 //             that form an Ecmascript program.
4 //
5 // Author: 
6 //      Cesar Octavio Lopez Nataren
7 //
8 // (C) 2003, Cesar Octavio Lopez Nataren, <cesar@ciencias.unam.mx>
9 //
10
11 using System.Collections;
12 using System.Text;
13 using System;
14
15 namespace Microsoft.JScript.Tmp {
16
17         public class ASTList : AST {
18
19                 internal ArrayList elems;
20
21                 internal ASTList ()
22                 {
23                         elems = new ArrayList ();
24                 }
25
26                 internal ASTList Add (AST elem)
27                 {
28                         elems.Add (elem);
29                         return this;
30                 }
31
32                 public override string ToString ()
33                 {
34                         StringBuilder sb = new StringBuilder ();
35
36                         foreach (AST ast in elems)
37                                 sb.Append (ast.ToString () + "\n");
38
39                         return sb.ToString ();
40                 }
41
42                 internal override bool Resolve (IdentificationTable context)
43                 {
44                         throw new NotImplementedException ();
45                 }
46
47                 internal override void Emit (EmitContext ec)
48                 {
49                         throw new NotImplementedException ();
50                 }
51         }
52 }