Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const result = new NumberASTNode(
parent,
instance.startPosition,
instance.endPosition,
);
result.value = Yaml.parseYamlInteger(value);
result.isInteger = true;
return result;
}
case Yaml.ScalarType.float: {
const result = new NumberASTNode(
parent,
instance.startPosition,
instance.endPosition,
);
result.value = Yaml.parseYamlFloat(value);
result.isInteger = false;
return result;
}
case Yaml.ScalarType.string: {
const result = new StringASTNode(
parent,
false,
instance.startPosition,
instance.endPosition,
);
result.value = instance.value;
return result;
}
}
break;
}
node.startPosition,
node.endPosition
)
result.value = Yaml.parseYamlInteger(value)
result.isInteger = true
return result
}
case Yaml.ScalarType.float: {
const result = new NumberASTNode(
this,
parent,
name,
node.startPosition,
node.endPosition
)
result.value = Yaml.parseYamlFloat(value)
result.isInteger = false
return result
}
case Yaml.ScalarType.string: {
const result = new StringASTNode(
this,
parent,
name,
false,
node.startPosition,
node.endPosition,
instance.customTag
)
result.value = node.value
return result
}