Skip to content

NamingConvention and defaultLayer  #304

Description

@qfox

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:

  • fsDelims:
    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) || '_');
  • asserts:
    assert(conv.fs && typeof conv.fs.pattern === 'string',
  • knowledge about defaultLayer and common (?)
    const layer = conv.fs.defaultLayer || 'common';
          pathStringify({
              layer: cell.layer || 'common',
              tech: cell.tech,
              entity: schemeStringify(cell.entity) + entityStringify(cell.entity)
          }));
  • defaults in cell.match:
    const buildPathParseMethod = ({ fs: { pattern, delims: dd = {}, scheme = 'nested' }, delims, wordPattern: wp = ALPHANUM_RE }) => {
  • Pull in path parsers and builders for schemes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions