Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def parse_map_line_simple(self, items, line):
map_item = self.key_value(line)
if map_item:
(key, value) = map_item
key = convertImplicit(key)
if items.has_key(key):
self.error("Duplicate key "+key)
items[key] = self.parse_value(value)
else:
self.error("bad key for map")
def parse_untyped_value(self, value):
parse = self.parseSpecial(value)
if parse:
(ok, data) = parse
return data
token = getToken("(\S.*)", value)
if token:
lines = [token] + \
pruneTrailingEmpties(self.nestedDocs.popNestedLines())
return convertImplicit(joinLines(lines))
else:
self.nestedDocs.nestToNextLine()
return self.parseLines()
def parse_map_line_simple(self, items, line):
map_item = self.key_value(line)
if map_item:
(key, value) = map_item
key = convertImplicit(key)
if items.has_key(key):
self.error("Duplicate key "+key)
items[key] = self.parse_value(value)
else:
self.error("bad key for map")
def parse_untyped_value(self, value):
parse = self.parseSpecial(value)
if parse:
(ok, data) = parse
return data
token = getToken("(\S.*)", value)
if token:
lines = [token] + \
pruneTrailingEmpties(self.nestedDocs.popNestedLines())
return convertImplicit(joinLines(lines))
else:
self.nestedDocs.nestToNextLine()
return self.parseLines()
def parse_untyped_value(self, value):
parse = self.parseSpecial(value)
if parse:
(ok, data) = parse
return data
token = getToken("(\S.*)", value)
if token:
lines = [token] + \
pruneTrailingEmpties(self.nestedDocs.popNestedLines())
return convertImplicit(joinLines(lines))
else:
self.nestedDocs.nestToNextLine()
return self.parseLines()