[voltLib] name is optional for DEF_SCRIPT and DEF_LANGSYS
This commit is contained in:
parent
81d8d847a9
commit
b49c6b917e
@ -109,8 +109,10 @@ class Parser(object):
|
||||
def parse_def_script_(self):
|
||||
assert self.is_cur_keyword_("DEF_SCRIPT")
|
||||
location = self.cur_token_location_
|
||||
self.expect_keyword_("NAME")
|
||||
name = self.expect_string_()
|
||||
name = None
|
||||
if self.next_token_ == "NAME":
|
||||
self.expect_keyword_("NAME")
|
||||
name = self.expect_string_()
|
||||
self.expect_keyword_("TAG")
|
||||
tag = self.expect_string_()
|
||||
langs = []
|
||||
@ -126,8 +128,10 @@ class Parser(object):
|
||||
def parse_langsys_(self):
|
||||
assert self.is_cur_keyword_("DEF_LANGSYS")
|
||||
location = self.cur_token_location_
|
||||
self.expect_keyword_("NAME")
|
||||
name = self.expect_string_()
|
||||
name = None
|
||||
if self.next_token_ == "NAME":
|
||||
self.expect_keyword_("NAME")
|
||||
name = self.expect_string_()
|
||||
self.expect_keyword_("TAG")
|
||||
tag = self.expect_string_()
|
||||
features = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user