angular-estree-parser
Version:
A parser that converts Angular source code into an ESTree-compatible form
10 lines (9 loc) • 494 B
JavaScript
import { transform as transformNode } from './transform-node.js';
import { transform as transformTemplateBindings } from './transform-template-binding.js';
function transformAstResult({ result: { ast }, text, comments, }) {
return Object.assign(transformNode(ast, text), { comments });
}
function transformMicrosyntaxResult({ result: { templateBindings }, text, }) {
return transformTemplateBindings(templateBindings, text);
}
export { transformAstResult, transformMicrosyntaxResult };