def construct_yaml_str(self, node): """ Return a node class representing a line-marked string. """ obj = SafeConstructor.construct_scalar(self, node) assert da.util.is_string(obj) return StringNode(obj, node.start_mark, node.end_mark)
def construct_scalar(node): scalar = SafeConstructor.construct_scalar(loader, node) key = id(scalar) if not line_numbers.get(key): line_numbers[key] = LineTracker(filename, node.__line__) else: line_numbers[key] = SHARED_OBJECT return scalar
def construct_yaml_float(self, node): obj = SafeConstructor.construct_scalar(self, node) return float_node(obj, node.start_mark, node.end_mark)
def construct_yaml_str(self, node): obj = SafeConstructor.construct_scalar(self, node) assert isinstance(obj, unicode) return unicode_node(obj, node.start_mark, node.end_mark)
def construct_yaml_str(self, node): # always return unicode objects obj = SafeConstructor.construct_scalar(self, node) return str_node(obj, node_info=node)