Module meta

ConstructorsHelpersRenderers

Types

Name = object
  value: string
  exported: bool
TypeName = object
  name: Name
  parameters: seq[TypeDesc]
TypeDesc = object
  is_ref: bool
  case kind: TypeDescKind
  of tdkNamed:
      type_name: TypeName

  of tdkTuple:
      identifiers: seq[Field]

  
Field = object
  name: Name
  type_desc: TypeDesc

Procs

proc newName(value: string; exported: bool = false): Name {.raises: [], tags: [].}
proc newTypeName(name: Name; parameters: seq[TypeDesc]): TypeName {.raises: [], tags: [].}
proc newTypeName(name: Name; parameters: seq[TypeName]): TypeName {.
    raises: [Exception], tags: [RootEffect].}
proc newTypeName(name: Name): TypeName {.raises: [], tags: [].}
proc newTypeName(name: string): TypeName {.raises: [], tags: [].}
proc newTypeDesc(type_name: TypeName; is_ref: bool = false): TypeDesc {.raises: [],
    tags: [].}
proc newTypeDesc(type_name: string; is_ref: bool = false): TypeDesc {.raises: [], tags: [].}
proc newTypeDesc(identifiers: seq[Field]; is_ref: bool = false): TypeDesc {.raises: [],
    tags: [].}
proc newSeqDesc(type_name: TypeName): TypeDesc {.raises: [Exception],
    tags: [RootEffect].}
proc newSeqDesc(type_name: string): TypeDesc {.raises: [Exception], tags: [RootEffect].}
proc newField(name: Name; type_desc: TypeDesc): Field {.raises: [], tags: [].}
proc newField(name: string; type_name: string; is_ref: bool = false): Field {.raises: [],
    tags: [].}
proc newIdentifier(name: Name; type_desc: ref TypeDesc = nil; default: ref NimNode = nil): Identifier {.
    raises: [], tags: [].}
proc newAliasDesc(alias: TypeDesc): Desc {.raises: [], tags: [].}
proc newTupleDesc(fields: seq[Field]): Desc {.raises: [], tags: [].}
proc newStructDesc(fields: seq[Field]): Desc {.raises: [], tags: [].}
proc newInheritedDesc(fields: seq[Field]; inherits: TypeName): Desc {.raises: [],
    tags: [].}
proc newVariantDesc(discriminator: Field; variants: Table[Name, seq[Field]]): Desc {.
    raises: [], tags: [].}
proc newEnumDesc(values: seq[Name]): Desc {.raises: [], tags: [].}
proc newTypeDef(type_name: TypeName; desc: Desc; is_ref: bool = false): TypeDef {.
    raises: [], tags: [].}
proc exported(name: string): Name {.raises: [], tags: [].}
proc render(name: Name): NimNode {.compileTime, raises: [], tags: [].}
proc render(type_name: TypeName): NimNode {.compileTime, raises: [Exception],
                                        tags: [RootEffect].}
proc asTuple(type_name: TypeName): tuple[name, params: NimNode] {.compileTime,
    raises: [Exception], tags: [RootEffect].}
proc render(field: Field): NimNode {.compileTime, raises: [Exception],
                                 tags: [RootEffect].}
proc render(type_desc: TypeDesc): NimNode {.compileTime, raises: [Exception],
                                        tags: [RootEffect].}
proc render(identifier: Identifier): NimNode {.compileTime, raises: [Exception],
    tags: [RootEffect].}
proc render(desc: Desc): NimNode {.compileTime, raises: [Exception], tags: [RootEffect].}
proc render(typedef: TypeDef): NimNode {.compileTime, raises: [Exception],
                                     tags: [RootEffect].}

Converters

converter toName(s: string): Name {.raises: [], tags: [].}