import CypherCmdParserVisitor from '../generated-parser/CypherCmdParserVisitor';
import { getParseTreeAndTokens } from './formattingHelpers';
class StandardizingVisitor extends CypherCmdParserVisitor {
    buffer = [];
    format = (root) => {
        this.visit(root);
        return this.buffer.join('');
    };
    visitTerminal = (node) => {
        this.buffer.push(node.getText().toLowerCase());
        this.buffer.push(' ');
    };
}
export function standardizeQuery(query) {
    const { tree } = getParseTreeAndTokens(query);
    const visitor = new StandardizingVisitor();
    return visitor.format(tree);
}
//# sourceMappingURL=standardizer.js.map