package com.jfireel.expression.node.impl;

import com.jfireel.expression.node.CalculateNode;
import com.jfireel.expression.token.Token;
import com.jfireel.expression.token.TokenType;

import java.util.Map;

public class StringNode implements CalculateNode {
	private String literals;

	public StringNode(String literals) {
		this.literals = literals;
	}

	@Override
	public Object calculate(Map<String, Object> variables) {
		return literals;
	}

	@Override
	public TokenType type() {
		return Token.STRING;
	}

	@Override
	public String literals() {
		return '\'' + literals + "'";
	}

	@Override
	public String toString() {
		return literals();
	}

}
