84 lines
2.1 KiB
JavaScript
84 lines
2.1 KiB
JavaScript
(function() {
|
|
var unique_id, _ref, _ref1,
|
|
__hasProp = {}.hasOwnProperty,
|
|
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
|
|
|
|
unique_id = 0;
|
|
|
|
this.Node = (function() {
|
|
function Node(tag, value, start_mark, end_mark) {
|
|
this.tag = tag;
|
|
this.value = value;
|
|
this.start_mark = start_mark;
|
|
this.end_mark = end_mark;
|
|
this.unique_id = "node_" + (unique_id++);
|
|
}
|
|
|
|
return Node;
|
|
|
|
})();
|
|
|
|
this.ScalarNode = (function(_super) {
|
|
__extends(ScalarNode, _super);
|
|
|
|
ScalarNode.prototype.id = 'scalar';
|
|
|
|
function ScalarNode(tag, value, start_mark, end_mark, style) {
|
|
this.tag = tag;
|
|
this.value = value;
|
|
this.start_mark = start_mark;
|
|
this.end_mark = end_mark;
|
|
this.style = style;
|
|
ScalarNode.__super__.constructor.apply(this, arguments);
|
|
}
|
|
|
|
return ScalarNode;
|
|
|
|
})(this.Node);
|
|
|
|
this.CollectionNode = (function(_super) {
|
|
__extends(CollectionNode, _super);
|
|
|
|
function CollectionNode(tag, value, start_mark, end_mark, flow_style) {
|
|
this.tag = tag;
|
|
this.value = value;
|
|
this.start_mark = start_mark;
|
|
this.end_mark = end_mark;
|
|
this.flow_style = flow_style;
|
|
CollectionNode.__super__.constructor.apply(this, arguments);
|
|
}
|
|
|
|
return CollectionNode;
|
|
|
|
})(this.Node);
|
|
|
|
this.SequenceNode = (function(_super) {
|
|
__extends(SequenceNode, _super);
|
|
|
|
function SequenceNode() {
|
|
_ref = SequenceNode.__super__.constructor.apply(this, arguments);
|
|
return _ref;
|
|
}
|
|
|
|
SequenceNode.prototype.id = 'sequence';
|
|
|
|
return SequenceNode;
|
|
|
|
})(this.CollectionNode);
|
|
|
|
this.MappingNode = (function(_super) {
|
|
__extends(MappingNode, _super);
|
|
|
|
function MappingNode() {
|
|
_ref1 = MappingNode.__super__.constructor.apply(this, arguments);
|
|
return _ref1;
|
|
}
|
|
|
|
MappingNode.prototype.id = 'mapping';
|
|
|
|
return MappingNode;
|
|
|
|
})(this.CollectionNode);
|
|
|
|
}).call(this);
|