Exemple #1
0
 public void AddToMap(string key, PonyTextStructureBase structureBase)
 {
     if (!map.ContainsKey(key))
     {
         map.Add(key, structureBase);
     }
     else
     {
         throw new PonyTextException(ProcessingStage.PreProcessing, $"Key '{key}' already exist");
     }
 }
Exemple #2
0
 public PonyTextStructureBase[] ToParameter(PonyTextContext ctx)
 {
     PonyTextStructureBase[] arr = new PonyTextStructureBase[arguments.Count];
     for (int i = 0; i < arguments.Count; i++)
     {
         PonyTextStructureBase structBase = arguments[i];
         if (structBase.StructureType == StructureType.MarcoStruct)
         {
             arr[i] = ctx.MacroTable.GetMarco(((PonyTextMarcoStruct)structBase).MarcoName);
         }
         else
         {
             arr[i] = structBase;
         }
     }
     return(arr);
 }
Exemple #3
0
 public void AddToParagraph(PonyTextStructureBase structureBase)
 {
     structureBases.Add(structureBase);
 }
Exemple #4
0
 public void AddFormatArgs(PonyTextStructureBase formatArg)
 {
     formatArgs.Add(formatArg);
 }
Exemple #5
0
 public void AddStructure(PonyTextStructureBase textStructureBase)
 {
     structs.Add(textStructureBase);
 }
Exemple #6
0
 public void AddArgument(PonyTextStructureBase arg)
 {
     arguments.Add(arg);
 }