···3333`;
34343535exports[`works while only minifying 1`] = `
3636-"import match from 'reghex/macro';
3636+"import { match } from 'reghex/macro';
3737const node = match('node')([\\"\\", \\"+|\\", \\"+(\\", \\"(\\", \\"?\\", \\"))*\\"], 1, 2, 3, 4, 5);"
3838`;
39394040exports[`works with local recursion 1`] = `
4141-"import { tag, _exec, _pattern } from 'reghex';
4141+"import { match as m, tag, _exec, _pattern } from 'reghex';
42424343const inner = function (state) {
4444 var index_1 = state.index;
···7474`;
75757676exports[`works with non-capturing groups 1`] = `
7777-"import { _exec, _pattern, tag as _tag } from 'reghex';
7777+"import { match, _exec, _pattern, tag as _tag } from 'reghex';
78787979var _node_expression = _pattern(1),
8080 _node_expression2 = _pattern(2),
···131131`;
132132133133exports[`works with standard features 1`] = `
134134-"import { _exec, _pattern, tag as _tag } from \\"reghex\\";
134134+"import { match, _exec, _pattern, tag as _tag } from \\"reghex\\";
135135136136var _node_expression = _pattern(1),
137137 _node_expression2 = _pattern(2),
···219219`;
220220221221exports[`works with transform functions 1`] = `
222222-"import { _exec, _pattern, tag as _tag } from 'reghex';
222222+"import { match, _exec, _pattern, tag as _tag } from 'reghex';
223223224224var _inner_transform = x => x;
225225
+8-8
src/babel/plugin.test.js
···3344it('works with standard features', () => {
55 const code = `
66- import match from 'reghex/macro';
66+ import { match } from 'reghex/macro';
7788 const node = match('node')\`
99 \${1}+ | \${2}+ (\${3} ( \${4}? \${5} ) )*
···18181919it('works while only minifying', () => {
2020 const code = `
2121- import match from 'reghex/macro';
2121+ import { match } from 'reghex/macro';
22222323 const node = match('node')\`
2424 \${1}+ | \${2}+ (\${3} ( \${4}? \${5} ) )*
···3737it('works with local recursion', () => {
3838 // NOTE: A different default name is allowed
3939 const code = `
4040- import match_rec, { tag } from 'reghex';
4040+ import { match as m, tag } from 'reghex';
41414242- const inner = match_rec('inner')\`
4242+ const inner = m('inner')\`
4343 \${/inner/}
4444 \`;
45454646- const node = match_rec('node')\`
4646+ const node = m('node')\`
4747 \${inner}
4848 \`;
4949 `;
···56565757it('works with transform functions', () => {
5858 const code = `
5959- import match from 'reghex';
5959+ import { match } from 'reghex';
60606161 const first = match('inner', x => x)\`\`;
6262···72727373it('works with non-capturing groups', () => {
7474 const code = `
7575- import match from 'reghex';
7575+ import { match } from 'reghex';
76767777 const node = match('node')\`
7878 \${1} (\${2} | (?: \${3})+)
···87878888it('works together with @babel/plugin-transform-modules-commonjs', () => {
8989 const code = `
9090- import match from 'reghex';
9090+ import { match } from 'reghex';
91919292 const node = match('node')\`
9393 \${1} \${2}