Created
February 1, 2019 13:18
-
-
Save PatrickKalkman/63133be9cba2782067430b9708465e4e to your computer and use it in GitHub Desktop.
Combining parsers to parse Tag attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static readonly Parser<PlaylistTagAttribute> TagAttributeParser = | |
from attribute in AttributeWithQuotesParser | |
.Or(AttributeWithoutQuotesParser) | |
.Or(AttributeWithSingleValueParser) | |
select attribute; | |
public static readonly Parser<List<PlaylistTagAttribute>> MultipleTagAttributesParser = | |
from attributes in TagAttributeParser.Many() | |
select new List<PlaylistTagAttribute>(attributes); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment