Example #1
0
 public static TagType Opposite(TagType type)
 {
     return(IsClosing(type) ? CloseToOpen[type] : OpenToClose[type]);
 }
Example #2
0
 public static TagType Closing(TagType type)
 {
     return(IsClosing(type) ? type : OpenToClose[type]);
 }
Example #3
0
 public static bool IsClosing(TagType type)
 {
     return(CloseToOpen.ContainsKey(type));
 }
Example #4
0
 public Tag(TagType type, int position)
 {
     Type     = type;
     Position = position;
 }
Example #5
0
 private static bool CanRemoveCurrentPairInTheFuture(IReadOnlyCollection <Tag> openingTags, IReadOnlyCollection <TagSpecification> currentSpecifications, TagType typeCurrentPair)
 {
     return(openingTags.FirstOrDefault(tag =>
                                       currentSpecifications.First(ts => ts.TagType == tag.TagType).IgnoreTags
                                       .Contains(typeCurrentPair)) != null);
 }
Example #6
0
 public Tag(int index, TokenType tokenType, TagType tagType)
 {
     Index     = index;
     TokenType = tokenType;
     TagType   = tagType;
 }