[voltLib] range definition uses TO

This commit is contained in:
moyogo 2016-01-11 17:03:23 +00:00
parent bf167e6b3b
commit 319b4cc227
2 changed files with 4 additions and 3 deletions

View File

@ -327,7 +327,6 @@ class Parser(object):
location, coverages, pos)
return position
def parse_def_anchor_(self):
assert self.is_cur_keyword_("DEF_ANCHOR")
location = self.cur_token_location_
@ -435,7 +434,9 @@ class Parser(object):
# # location)
elif self.next_token_ == "RANGE":
self.expect_keyword_("RANGE")
start, end = self.expect_string_(), self.expect_string_()
start = self.expect_string_()
self.expect_keyword_("TO")
end = self.expect_string_()
coverage.append((start, end))
return coverage

View File

@ -190,7 +190,7 @@ class ParserTest(unittest.TestCase):
def test_def_group_range(self):
[def_group] = self.parse(
'DEF_GROUP "KERN_lc_a_2ND"\n'
'ENUM RANGE "a" "atilde" GLYPH "b" RANGE "c" "cdotaccent" '
'ENUM RANGE "a" TO "atilde" GLYPH "b" RANGE "c" TO "cdotaccent" '
'END_ENUM\n'
'END_GROUP'
).statements