move some files around, organize imports

This commit is contained in:
Ean Milligan 2025-05-03 08:25:00 -04:00
parent 07e76733ec
commit 1b2851353e
5 changed files with 15 additions and 10 deletions

View File

@ -2,9 +2,10 @@ import { log, LogTypes as LT } from '@Log4Deno';
import config from '~config';
import { tokenizeMath } from 'artigen/mathTokenizer.ts';
import { CountDetails, ReturnData } from 'artigen/solver.d.ts';
import { tokenizeMath } from 'artigen/math/mathTokenizer.ts';
import { closeInternal, internalWrapRegex, openInternal } from 'artigen/utils/escape.ts';
import { loggingEnabled } from 'artigen/utils/logFlag.ts';
import { getMatchingInternalIdx, getMatchingPostfixIdx } from 'artigen/utils/parenBalance.ts';

View File

@ -1,12 +1,14 @@
import { log, LogTypes as LT } from '@Log4Deno';
import { rollCounter } from './utils/counter.ts';
import { RollModifiers } from 'src/mod.d.ts';
import { executeRoll } from 'artigen/executeRoll.ts';
import { RollFormat } from 'artigen/solver.d.ts';
import { executeRoll } from 'artigen/dice/executeRoll.ts';
import { rollCounter } from 'artigen/utils/counter.ts';
import { loggingEnabled } from 'artigen/utils/logFlag.ts';
import { RollModifiers } from 'src/mod.d.ts';
// generateSolvedRoll(rollConf, modifiers) returns one SolvedStep
// generateSolvedRoll handles creating and formatting the completed rolls into the SolvedStep format
export const generateSolvedRoll = (rollConf: string, modifiers: RollModifiers): RollFormat => {

View File

@ -1,9 +1,11 @@
import { log, LogTypes as LT } from '@Log4Deno';
import { generateSolvedRoll } from 'artigen/generateSolvedRoll.ts';
import { mathSolver } from 'artigen/mathSolver.ts';
import { CountDetails, MathConf, ReturnData, SolvedStep } from 'artigen/solver.d.ts';
import { generateSolvedRoll } from 'artigen/dice/generateSolvedRoll.ts';
import { mathSolver } from 'artigen/math/mathSolver.ts';
import { cmdSplitRegex, internalWrapRegex } from 'artigen/utils/escape.ts';
import { legalMathOperators } from 'artigen/utils/legalMath.ts';
import { loggingEnabled } from 'artigen/utils/logFlag.ts';
@ -100,7 +102,7 @@ export const tokenizeMath = (cmd: string, modifiers: RollModifiers): [ReturnData
containsCrit: false,
containsFail: false,
},
],
]
);
i += 2;
} else if (!legalMathOperators.includes(strMathConfI) && legalMathOperators.some((mathOp) => strMathConfI.endsWith(mathOp))) {