(self, sum_type_name, constructor)
| 161 | sum_type.seq_fragment_types += constructors |
| 162 | |
| 163 | def _add_constructor(self, sum_type_name, constructor): |
| 164 | assert constructor.name not in self.constructors |
| 165 | self.constructors[constructor.name] = constructor |
| 166 | assert constructor.name not in self.singular_types |
| 167 | self.singular_types[constructor.name] = constructor |
| 168 | assert constructor.name not in self.constructor_to_sum_type |
| 169 | self.constructor_to_sum_type[constructor.name] = sum_type_name |
| 170 | |
| 171 | if not constructor.fields: |
| 172 | self.fieldless_constructors.append(constructor.name) |
| 173 | self.fieldless_constructors.sort() |
| 174 | |
| 175 | def verify_ast(self, node, expected_type=None, field_path=(), is_seq=False): |
| 176 | # type: (ASTWrapper, Node, Optional[str], Tuple[str, ...]) -> None |
no test coverage detected