wingspkg/lib/tconfig

Types

ImportPathType = enum
  Never = "Never", Absolute = "Absolute", Relative = "Relative"
Supported import path types.   Source Edit
TypeInterpreter = ref object of RootObj
  wingsType*: string
  targetType*: string
  requiredImport*: string
  targetInit*: string
  targetParse*: string
Output type object from given input type.   Source Edit
CustomTypeInterpreter = ref object of TypeInterpreter
  prefix*: string
  separators*: string
  postfix*: string
Post processed custom types.   Source Edit
Indentation = object
  spacing*: string
  preIndent*: bool
  Source Edit
InterfaceConfig = object
  interfaceSupported*: bool
  paramFormat*: string
  paramJoiner*: string
  Source Edit
TConfig = object
  comment*: string
  customTypes*: Table[string, CustomTypeInterpreter]
  filename*: Case
  filetype*: string
  implementFormat*: string
  importPath*: ImportPath
  indentation*: Indentation
  interfaceConfig*: InterfaceConfig
  parseFormat*: string
  templates*: Table[string, string]
  types*: Table[string, TypeInterpreter]
Object of template config.   Source Edit

Consts

DEFAULT_SEPARATOR: char = '/'
  Source Edit
DEFAULT_COMMENT: string = "//"
  Source Edit

Procs

proc initTypeInterpreter(wingsType: string = ""; targetType: string = "";
                         requiredImport: string = ""; targetInit: string = "";
                         targetParse: string = ""): TypeInterpreter {...}{.
    raises: [], tags: [].}
  Source Edit
proc interpretType(typeInterpreter: TypeInterpreter): CustomTypeInterpreter {...}{.
    raises: [ValueError, GenericError], tags: [].}
Interpret custom types.   Source Edit
proc initInterfaceConfig(interfaceSupported: bool = false;
                         paramFormat: string = ""; paramJoiner: string = ""): InterfaceConfig {...}{.
    raises: [], tags: [].}
  Source Edit
proc initTConfig(cmt: string = DEFAULT_COMMENT;
                 ct: Table[string, CustomTypeInterpreter] = initTable();
                 c: Case = Case.Default; ft: string = ""; ifmt: string = "";
                 ipfmt: string = ""; ipt: ImportPathType = ImportPathType.Never;
                 pfx: string = ""; sep: char = DEFAULT_SEPARATOR;
                 level: int = 0; isp: string = ""; pi: bool = false;
                 isup: bool = false; prmFmt: string = ""; prmJnr: string = "";
                 pfmt: string = ""; temp: Table[string, string] = initTable();
                 ty: Table[string, TypeInterpreter] = initTable()): TConfig {...}{.
    raises: [], tags: [].}
Create an initialized template config.   Source Edit