[voltLib] COMPONENTS doesn't have to be preceded by LIGATURE

This commit is contained in:
moyogo 2015-12-05 20:08:58 +00:00
parent 19c55a2d05
commit d47b818774

View File

@ -70,14 +70,13 @@ class Parser(object):
elif self.next_token_ == "UNICODEVALUES": elif self.next_token_ == "UNICODEVALUES":
self.expect_keyword_("UNICODEVALUES") self.expect_keyword_("UNICODEVALUES")
gunicode = self.parse_unicode_values_() gunicode = self.parse_unicode_values_()
# Apparently TYPE is optional
gtype = None gtype = None
if self.next_token_ == "TYPE": if self.next_token_ == "TYPE":
self.expect_keyword_("TYPE") self.expect_keyword_("TYPE")
gtype = self.expect_name_() gtype = self.expect_name_()
assert gtype in ("BASE", "LIGATURE", "MARK") assert gtype in ("BASE", "LIGATURE", "MARK")
components = None components = None
if gtype == "LIGATURE": if self.next_token_ == "COMPONENTS":
self.expect_keyword_("COMPONENTS") self.expect_keyword_("COMPONENTS")
components = self.expect_number_() components = self.expect_number_()
self.expect_keyword_("END_GLYPH") self.expect_keyword_("END_GLYPH")