Open qfox opened 6 years ago
Knowledge of defaultLayer should not be a part of "naming.cell.match" package. Can we write some sort of convention normalizer?
Feels like it can be a container with normalization functions like Cell, EntityName, etc.
Cell
EntityName
This container should check and resolve fields for naming, fs delims, and anything else we use in naming presets:
naming
fs
const dElem = 'elem' in dd ? dd.elem : (delims.elem || '__'); const dMod = 'mod' in dd ? dd.mod : (Object(delims.mod).name || (typeof delims.mod === 'string' && delims.mod) || '_');
assert(conv.fs && typeof conv.fs.pattern === 'string',
common
const layer = conv.fs.defaultLayer || 'common';
pathStringify({ layer: cell.layer || 'common', tech: cell.tech, entity: schemeStringify(cell.entity) + entityStringify(cell.entity) }));
cell.match
const buildPathParseMethod = ({ fs: { pattern, delims: dd = {}, scheme = 'nested' }, delims, wordPattern: wp = ALPHANUM_RE }) => {
Knowledge of defaultLayer should not be a part of "naming.cell.match" package. Can we write some sort of convention normalizer?
Feels like it can be a container with normalization functions like
Cell
,EntityName
, etc.This container should check and resolve fields for
naming
,fs
delims, and anything else we use in naming presets:common
(?)cell.match
: