public static TagType Opposite(TagType type) { return(IsClosing(type) ? CloseToOpen[type] : OpenToClose[type]); }
public static TagType Closing(TagType type) { return(IsClosing(type) ? type : OpenToClose[type]); }
public static bool IsClosing(TagType type) { return(CloseToOpen.ContainsKey(type)); }
public Tag(TagType type, int position) { Type = type; Position = position; }
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); }
public Tag(int index, TokenType tokenType, TagType tagType) { Index = index; TokenType = tokenType; TagType = tagType; }