Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ function mergeMappings(state:State, destination, source) {
}
}

function storeMappingPair(state:State, _result:ast.YamlMap, keyTag, keyNode:ast.YAMLNode,
valueNode:ast.YAMLNode):ast.YamlMap {
function storeMappingPair(state:State, _result:ast.YAMLMap, keyTag, keyNode:ast.YAMLNode,
valueNode:ast.YAMLNode):ast.YAMLMap {
var index, quantity;
if (keyNode==null){
return;
Expand Down Expand Up @@ -885,7 +885,7 @@ function readFlowCollection(state:State, nodeIndent) {
}

if (isMapping) {
storeMappingPair(state, (<ast.YamlMap>_result), keyTag, keyNode, valueNode);
storeMappingPair(state, (<ast.YAMLMap>_result), keyTag, keyNode, valueNode);
} else if (isPair) {
var mp=storeMappingPair(state, null, keyTag, keyNode, valueNode);
mp.parent=_result;
Expand Down
5 changes: 3 additions & 2 deletions src/yamlAST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ export interface YAMLMapping extends YAMLNode{
export interface YAMLSequence extends YAMLNode{
items:YAMLNode[]
}
export interface YamlMap extends YAMLNode{
export interface YAMLMap extends YAMLNode{
mappings:YAMLMapping[]
}
export type YamlMap = YAMLMap; // keep it for backward compatibility
export function newMapping(key:YAMLScalar,value:YAMLNode):YAMLMapping{
var end = (value ? value.endPosition : key.endPosition + 1); //FIXME.workaround, end should be defied by position of ':'
//console.log('key: ' + key.value + ' ' + key.startPosition + '..' + key.endPosition + ' ' + value + ' end: ' + end);
Expand Down Expand Up @@ -117,7 +118,7 @@ export function newItems():YAMLSequence{
export function newSeq():YAMLSequence{
return newItems();
}
export function newMap(mappings?: YAMLMapping[]):YamlMap{
export function newMap(mappings?: YAMLMapping[]):YAMLMap {
return {
errors:[],
startPosition:-1,
Expand Down