package token;

import java.util.function.Supplier;

import file.FilePosition;
import sexpression.BackquoteExpression;
import sexpression.SExpression;

public class Backquote extends Token {

    public Backquote(String text, FilePosition position) {
        super(text, position);
    }

    @Override
    public SExpression parseSExpression(Supplier<Token> getNextToken) {
        Token nextToken = getNextToken.get();
        SExpression argument = nextToken.parseSExpression(getNextToken);

        return new BackquoteExpression(argument);
    }

}
