Kai Cataldo bbce2b3807 Remove comment attachment (babel/babel-eslint#736)
* Remove comment attachment

* Simplify error messaging in tests
2019-01-11 12:23:34 -05:00

11 lines
330 B
JavaScript

"use strict";
const convertTemplateType = require("./convertTemplateType");
const convertToken = require("./convertToken");
module.exports = function(tokens, tt, code) {
return convertTemplateType(tokens, tt)
.filter(t => t.type !== "CommentLine" && t.type !== "CommentBlock")
.map(t => convertToken(t, tt, code));
};