Lines Matching full:anchor
423 value = PyUnicode_FromYamlString(token.data.anchor.value)
555 anchor = PyUnicode_FromYamlString(event.data.alias.anchor)
556 return AliasEvent(anchor, start_mark, end_mark)
558 anchor = None
559 if event.data.scalar.anchor != NULL:
560 anchor = PyUnicode_FromYamlString(event.data.scalar.anchor)
583 return ScalarEvent(anchor, tag,
587 anchor = None
588 if event.data.sequence_start.anchor != NULL:
589 anchor = PyUnicode_FromYamlString(event.data.sequence_start.anchor)
601 return SequenceStartEvent(anchor, tag, implicit,
604 anchor = None
605 if event.data.mapping_start.anchor != NULL:
606 anchor = PyUnicode_FromYamlString(event.data.mapping_start.anchor)
618 return MappingStartEvent(anchor, tag, implicit,
696 anchor = PyUnicode_FromYamlString(self.parsed_event.data.alias.anchor)
697 if anchor not in self.anchors:
705 return self.anchors[anchor]
706 anchor = None
708 and self.parsed_event.data.scalar.anchor != NULL:
709 anchor = PyUnicode_FromYamlString(self.parsed_event.data.scalar.anchor)
711 and self.parsed_event.data.sequence_start.anchor != NULL:
712 anchor = PyUnicode_FromYamlString(self.parsed_event.data.sequence_start.anchor)
714 and self.parsed_event.data.mapping_start.anchor != NULL:
715 anchor = PyUnicode_FromYamlString(self.parsed_event.data.mapping_start.anchor)
716 if anchor is not None:
717 if anchor in self.anchors:
723 raise ComposerError(u"found duplicate anchor; first occurrence",
724 self.anchors[anchor].start_mark, u"second occurrence", mark)
727 node = self._compose_scalar_node(anchor)
729 node = self._compose_sequence_node(anchor)
731 node = self._compose_mapping_node(anchor)
735 cdef _compose_scalar_node(self, object anchor): argument
772 if anchor is not None:
773 self.anchors[anchor] = node
777 cdef _compose_sequence_node(self, object anchor): argument
800 if anchor is not None:
801 self.anchors[anchor] = node
817 cdef _compose_mapping_node(self, object anchor): argument
839 if anchor is not None:
840 self.anchors[anchor] = node
968 cdef yaml_char_t *anchor
1030 anchor = NULL
1031 anchor_object = event_object.anchor
1035 raise TypeError(u"anchor must be a string")
1036 anchor = PyBytes_AS_Yaml_STRING(anchor_object)
1037 if yaml_alias_event_initialize(event, anchor) == 0:
1040 anchor = NULL
1041 anchor_object = event_object.anchor
1046 raise TypeError(u"anchor must be a string")
1047 anchor = PyBytes_AS_Yaml_STRING(anchor_object)
1078 if yaml_scalar_event_initialize(event, anchor, tag, value, length,
1082 anchor = NULL
1083 anchor_object = event_object.anchor
1088 raise TypeError(u"anchor must be a string")
1089 anchor = PyBytes_AS_Yaml_STRING(anchor_object)
1104 if yaml_sequence_start_event_initialize(event, anchor, tag,
1108 anchor = NULL
1109 anchor_object = event_object.anchor
1114 raise TypeError(u"anchor must be a string")
1115 anchor = PyBytes_AS_Yaml_STRING(anchor_object)
1130 if yaml_mapping_start_event_initialize(event, anchor, tag,
1261 cdef yaml_char_t *anchor
1270 anchor = NULL
1275 raise TypeError(u"anchor must be a string")
1276 anchor = PyBytes_AS_Yaml_STRING(anchor_object)
1278 if yaml_alias_event_initialize(&event, anchor) == 0:
1319 if yaml_scalar_event_initialize(&event, anchor, tag, value, length,
1340 if yaml_sequence_start_event_initialize(&event, anchor, tag,
1369 if yaml_mapping_start_event_initialize(&event, anchor, tag,