src/pylib/pysugar/stmt/funcSignature

Source   Edit  

Procs

func newGenericsTree(): NimNode {....raises: [], tags: [], forbids: [].}
Source   Edit  
func newProc(name, generics: NimNode;
             params: openArray[NimNode] = [newEmptyNode()]; body = emptyn;
             procType = nnkProcDef; pragmas = emptyn): NimNode {....raises: [],
    tags: [], forbids: [].}
variant that accept generics Source   Edit  
func newProc(tup: tuple[name: NimNode, params: seq[NimNode]]; generics: NimNode;
             body = emptyn; procType = nnkProcDef; pragmas = emptyn): NimNode {.
    ...raises: [], tags: [], forbids: [].}
variant that accept generics, sleamless to work with parseSignature Source   Edit  
func parseBracketGenericParams(generics: var NimNode; params: NimNode): NimNode {.
    ...raises: [], tags: [], forbids: [].}
returns name Source   Edit  
func parseGenericParams(generics: var NimNode; params: NimNode): NimNode {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc parseSignature(generics: var NimNode; signature: NimNode;
                    deftype = ident"untyped"): tuple[name: NimNode,
    params: seq[NimNode]] {....raises: [], tags: [], forbids: [].}
deftype is for both params and result, but if signature is of arrow expr, then restype will be its rhs. Source   Edit  
proc parseSignatureNoGenerics(signature: NimNode; deftype = ident"untyped"): tuple[
    name: NimNode, params: seq[NimNode]] {....raises: [], tags: [], forbids: [].}
Source   Edit