Lines Matching defs:output
74 _text_accumulator_nt = collections.namedtuple("_text_accumulator", "text append output")
78 def output():
82 return _text_accumulator_nt(text, text.append, output)
92 append, output
94 "output" returns the contents of the accumulator
98 text, append, output = _text_accumulator()
99 return text_accumulator_nt(append, output)
104 add, output = text_accumulator()
120 print(output())
170 text, add, output = _text_accumulator()
175 return output()
190 is removed in the output.
192 is passed unmodified through to the output.
199 add, output = text_accumulator()
226 return output()[:-1]
627 text, add, output = _text_accumulator()
752 add, output = text_accumulator()
780 return linear_format(output(), parser_declarations=declarations)
1236 add, output = text_accumulator()
1308 template_dict['option_group_parsing'] = format_escape(output())
1314 add, output = text_accumulator()
1519 output is either str or None. If str, it's the output
1542 def __init__(self, input, dsl_name=None, signatures=None, output=None, indent='', preindent=''):
1547 self.output = output
1559 "<Block ", dsl_name, " input=", summarize(self.input), " output=", summarize(self.output), ">"))
1623 add, output = text_accumulator()
1634 return Block(output())
1667 # consume output and checksum line, if present.
1690 output = output_output()
1701 checksum = d['output']
1707 computed = compute_checksum(output, len(checksum))
1715 # put back output
1716 output_lines = output.splitlines(keepends=True)
1719 output = None
1721 return Block(input_output(), dsl_name, output=output)
1732 output = block.output
1736 assert not ((dsl_name is None) ^ (output is None)), "you must specify dsl_name and output together, dsl_name " + repr(dsl_name)
1758 output = ''.join(block.output)
1759 if output:
1760 if not output.endswith('\n'):
1761 output += '\n'
1762 write(output)
1764 arguments="output={} input={}".format(compute_checksum(output, 16), compute_checksum(input, 16))
1804 texts = [ta.output() for ta in self._array]
2057 output = destination.dump()
2059 if output:
2061 block = Block("", dsl_name="clinic", output=output)
2103 if id in block.output:
2105 block.output = block.output.replace(id, replacement)
2144 def parse_file(filename, *, verify=True, output=None):
2145 if not output:
2146 output = filename
2168 write_file(output, cooked)
2189 block.output = s.getvalue()
4150 fail("Can't 'output pop', stack is empty!")
4157 self.block.output.append(pprint.pformat(fd))
4158 self.block.output.append('\n')
4173 self.block.output.append(self.clinic.get_destination(name).dump())
4176 self.block.output.append(' '.join(args))
4177 self.block.output.append('\n')
4202 self.saved_output = self.block.output
4203 block.output = []
4214 block.output.extend(self.clinic.language.render(clinic, block.signatures))
4217 if block.output:
4218 fail("'preserve' only works for blocks that don't produce any output!")
4219 block.output = self.saved_output
4887 text, add, output = _text_accumulator()
5054 docstring_first_line = output()
5073 parameters = output()
5121 docstring = output()
5189 cmdline.add_argument("-o", "--output", type=str)
5261 if ns.output or ns.filename:
5288 if ns.output and len(ns.filename) > 1:
5297 parse_file(filename, output=ns.output, verify=not ns.force)