예제 #1
0
 public void Add(RawStatements values)
 {
     if (values != null)
     {
         Add(values.Statements);
     }
 }
예제 #2
0
 public EnumMember(string name, int?value)
 {
     Name = name;
     if (value != null)
     {
         Value = new RawStatements(value.ToString());
     }
 }
예제 #3
0
 public static bool IsSame(this RawStatements r1, RawStatements r2)
 {
     if (r1 == null || r2 == null)
     {
         return(r1 == r2);
     }
     return(Enumerable.SequenceEqual(r1.Statements, r2.Statements, new RawStatementEqualityComparer()));
 }
예제 #4
0
 public void Generate(RawStatements raw)
 {
     foreach (var item in raw.Statements)
     {
         if (item is RawStatement)
         {
             Formatter.Write(((RawStatement)item).Content);
         }
         else if (item is RawStatementTypeReference)
         {
             Generate(((RawStatementTypeReference)item).TypeReference);
         }
         else
         {
             throw new ArgumentOutOfRangeException();
         }
     }
 }
예제 #5
0
 public RawDeclarationMember(RawStatements raw)
 {
     Raw = raw;
 }
예제 #6
0
 public FunctionMember(string name, RawStatements body) : base(name)
 {
     Body = body;
 }
예제 #7
0
 public TypescriptTypeReference(RawStatements raw) : this()
 {
     Raw = raw;
 }