Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

        def parse_string_literal(premonition_stream_1):
	assert(premonition_stream_1.peek() == "\"")

	premonition_stream_1.consume()
	
	literal = StringIO()
	in_escape = False
	for input in premonition_stream_1:
		if not in_escape:
			if input == "\\":
				in_escape = True
			elif input == "\"": # end quote.
				break
			else:
				literal.write(input)
		else:
			# TODO are there other escapes than "\"" possible?
			literal.write(input)
			in_escape = False
	
	item = literal.getvalue()
	assert(premonition_stream_1.peek() == "\"")
	premonition_stream_1.consume()

	return item
        


src/i/m/IMAPFS-HEAD/niceimap.py   IMAPFS(Download)
		premonition_stream_1.consume()
 
		separator = lisp.parse_string_literal(premonition_stream_1)
		assert(separator == "/") # limitation
 
		assert(premonition_stream_1.peek() == " ")
		premonition_stream_1.consume()
 
		if premonition_stream_1.peek() == "\"":
			name = lisp.parse_string_literal(premonition_stream_1)