"use strict";

const { validateArguments } = require("@validatem/core");
const required = require("@validatem/required");

const node = require("../ast-node");
const isLiteralValue = require("../validators/is-literal-value");

module.exports = function (_operations) {
	return function literalValue(_value) {
		let [ value ] = validateArguments(arguments, {
			value: [ required, isLiteralValue ]
		});
	
		return node({ type: "literalValue", value });
	};
};
