Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new StringASTNode(
parent,
false,
instance.startPosition,
instance.endPosition,
);
}
case Yaml.ScalarType.bool: {
return new BooleanASTNode(
parent,
Yaml.parseYamlBoolean(value),
instance.startPosition,
instance.endPosition,
);
}
case Yaml.ScalarType.int: {
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);
if (
instance.plainScalar &&
possibleBooleanValues.indexOf(value.toString()) !== -1
) {
return new BooleanASTNode(
this,
parent,
name,
parseYamlBoolean(value),
node.startPosition,
node.endPosition
)
}
switch (type) {
case Yaml.ScalarType.null: {
return new StringASTNode(
this,
parent,
name,
false,
instance.startPosition,
instance.endPosition
)
}
case Yaml.ScalarType.bool: {
return new BooleanASTNode(
this,
parent,
name,
Yaml.parseYamlBoolean(value),
node.startPosition,