Skip to content

Commit

Permalink
Merge pull request #1708 from simlu/dev
Browse files Browse the repository at this point in the history
Revert "chore: refactor"
  • Loading branch information
simlu committed Jun 15, 2022
2 parents be6e205 + 316ee59 commit f41e2b2
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import iterator from '../../generic/iterator.js';
import iterator from '../generic/iterator.js';

export default (tower, needle, tree, { onAdd, onFin }) => {
const stack = [[[tower, null]]];
Expand Down
6 changes: 3 additions & 3 deletions src/core/compiler.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* compile needles to hierarchical map object */
import parser from './parser.js';
import iterator from './compiler/iterator.js';
import iterator from './compiler-iterator.js';
import { defineProperty } from '../generic/helper.js';
import { Wildcard } from './parser/wildcard.js';
import { Ref } from './parser/ref.js';
import { Wildcard } from './wildcard.js';
import { Ref } from './ref.js';

const LEAF = Symbol('leaf');
const markLeaf = (input, match, readonly) => defineProperty(input, LEAF, match, readonly);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/core/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
hasMatches, matchedBy, isLastLeafMatch,
getValues, getOrder, getRoots
} from './compiler.js';
import Result from './find/result.js';
import Result from './find-result.js';
import { toPath } from '../generic/helper.js';

const formatPath = (input, ctx) => (ctx.joined ? toPath(input) : [...input]);
Expand Down
4 changes: 2 additions & 2 deletions src/core/parser/result.js → src/core/parser-result.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assert from '../../generic/assert.js';
import { defineProperty } from '../../generic/helper.js';
import assert from '../generic/assert.js';
import { defineProperty } from '../generic/helper.js';
import { Wildcard } from './wildcard.js';
import { Ref } from './ref.js';

Expand Down
4 changes: 2 additions & 2 deletions src/core/parser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Wildcard } from './parser/wildcard.js';
import Result from './parser/result.js';
import { Wildcard } from './wildcard.js';
import Result from './parser-result.js';

const throwError = (msg, input, context = {}) => {
throw new Error(Object.entries(context)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/core/parser/wildcard.js → src/core/wildcard.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { escapeRegex, asRegex } from '../../generic/helper.js';
import { escapeRegex, asRegex } from '../generic/helper.js';

export const parseWildcard = (str) => {
let regex = '';
Expand Down
2 changes: 1 addition & 1 deletion test/core/parser.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe } from 'node-tdd';
import { expect } from 'chai';
import { Ref } from '../../src/core/parser/ref.js';
import { Ref } from '../../src/core/ref.js';
import parser from '../../src/core/parser.js';
import Context from '../../src/core/context.js';
import generateParsedNeedle from '../helper/generate-parsed-needle.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from 'chai';
import { describe } from 'node-tdd';
import { parseWildcard } from '../../../src/core/parser/wildcard.js';
import { parseWildcard } from '../../src/core/wildcard.js';

describe('Testing Helper', () => {
describe('Testing parseWildcard', () => {
Expand Down

0 comments on commit f41e2b2

Please sign in to comment.