Include/cpython/compile

Source   Edit  

Types

PyCF {.pure.} = enum
  SOURCE_IS_UTF8 = 256, DONT_IMPLY_DEDENT = 512, ONLY_AST = 1024,
  IGNORE_COOKIE = 2048, TYPE_COMMENTS = 4096, ALLOW_TOP_LEVEL_AWAIT = 8192,
  ALLOW_INCOMPLETE_INPUT = 16384, OPTIMIZED_AST = 33792
Source   Edit  
PyCodeFutureOption {.pure.} = enum
  DIVISION = 131072, ABSOLUTE_IMPORT = 262144, WITH_STATEMENT = 524288,
  PRINT_FUNCTION = 1048576, UNICODE_LITERALS = 2097152, BARRY_AS_BDFL = 4194304,
  GENERATOR_STOP = 8388608, ANNOTATIONS = 16777216
Source   Edit  
PyCompilerFlags = ref PyCompilerFlagsObj
Source   Edit  

Procs

proc `&`(a: PyCFlag; b: PyCF): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc `&`(a: PyCFlag; b: PyCodeFutureOption): bool {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc `&`(a`gensym1, b`gensym1: PyCodeFutureOption): bool {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc `&`(a`gensym1: IntFlag[PyCodeFutureOption]; b`gensym1: PyCodeFutureOption): bool {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc `&`(a`gensym3, b`gensym3: PyCF): bool {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc `&`(a`gensym3: IntFlag[PyCF]; b`gensym3: PyCF): bool {....raises: [],
    tags: [], forbids: [].}
Source   Edit  
proc `|`(a: PyCFlag; b: PyCF): PyCFlag {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc `|`(a: PyCFlag; b: PyCodeFutureOption): PyCFlag {....raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc `|`(a`gensym1, b`gensym1: PyCodeFutureOption): IntFlag[PyCodeFutureOption] {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc `|`(a`gensym3, b`gensym3: PyCF): IntFlag[PyCF] {....raises: [], tags: [],
    forbids: [].}
Source   Edit  

Converters

converter toIntFlag(x`gensym1: PyCodeFutureOption): IntFlag[PyCodeFutureOption] {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
converter toIntFlag(x`gensym3: PyCF): IntFlag[PyCF] {....raises: [], tags: [],
    forbids: [].}
Source   Edit  

Templates

template initPyCompilerFlags(f = PyCFlag(0); fv = PyMinor): PyCompilerFlags
Source   Edit