snapshot before regression test
This commit is contained in:
105
Test/AstTest/App/main.py
Normal file
105
Test/AstTest/App/main.py
Normal file
@@ -0,0 +1,105 @@
|
||||
from stdint import *
|
||||
import t, c
|
||||
from t import CInt, CExport
|
||||
from stdio import printf
|
||||
import memhub
|
||||
import stdlib
|
||||
import sys
|
||||
import string
|
||||
import ast
|
||||
import w32.win32console
|
||||
|
||||
|
||||
# MBuddy arena 大小:1MB
|
||||
ARENA_SIZE: t.CDefine = 1048576
|
||||
# mpool 内存大小:512KB
|
||||
POOL_SIZE: t.CDefine = 524288
|
||||
# dump 缓冲区大小:256KB
|
||||
DUMP_SIZE: t.CDefine = 262144
|
||||
|
||||
|
||||
def main() -> CInt | CExport:
|
||||
w32.win32console.SetConsoleCP(65001)
|
||||
w32.win32console.SetConsoleOutputCP(65001)
|
||||
|
||||
printf("AST Comprehensive Test Start\n")
|
||||
|
||||
# 初始化全局 MBuddy 内存分配器
|
||||
arena: bytes = stdlib.malloc(ARENA_SIZE)
|
||||
if arena == None:
|
||||
printf("FAIL: arena alloc failed\n")
|
||||
return 1
|
||||
mbuddy_obj: memhub.MemBuddy | t.CPtr = memhub.MemBuddy(arena, ARENA_SIZE)
|
||||
if mbuddy_obj == None:
|
||||
printf("FAIL: mbuddy init failed\n")
|
||||
return 1
|
||||
|
||||
sys._mbuddy = mbuddy_obj
|
||||
ast._mbuddy = mbuddy_obj
|
||||
|
||||
# 为 ast 解析器创建 mpool
|
||||
pool_mem: bytes = stdlib.malloc(POOL_SIZE)
|
||||
if pool_mem == None:
|
||||
printf("FAIL: malloc for pool failed\n")
|
||||
return 1
|
||||
pool: memhub.MemPool | t.CPtr = memhub.MemPool(pool_mem, POOL_SIZE)
|
||||
if pool == None:
|
||||
printf("FAIL: memhub.MemPool init failed\n")
|
||||
return 1
|
||||
|
||||
# dump 缓冲区(独立分配)
|
||||
dump_mem: bytes = stdlib.malloc(DUMP_SIZE)
|
||||
if dump_mem == None:
|
||||
printf("FAIL: malloc for dump failed\n")
|
||||
return 1
|
||||
dump_buf: t.CChar | t.CPtr = t.CChar(dump_mem, t.CPtr)
|
||||
|
||||
# 综合测试源码:覆盖 CPython 主要语法
|
||||
src: str = """x = 1
|
||||
y = 2
|
||||
z = x + y
|
||||
a = x - y
|
||||
b = x * y
|
||||
c = x / y
|
||||
d = x == y
|
||||
e = x < y
|
||||
f = x > y
|
||||
g = x and y
|
||||
h = x or y
|
||||
i = not x
|
||||
def foo(a, b):
|
||||
return a + b
|
||||
result = foo(x, y)
|
||||
if x > 0:
|
||||
print(x)
|
||||
else:
|
||||
print(y)
|
||||
for i in range(10):
|
||||
print(i)
|
||||
while x > 0:
|
||||
x = x - 1
|
||||
class Point:
|
||||
pass
|
||||
"""
|
||||
|
||||
printf("Parsing comprehensive source...\n")
|
||||
|
||||
# 解析
|
||||
tree: ast.AST | t.CPtr = ast.parse(src, pool)
|
||||
if tree == None:
|
||||
printf("FAIL: parse returned None\n")
|
||||
stdlib.free(pool_mem)
|
||||
stdlib.free(dump_mem)
|
||||
return 1
|
||||
|
||||
printf("PASS: parse succeeded\n")
|
||||
|
||||
# dump AST
|
||||
printf("Calling ast.dump...\n")
|
||||
ast.dump(tree, dump_buf, DUMP_SIZE)
|
||||
printf("ast.dump returned, now printing buffer...\n")
|
||||
printf("=== AST DUMP ===\n%s\n=== END ===\n", dump_buf)
|
||||
|
||||
stdlib.free(pool_mem)
|
||||
stdlib.free(dump_mem)
|
||||
return 0
|
||||
1
Test/AstTest/output/0853acdbdfc9b27c.deps.json
Normal file
1
Test/AstTest/output/0853acdbdfc9b27c.deps.json
Normal file
@@ -0,0 +1 @@
|
||||
{"w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "ast.lexer": "0c212981c180e7fb", "lexer": "0c212981c180e7fb", "atom": "271ea3decb810db2", "ast.__init__": "34548789d646f432", "__init__": "34548789d646f432", "ast": "34548789d646f432", "ast.astaux": "4337fb260448bbe2", "astaux": "4337fb260448bbe2", "ast.exprs": "47767b5026a8ee15", "exprs": "47767b5026a8ee15", "ast.match": "4dd6b3f1427d1cc5", "match": "4dd6b3f1427d1cc5", "ast.base": "5dab8cb390496d22", "base": "5dab8cb390496d22", "posix": "6503c97dde0c79c4", "ast.stmts": "657e182b27c2a022", "stmts": "657e182b27c2a022", "stdio": "6f62fe05c5ea1ceb", "stdarg": "71e0a3ffcb3ebfad", "w32.win32base": "7e529fe7a078cfef", "win32base": "7e529fe7a078cfef", "stdlib": "90c53dd6db8d41cf", "platmacro": "93c1d18e35d188d6", "string": "ab6e54ba9a669f76", "ast.tokens": "b547ac4f380bddb6", "tokens": "b547ac4f380bddb6", "sys": "b5a965302cded36b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperlib": "c3b259b4059f8668", "viperio": "c9f4be41ca1cc2b4", "memhub": "ee084e9fc6ee413a", "ast.parser": "ee52c08239684346", "parser": "ee52c08239684346", "stdint": "f5522571bcce7bcb", "main.tokens": "b547ac4f380bddb6", "main.base": "5dab8cb390496d22", "main.exprs": "47767b5026a8ee15", "main.stmts": "657e182b27c2a022", "main.astaux": "4337fb260448bbe2", "main.match": "4dd6b3f1427d1cc5", "main.lexer": "0c212981c180e7fb"}
|
||||
29
Test/AstTest/project.json
Normal file
29
Test/AstTest/project.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/TermiNexus/TransPyC/main/schemas/project-schema.json",
|
||||
"name": "AstTest",
|
||||
"version": "1.0.0",
|
||||
"source_dir": "./App",
|
||||
"temp_dir": "./temp",
|
||||
"output_dir": "./output",
|
||||
"compiler": {
|
||||
"cmd": "llc",
|
||||
"flags": ["-filetype=obj", "-relocation-model=pic"]
|
||||
},
|
||||
"linker": {
|
||||
"cmd": "clang++",
|
||||
"flags": ["-lmsvcrt", "-lucrt", "-lpthread", "-lmingwex", "-lkernel32", "-Wl,--allow-multiple-definition"],
|
||||
"output": "AstTest.exe"
|
||||
},
|
||||
"includes": [
|
||||
"./includes"
|
||||
],
|
||||
"target": {
|
||||
"triple": "x86_64-pc-windows-gnu",
|
||||
"datalayout": "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
},
|
||||
"options": {
|
||||
"slice_level": 3,
|
||||
"target": "llvm",
|
||||
"strict_mode": true
|
||||
}
|
||||
}
|
||||
81
Test/AstTest/temp/0035c95a18d4f8e8.pyi
Normal file
81
Test/AstTest/temp/0035c95a18d4f8e8.pyi
Normal file
@@ -0,0 +1,81 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.fileio.py
|
||||
Module: w32.fileio
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import stdio
|
||||
import w32.win32base
|
||||
import w32.win32file
|
||||
|
||||
class MODE(t.CEnum):
|
||||
R = 0
|
||||
W = 1
|
||||
A = 2
|
||||
RP = 3
|
||||
WP = 4
|
||||
AP = 5
|
||||
X = 6
|
||||
XP = 7
|
||||
class FRESULT(t.CEnum):
|
||||
OK = 0
|
||||
ERR = -1
|
||||
ERR_CLOSED = -2
|
||||
ERR_PERM = -3
|
||||
ERR_IO = -4
|
||||
ERR_NOTFOUND = -5
|
||||
|
||||
SEEK_SET: t.CDefine = 0
|
||||
SEEK_CUR: t.CDefine = 1
|
||||
SEEK_END: t.CDefine = 2
|
||||
INVALID_SET_FILE_POINTER: t.CDefine = -1
|
||||
SHARE_READ: t.CDefine = 0x00000001
|
||||
SHARE_WRITE: t.CDefine = 0x00000002
|
||||
SHARE_DELETE: t.CDefine = 0x00000004
|
||||
|
||||
class File:
|
||||
handle: w32.win32base.HANDLE
|
||||
closed: bool
|
||||
can_read: bool
|
||||
can_write: bool
|
||||
is_append: bool
|
||||
_share_mode: ULONG
|
||||
def __init__(self: File, filename: str, mode: ULONG, share: ULONG) -> t.CInt: pass
|
||||
def __enter__(self: File) -> 'File' | t.CPtr: pass
|
||||
def __exit__(self: File) -> t.CInt: pass
|
||||
def read(self: File, buf: bytes, count: ULONG) -> LONG: pass
|
||||
def write(self: File, buf: bytes, count: ULONG) -> LONG: pass
|
||||
def write_str(self: File, s: str) -> LONG: pass
|
||||
def seek(self: File, offset: LONG, origin: ULONG) -> LONG: pass
|
||||
def tell(self: File) -> LONG: pass
|
||||
def close(self: File) -> LONG: pass
|
||||
def flush(self: File) -> LONG: pass
|
||||
def size(self: File) -> LONGLONG: pass
|
||||
def readline(self: File, buf: bytes, max_count: ULONG) -> LONG: pass
|
||||
def read_all(self: File, buf: bytes, max_count: ULONG) -> LONG: pass
|
||||
class FileW:
|
||||
handle: w32.win32base.HANDLE
|
||||
closed: bool
|
||||
can_read: bool
|
||||
can_write: bool
|
||||
is_append: bool
|
||||
_share_mode: ULONG
|
||||
def __init__(self: FileW, filename: w32.win32base.LPCWSTR, mode: ULONG, share: ULONG) -> t.CInt: pass
|
||||
def __enter__(self: FileW) -> 'FileW' | t.CPtr: pass
|
||||
def __exit__(self: FileW) -> t.CInt: pass
|
||||
def read(self: FileW, buf: bytes, count: ULONG) -> LONG: pass
|
||||
def write(self: FileW, buf: bytes, count: ULONG) -> LONG: pass
|
||||
def write_str(self: FileW, s: str) -> LONG: pass
|
||||
def seek(self: FileW, offset: LONG, origin: ULONG) -> LONG: pass
|
||||
def tell(self: FileW) -> LONG: pass
|
||||
def close(self: FileW) -> LONG: pass
|
||||
def flush(self: FileW) -> LONG: pass
|
||||
def size(self: FileW) -> LONGLONG: pass
|
||||
def readline(self: FileW, buf: bytes, max_count: ULONG) -> LONG: pass
|
||||
def read_all(self: FileW, buf: bytes, max_count: ULONG) -> LONG: pass
|
||||
|
||||
def open(filename: str, mode: ULONG, share: ULONG) -> File | t.CPtr: pass
|
||||
|
||||
def openw(filename: LPCWSTR, mode: ULONG, share: ULONG) -> FileW | t.CPtr: pass
|
||||
136
Test/AstTest/temp/067c78e9f121dce3.pyi
Normal file
136
Test/AstTest/temp/067c78e9f121dce3.pyi
Normal file
@@ -0,0 +1,136 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.win32process.py
|
||||
Module: w32.win32process
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
from stdint import *
|
||||
from w32.win32base import *
|
||||
|
||||
PROCESS_TERMINATE: t.CDefine = 0x0001
|
||||
PROCESS_CREATE_THREAD: t.CDefine = 0x0002
|
||||
PROCESS_VM_OPERATION: t.CDefine = 0x0008
|
||||
PROCESS_VM_READ: t.CDefine = 0x0010
|
||||
PROCESS_VM_WRITE: t.CDefine = 0x0020
|
||||
PROCESS_QUERY_INFORMATION: t.CDefine = 0x0400
|
||||
PROCESS_ALL_ACCESS: t.CDefine = 0x001FFFFF
|
||||
THREAD_TERMINATE: t.CDefine = 0x0001
|
||||
THREAD_SUSPEND_RESUME: t.CDefine = 0x0002
|
||||
THREAD_GET_CONTEXT: t.CDefine = 0x0008
|
||||
THREAD_SET_CONTEXT: t.CDefine = 0x0010
|
||||
THREAD_QUERY_INFORMATION: t.CDefine = 0x0040
|
||||
THREAD_ALL_ACCESS: t.CDefine = 0x001FFFFF
|
||||
CREATE_SUSPENDED: t.CDefine = 0x00000004
|
||||
CREATE_NEW_CONSOLE: t.CDefine = 0x00000010
|
||||
CREATE_NEW_PROCESS_GROUP: t.CDefine = 0x00000200
|
||||
CREATE_NO_WINDOW: t.CDefine = 0x08000000
|
||||
DETACHED_PROCESS: t.CDefine = 0x00000008
|
||||
STARTF_USESHOWWINDOW: t.CDefine = 0x00000001
|
||||
STARTF_USESTDHANDLES: t.CDefine = 0x00000100
|
||||
SW_HIDE: t.CDefine = 0
|
||||
SW_SHOW: t.CDefine = 5
|
||||
SW_MINIMIZE: t.CDefine = 6
|
||||
NORMAL_PRIORITY_CLASS: t.CDefine = 0x00000020
|
||||
IDLE_PRIORITY_CLASS: t.CDefine = 0x00000040
|
||||
HIGH_PRIORITY_CLASS: t.CDefine = 0x00000080
|
||||
REALTIME_PRIORITY_CLASS: t.CDefine = 0x00000100
|
||||
BELOW_NORMAL_PRIORITY_CLASS: t.CDefine = 0x00004000
|
||||
ABOVE_NORMAL_PRIORITY_CLASS: t.CDefine = 0x00008000
|
||||
STILL_ACTIVE: t.CDefine = 259
|
||||
|
||||
class STARTUPINFOA:
|
||||
cb: ULONG
|
||||
lpReserved: CHARPTR
|
||||
lpDesktop: CHARPTR
|
||||
lpTitle: CHARPTR
|
||||
dwX: ULONG
|
||||
dwY: ULONG
|
||||
dwXSize: ULONG
|
||||
dwYSize: ULONG
|
||||
dwXCountChars: ULONG
|
||||
dwYCountChars: ULONG
|
||||
dwFillAttribute: ULONG
|
||||
dwFlags: ULONG
|
||||
wShowWindow: WORD
|
||||
cbReserved2: WORD
|
||||
lpReserved2: VOIDPTR
|
||||
hStdInput: HANDLE
|
||||
hStdOutput: HANDLE
|
||||
hStdError: HANDLE
|
||||
class STARTUPINFOW:
|
||||
cb: ULONG
|
||||
lpReserved: WCHARPTR
|
||||
lpDesktop: WCHARPTR
|
||||
lpTitle: WCHARPTR
|
||||
dwX: ULONG
|
||||
dwY: ULONG
|
||||
dwXSize: ULONG
|
||||
dwYSize: ULONG
|
||||
dwXCountChars: ULONG
|
||||
dwYCountChars: ULONG
|
||||
dwFillAttribute: ULONG
|
||||
dwFlags: ULONG
|
||||
wShowWindow: WORD
|
||||
cbReserved2: WORD
|
||||
lpReserved2: VOIDPTR
|
||||
hStdInput: HANDLE
|
||||
hStdOutput: HANDLE
|
||||
hStdError: HANDLE
|
||||
class PROCESS_INFORMATION:
|
||||
hProcess: HANDLE
|
||||
hThread: HANDLE
|
||||
dwProcessId: ULONG
|
||||
dwThreadId: ULONG
|
||||
|
||||
def CreateProcessA(lpApplicationName: LPCSTR, lpCommandLine: CHARPTR, lpProcessAttributes: SECURITY_ATTRIBUTES | t.CPtr, lpThreadAttributes: SECURITY_ATTRIBUTES | t.CPtr, bInheritHandles: BOOL, dwCreationFlags: ULONG, lpEnvironment: VOIDPTR, lpCurrentDirectory: LPCSTR, lpStartupInfo: STARTUPINFOA | t.CPtr, lpProcessInformation: PROCESS_INFORMATION | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def CreateProcessW(lpApplicationName: LPCWSTR, lpCommandLine: WCHARPTR, lpProcessAttributes: SECURITY_ATTRIBUTES | t.CPtr, lpThreadAttributes: SECURITY_ATTRIBUTES | t.CPtr, bInheritHandles: BOOL, dwCreationFlags: ULONG, lpEnvironment: VOIDPTR, lpCurrentDirectory: LPCWSTR, lpStartupInfo: STARTUPINFOW | t.CPtr, lpProcessInformation: PROCESS_INFORMATION | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def TerminateProcess(hProcess: HANDLE, uExitCode: UINT) -> BOOL | t.State: pass
|
||||
|
||||
def GetExitCodeProcess(hProcess: HANDLE, lpExitCode: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def GetExitCodeThread(hThread: HANDLE, lpExitCode: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def OpenProcess(dwDesiredAccess: ULONG, bInheritHandle: BOOL, dwProcessId: ULONG) -> HANDLE | t.State: pass
|
||||
|
||||
def GetCurrentProcess() -> HANDLE | t.State: pass
|
||||
|
||||
def GetCurrentProcessId() -> ULONG | t.State: pass
|
||||
|
||||
def CreateThread(lpThreadAttributes: SECURITY_ATTRIBUTES | t.CPtr, dwStackSize: t.CSizeT, lpStartAddress: VOIDPTR, lpParameter: VOIDPTR, dwCreationFlags: ULONG, lpThreadId: ULONG | t.CPtr) -> HANDLE | t.State: pass
|
||||
|
||||
def OpenThread(dwDesiredAccess: ULONG, bInheritHandle: BOOL, dwThreadId: ULONG) -> HANDLE | t.State: pass
|
||||
|
||||
def SuspendThread(hThread: HANDLE) -> ULONG | t.State: pass
|
||||
|
||||
def ResumeThread(hThread: HANDLE) -> ULONG | t.State: pass
|
||||
|
||||
def TerminateThread(hThread: HANDLE, dwExitCode: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def GetCurrentThread() -> HANDLE | t.State: pass
|
||||
|
||||
def GetCurrentThreadId() -> ULONG | t.State: pass
|
||||
|
||||
def GetThreadId(hThread: HANDLE) -> ULONG | t.State: pass
|
||||
|
||||
def GetProcessId(hProcess: HANDLE) -> ULONG | t.State: pass
|
||||
|
||||
def SetThreadPriority(hThread: HANDLE, nPriority: INT) -> BOOL | t.State: pass
|
||||
|
||||
def GetThreadPriority(hThread: HANDLE) -> INT | t.State: pass
|
||||
|
||||
def ExitProcess(uExitCode: UINT) -> VOID | t.State: pass
|
||||
|
||||
def ExitThread(dwExitCode: ULONG) -> VOID | t.State: pass
|
||||
|
||||
def TlsAlloc() -> ULONG | t.State: pass
|
||||
|
||||
def TlsFree(dwTlsIndex: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def TlsGetValue(dwTlsIndex: ULONG) -> VOIDPTR | t.State: pass
|
||||
|
||||
def TlsSetValue(dwTlsIndex: ULONG, lpTlsValue: VOIDPTR) -> BOOL | t.State: pass
|
||||
109
Test/AstTest/temp/06f53cc594b4ac6c.pyi
Normal file
109
Test/AstTest/temp/06f53cc594b4ac6c.pyi
Normal file
@@ -0,0 +1,109 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.win32sync.py
|
||||
Module: w32.win32sync
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
from stdint import *
|
||||
from w32.win32base import *
|
||||
|
||||
class CRITICAL_SECTION:
|
||||
DebugInfo: VOIDPTR
|
||||
LockCount: LONG
|
||||
RecursionCount: LONG
|
||||
OwningThread: HANDLE
|
||||
LockSemaphore: HANDLE
|
||||
SpinCount: QWORD
|
||||
|
||||
def InitializeCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> VOID | t.State: pass
|
||||
|
||||
def EnterCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> VOID | t.State: pass
|
||||
|
||||
def LeaveCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> VOID | t.State: pass
|
||||
|
||||
def DeleteCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> VOID | t.State: pass
|
||||
|
||||
def TryEnterCriticalSection(lpCriticalSection: CRITICAL_SECTION | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def SetCriticalSectionSpinCount(lpCriticalSection: CRITICAL_SECTION | t.CPtr, dwSpinCount: ULONG) -> ULONG | t.State: pass
|
||||
|
||||
def InitializeCriticalSectionAndSpinCount(lpCriticalSection: CRITICAL_SECTION | t.CPtr, dwSpinCount: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def CreateMutexA(lpMutexAttributes: SECURITY_ATTRIBUTES | t.CPtr, bInitialOwner: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def CreateMutexW(lpMutexAttributes: SECURITY_ATTRIBUTES | t.CPtr, bInitialOwner: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def OpenMutexA(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def OpenMutexW(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def ReleaseMutex(hMutex: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def CreateEventA(lpEventAttributes: SECURITY_ATTRIBUTES | t.CPtr, bManualReset: BOOL, bInitialState: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def CreateEventW(lpEventAttributes: SECURITY_ATTRIBUTES | t.CPtr, bManualReset: BOOL, bInitialState: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def OpenEventA(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def OpenEventW(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def SetEvent(hEvent: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def ResetEvent(hEvent: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def PulseEvent(hEvent: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def CreateSemaphoreA(lpSemaphoreAttributes: SECURITY_ATTRIBUTES | t.CPtr, lInitialCount: LONG, lMaximumCount: LONG, lpName: LPCSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def CreateSemaphoreW(lpSemaphoreAttributes: SECURITY_ATTRIBUTES | t.CPtr, lInitialCount: LONG, lMaximumCount: LONG, lpName: LPCWSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def OpenSemaphoreA(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def OpenSemaphoreW(dwDesiredAccess: ULONG, bInheritHandle: BOOL, lpName: LPCWSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def ReleaseSemaphore(hSemaphore: HANDLE, lReleaseCount: LONG, lpPreviousCount: LONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def WaitForSingleObject(hHandle: HANDLE, dwMilliseconds: ULONG) -> ULONG | t.State: pass
|
||||
|
||||
def WaitForSingleObjectEx(hHandle: HANDLE, dwMilliseconds: ULONG, bAlertable: BOOL) -> ULONG | t.State: pass
|
||||
|
||||
def WaitForMultipleObjects(nCount: ULONG, lpHandles: VOIDPTR, bWaitAll: BOOL, dwMilliseconds: ULONG) -> ULONG | t.State: pass
|
||||
|
||||
def WaitForMultipleObjectsEx(nCount: ULONG, lpHandles: VOIDPTR, bWaitAll: BOOL, dwMilliseconds: ULONG, bAlertable: BOOL) -> ULONG | t.State: pass
|
||||
|
||||
def InitializeSRWLock(SRWLock: VOIDPTR) -> VOID | t.State: pass
|
||||
|
||||
def AcquireSRWLockExclusive(SRWLock: VOIDPTR) -> VOID | t.State: pass
|
||||
|
||||
def AcquireSRWLockShared(SRWLock: VOIDPTR) -> VOID | t.State: pass
|
||||
|
||||
def ReleaseSRWLockExclusive(SRWLock: VOIDPTR) -> VOID | t.State: pass
|
||||
|
||||
def ReleaseSRWLockShared(SRWLock: VOIDPTR) -> VOID | t.State: pass
|
||||
|
||||
|
||||
CONDITION_VARIABLE_LOCKMODE_SHARED: t.CDefine = 0x1
|
||||
|
||||
def InitializeConditionVariable(ConditionVariable: VOIDPTR) -> VOID | t.State: pass
|
||||
|
||||
def SleepConditionVariableCS(ConditionVariable: VOIDPTR, CriticalSection: CRITICAL_SECTION | t.CPtr, dwMilliseconds: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def SleepConditionVariableSRW(ConditionVariable: VOIDPTR, SRWLock: VOIDPTR, dwMilliseconds: ULONG, Flags: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def WakeConditionVariable(ConditionVariable: VOIDPTR) -> VOID | t.State: pass
|
||||
|
||||
def WakeAllConditionVariable(ConditionVariable: VOIDPTR) -> VOID | t.State: pass
|
||||
|
||||
|
||||
INIT_ONCE_STATIC_INIT: t.CDefine = 0x00000001
|
||||
INIT_ONCE_CHECK_ONLY: t.CDefine = 0x00000002
|
||||
INIT_ONCE_ASYNC: t.CDefine = 0x00000004
|
||||
INIT_ONCE_INIT_FAILED: t.CDefine = 0x00000008
|
||||
|
||||
class INIT_ONCE:
|
||||
Ptr: t.CPtr
|
||||
|
||||
def InitOnceExecuteOnce(InitOnce: INIT_ONCE | t.CPtr, InitFn: VOIDPTR, Parameter: VOIDPTR, Context: VOIDPTR | t.CPtr) -> BOOL | t.State: pass
|
||||
1
Test/AstTest/temp/0853acdbdfc9b27c.doc.json
Normal file
1
Test/AstTest/temp/0853acdbdfc9b27c.doc.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
22
Test/AstTest/temp/0853acdbdfc9b27c.pyi
Normal file
22
Test/AstTest/temp/0853acdbdfc9b27c.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
"""
|
||||
Auto-generated Python stub file from main.py
|
||||
Module: main
|
||||
"""
|
||||
|
||||
|
||||
from stdint import *
|
||||
import t, c
|
||||
from t import CInt, CExport
|
||||
from stdio import printf
|
||||
import memhub
|
||||
import stdlib
|
||||
import sys
|
||||
import string
|
||||
import ast
|
||||
import w32.win32console
|
||||
|
||||
ARENA_SIZE: t.CDefine = 1048576
|
||||
POOL_SIZE: t.CDefine = 524288
|
||||
DUMP_SIZE: t.CDefine = 262144
|
||||
|
||||
def main() -> CInt | CExport: pass
|
||||
67
Test/AstTest/temp/0c212981c180e7fb.pyi
Normal file
67
Test/AstTest/temp/0c212981c180e7fb.pyi
Normal file
@@ -0,0 +1,67 @@
|
||||
"""
|
||||
Auto-generated Python stub file from ast.lexer.py
|
||||
Module: ast.lexer
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import memhub
|
||||
import string
|
||||
from .tokens import Token, TokenType, TokOp, _init_tables, _kw_lookup, _op_head, OpEntry, new_token, token_set_str, token_set_str_literal
|
||||
|
||||
LEXER_MAX_INDENT: t.CDefine = 256
|
||||
|
||||
class Lexer:
|
||||
src: str
|
||||
pos: t.CSizeT
|
||||
len: t.CSizeT
|
||||
lineno: t.CInt
|
||||
col: t.CInt
|
||||
pool: memhub.MemManager | t.CPtr
|
||||
indent_stack: t.CInt | t.CPtr
|
||||
indent_top: t.CInt
|
||||
paren_depth: t.CInt
|
||||
tokens_head: Token | t.CPtr
|
||||
tokens_tail: Token | t.CPtr
|
||||
at_line_start: t.CInt
|
||||
error_count: t.CInt
|
||||
def __new__(self: Lexer, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def new_lexer(pool: memhub.MemManager | t.CPtr) -> Lexer | t.CPtr: pass
|
||||
|
||||
def _lexer_init(lx: Lexer | t.CPtr, src: str, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _peek(lx: Lexer | t.CPtr, offset: t.CSizeT) -> t.CChar: pass
|
||||
|
||||
def _peek_cur(lx: Lexer | t.CPtr) -> t.CChar: pass
|
||||
|
||||
def _advance(lx: Lexer | t.CPtr) -> t.CChar: pass
|
||||
|
||||
def _is_alpha(ch: t.CChar) -> t.CInt: pass
|
||||
|
||||
def _is_digit(ch: t.CChar) -> t.CInt: pass
|
||||
|
||||
def _is_alnum(ch: t.CChar) -> t.CInt: pass
|
||||
|
||||
def _is_hex(ch: t.CChar) -> t.CInt: pass
|
||||
|
||||
def _is_space(ch: t.CChar) -> t.CInt: pass
|
||||
|
||||
def _emit(lx: Lexer | t.CPtr, tok: Token | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _make_op_token(lx: Lexer | t.CPtr, op_id: t.CInt, length: t.CInt, lineno: t.CInt, col: t.CInt) -> Token | t.CPtr: pass
|
||||
|
||||
def _handle_indent(lx: Lexer | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _read_name(lx: Lexer | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _read_number(lx: Lexer | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _emit_number(lx: Lexer | t.CPtr, start: t.CSizeT, start_lineno: t.CInt, start_col: t.CInt, is_float: t.CInt, is_complex: t.CInt, is_hex: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _read_string(lx: Lexer | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _read_operator(lx: Lexer | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def tokenize(lx: Lexer | t.CPtr) -> Token | t.CPtr: pass
|
||||
26
Test/AstTest/temp/271ea3decb810db2.pyi
Normal file
26
Test/AstTest/temp/271ea3decb810db2.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
Auto-generated Python stub file from atom.py
|
||||
Module: atom
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
|
||||
ATOMIC_RELAXED: t.CDefine = 0
|
||||
ATOMIC_CONSUME: t.CDefine = 1
|
||||
ATOMIC_ACQUIRE: t.CDefine = 2
|
||||
ATOMIC_RELEASE: t.CDefine = 3
|
||||
ATOMIC_ACQ_REL: t.CDefine = 4
|
||||
ATOMIC_SEQ_CST: t.CDefine = 5
|
||||
|
||||
def __atomic_test_and_set(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CBool: pass
|
||||
|
||||
def __atomic_clear(ptr: t.CUInt64T | t.CPtr, order: t.CInt) -> t.CVoid: pass
|
||||
|
||||
def __atomic_thread_fence(order: t.CInt) -> t.CVoid: pass
|
||||
|
||||
def __atomic_signal_fence(order: t.CInt) -> t.CVoid: pass
|
||||
|
||||
def __atomic_always_lock_free(size: t.CSizeT, ptr: t.CVoid | t.CPtr) -> t.CBool: pass
|
||||
|
||||
def __atomic_is_lock_free(size: t.CSizeT, ptr: t.CVoid | t.CPtr) -> t.CBool: pass
|
||||
26
Test/AstTest/temp/34548789d646f432.pyi
Normal file
26
Test/AstTest/temp/34548789d646f432.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
Auto-generated Python stub file from ast.__init__.py
|
||||
Module: ast.__init__
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import memhub
|
||||
import string
|
||||
from .tokens import Token, TokenType, Keyword, TokOp, _init_tables
|
||||
from .base import AST, ASTKind, ASTCtx, OpKind, ASTFlag, CONST_INT, CONST_FLOAT, CONST_STR, CONST_BOOL, CONST_NONE, FLAG_IS_ASYNC, FLAG_SIMPLE, FLAG_HAS_STAR, _init_ast, _copy_str, _set_pos, _inherit_pos, _set_parent_list, _binop_from_op, _augop_from_op, _cmpop_from_op, _emit, _emit_str, _emit_int, _dump_list, dump
|
||||
from .stmts import Module, Expression, Interactive, FunctionType, FunctionDef, ClassDef, Return, Delete, Assign, AugAssign, AnnAssign, For, While, If, With, Raise, Try, Assert, Global, Nonlocal, Pass, Break, Continue, Expr, Import, ImportFrom, Match
|
||||
from .exprs import BoolOp, BinOp, UnaryOp, Lambda, IfExp, Dict, Set, ListComp, SetComp, DictComp, GeneratorExp, Await, Yield, YieldFrom, FormattedValue, JoinedStr, Constant, NamedExpr, Attribute, Subscript, Starred, Name, List, Tuple, Slice, Call, Compare, OpNode
|
||||
from .astaux import ExceptHandler, Arguments, Arg, Keyword, Alias, WithItem, Comprehension
|
||||
from .match import MatchCase, MatchValue, MatchSingleton, MatchSequence, MatchMapping, MatchClass, MatchStar, MatchAs, MatchOr
|
||||
from .visitor import ASTVisitor
|
||||
from .lexer import Lexer, _lexer_init, tokenize, new_lexer
|
||||
from .parser import Parser, _parser_init, parse_tokens, new_parser
|
||||
from .parser import _parse_test
|
||||
|
||||
_mbuddy: t.CExtern | memhub.MemBuddy | t.CPtr
|
||||
|
||||
def parse(src: str, pool: memhub.MemManager | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def parse_expression(src: str, pool: memhub.MemManager | t.CPtr) -> AST | t.CPtr: pass
|
||||
73
Test/AstTest/temp/4337fb260448bbe2.pyi
Normal file
73
Test/AstTest/temp/4337fb260448bbe2.pyi
Normal file
@@ -0,0 +1,73 @@
|
||||
"""
|
||||
Auto-generated Python stub file from ast.astaux.py
|
||||
Module: ast.astaux
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import memhub
|
||||
import string
|
||||
from .base import AST, ASTKind, _init_ast, _copy_str, _set_parent_list, _emit, _emit_str, _emit_int, _dump_list
|
||||
|
||||
class ExceptHandler(AST):
|
||||
type: AST | t.CPtr
|
||||
name: str
|
||||
def __new__(self: ExceptHandler, pool: memhub.MemManager | t.CPtr, type: AST | t.CPtr, name: str) -> t.CInt: pass
|
||||
def __init__(self: ExceptHandler, pool: memhub.MemManager | t.CPtr, type: AST | t.CPtr, name: str) -> t.CInt: pass
|
||||
def kind(self: ExceptHandler) -> t.CInt: pass
|
||||
def type_name(self: ExceptHandler) -> str: pass
|
||||
def dump(self: ExceptHandler, buf: bytes, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Arguments(AST):
|
||||
args: list[AST | t.CPtr] | t.CPtr
|
||||
vararg: AST | t.CPtr
|
||||
kwarg: AST | t.CPtr
|
||||
defaults: list[AST | t.CPtr] | t.CPtr
|
||||
kw_defaults: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Arguments, pool: memhub.MemManager | t.CPtr, args: list[AST | t.CPtr] | t.CPtr, vararg: AST | t.CPtr, kwarg: AST | t.CPtr, defaults: list[AST | t.CPtr] | t.CPtr, kw_defaults: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Arguments, pool: memhub.MemManager | t.CPtr, args: list[AST | t.CPtr] | t.CPtr, vararg: AST | t.CPtr, kwarg: AST | t.CPtr, defaults: list[AST | t.CPtr] | t.CPtr, kw_defaults: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Arguments) -> t.CInt: pass
|
||||
def type_name(self: Arguments) -> str: pass
|
||||
def dump(self: Arguments, buf: bytes, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Arg(AST):
|
||||
arg: str
|
||||
annotation: AST | t.CPtr
|
||||
def __new__(self: Arg, pool: memhub.MemManager | t.CPtr, arg: str, annotation: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Arg, pool: memhub.MemManager | t.CPtr, arg: str, annotation: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Arg) -> t.CInt: pass
|
||||
def type_name(self: Arg) -> str: pass
|
||||
def dump(self: Arg, buf: bytes, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Keyword(AST):
|
||||
arg: str
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: Keyword, pool: memhub.MemManager | t.CPtr, arg: str, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Keyword, pool: memhub.MemManager | t.CPtr, arg: str, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Keyword) -> t.CInt: pass
|
||||
def type_name(self: Keyword) -> str: pass
|
||||
def dump(self: Keyword, buf: bytes, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Alias(AST):
|
||||
name: str
|
||||
asname: str
|
||||
def __new__(self: Alias, pool: memhub.MemManager | t.CPtr, name: str, asname: str) -> t.CInt: pass
|
||||
def __init__(self: Alias, pool: memhub.MemManager | t.CPtr, name: str, asname: str) -> t.CInt: pass
|
||||
def kind(self: Alias) -> t.CInt: pass
|
||||
def type_name(self: Alias) -> str: pass
|
||||
def dump(self: Alias, buf: bytes, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class WithItem(AST):
|
||||
context_expr: AST | t.CPtr
|
||||
optional_vars: AST | t.CPtr
|
||||
def __new__(self: WithItem, pool: memhub.MemManager | t.CPtr, context_expr: AST | t.CPtr, optional_vars: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: WithItem, pool: memhub.MemManager | t.CPtr, context_expr: AST | t.CPtr, optional_vars: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: WithItem) -> t.CInt: pass
|
||||
def type_name(self: WithItem) -> str: pass
|
||||
def dump(self: WithItem, buf: bytes, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Comprehension(AST):
|
||||
target: AST | t.CPtr
|
||||
iter: AST | t.CPtr
|
||||
ifs: list[AST | t.CPtr] | t.CPtr
|
||||
is_async: t.CInt
|
||||
def __new__(self: Comprehension, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, iter: AST | t.CPtr, ifs: list[AST | t.CPtr] | t.CPtr, is_async: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: Comprehension, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, iter: AST | t.CPtr, ifs: list[AST | t.CPtr] | t.CPtr, is_async: t.CInt) -> t.CInt: pass
|
||||
def kind(self: Comprehension) -> t.CInt: pass
|
||||
def type_name(self: Comprehension) -> str: pass
|
||||
def dump(self: Comprehension, buf: bytes, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
241
Test/AstTest/temp/47767b5026a8ee15.pyi
Normal file
241
Test/AstTest/temp/47767b5026a8ee15.pyi
Normal file
@@ -0,0 +1,241 @@
|
||||
"""
|
||||
Auto-generated Python stub file from ast.exprs.py
|
||||
Module: ast.exprs
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import memhub
|
||||
import string
|
||||
from .base import AST, ASTKind, ASTCtx, OpKind, _init_ast, _copy_str, _set_parent_list, _emit, _emit_str, _emit_int, _dump_list, _dump_op_list, _op_name, CONST_INT, CONST_FLOAT, CONST_STR, CONST_BOOL, CONST_NONE
|
||||
|
||||
class Name(AST):
|
||||
id: str
|
||||
ctx: t.CInt
|
||||
def __new__(self: Name, pool: memhub.MemManager | t.CPtr, id: str, ctx: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: Name, pool: memhub.MemManager | t.CPtr, id: str, ctx: t.CInt) -> t.CInt: pass
|
||||
def kind(self: Name) -> t.CInt: pass
|
||||
def type_name(self: Name) -> str: pass
|
||||
def dump(self: Name, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Constant(AST):
|
||||
int_val: t.CInt64T
|
||||
float_val: t.CDouble
|
||||
str_val: str
|
||||
const_kind: t.CInt
|
||||
def __new__(self: Constant, pool: memhub.MemManager | t.CPtr, const_kind: t.CInt, int_val: t.CInt64T, float_val: t.CDouble, str_val: str, lineno: t.CInt, col: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: Constant, pool: memhub.MemManager | t.CPtr, const_kind: t.CInt, int_val: t.CInt64T, float_val: t.CDouble, str_val: str, lineno: t.CInt, col: t.CInt) -> t.CInt: pass
|
||||
def kind(self: Constant) -> t.CInt: pass
|
||||
def type_name(self: Constant) -> str: pass
|
||||
def dump(self: Constant, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class BinOp(AST):
|
||||
left: AST | t.CPtr
|
||||
op: t.CInt
|
||||
right: AST | t.CPtr
|
||||
def __new__(self: BinOp, pool: memhub.MemManager | t.CPtr, left: AST | t.CPtr, op: t.CInt, right: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: BinOp, pool: memhub.MemManager | t.CPtr, left: AST | t.CPtr, op: t.CInt, right: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: BinOp) -> t.CInt: pass
|
||||
def type_name(self: BinOp) -> str: pass
|
||||
def dump(self: BinOp, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class UnaryOp(AST):
|
||||
op: t.CInt
|
||||
operand: AST | t.CPtr
|
||||
def __new__(self: UnaryOp, pool: memhub.MemManager | t.CPtr, op: t.CInt, operand: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: UnaryOp, pool: memhub.MemManager | t.CPtr, op: t.CInt, operand: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: UnaryOp) -> t.CInt: pass
|
||||
def type_name(self: UnaryOp) -> str: pass
|
||||
def dump(self: UnaryOp, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Compare(AST):
|
||||
left: AST | t.CPtr
|
||||
ops: t.CPtr
|
||||
comparators: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Compare, pool: memhub.MemManager | t.CPtr, left: AST | t.CPtr, ops: t.CPtr, comparators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Compare, pool: memhub.MemManager | t.CPtr, left: AST | t.CPtr, ops: t.CPtr, comparators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Compare) -> t.CInt: pass
|
||||
def type_name(self: Compare) -> str: pass
|
||||
def dump(self: Compare, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Call(AST):
|
||||
func: AST | t.CPtr
|
||||
args: list[AST | t.CPtr] | t.CPtr
|
||||
keywords: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Call, pool: memhub.MemManager | t.CPtr, func: AST | t.CPtr, args: list[AST | t.CPtr] | t.CPtr, keywords: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Call, pool: memhub.MemManager | t.CPtr, func: AST | t.CPtr, args: list[AST | t.CPtr] | t.CPtr, keywords: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Call) -> t.CInt: pass
|
||||
def type_name(self: Call) -> str: pass
|
||||
def dump(self: Call, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class BoolOp(AST):
|
||||
op: t.CInt
|
||||
values: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: BoolOp, pool: memhub.MemManager | t.CPtr, op: t.CInt, values: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: BoolOp, pool: memhub.MemManager | t.CPtr, op: t.CInt, values: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: BoolOp) -> t.CInt: pass
|
||||
def type_name(self: BoolOp) -> str: pass
|
||||
def dump(self: BoolOp, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Lambda(AST):
|
||||
args: AST | t.CPtr
|
||||
body: AST | t.CPtr
|
||||
def __new__(self: Lambda, pool: memhub.MemManager | t.CPtr, args: AST | t.CPtr, body: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Lambda, pool: memhub.MemManager | t.CPtr, args: AST | t.CPtr, body: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Lambda) -> t.CInt: pass
|
||||
def type_name(self: Lambda) -> str: pass
|
||||
def dump(self: Lambda, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class IfExp(AST):
|
||||
test: AST | t.CPtr
|
||||
body: AST | t.CPtr
|
||||
orelse: AST | t.CPtr
|
||||
def __new__(self: IfExp, pool: memhub.MemManager | t.CPtr, test: AST | t.CPtr, body: AST | t.CPtr, orelse: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: IfExp, pool: memhub.MemManager | t.CPtr, test: AST | t.CPtr, body: AST | t.CPtr, orelse: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: IfExp) -> t.CInt: pass
|
||||
def type_name(self: IfExp) -> str: pass
|
||||
def dump(self: IfExp, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Dict(AST):
|
||||
keys: list[AST | t.CPtr] | t.CPtr
|
||||
values: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Dict, pool: memhub.MemManager | t.CPtr, keys: list[AST | t.CPtr] | t.CPtr, values: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Dict, pool: memhub.MemManager | t.CPtr, keys: list[AST | t.CPtr] | t.CPtr, values: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Dict) -> t.CInt: pass
|
||||
def type_name(self: Dict) -> str: pass
|
||||
def dump(self: Dict, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Set(AST):
|
||||
elts: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Set, pool: memhub.MemManager | t.CPtr, elts: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Set, pool: memhub.MemManager | t.CPtr, elts: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Set) -> t.CInt: pass
|
||||
def type_name(self: Set) -> str: pass
|
||||
def dump(self: Set, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class ListComp(AST):
|
||||
elt: AST | t.CPtr
|
||||
generators: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: ListComp, pool: memhub.MemManager | t.CPtr, elt: AST | t.CPtr, generators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: ListComp, pool: memhub.MemManager | t.CPtr, elt: AST | t.CPtr, generators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: ListComp) -> t.CInt: pass
|
||||
def type_name(self: ListComp) -> str: pass
|
||||
def dump(self: ListComp, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class SetComp(AST):
|
||||
elt: AST | t.CPtr
|
||||
generators: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: SetComp, pool: memhub.MemManager | t.CPtr, elt: AST | t.CPtr, generators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: SetComp, pool: memhub.MemManager | t.CPtr, elt: AST | t.CPtr, generators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: SetComp) -> t.CInt: pass
|
||||
def type_name(self: SetComp) -> str: pass
|
||||
def dump(self: SetComp, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class DictComp(AST):
|
||||
key: AST | t.CPtr
|
||||
value: AST | t.CPtr
|
||||
generators: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: DictComp, pool: memhub.MemManager | t.CPtr, key: AST | t.CPtr, value: AST | t.CPtr, generators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: DictComp, pool: memhub.MemManager | t.CPtr, key: AST | t.CPtr, value: AST | t.CPtr, generators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: DictComp) -> t.CInt: pass
|
||||
def type_name(self: DictComp) -> str: pass
|
||||
def dump(self: DictComp, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class GeneratorExp(AST):
|
||||
elt: AST | t.CPtr
|
||||
generators: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: GeneratorExp, pool: memhub.MemManager | t.CPtr, elt: AST | t.CPtr, generators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: GeneratorExp, pool: memhub.MemManager | t.CPtr, elt: AST | t.CPtr, generators: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: GeneratorExp) -> t.CInt: pass
|
||||
def type_name(self: GeneratorExp) -> str: pass
|
||||
def dump(self: GeneratorExp, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Await(AST):
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: Await, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Await, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Await) -> t.CInt: pass
|
||||
def type_name(self: Await) -> str: pass
|
||||
def dump(self: Await, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Yield(AST):
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: Yield, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Yield, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Yield) -> t.CInt: pass
|
||||
def type_name(self: Yield) -> str: pass
|
||||
def dump(self: Yield, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class YieldFrom(AST):
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: YieldFrom, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: YieldFrom, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: YieldFrom) -> t.CInt: pass
|
||||
def type_name(self: YieldFrom) -> str: pass
|
||||
def dump(self: YieldFrom, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class FormattedValue(AST):
|
||||
value: AST | t.CPtr
|
||||
conversion: t.CInt
|
||||
format_spec: AST | t.CPtr
|
||||
def __new__(self: FormattedValue, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr, conversion: t.CInt, format_spec: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: FormattedValue, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr, conversion: t.CInt, format_spec: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: FormattedValue) -> t.CInt: pass
|
||||
def type_name(self: FormattedValue) -> str: pass
|
||||
def dump(self: FormattedValue, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class JoinedStr(AST):
|
||||
values: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: JoinedStr, pool: memhub.MemManager | t.CPtr, values: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: JoinedStr, pool: memhub.MemManager | t.CPtr, values: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: JoinedStr) -> t.CInt: pass
|
||||
def type_name(self: JoinedStr) -> str: pass
|
||||
def dump(self: JoinedStr, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Attribute(AST):
|
||||
value: AST | t.CPtr
|
||||
attr: str
|
||||
ctx: t.CInt
|
||||
def __new__(self: Attribute, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr, attr: str, ctx: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: Attribute, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr, attr: str, ctx: t.CInt) -> t.CInt: pass
|
||||
def kind(self: Attribute) -> t.CInt: pass
|
||||
def type_name(self: Attribute) -> str: pass
|
||||
def dump(self: Attribute, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Subscript(AST):
|
||||
value: AST | t.CPtr
|
||||
slice: AST | t.CPtr
|
||||
ctx: t.CInt
|
||||
def __new__(self: Subscript, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr, slice: AST | t.CPtr, ctx: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: Subscript, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr, slice: AST | t.CPtr, ctx: t.CInt) -> t.CInt: pass
|
||||
def kind(self: Subscript) -> t.CInt: pass
|
||||
def type_name(self: Subscript) -> str: pass
|
||||
def dump(self: Subscript, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Starred(AST):
|
||||
value: AST | t.CPtr
|
||||
ctx: t.CInt
|
||||
def __new__(self: Starred, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr, ctx: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: Starred, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr, ctx: t.CInt) -> t.CInt: pass
|
||||
def kind(self: Starred) -> t.CInt: pass
|
||||
def type_name(self: Starred) -> str: pass
|
||||
def dump(self: Starred, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class List(AST):
|
||||
elts: list[AST | t.CPtr] | t.CPtr
|
||||
ctx: t.CInt
|
||||
def __new__(self: List, pool: memhub.MemManager | t.CPtr, elts: list[AST | t.CPtr] | t.CPtr, ctx: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: List, pool: memhub.MemManager | t.CPtr, elts: list[AST | t.CPtr] | t.CPtr, ctx: t.CInt) -> t.CInt: pass
|
||||
def kind(self: List) -> t.CInt: pass
|
||||
def type_name(self: List) -> str: pass
|
||||
def dump(self: List, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Tuple(AST):
|
||||
elts: list[AST | t.CPtr] | t.CPtr
|
||||
ctx: t.CInt
|
||||
def __new__(self: Tuple, pool: memhub.MemManager | t.CPtr, elts: list[AST | t.CPtr] | t.CPtr, ctx: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: Tuple, pool: memhub.MemManager | t.CPtr, elts: list[AST | t.CPtr] | t.CPtr, ctx: t.CInt) -> t.CInt: pass
|
||||
def kind(self: Tuple) -> t.CInt: pass
|
||||
def type_name(self: Tuple) -> str: pass
|
||||
def dump(self: Tuple, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Slice(AST):
|
||||
lower: AST | t.CPtr
|
||||
upper: AST | t.CPtr
|
||||
step: AST | t.CPtr
|
||||
def __new__(self: Slice, pool: memhub.MemManager | t.CPtr, lower: AST | t.CPtr, upper: AST | t.CPtr, step: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Slice, pool: memhub.MemManager | t.CPtr, lower: AST | t.CPtr, upper: AST | t.CPtr, step: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Slice) -> t.CInt: pass
|
||||
def type_name(self: Slice) -> str: pass
|
||||
def dump(self: Slice, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class NamedExpr(AST):
|
||||
target: AST | t.CPtr
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: NamedExpr, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: NamedExpr, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: NamedExpr) -> t.CInt: pass
|
||||
def type_name(self: NamedExpr) -> str: pass
|
||||
def dump(self: NamedExpr, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class OpNode(AST):
|
||||
op: t.CInt
|
||||
def __new__(self: OpNode, pool: memhub.MemManager | t.CPtr, op: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: OpNode, pool: memhub.MemManager | t.CPtr, op: t.CInt) -> t.CInt: pass
|
||||
def kind(self: OpNode) -> t.CInt: pass
|
||||
def type_name(self: OpNode) -> str: pass
|
||||
def dump(self: OpNode, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
82
Test/AstTest/temp/4dd6b3f1427d1cc5.pyi
Normal file
82
Test/AstTest/temp/4dd6b3f1427d1cc5.pyi
Normal file
@@ -0,0 +1,82 @@
|
||||
"""
|
||||
Auto-generated Python stub file from ast.match.py
|
||||
Module: ast.match
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import memhub
|
||||
import string
|
||||
from .base import AST, ASTKind, _init_ast, _copy_str, _set_parent_list, _emit, _emit_str, _emit_int, _dump_list
|
||||
|
||||
class MatchCase(AST):
|
||||
pattern: AST | t.CPtr
|
||||
guard: AST | t.CPtr
|
||||
def __new__(self: MatchCase, pool: memhub.MemManager | t.CPtr, pattern: AST | t.CPtr, guard: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: MatchCase, pool: memhub.MemManager | t.CPtr, pattern: AST | t.CPtr, guard: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: MatchCase) -> t.CInt: pass
|
||||
def type_name(self: MatchCase) -> str: pass
|
||||
def dump(self: MatchCase, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class MatchValue(AST):
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: MatchValue, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: MatchValue, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: MatchValue) -> t.CInt: pass
|
||||
def type_name(self: MatchValue) -> str: pass
|
||||
def dump(self: MatchValue, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class MatchSingleton(AST):
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: MatchSingleton, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: MatchSingleton, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: MatchSingleton) -> t.CInt: pass
|
||||
def type_name(self: MatchSingleton) -> str: pass
|
||||
def dump(self: MatchSingleton, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class MatchSequence(AST):
|
||||
patterns: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: MatchSequence, pool: memhub.MemManager | t.CPtr, patterns: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: MatchSequence, pool: memhub.MemManager | t.CPtr, patterns: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: MatchSequence) -> t.CInt: pass
|
||||
def type_name(self: MatchSequence) -> str: pass
|
||||
def dump(self: MatchSequence, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class MatchMapping(AST):
|
||||
keys: list[AST | t.CPtr] | t.CPtr
|
||||
patterns: list[AST | t.CPtr] | t.CPtr
|
||||
rest: str
|
||||
def __new__(self: MatchMapping, pool: memhub.MemManager | t.CPtr, keys: list[AST | t.CPtr] | t.CPtr, patterns: list[AST | t.CPtr] | t.CPtr, rest: str) -> t.CInt: pass
|
||||
def __init__(self: MatchMapping, pool: memhub.MemManager | t.CPtr, keys: list[AST | t.CPtr] | t.CPtr, patterns: list[AST | t.CPtr] | t.CPtr, rest: str) -> t.CInt: pass
|
||||
def kind(self: MatchMapping) -> t.CInt: pass
|
||||
def type_name(self: MatchMapping) -> str: pass
|
||||
def dump(self: MatchMapping, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class MatchClass(AST):
|
||||
cls: AST | t.CPtr
|
||||
patterns: list[AST | t.CPtr] | t.CPtr
|
||||
kwd_attrs: list[AST | t.CPtr] | t.CPtr
|
||||
kwd_patterns: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: MatchClass, pool: memhub.MemManager | t.CPtr, cls: AST | t.CPtr, patterns: list[AST | t.CPtr] | t.CPtr, kwd_attrs: list[AST | t.CPtr] | t.CPtr, kwd_patterns: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: MatchClass, pool: memhub.MemManager | t.CPtr, cls: AST | t.CPtr, patterns: list[AST | t.CPtr] | t.CPtr, kwd_attrs: list[AST | t.CPtr] | t.CPtr, kwd_patterns: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: MatchClass) -> t.CInt: pass
|
||||
def type_name(self: MatchClass) -> str: pass
|
||||
def dump(self: MatchClass, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class MatchStar(AST):
|
||||
name: str
|
||||
def __new__(self: MatchStar, pool: memhub.MemManager | t.CPtr, name: str) -> t.CInt: pass
|
||||
def __init__(self: MatchStar, pool: memhub.MemManager | t.CPtr, name: str) -> t.CInt: pass
|
||||
def kind(self: MatchStar) -> t.CInt: pass
|
||||
def type_name(self: MatchStar) -> str: pass
|
||||
def dump(self: MatchStar, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class MatchAs(AST):
|
||||
pattern: AST | t.CPtr
|
||||
name: str
|
||||
def __new__(self: MatchAs, pool: memhub.MemManager | t.CPtr, pattern: AST | t.CPtr, name: str) -> t.CInt: pass
|
||||
def __init__(self: MatchAs, pool: memhub.MemManager | t.CPtr, pattern: AST | t.CPtr, name: str) -> t.CInt: pass
|
||||
def kind(self: MatchAs) -> t.CInt: pass
|
||||
def type_name(self: MatchAs) -> str: pass
|
||||
def dump(self: MatchAs, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class MatchOr(AST):
|
||||
patterns: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: MatchOr, pool: memhub.MemManager | t.CPtr, patterns: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: MatchOr, pool: memhub.MemManager | t.CPtr, patterns: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: MatchOr) -> t.CInt: pass
|
||||
def type_name(self: MatchOr) -> str: pass
|
||||
def dump(self: MatchOr, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
182
Test/AstTest/temp/5dab8cb390496d22.pyi
Normal file
182
Test/AstTest/temp/5dab8cb390496d22.pyi
Normal file
@@ -0,0 +1,182 @@
|
||||
"""
|
||||
Auto-generated Python stub file from ast.base.py
|
||||
Module: ast.base
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import memhub
|
||||
import string
|
||||
import viperlib
|
||||
from .tokens import TokOp
|
||||
|
||||
class ASTKind(t.CEnum):
|
||||
Module: t.State
|
||||
FunctionDef: t.State
|
||||
ClassDef: t.State
|
||||
Assign: t.State
|
||||
If: t.State
|
||||
For: t.State
|
||||
While: t.State
|
||||
Return: t.State
|
||||
Expr: t.State
|
||||
Name: t.State
|
||||
Constant: t.State
|
||||
BinOp: t.State
|
||||
UnaryOp: t.State
|
||||
Call: t.State
|
||||
Compare: t.State
|
||||
Expression: t.State
|
||||
Interactive: t.State
|
||||
FunctionType: t.State
|
||||
Delete: t.State
|
||||
AugAssign: t.State
|
||||
AnnAssign: t.State
|
||||
With: t.State
|
||||
Raise: t.State
|
||||
Try: t.State
|
||||
Assert: t.State
|
||||
Global: t.State
|
||||
Nonlocal: t.State
|
||||
Pass: t.State
|
||||
Break: t.State
|
||||
Continue: t.State
|
||||
Import: t.State
|
||||
ImportFrom: t.State
|
||||
Match: t.State
|
||||
BoolOp: t.State
|
||||
Lambda: t.State
|
||||
IfExp: t.State
|
||||
Dict: t.State
|
||||
Set: t.State
|
||||
ListComp: t.State
|
||||
SetComp: t.State
|
||||
DictComp: t.State
|
||||
GeneratorExp: t.State
|
||||
Await: t.State
|
||||
Yield: t.State
|
||||
YieldFrom: t.State
|
||||
FormattedValue: t.State
|
||||
JoinedStr: t.State
|
||||
Attribute: t.State
|
||||
Subscript: t.State
|
||||
Starred: t.State
|
||||
List: t.State
|
||||
Tuple: t.State
|
||||
Slice: t.State
|
||||
NamedExpr: t.State
|
||||
ExceptHandler: t.State
|
||||
Arguments: t.State
|
||||
Arg: t.State
|
||||
Keyword: t.State
|
||||
Alias: t.State
|
||||
WithItem: t.State
|
||||
Comprehension: t.State
|
||||
OpNode: t.State
|
||||
MatchCase: t.State
|
||||
MatchValue: t.State
|
||||
MatchSingleton: t.State
|
||||
MatchSequence: t.State
|
||||
MatchMapping: t.State
|
||||
MatchClass: t.State
|
||||
MatchStar: t.State
|
||||
MatchAs: t.State
|
||||
MatchOr: t.State
|
||||
class ASTCtx(t.CEnum):
|
||||
Load: t.State
|
||||
Store: t.State
|
||||
Del: t.State
|
||||
class OpKind(t.CEnum):
|
||||
Add: t.State
|
||||
Sub: t.State
|
||||
Mult: t.State
|
||||
MatMult: t.State
|
||||
Div: t.State
|
||||
Mod: t.State
|
||||
Pow: t.State
|
||||
LShift: t.State
|
||||
RShift: t.State
|
||||
BitOr: t.State
|
||||
BitXor: t.State
|
||||
BitAnd: t.State
|
||||
FloorDiv: t.State
|
||||
And: t.State
|
||||
Or: t.State
|
||||
Eq: t.State
|
||||
Ne: t.State
|
||||
Lt: t.State
|
||||
Le: t.State
|
||||
Gt: t.State
|
||||
Ge: t.State
|
||||
Is: t.State
|
||||
IsNot: t.State
|
||||
In: t.State
|
||||
NotIn: t.State
|
||||
Not: t.State
|
||||
UAdd: t.State
|
||||
USub: t.State
|
||||
Invert: t.State
|
||||
NoneOp: t.State
|
||||
|
||||
CONST_INT: t.CDefine = 1
|
||||
CONST_FLOAT: t.CDefine = 2
|
||||
CONST_STR: t.CDefine = 3
|
||||
CONST_BOOL: t.CDefine = 4
|
||||
CONST_NONE: t.CDefine = 5
|
||||
FLAG_IS_ASYNC: t.CDefine = 1
|
||||
FLAG_SIMPLE: t.CDefine = 2
|
||||
FLAG_HAS_STAR: t.CDefine = 4
|
||||
|
||||
class ASTFlag(t.CEnum):
|
||||
IsAsync: t.State
|
||||
Simple: t.State
|
||||
HasStar: t.State
|
||||
|
||||
def _copy_str(pool: memhub.MemManager | t.CPtr, src: str) -> str: pass
|
||||
|
||||
def _set_pos(node: AST | t.CPtr, lineno: t.CInt, col_offset: t.CInt, end_lineno: t.CInt, end_col_offset: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _inherit_pos(node: AST | t.CPtr, ref: AST | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _init_ast(node: AST | t.CPtr, pool: memhub.MemManager | t.CPtr, lineno: t.CInt, col: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _set_parent_list(lst: list[AST | t.CPtr] | t.CPtr, parent: AST | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _append_child(lst: list[AST | t.CPtr] | t.CPtr, node: AST | t.CPtr, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _binop_from_op(op_id: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _augop_from_op(op_id: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _cmpop_from_op(op_id: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _emit(buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT, text: str) -> t.CSizeT: pass
|
||||
|
||||
def _emit_str(buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT, text: str) -> t.CSizeT: pass
|
||||
|
||||
def _emit_int(buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT, val: t.CInt64T) -> t.CSizeT: pass
|
||||
|
||||
def _op_name(op: t.CInt) -> str: pass
|
||||
|
||||
def _dump_list(lst: list[AST | t.CPtr] | t.CPtr, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
|
||||
def _dump_op_list(lst: t.CPtr, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
|
||||
|
||||
@t.CVTable
|
||||
class AST:
|
||||
parent: AST | t.CPtr
|
||||
pool: memhub.MemManager | t.CPtr
|
||||
lineno: t.CInt
|
||||
col_offset: t.CInt
|
||||
end_lineno: t.CInt
|
||||
end_col_offset: t.CInt
|
||||
children: list[AST | t.CPtr] | t.CPtr
|
||||
def kind(self: AST) -> t.CInt: pass
|
||||
def type_name(self: AST) -> str: pass
|
||||
def dump(self: AST, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
def accept(self: AST, visitor: t.CPtr) -> t.CInt: pass
|
||||
def append(self: AST, node: AST | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def dump(node: AST | t.CPtr, buf: t.CChar | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
86
Test/AstTest/temp/6446627d4f07a1b5.pyi
Normal file
86
Test/AstTest/temp/6446627d4f07a1b5.pyi
Normal file
@@ -0,0 +1,86 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.winsock2.py
|
||||
Module: w32.winsock2
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
from w32.win32base import *
|
||||
|
||||
WINSOCK_VERSION: t.CDefine = 0x0202 # 2.2
|
||||
AF_INET: t.CDefine = 2
|
||||
AF_INET6: t.CDefine = 23
|
||||
SOCK_STREAM: t.CDefine = 1 # TCP
|
||||
SOCK_DGRAM: t.CDefine = 2 # UDP
|
||||
SOCK_RAW: t.CDefine = 3 # 原始套接字
|
||||
IPPROTO_TCP: t.CDefine = 6
|
||||
IPPROTO_UDP: t.CDefine = 17
|
||||
SOL_SOCKET: t.CDefine = 0xFFFF # WinSock2 值
|
||||
SO_RCVTIMEO: t.CDefine = 0x1006 # WinSock2 值
|
||||
SO_SNDTIMEO: t.CDefine = 0x1005 # WinSock2 值
|
||||
SO_REUSEADDR: t.CDefine = 0x0004 # WinSock2 值
|
||||
INADDR_ANY: t.CDefine = 0
|
||||
SOCKET_ERROR: t.CDefine = -1
|
||||
INVALID_SOCKET: t.CDefine = 0xFFFFFFFF # WinSock2: ~0
|
||||
MSG_NOSIGNAL: t.CDefine = 0 # Windows 不支持,设为 0
|
||||
SD_SEND: t.CDefine = 1
|
||||
SD_RECV: t.CDefine = 0
|
||||
SD_BOTH: t.CDefine = 2
|
||||
|
||||
class WSASocketAddr:
|
||||
family: u16
|
||||
port: u16
|
||||
addr: u32
|
||||
zero: u64
|
||||
class WSAData:
|
||||
wVersion: WORD
|
||||
wHighVersion: WORD
|
||||
szDescription: BYTE
|
||||
szSystemStatus: BYTE
|
||||
iMaxSockets: u16
|
||||
iMaxUdpDg: u16
|
||||
lpVendorInfo: CHARPTR
|
||||
class WSAHostEnt:
|
||||
h_name: CHARPTR
|
||||
h_aliases: CHARPTR
|
||||
h_addrtype: SHORT
|
||||
h_length: SHORT
|
||||
h_addr_list: CHARPTR
|
||||
class WinTimeVal:
|
||||
tv_sec: LONG
|
||||
tv_usec: LONG
|
||||
|
||||
def WSAStartup(wVersionRequested: WORD, lpWSAData: WSAData | t.CPtr) -> INT | t.State: pass
|
||||
|
||||
def WSACleanup() -> INT | t.State: pass
|
||||
|
||||
def WSAGetLastError() -> INT | t.State: pass
|
||||
|
||||
def socket(family: INT, type: INT, protocol: INT) -> u64 | t.State: pass
|
||||
|
||||
def closesocket(s: u64) -> INT | t.State: pass
|
||||
|
||||
def connect(s: u64, name: WSASocketAddr | t.CPtr, namelen: INT) -> INT | t.State: pass
|
||||
|
||||
def send(s: u64, buf: t.CVoid | t.CPtr, len: INT, flags: INT) -> INT | t.State: pass
|
||||
|
||||
def recv(s: u64, buf: t.CVoid | t.CPtr, len: INT, flags: INT) -> INT | t.State: pass
|
||||
|
||||
def bind(s: u64, name: WSASocketAddr | t.CPtr, namelen: INT) -> INT | t.State: pass
|
||||
|
||||
def listen(s: u64, backlog: INT) -> INT | t.State: pass
|
||||
|
||||
def accept(s: u64, addr: WSASocketAddr | t.CPtr, addrlen: INT | t.CPtr) -> u64 | t.State: pass
|
||||
|
||||
def setsockopt(s: u64, level: INT, optname: INT, optval: t.CVoid | t.CPtr, optlen: INT) -> INT | t.State: pass
|
||||
|
||||
def shutdown(s: u64, how: INT) -> INT | t.State: pass
|
||||
|
||||
def gethostbyname(name: t.CChar | t.CConst | t.CPtr) -> WSAHostEnt | t.CPtr | t.State: pass
|
||||
|
||||
def ntohs(netshort: u16) -> u16 | t.State: pass
|
||||
|
||||
def htons(hostshort: u16) -> u16 | t.State: pass
|
||||
|
||||
def inet_addr(cp: t.CChar | t.CConst | t.CPtr) -> u32 | t.State: pass
|
||||
189
Test/AstTest/temp/6503c97dde0c79c4.pyi
Normal file
189
Test/AstTest/temp/6503c97dde0c79c4.pyi
Normal file
@@ -0,0 +1,189 @@
|
||||
"""
|
||||
Auto-generated Python stub file from posix.py
|
||||
Module: posix
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
|
||||
DIR: t.CTypedef = t.CVoid | t.CPtr
|
||||
mode_t: t.CTypedef = t.CUInt32T
|
||||
pid_t: t.CTypedef = t.CInt32T
|
||||
off_t: t.CTypedef = t.CInt64T
|
||||
dev_t: t.CTypedef = t.CUInt64T
|
||||
ino_t: t.CTypedef = t.CUInt64T
|
||||
nlink_t: t.CTypedef = t.CUInt64T
|
||||
uid_t: t.CTypedef = t.CUInt32T
|
||||
gid_t: t.CTypedef = t.CUInt32T
|
||||
blksize_t: t.CTypedef = t.CInt64T
|
||||
blkcnt_t: t.CTypedef = t.CInt64T
|
||||
time_t: t.CTypedef = t.CInt64T
|
||||
O_RDONLY: t.CDefine = 0
|
||||
O_WRONLY: t.CDefine = 1
|
||||
O_RDWR: t.CDefine = 2
|
||||
O_CREAT: t.CDefine = 0o100
|
||||
O_EXCL: t.CDefine = 0o200
|
||||
O_TRUNC: t.CDefine = 0o1000
|
||||
O_APPEND: t.CDefine = 0o2000
|
||||
O_NONBLOCK: t.CDefine = 0o4000
|
||||
O_CLOEXEC: t.CDefine = 0o2000000
|
||||
F_OK: t.CDefine = 0 # 文件存在
|
||||
R_OK: t.CDefine = 4 # 可读
|
||||
W_OK: t.CDefine = 2 # 可写
|
||||
X_OK: t.CDefine = 1 # 可执行
|
||||
S_IFMT: t.CDefine = 0o170000 # 类型掩码
|
||||
S_IFSOCK: t.CDefine = 0o140000 # 套接字
|
||||
S_IFLNK: t.CDefine = 0o120000 # 符号链接
|
||||
S_IFREG: t.CDefine = 0o100000 # 普通文件
|
||||
S_IFBLK: t.CDefine = 0o060000 # 块设备
|
||||
S_IFDIR: t.CDefine = 0o040000 # 目录
|
||||
S_IFCHR: t.CDefine = 0o020000 # 字符设备
|
||||
S_IFIFO: t.CDefine = 0o010000 # FIFO/管道
|
||||
S_ISUID: t.CDefine = 0o4000 # set-user-ID
|
||||
S_ISGID: t.CDefine = 0o2000 # set-group-ID
|
||||
S_ISVTX: t.CDefine = 0o1000 # sticky 位
|
||||
S_IRWXU: t.CDefine = 0o700 # 用户读写执行
|
||||
S_IRUSR: t.CDefine = 0o400 # 用户读
|
||||
S_IWUSR: t.CDefine = 0o200 # 用户写
|
||||
S_IXUSR: t.CDefine = 0o100 # 用户执行
|
||||
S_IRWXG: t.CDefine = 0o070 # 组读写执行
|
||||
S_IRGRP: t.CDefine = 0o040 # 组读
|
||||
S_IWGRP: t.CDefine = 0o020 # 组写
|
||||
S_IXGRP: t.CDefine = 0o010 # 组执行
|
||||
S_IRWXO: t.CDefine = 0o007 # 其他读写执行
|
||||
S_IROTH: t.CDefine = 0o004 # 其他读
|
||||
S_IWOTH: t.CDefine = 0o002 # 其他写
|
||||
S_IXOTH: t.CDefine = 0o001 # 其他执行
|
||||
SEEK_SET: t.CDefine = 0
|
||||
SEEK_CUR: t.CDefine = 1
|
||||
SEEK_END: t.CDefine = 2
|
||||
PATH_MAX: t.CDefine = 4096
|
||||
NAME_MAX: t.CDefine = 255
|
||||
_SC_NPROCESSORS_ONLN: t.CDefine = 84
|
||||
_SC_PAGESIZE: t.CDefine = 30
|
||||
_SC_CLK_TCK: t.CDefine = 2
|
||||
DT_UNKNOWN: t.CDefine = 0
|
||||
DT_FIFO: t.CDefine = 1
|
||||
DT_CHR: t.CDefine = 2
|
||||
DT_DIR: t.CDefine = 4
|
||||
DT_BLK: t.CDefine = 6
|
||||
DT_REG: t.CDefine = 8
|
||||
DT_LNK: t.CDefine = 10
|
||||
DT_SOCK: t.CDefine = 12
|
||||
DT_WHT: t.CDefine = 14
|
||||
WNOHANG: t.CDefine = 1
|
||||
WUNTRACED: t.CDefine = 2
|
||||
WCONTINUED: t.CDefine = 8
|
||||
|
||||
class Stat:
|
||||
st_dev: dev_t
|
||||
st_ino: ino_t
|
||||
st_nlink: nlink_t
|
||||
st_mode: mode_t
|
||||
st_uid: uid_t
|
||||
st_gid: gid_t
|
||||
__pad0: INT
|
||||
st_rdev: dev_t
|
||||
st_size: off_t
|
||||
st_blksize: blksize_t
|
||||
st_blocks: blkcnt_t
|
||||
st_atim_sec: time_t
|
||||
st_atim_nsec: LONGLONG
|
||||
st_mtim_sec: time_t
|
||||
st_mtim_nsec: LONGLONG
|
||||
st_ctim_sec: time_t
|
||||
st_ctim_nsec: LONGLONG
|
||||
__unused0: LONGLONG
|
||||
__unused1: LONGLONG
|
||||
__unused2: LONGLONG
|
||||
class Dirent:
|
||||
d_ino: ino_t
|
||||
d_off: off_t
|
||||
d_reclen: USHORT
|
||||
d_type: BYTE
|
||||
d_name: CHARPTR
|
||||
|
||||
def open(path: t.CConst | str, oflag: INT, *args) -> INT | t.State: pass
|
||||
|
||||
def close(fd: INT) -> INT | t.State: pass
|
||||
|
||||
def read(fd: INT, buf: bytes, count: t.CSizeT) -> ssize_t | t.State: pass
|
||||
|
||||
def write(fd: INT, buf: t.CConst | bytes, count: t.CSizeT) -> ssize_t | t.State: pass
|
||||
|
||||
def lseek(fd: INT, offset: off_t, whence: INT) -> off_t | t.State: pass
|
||||
|
||||
def unlink(path: t.CConst | str) -> INT | t.State: pass
|
||||
|
||||
def access(path: t.CConst | str, amode: INT) -> INT | t.State: pass
|
||||
|
||||
def realpath(path: t.CConst | str, resolved: CHARPTR) -> CHARPTR | t.State: pass
|
||||
|
||||
def rename(oldpath: t.CConst | str, newpath: t.CConst | str) -> INT | t.State: pass
|
||||
|
||||
def chmod(path: t.CConst | str, mode: mode_t) -> INT | t.State: pass
|
||||
|
||||
def stat(path: t.CConst | str, buf: Stat | t.CPtr) -> INT | t.State: pass
|
||||
|
||||
def fstat(fd: INT, buf: Stat | t.CPtr) -> INT | t.State: pass
|
||||
|
||||
def opendir(name: t.CConst | str) -> DIR | t.CPtr | t.State: pass
|
||||
|
||||
def readdir(dirp: DIR | t.CPtr) -> Dirent | t.CPtr | t.State: pass
|
||||
|
||||
def closedir(dirp: DIR | t.CPtr) -> INT | t.State: pass
|
||||
|
||||
def mkdir(path: t.CConst | str, mode: mode_t) -> INT | t.State: pass
|
||||
|
||||
def rmdir(path: t.CConst | str) -> INT | t.State: pass
|
||||
|
||||
def getcwd(buf: CHARPTR, size: t.CSizeT) -> CHARPTR | t.State: pass
|
||||
|
||||
def chdir(path: t.CConst | str) -> INT | t.State: pass
|
||||
|
||||
def fork() -> pid_t | t.State: pass
|
||||
|
||||
def execvp(file: t.CConst | str, argv: CHARPTR | t.CPtr) -> INT | t.State: pass
|
||||
|
||||
def execv(path: t.CConst | str, argv: CHARPTR | t.CPtr) -> INT | t.State: pass
|
||||
|
||||
def waitpid(pid: pid_t, status: INT | t.CPtr, options: INT) -> pid_t | t.State: pass
|
||||
|
||||
def pipe(fds: INT | t.CPtr) -> INT | t.State: pass
|
||||
|
||||
def dup2(oldfd: INT, newfd: INT) -> INT | t.State: pass
|
||||
|
||||
def _exit(status: INT) -> t.CVoid | t.State: pass
|
||||
|
||||
def getpid() -> pid_t | t.State: pass
|
||||
|
||||
def getenv(name: t.CConst | str) -> CHARPTR | t.State: pass
|
||||
|
||||
def setenv(name: t.CConst | str, value: t.CConst | str, overwrite: INT) -> INT | t.State: pass
|
||||
|
||||
def sysconf(name: INT) -> LONG | t.State: pass
|
||||
|
||||
def isatty(fd: INT) -> INT | t.State: pass
|
||||
|
||||
def S_ISREG(mode: mode_t) -> bool: pass
|
||||
|
||||
def S_ISDIR(mode: mode_t) -> bool: pass
|
||||
|
||||
def S_ISLNK(mode: mode_t) -> bool: pass
|
||||
|
||||
def S_ISCHR(mode: mode_t) -> bool: pass
|
||||
|
||||
def S_ISBLK(mode: mode_t) -> bool: pass
|
||||
|
||||
def S_ISFIFO(mode: mode_t) -> bool: pass
|
||||
|
||||
def S_ISSOCK(mode: mode_t) -> bool: pass
|
||||
|
||||
def WIFEXITED(status: INT) -> bool: pass
|
||||
|
||||
def WEXITSTATUS(status: INT) -> INT: pass
|
||||
|
||||
def WIFSIGNALED(status: INT) -> bool: pass
|
||||
|
||||
def WTERMSIG(status: INT) -> INT: pass
|
||||
226
Test/AstTest/temp/657e182b27c2a022.pyi
Normal file
226
Test/AstTest/temp/657e182b27c2a022.pyi
Normal file
@@ -0,0 +1,226 @@
|
||||
"""
|
||||
Auto-generated Python stub file from ast.stmts.py
|
||||
Module: ast.stmts
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import memhub
|
||||
import string
|
||||
from .base import AST, ASTKind, ASTCtx, OpKind, _init_ast, _copy_str, _set_parent_list, _emit, _emit_str, _emit_int, _dump_list, FLAG_IS_ASYNC
|
||||
|
||||
@t.CVTable
|
||||
class Module(AST):
|
||||
def __new__(self: Module, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Module, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Module) -> t.CInt: pass
|
||||
def type_name(self: Module) -> str: pass
|
||||
def dump(self: Module, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Assign(AST):
|
||||
targets: list[AST | t.CPtr] | t.CPtr
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: Assign, pool: memhub.MemManager | t.CPtr, targets: list[AST | t.CPtr] | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Assign, pool: memhub.MemManager | t.CPtr, targets: list[AST | t.CPtr] | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Assign) -> t.CInt: pass
|
||||
def type_name(self: Assign) -> str: pass
|
||||
def dump(self: Assign, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class If(AST):
|
||||
test: AST | t.CPtr
|
||||
orelse: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: If, pool: memhub.MemManager | t.CPtr, test: AST | t.CPtr, orelse: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: If, pool: memhub.MemManager | t.CPtr, test: AST | t.CPtr, orelse: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: If) -> t.CInt: pass
|
||||
def type_name(self: If) -> str: pass
|
||||
def dump(self: If, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class For(AST):
|
||||
target: AST | t.CPtr
|
||||
iter: AST | t.CPtr
|
||||
orelse: list[AST | t.CPtr] | t.CPtr
|
||||
flags: t.CInt
|
||||
def __new__(self: For, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, iter: AST | t.CPtr, orelse: list[AST | t.CPtr] | t.CPtr, is_async: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: For, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, iter: AST | t.CPtr, orelse: list[AST | t.CPtr] | t.CPtr, is_async: t.CInt) -> t.CInt: pass
|
||||
def kind(self: For) -> t.CInt: pass
|
||||
def type_name(self: For) -> str: pass
|
||||
def dump(self: For, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class While(AST):
|
||||
test: AST | t.CPtr
|
||||
orelse: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: While, pool: memhub.MemManager | t.CPtr, test: AST | t.CPtr, orelse: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: While, pool: memhub.MemManager | t.CPtr, test: AST | t.CPtr, orelse: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: While) -> t.CInt: pass
|
||||
def type_name(self: While) -> str: pass
|
||||
def dump(self: While, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Return(AST):
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: Return, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Return, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Return) -> t.CInt: pass
|
||||
def type_name(self: Return) -> str: pass
|
||||
def dump(self: Return, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Expr(AST):
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: Expr, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Expr, pool: memhub.MemManager | t.CPtr, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Expr) -> t.CInt: pass
|
||||
def type_name(self: Expr) -> str: pass
|
||||
def dump(self: Expr, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class FunctionDef(AST):
|
||||
name: str
|
||||
args: AST | t.CPtr
|
||||
decorator_list: list[AST | t.CPtr] | t.CPtr
|
||||
returns: AST | t.CPtr
|
||||
flags: t.CInt
|
||||
def __new__(self: FunctionDef, pool: memhub.MemManager | t.CPtr, name: str, args: AST | t.CPtr, decorator_list: list[AST | t.CPtr] | t.CPtr, returns: AST | t.CPtr, is_async: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: FunctionDef, pool: memhub.MemManager | t.CPtr, name: str, args: AST | t.CPtr, decorator_list: list[AST | t.CPtr] | t.CPtr, returns: AST | t.CPtr, is_async: t.CInt) -> t.CInt: pass
|
||||
def kind(self: FunctionDef) -> t.CInt: pass
|
||||
def type_name(self: FunctionDef) -> str: pass
|
||||
def dump(self: FunctionDef, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Expression(AST):
|
||||
body: AST | t.CPtr
|
||||
def __new__(self: Expression, pool: memhub.MemManager | t.CPtr, body: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Expression, pool: memhub.MemManager | t.CPtr, body: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Expression) -> t.CInt: pass
|
||||
def type_name(self: Expression) -> str: pass
|
||||
def dump(self: Expression, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Interactive(AST):
|
||||
body: AST | t.CPtr
|
||||
def __new__(self: Interactive, pool: memhub.MemManager | t.CPtr, body: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Interactive, pool: memhub.MemManager | t.CPtr, body: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Interactive) -> t.CInt: pass
|
||||
def type_name(self: Interactive) -> str: pass
|
||||
def dump(self: Interactive, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class FunctionType(AST):
|
||||
argtypes: list[AST | t.CPtr] | t.CPtr
|
||||
returns: AST | t.CPtr
|
||||
def __new__(self: FunctionType, pool: memhub.MemManager | t.CPtr, argtypes: list[AST | t.CPtr] | t.CPtr, returns: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: FunctionType, pool: memhub.MemManager | t.CPtr, argtypes: list[AST | t.CPtr] | t.CPtr, returns: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: FunctionType) -> t.CInt: pass
|
||||
def type_name(self: FunctionType) -> str: pass
|
||||
def dump(self: FunctionType, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class ClassDef(AST):
|
||||
name: str
|
||||
bases: list[AST | t.CPtr] | t.CPtr
|
||||
keywords: list[AST | t.CPtr] | t.CPtr
|
||||
decorator_list: list[AST | t.CPtr] | t.CPtr
|
||||
type_params: list[str] | t.CPtr
|
||||
def __new__(self: ClassDef, pool: memhub.MemManager | t.CPtr, name: str, bases: list[AST | t.CPtr] | t.CPtr, keywords: list[AST | t.CPtr] | t.CPtr, decorator_list: list[AST | t.CPtr] | t.CPtr, type_params: list[str] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: ClassDef, pool: memhub.MemManager | t.CPtr, name: str, bases: list[AST | t.CPtr] | t.CPtr, keywords: list[AST | t.CPtr] | t.CPtr, decorator_list: list[AST | t.CPtr] | t.CPtr, type_params: list[str] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: ClassDef) -> t.CInt: pass
|
||||
def type_name(self: ClassDef) -> str: pass
|
||||
def dump(self: ClassDef, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Delete(AST):
|
||||
targets: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Delete, pool: memhub.MemManager | t.CPtr, targets: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Delete, pool: memhub.MemManager | t.CPtr, targets: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Delete) -> t.CInt: pass
|
||||
def type_name(self: Delete) -> str: pass
|
||||
def dump(self: Delete, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class AugAssign(AST):
|
||||
target: AST | t.CPtr
|
||||
op: t.CInt
|
||||
value: AST | t.CPtr
|
||||
def __new__(self: AugAssign, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, op: t.CInt, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: AugAssign, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, op: t.CInt, value: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: AugAssign) -> t.CInt: pass
|
||||
def type_name(self: AugAssign) -> str: pass
|
||||
def dump(self: AugAssign, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class AnnAssign(AST):
|
||||
target: AST | t.CPtr
|
||||
annotation: AST | t.CPtr
|
||||
value: AST | t.CPtr
|
||||
simple: t.CInt
|
||||
def __new__(self: AnnAssign, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, annotation: AST | t.CPtr, value: AST | t.CPtr, simple: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: AnnAssign, pool: memhub.MemManager | t.CPtr, target: AST | t.CPtr, annotation: AST | t.CPtr, value: AST | t.CPtr, simple: t.CInt) -> t.CInt: pass
|
||||
def kind(self: AnnAssign) -> t.CInt: pass
|
||||
def type_name(self: AnnAssign) -> str: pass
|
||||
def dump(self: AnnAssign, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class With(AST):
|
||||
items: list[AST | t.CPtr] | t.CPtr
|
||||
flags: t.CInt
|
||||
def __new__(self: With, pool: memhub.MemManager | t.CPtr, items: list[AST | t.CPtr] | t.CPtr, is_async: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: With, pool: memhub.MemManager | t.CPtr, items: list[AST | t.CPtr] | t.CPtr, is_async: t.CInt) -> t.CInt: pass
|
||||
def kind(self: With) -> t.CInt: pass
|
||||
def type_name(self: With) -> str: pass
|
||||
def dump(self: With, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Raise(AST):
|
||||
exc: AST | t.CPtr
|
||||
cause: AST | t.CPtr
|
||||
def __new__(self: Raise, pool: memhub.MemManager | t.CPtr, exc: AST | t.CPtr, cause: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Raise, pool: memhub.MemManager | t.CPtr, exc: AST | t.CPtr, cause: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Raise) -> t.CInt: pass
|
||||
def type_name(self: Raise) -> str: pass
|
||||
def dump(self: Raise, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Try(AST):
|
||||
handlers: list[AST | t.CPtr] | t.CPtr
|
||||
orelse: list[AST | t.CPtr] | t.CPtr
|
||||
finalbody: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Try, pool: memhub.MemManager | t.CPtr, handlers: list[AST | t.CPtr] | t.CPtr, orelse: list[AST | t.CPtr] | t.CPtr, finalbody: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Try, pool: memhub.MemManager | t.CPtr, handlers: list[AST | t.CPtr] | t.CPtr, orelse: list[AST | t.CPtr] | t.CPtr, finalbody: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Try) -> t.CInt: pass
|
||||
def type_name(self: Try) -> str: pass
|
||||
def dump(self: Try, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Assert(AST):
|
||||
test: AST | t.CPtr
|
||||
msg: AST | t.CPtr
|
||||
def __new__(self: Assert, pool: memhub.MemManager | t.CPtr, test: AST | t.CPtr, msg: AST | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Assert, pool: memhub.MemManager | t.CPtr, test: AST | t.CPtr, msg: AST | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Assert) -> t.CInt: pass
|
||||
def type_name(self: Assert) -> str: pass
|
||||
def dump(self: Assert, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Global(AST):
|
||||
names: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Global, pool: memhub.MemManager | t.CPtr, names: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Global, pool: memhub.MemManager | t.CPtr, names: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Global) -> t.CInt: pass
|
||||
def type_name(self: Global) -> str: pass
|
||||
def dump(self: Global, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Nonlocal(AST):
|
||||
names: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Nonlocal, pool: memhub.MemManager | t.CPtr, names: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Nonlocal, pool: memhub.MemManager | t.CPtr, names: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Nonlocal) -> t.CInt: pass
|
||||
def type_name(self: Nonlocal) -> str: pass
|
||||
def dump(self: Nonlocal, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Pass(AST):
|
||||
def __new__(self: Pass, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Pass, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Pass) -> t.CInt: pass
|
||||
def type_name(self: Pass) -> str: pass
|
||||
def dump(self: Pass, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Break(AST):
|
||||
def __new__(self: Break, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Break, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Break) -> t.CInt: pass
|
||||
def type_name(self: Break) -> str: pass
|
||||
def dump(self: Break, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Continue(AST):
|
||||
def __new__(self: Continue, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Continue, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Continue) -> t.CInt: pass
|
||||
def type_name(self: Continue) -> str: pass
|
||||
def dump(self: Continue, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Import(AST):
|
||||
names: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Import, pool: memhub.MemManager | t.CPtr, names: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Import, pool: memhub.MemManager | t.CPtr, names: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Import) -> t.CInt: pass
|
||||
def type_name(self: Import) -> str: pass
|
||||
def dump(self: Import, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class ImportFrom(AST):
|
||||
module: str
|
||||
names: list[AST | t.CPtr] | t.CPtr
|
||||
level: t.CInt
|
||||
def __new__(self: ImportFrom, pool: memhub.MemManager | t.CPtr, module: str, names: list[AST | t.CPtr] | t.CPtr, level: t.CInt) -> t.CInt: pass
|
||||
def __init__(self: ImportFrom, pool: memhub.MemManager | t.CPtr, module: str, names: list[AST | t.CPtr] | t.CPtr, level: t.CInt) -> t.CInt: pass
|
||||
def kind(self: ImportFrom) -> t.CInt: pass
|
||||
def type_name(self: ImportFrom) -> str: pass
|
||||
def dump(self: ImportFrom, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
class Match(AST):
|
||||
subject: AST | t.CPtr
|
||||
cases: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Match, pool: memhub.MemManager | t.CPtr, subject: AST | t.CPtr, cases: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def __init__(self: Match, pool: memhub.MemManager | t.CPtr, subject: AST | t.CPtr, cases: list[AST | t.CPtr] | t.CPtr) -> t.CInt: pass
|
||||
def kind(self: Match) -> t.CInt: pass
|
||||
def type_name(self: Match) -> str: pass
|
||||
def dump(self: Match, buf: t.CChar | t.CPtr, size: t.CSizeT, pos: t.CSizeT) -> t.CSizeT: pass
|
||||
28
Test/AstTest/temp/6f62fe05c5ea1ceb.pyi
Normal file
28
Test/AstTest/temp/6f62fe05c5ea1ceb.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
"""
|
||||
Auto-generated Python stub file from stdio.py
|
||||
Module: stdio
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
|
||||
def printf(fmt: t.CConst | str, *args) -> t.CInt | t.State: pass
|
||||
|
||||
def fprintf(stream: bytes, fmt: t.CConst | str, *args) -> t.CInt | t.State: pass
|
||||
|
||||
def sprintf(buf: bytes, fmt: t.CConst | str, *args) -> t.CInt | t.State: pass
|
||||
|
||||
def snprintf(buf: bytes, size: t.CSizeT, fmt: t.CConst | str, *args) -> t.CInt | t.State: pass
|
||||
|
||||
def puts(s: t.CConst | str) -> t.CInt | t.State: pass
|
||||
|
||||
def fputs(s: t.CConst | str, stream: bytes) -> t.CInt | t.State: pass
|
||||
|
||||
def fgets(buf: bytes, size: t.CInt, stream: bytes) -> bytes | t.State: pass
|
||||
|
||||
def fflush(stream: bytes) -> t.CInt | t.State: pass
|
||||
|
||||
|
||||
stdin: t.CExtern | bytes
|
||||
stdout: t.CExtern | bytes
|
||||
stderr: t.CExtern | bytes
|
||||
20
Test/AstTest/temp/71e0a3ffcb3ebfad.pyi
Normal file
20
Test/AstTest/temp/71e0a3ffcb3ebfad.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
"""
|
||||
Auto-generated Python stub file from stdarg.py
|
||||
Module: stdarg
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
|
||||
def va_start(args: t.CPtr, last_arg: t.CPtr) -> t.State: pass
|
||||
|
||||
def va_arg(args: t.CPtr, type: t.CPtr) -> t.CPtr | t.State: pass
|
||||
|
||||
def va_end(args: t.CPtr) -> t.State | t.State: pass
|
||||
|
||||
|
||||
va_list: t.CTypedef = t.CUnsignedChar | t.CPtr
|
||||
|
||||
def arg(type: t.CType) -> t.State: pass
|
||||
91
Test/AstTest/temp/72e2d5ccb7cedcf1.pyi
Normal file
91
Test/AstTest/temp/72e2d5ccb7cedcf1.pyi
Normal file
@@ -0,0 +1,91 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.win32memory.py
|
||||
Module: w32.win32memory
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
from stdint import *
|
||||
from w32.win32base import *
|
||||
|
||||
MEM_COMMIT: t.CDefine = 0x00001000
|
||||
MEM_RESERVE: t.CDefine = 0x00002000
|
||||
MEM_DECOMMIT: t.CDefine = 0x00004000
|
||||
MEM_RELEASE: t.CDefine = 0x00008000
|
||||
MEM_FREE: t.CDefine = 0x00010000
|
||||
MEM_RESET: t.CDefine = 0x00080000
|
||||
MEM_TOP_DOWN: t.CDefine = 0x00100000
|
||||
MEM_WRITE_WATCH: t.CDefine = 0x00200000
|
||||
MEM_PHYSICAL: t.CDefine = 0x00400000
|
||||
MEM_LARGE_PAGES: t.CDefine = 0x20000000
|
||||
PAGE_NOACCESS: t.CDefine = 0x01
|
||||
PAGE_READONLY: t.CDefine = 0x02
|
||||
PAGE_READWRITE: t.CDefine = 0x04
|
||||
PAGE_WRITECOPY: t.CDefine = 0x08
|
||||
PAGE_EXECUTE: t.CDefine = 0x10
|
||||
PAGE_EXECUTE_READ: t.CDefine = 0x20
|
||||
PAGE_EXECUTE_READWRITE: t.CDefine = 0x40
|
||||
PAGE_EXECUTE_WRITECOPY: t.CDefine = 0x80
|
||||
PAGE_GUARD: t.CDefine = 0x100
|
||||
PAGE_NOCACHE: t.CDefine = 0x200
|
||||
PAGE_WRITECOMBINE: t.CDefine = 0x400
|
||||
HEAP_NO_SERIALIZE: t.CDefine = 0x00000001
|
||||
HEAP_GROWABLE: t.CDefine = 0x00000002
|
||||
HEAP_GENERATE_EXCEPTIONS: t.CDefine = 0x00000004
|
||||
HEAP_ZERO_MEMORY: t.CDefine = 0x00000008
|
||||
HEAP_REALLOC_IN_PLACE_ONLY: t.CDefine = 0x00000010
|
||||
|
||||
class MEMORY_BASIC_INFORMATION:
|
||||
BaseAddress: VOIDPTR
|
||||
AllocationBase: VOIDPTR
|
||||
AllocationProtect: ULONG
|
||||
RegionSize: t.CSizeT
|
||||
State: ULONG
|
||||
Protect: ULONG
|
||||
Type: ULONG
|
||||
|
||||
def VirtualAlloc(lpAddress: VOIDPTR, dwSize: t.CSizeT, flAllocationType: ULONG, flProtect: ULONG) -> VOIDPTR | t.State: pass
|
||||
|
||||
def VirtualFree(lpAddress: VOIDPTR, dwSize: t.CSizeT, dwFreeType: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def VirtualProtect(lpAddress: VOIDPTR, dwSize: t.CSizeT, flNewProtect: ULONG, lpflOldProtect: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def VirtualQuery(lpAddress: t.CConst | VOIDPTR, lpBuffer: MEMORY_BASIC_INFORMATION | t.CPtr, dwLength: t.CSizeT) -> t.CSizeT | t.State: pass
|
||||
|
||||
def VirtualLock(lpAddress: VOIDPTR, dwSize: t.CSizeT) -> BOOL | t.State: pass
|
||||
|
||||
def VirtualUnlock(lpAddress: VOIDPTR, dwSize: t.CSizeT) -> BOOL | t.State: pass
|
||||
|
||||
def GetProcessHeap() -> HANDLE | t.State: pass
|
||||
|
||||
def HeapCreate(flOptions: ULONG, dwInitialSize: t.CSizeT, dwMaximumSize: t.CSizeT) -> HANDLE | t.State: pass
|
||||
|
||||
def HeapDestroy(hHeap: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def HeapAlloc(hHeap: HANDLE, dwFlags: ULONG, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass
|
||||
|
||||
def HeapReAlloc(hHeap: HANDLE, dwFlags: ULONG, lpMem: VOIDPTR, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass
|
||||
|
||||
def HeapFree(hHeap: HANDLE, dwFlags: ULONG, lpMem: VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def HeapSize(hHeap: HANDLE, dwFlags: ULONG, lpMem: t.CConst | VOIDPTR) -> t.CSizeT | t.State: pass
|
||||
|
||||
def HeapValidate(hHeap: HANDLE, dwFlags: ULONG, lpMem: t.CConst | VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def HeapCompact(hHeap: HANDLE, dwFlags: ULONG) -> t.CSizeT | t.State: pass
|
||||
|
||||
def GlobalAlloc(uFlags: UINT, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass
|
||||
|
||||
def GlobalFree(hMem: VOIDPTR) -> VOIDPTR | t.State: pass
|
||||
|
||||
def GlobalLock(hMem: VOIDPTR) -> VOIDPTR | t.State: pass
|
||||
|
||||
def GlobalUnlock(hMem: VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def GlobalSize(hMem: VOIDPTR) -> t.CSizeT | t.State: pass
|
||||
|
||||
def LocalAlloc(uFlags: UINT, dwBytes: t.CSizeT) -> VOIDPTR | t.State: pass
|
||||
|
||||
def LocalFree(hMem: VOIDPTR) -> VOIDPTR | t.State: pass
|
||||
100
Test/AstTest/temp/7e529fe7a078cfef.pyi
Normal file
100
Test/AstTest/temp/7e529fe7a078cfef.pyi
Normal file
@@ -0,0 +1,100 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.win32base.py
|
||||
Module: w32.win32base
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
from stdint import *
|
||||
|
||||
HANDLE: t.CTypedef = VOIDPTR
|
||||
LPCSTR: t.CTypedef = t.CConst | t.CChar | t.CPtr
|
||||
LPCWSTR: t.CTypedef = t.CConst | t.CUnsignedShort | t.CPtr
|
||||
INVALID_HANDLE_VALUE: t.CDefine = t.CVoid(-1)
|
||||
NULL: t.CDefine = 0
|
||||
TRUE: t.CDefine = 1
|
||||
FALSE: t.CDefine = 0
|
||||
INFINITE: t.CDefine = 0xFFFFFFFF
|
||||
WAIT_FAILED: t.CDefine = 0xFFFFFFFF
|
||||
WAIT_OBJECT_0: t.CDefine = 0
|
||||
WAIT_TIMEOUT: t.CDefine = 258
|
||||
WAIT_ABANDONED: t.CDefine = 0x80
|
||||
MAX_PATH: t.CDefine = 260
|
||||
ERROR_SUCCESS: t.CDefine = 0
|
||||
ERROR_FILE_NOT_FOUND: t.CDefine = 2
|
||||
ERROR_ACCESS_DENIED: t.CDefine = 5
|
||||
ERROR_INSUFFICIENT_BUFFER: t.CDefine = 122
|
||||
|
||||
class SECURITY_ATTRIBUTES:
|
||||
nLength: ULONG
|
||||
lpSecurityDescriptor: VOIDPTR
|
||||
bInheritHandle: BOOL
|
||||
class OVERLAPPED:
|
||||
Internal: ULONGLONG
|
||||
InternalHigh: ULONGLONG
|
||||
Offset: ULONG
|
||||
OffsetHigh: ULONG
|
||||
hEvent: HANDLE
|
||||
class FILETIME:
|
||||
dwLowDateTime: DWORD
|
||||
dwHighDateTime: DWORD
|
||||
class SYSTEMTIME:
|
||||
wYear: WORD
|
||||
wMonth: WORD
|
||||
wDayOfWeek: WORD
|
||||
wDay: WORD
|
||||
wHour: WORD
|
||||
wMinute: WORD
|
||||
wSecond: WORD
|
||||
wMilliseconds: WORD
|
||||
class GUID:
|
||||
Data1: DWORD
|
||||
Data2: WORD
|
||||
Data3: WORD
|
||||
Data4: BYTEPTR
|
||||
class LARGE_INTEGER:
|
||||
QuadPart: LONGLONG
|
||||
class ULARGE_INTEGER:
|
||||
QuadPart: ULONGLONG
|
||||
|
||||
def GetLastError() -> ULONG | t.State: pass
|
||||
|
||||
def SetLastError(dwErrCode: ULONG) -> t.State: pass
|
||||
|
||||
def CloseHandle(hObject: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def GetProcAddress(hModule: HANDLE, lpProcName: LPCSTR) -> VOIDPTR | t.State: pass
|
||||
|
||||
def GetModuleHandleA(lpModuleName: LPCSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def GetModuleHandleW(lpModuleName: LPCWSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def LoadLibraryA(lpLibFileName: LPCSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def LoadLibraryW(lpLibFileName: LPCWSTR) -> HANDLE | t.State: pass
|
||||
|
||||
def FreeLibrary(hLibModule: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def GetSystemTime(lpSystemTime: SYSTEMTIME | t.CPtr) -> t.State: pass
|
||||
|
||||
def GetLocalTime(lpSystemTime: SYSTEMTIME | t.CPtr) -> t.State: pass
|
||||
|
||||
def FileTimeToSystemTime(lpFileTime: FILETIME | t.CPtr, lpSystemTime: SYSTEMTIME | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def SystemTimeToFileTime(lpSystemTime: SYSTEMTIME | t.CPtr, lpFileTime: FILETIME | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def QueryPerformanceCounter(lpPerformanceCount: LARGE_INTEGER | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def QueryPerformanceFrequency(lpFrequency: LARGE_INTEGER | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def Sleep(dwMilliseconds: ULONG) -> t.State: pass
|
||||
|
||||
def SleepEx(dwMilliseconds: ULONG, bAlertable: BOOL) -> ULONG | t.State: pass
|
||||
|
||||
def GetTickCount() -> ULONG | t.State: pass
|
||||
|
||||
def GetTickCount64() -> ULONGLONG | t.State: pass
|
||||
|
||||
def GetCommandLineA() -> CHARPTR | t.State: pass
|
||||
20
Test/AstTest/temp/90c53dd6db8d41cf.pyi
Normal file
20
Test/AstTest/temp/90c53dd6db8d41cf.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
"""
|
||||
Auto-generated Python stub file from stdlib.py
|
||||
Module: stdlib
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
from stdint import *
|
||||
import t
|
||||
|
||||
def malloc(size: t.CSizeT) -> t.CVoid | t.CPtr | t.State: pass
|
||||
|
||||
def calloc(nmemb: t.CSizeT, size: t.CSizeT) -> t.CVoid | t.CPtr | t.State: pass
|
||||
|
||||
def realloc(p: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CVoid | t.CPtr | t.State: pass
|
||||
|
||||
def free(p: t.CVoid | t.CPtr) -> t.State: pass
|
||||
|
||||
def system(cmd: t.CConst | t.CChar | t.CPtr) -> INT | t.State: pass
|
||||
53
Test/AstTest/temp/93c1d18e35d188d6.pyi
Normal file
53
Test/AstTest/temp/93c1d18e35d188d6.pyi
Normal file
@@ -0,0 +1,53 @@
|
||||
"""
|
||||
Auto-generated Python stub file from platmacro.py
|
||||
Module: platmacro
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
|
||||
IS_WINDOWS: t.CDefine = 1
|
||||
IS_WIN64: t.CDefine = 1
|
||||
IS_X86_64: t.CDefine = 1
|
||||
IS_LP64: t.CDefine = 1
|
||||
IS_LITTLE_ENDIAN: t.CDefine = 1
|
||||
IS_LINUX: t.CDefine = 0
|
||||
IS_MACOS: t.CDefine = 0
|
||||
IS_ARM64: t.CDefine = 0
|
||||
IS_BIG_ENDIAN: t.CDefine = 0
|
||||
IS_ILP32: t.CDefine = 0
|
||||
PTR_SIZE: t.CDefine = t.CSizeT().Size
|
||||
INT_SIZE: t.CDefine = 4
|
||||
LONG_SIZE: t.CDefine = t.CLong().Size
|
||||
WORD_SIZE: t.CDefine = t.CSizeT().Size
|
||||
CACHE_LINE_SIZE: t.CDefine = 64
|
||||
PAGE_SIZE: t.CDefine = 4096
|
||||
STACK_ALIGN: t.CDefine = 16
|
||||
MAX_PATH_LEN: t.CDefine = 260
|
||||
PLATFORM_NAME: t.CDefine = 1
|
||||
ARCH_NAME: t.CDefine = 1
|
||||
WINVER: t.CDefine = 0x0A00
|
||||
_WIN32_WINNT: t.CDefine = 0x0A00
|
||||
NTDDI_VERSION: t.CDefine = 0x0A000006
|
||||
HAS_SSE2: t.CDefine = 1
|
||||
HAS_AVX: t.CDefine = 1
|
||||
HAS_AVX2: t.CDefine = 1
|
||||
HAS_FMA: t.CDefine = 1
|
||||
HAS_NEON: t.CDefine = 0
|
||||
ALIGNOF_INT: t.CDefine = 4
|
||||
ALIGNOF_LONG: t.CDefine = t.CLong().Size // 8
|
||||
ALIGNOF_PTR: t.CDefine = t.CSizeT().Size // 8
|
||||
ALIGNOF_DOUBLE: t.CDefine = 8
|
||||
ALIGNOF_LONG_DOUBLE: t.CDefine = 16
|
||||
SIZEOF_SHORT: t.CDefine = 2
|
||||
SIZEOF_INT: t.CDefine = 4
|
||||
SIZEOF_LONG: t.CDefine = t.CLong().Size // 8
|
||||
SIZEOF_LONG_LONG: t.CDefine = 8
|
||||
SIZEOF_FLOAT: t.CDefine = 4
|
||||
SIZEOF_DOUBLE: t.CDefine = 8
|
||||
SIZEOF_LONG_DOUBLE: t.CDefine = 16
|
||||
SIZEOF_POINTER: t.CDefine = t.CSizeT().Size // 8
|
||||
SIZEOF_SIZE_T: t.CDefine = t.CSizeT().Size // 8
|
||||
SIZEOF_PTRDIFF_T: t.CDefine = t.CPtrDiffT().Size // 8
|
||||
BYTE_ORDER_LE: t.CDefine = 1
|
||||
BYTE_ORDER_BE: t.CDefine = 0
|
||||
1
Test/AstTest/temp/_phase1_manifest.json
Normal file
1
Test/AstTest/temp/_phase1_manifest.json
Normal file
@@ -0,0 +1 @@
|
||||
{"D:\\Users\\TermiNexus\\Desktop\\TransPyC\\Test\\AstTest\\App\\main.py": {"sha1": "0853acdbdfc9b27c", "mtime": 1782892830.6294758, "size": 2439}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\__init__.py": {"sha1": "34548789d646f432", "mtime": 1784102404.6307266, "size": 3409}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\astaux.py": {"sha1": "4337fb260448bbe2", "mtime": 1784006094.7981195, "size": 11489}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\base.py": {"sha1": "5dab8cb390496d22", "mtime": 1784197698.3282094, "size": 14966}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\exprs.py": {"sha1": "47767b5026a8ee15", "mtime": 1783239758.809719, "size": 40615}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\lexer.py": {"sha1": "0c212981c180e7fb", "mtime": 1783400609.908198, "size": 23535}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\match.py": {"sha1": "4dd6b3f1427d1cc5", "mtime": 1782961799.8492737, "size": 12309}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\parser.py": {"sha1": "ee52c08239684346", "mtime": 1784102405.1933146, "size": 85445}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\stmts.py": {"sha1": "657e182b27c2a022", "mtime": 1783929993.759902, "size": 37926}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\ast\\tokens.py": {"sha1": "b547ac4f380bddb6", "mtime": 1783165480.469121, "size": 13722}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\atom.py": {"sha1": "271ea3decb810db2", "mtime": 1782226548.693161, "size": 1290}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\memhub.py": {"sha1": "ee084e9fc6ee413a", "mtime": 1784214242.4485993, "size": 17765}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\platmacro.py": {"sha1": "93c1d18e35d188d6", "mtime": 1781237231.03366, "size": 1422}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\posix.py": {"sha1": "6503c97dde0c79c4", "mtime": 1783064077.6376991, "size": 10386}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdarg.py": {"sha1": "71e0a3ffcb3ebfad", "mtime": 1781258888.113146, "size": 277}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdint.py": {"sha1": "f5522571bcce7bcb", "mtime": 1782383975.8824987, "size": 4356}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdio.py": {"sha1": "6f62fe05c5ea1ceb", "mtime": 1783239556.0959673, "size": 714}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\stdlib.py": {"sha1": "90c53dd6db8d41cf", "mtime": 1783874975.3597875, "size": 375}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\string.py": {"sha1": "ab6e54ba9a669f76", "mtime": 1783933178.7264287, "size": 9922}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\sys.py": {"sha1": "b5a965302cded36b", "mtime": 1783569641.07535, "size": 5509}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperio.py": {"sha1": "c9f4be41ca1cc2b4", "mtime": 1782812279.506002, "size": 1556}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\viperlib.py": {"sha1": "c3b259b4059f8668", "mtime": 1782821991.979496, "size": 56772}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32base.py": {"sha1": "7e529fe7a078cfef", "mtime": 1782488356.7736557, "size": 2662}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32console.py": {"sha1": "bbdf3bbd4c3bc28c", "mtime": 1781200703.5338137, "size": 5604}, "D:\\Users\\TermiNexus\\Desktop\\TransPyC\\includes\\w32\\win32process.py": {"sha1": "067c78e9f121dce3", "mtime": 1781200703.5409546, "size": 4802}}
|
||||
25
Test/AstTest/temp/_sha1_map.txt
Normal file
25
Test/AstTest/temp/_sha1_map.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
067c78e9f121dce3:includes/w32\win32process.py
|
||||
0853acdbdfc9b27c:main.py
|
||||
0c212981c180e7fb:includes/ast\lexer.py
|
||||
271ea3decb810db2:includes/atom.py
|
||||
34548789d646f432:includes/ast\__init__.py
|
||||
4337fb260448bbe2:includes/ast\astaux.py
|
||||
47767b5026a8ee15:includes/ast\exprs.py
|
||||
4dd6b3f1427d1cc5:includes/ast\match.py
|
||||
5dab8cb390496d22:includes/ast\base.py
|
||||
6503c97dde0c79c4:includes/posix.py
|
||||
657e182b27c2a022:includes/ast\stmts.py
|
||||
6f62fe05c5ea1ceb:includes/stdio.py
|
||||
71e0a3ffcb3ebfad:includes/stdarg.py
|
||||
7e529fe7a078cfef:includes/w32\win32base.py
|
||||
90c53dd6db8d41cf:includes/stdlib.py
|
||||
93c1d18e35d188d6:includes/platmacro.py
|
||||
ab6e54ba9a669f76:includes/string.py
|
||||
b547ac4f380bddb6:includes/ast\tokens.py
|
||||
b5a965302cded36b:includes/sys.py
|
||||
bbdf3bbd4c3bc28c:includes/w32\win32console.py
|
||||
c3b259b4059f8668:includes/viperlib.py
|
||||
c9f4be41ca1cc2b4:includes/viperio.py
|
||||
ee084e9fc6ee413a:includes/memhub.py
|
||||
ee52c08239684346:includes/ast\parser.py
|
||||
f5522571bcce7bcb:includes/stdint.py
|
||||
48
Test/AstTest/temp/ab6e54ba9a669f76.pyi
Normal file
48
Test/AstTest/temp/ab6e54ba9a669f76.pyi
Normal file
@@ -0,0 +1,48 @@
|
||||
"""
|
||||
Auto-generated Python stub file from string.py
|
||||
Module: string
|
||||
"""
|
||||
|
||||
|
||||
from stdint import *
|
||||
import t, c
|
||||
|
||||
def strcpy(dest: str, src: str) -> str: pass
|
||||
|
||||
def strcat(dest: str, src: str) -> str: pass
|
||||
|
||||
def strncpy(dest: str, src: str, n: t.CSizeT) -> str: pass
|
||||
|
||||
def strlen(src: str) -> t.CSizeT | t.CExport: pass
|
||||
|
||||
def strcmp(str1: str, str2: str) -> t.CInt: pass
|
||||
|
||||
def samestr(str1: str, str2: str) -> bool: pass
|
||||
|
||||
def strncmp(str1: str, str2: str, n: t.CSizeT) -> t.CInt: pass
|
||||
|
||||
def memcmp(ptr1: t.CVoid | t.CPtr, ptr2: t.CVoid | t.CPtr, n: t.CSizeT) -> t.CInt: pass
|
||||
|
||||
def strchr(s: str, cr: t.CInt) -> str: pass
|
||||
|
||||
def strrchr(s: str, cr: t.CInt) -> str: pass
|
||||
|
||||
def strstr(s: str, needle: str) -> str: pass
|
||||
|
||||
def strspn(s: str, skip: str) -> int: pass
|
||||
|
||||
def memset(ptr: t.CVoid | t.CPtr, value: t.CInt, num: t.CSizeT) -> t.CVoid | t.CPtr | t.CExport: pass
|
||||
|
||||
def memset32(ptr: t.CVoid | t.CPtr, value: t.CUInt32T, count: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
|
||||
def memcpy(dest: t.CVoid | t.CPtr, src: t.CVoid | t.CPtr, num: t.CSizeT) -> t.CVoid | t.CPtr | t.CExport: pass
|
||||
|
||||
def memmove(dest: t.CVoid | t.CPtr, src: t.CVoid | t.CPtr, num: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
|
||||
def atoi(src: str) -> t.CInt: pass
|
||||
|
||||
def atoll(src: str) -> t.CInt64T: pass
|
||||
|
||||
def atof(src: str) -> t.CDouble: pass
|
||||
|
||||
def split(s: str, delim: str, result: t.CArray[str]) -> int: pass
|
||||
166
Test/AstTest/temp/b547ac4f380bddb6.pyi
Normal file
166
Test/AstTest/temp/b547ac4f380bddb6.pyi
Normal file
@@ -0,0 +1,166 @@
|
||||
"""
|
||||
Auto-generated Python stub file from ast.tokens.py
|
||||
Module: ast.tokens
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import memhub
|
||||
import string
|
||||
|
||||
class TokenType(t.CEnum):
|
||||
EndMarker: t.State
|
||||
NewLine: t.State
|
||||
Indent: t.State
|
||||
Dedent: t.State
|
||||
Name: t.State
|
||||
Number: t.State
|
||||
String: t.State
|
||||
FStringStart: t.State
|
||||
FStringMiddle: t.State
|
||||
FStringEnd: t.State
|
||||
Op: t.State
|
||||
Nl: t.State
|
||||
Comment: t.State
|
||||
Encoding: t.State
|
||||
class Keyword(t.CEnum):
|
||||
NotKeyword: t.State
|
||||
False_: t.State
|
||||
None_: t.State
|
||||
True_: t.State
|
||||
And: t.State
|
||||
As: t.State
|
||||
Assert: t.State
|
||||
Async: t.State
|
||||
Await: t.State
|
||||
Break: t.State
|
||||
Class: t.State
|
||||
Continue: t.State
|
||||
Def: t.State
|
||||
Del: t.State
|
||||
Elif: t.State
|
||||
Else: t.State
|
||||
Except: t.State
|
||||
Finally: t.State
|
||||
For: t.State
|
||||
From: t.State
|
||||
Global: t.State
|
||||
If: t.State
|
||||
Import: t.State
|
||||
In: t.State
|
||||
Is: t.State
|
||||
Lambda: t.State
|
||||
Nonlocal: t.State
|
||||
Not: t.State
|
||||
Or: t.State
|
||||
Pass: t.State
|
||||
Raise: t.State
|
||||
Return: t.State
|
||||
Try: t.State
|
||||
While: t.State
|
||||
With: t.State
|
||||
Yield: t.State
|
||||
Match: t.State
|
||||
Case: t.State
|
||||
Type: t.State
|
||||
class TokOp(t.CEnum):
|
||||
LPar: t.State
|
||||
RPar: t.State
|
||||
Lsqb: t.State
|
||||
Rsqb: t.State
|
||||
LBrace: t.State
|
||||
RBrace: t.State
|
||||
Comma: t.State
|
||||
Colon: t.State
|
||||
Dot: t.State
|
||||
Semi: t.State
|
||||
At: t.State
|
||||
Equal: t.State
|
||||
RArrow: t.State
|
||||
PlusEq: t.State
|
||||
MinusEq: t.State
|
||||
StarEq: t.State
|
||||
SlashEq: t.State
|
||||
DSlashEq: t.State
|
||||
PercentEq: t.State
|
||||
AtEq: t.State
|
||||
AmpEq: t.State
|
||||
VBarEq: t.State
|
||||
CaretEq: t.State
|
||||
GtGtEq: t.State
|
||||
LtLtEq: t.State
|
||||
StarEqEq: t.State
|
||||
DSlash: t.State
|
||||
StarStar: t.State
|
||||
LtLt: t.State
|
||||
GtGt: t.State
|
||||
LessEq: t.State
|
||||
GreaterEq: t.State
|
||||
EqEq: t.State
|
||||
ExclaimEq: t.State
|
||||
Less: t.State
|
||||
Greater: t.State
|
||||
Plus: t.State
|
||||
Minus: t.State
|
||||
Star: t.State
|
||||
Slash: t.State
|
||||
Percent: t.State
|
||||
Amp: t.State
|
||||
VBar: t.State
|
||||
Caret: t.State
|
||||
Tilde: t.State
|
||||
ColonEq: t.State
|
||||
Ellipsis: t.State
|
||||
Bang: t.State
|
||||
class Token:
|
||||
type: t.CInt
|
||||
op_subtype: t.CInt
|
||||
kw_subtype: t.CInt
|
||||
str_val: str
|
||||
int_val: t.CInt64T
|
||||
float_val: t.CDouble
|
||||
is_float: t.CInt
|
||||
is_complex: t.CInt
|
||||
lineno: t.CInt
|
||||
col_offset: t.CInt
|
||||
end_lineno: t.CInt
|
||||
end_col_offset: t.CInt
|
||||
next: Token | t.CPtr
|
||||
def __new__(self: Token, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
class KwEntry:
|
||||
name: str
|
||||
kw_id: t.CInt
|
||||
next: KwEntry | t.CPtr
|
||||
def __new__(self: KwEntry, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
_kw_head: t.CExtern | KwEntry | t.CPtr
|
||||
_kw_pool: t.CExtern | memhub.MemManager | t.CPtr
|
||||
|
||||
def _kw_intern(pool: memhub.MemManager | t.CPtr, name: str, kw_id: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _kw_lookup(name: str) -> t.CInt: pass
|
||||
|
||||
def _init_keywords(pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
|
||||
class OpEntry:
|
||||
name: str
|
||||
op_id: t.CInt
|
||||
length: t.CInt
|
||||
next: OpEntry | t.CPtr
|
||||
def __new__(self: OpEntry, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
_op_head: t.CExtern | OpEntry | t.CPtr
|
||||
|
||||
def _op_intern(pool: memhub.MemManager | t.CPtr, name: str, op_id: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _init_operators(pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _init_tables(pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def new_token(pool: memhub.MemManager | t.CPtr, ttype: t.CInt, lineno: t.CInt, col_offset: t.CInt) -> Token | t.CPtr: pass
|
||||
|
||||
def token_set_str(pool: memhub.MemManager | t.CPtr, tok: Token | t.CPtr, src: str, start: t.CSizeT, length: t.CSizeT) -> t.CInt: pass
|
||||
|
||||
def token_set_str_literal(pool: memhub.MemManager | t.CPtr, tok: Token | t.CPtr, text: str) -> t.CInt: pass
|
||||
44
Test/AstTest/temp/b5a965302cded36b.pyi
Normal file
44
Test/AstTest/temp/b5a965302cded36b.pyi
Normal file
@@ -0,0 +1,44 @@
|
||||
"""
|
||||
Auto-generated Python stub file from sys.py
|
||||
Module: sys
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import platmacro
|
||||
import memhub
|
||||
import string
|
||||
import stdio
|
||||
import w32.win32base
|
||||
import w32.win32process
|
||||
import posix
|
||||
|
||||
_mbuddy: t.CExtern | memhub.MemBuddy | t.CPtr
|
||||
|
||||
def fgets(buf: t.CChar | t.CPtr, size: t.CInt, stream: t.CVoid | t.CPtr) -> t.CChar | t.CPtr | t.CExtern | t.CExport: pass
|
||||
|
||||
def fflush(stream: t.CVoid | t.CPtr) -> t.CInt | t.CExtern | t.CExport: pass
|
||||
|
||||
def exit(status: INT) -> VOID | t.CExtern | t.CExport: pass
|
||||
|
||||
|
||||
maxsize: t.CDefine = 9223372036854775807
|
||||
|
||||
def platform() -> str: pass
|
||||
|
||||
def get_pid() -> int: pass
|
||||
|
||||
|
||||
_argc: t.CExtern | INT
|
||||
_argv: t.CExtern | str | t.CPtr
|
||||
|
||||
def _init_argv() -> t.CInt: pass
|
||||
|
||||
def _init_argv_win32() -> t.CInt: pass
|
||||
|
||||
def _init_argv_posix() -> t.CInt: pass
|
||||
|
||||
def argc() -> int: pass
|
||||
|
||||
def argv(index: int) -> str: pass
|
||||
138
Test/AstTest/temp/bbdf3bbd4c3bc28c.pyi
Normal file
138
Test/AstTest/temp/bbdf3bbd4c3bc28c.pyi
Normal file
@@ -0,0 +1,138 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.win32console.py
|
||||
Module: w32.win32console
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
from stdint import *
|
||||
from w32.win32base import *
|
||||
|
||||
ENABLE_PROCESSED_INPUT: t.CDefine = 0x0001
|
||||
ENABLE_LINE_INPUT: t.CDefine = 0x0002
|
||||
ENABLE_ECHO_INPUT: t.CDefine = 0x0004
|
||||
ENABLE_WINDOW_INPUT: t.CDefine = 0x0008
|
||||
ENABLE_MOUSE_INPUT: t.CDefine = 0x0010
|
||||
ENABLE_INSERT_MODE: t.CDefine = 0x0020
|
||||
ENABLE_QUICK_EDIT_MODE: t.CDefine = 0x0040
|
||||
ENABLE_EXTENDED_FLAGS: t.CDefine = 0x0080
|
||||
ENABLE_PROCESSED_OUTPUT: t.CDefine = 0x0001
|
||||
ENABLE_WRAP_AT_EOL_OUTPUT: t.CDefine = 0x0002
|
||||
ENABLE_VIRTUAL_TERMINAL_PROCESSING: t.CDefine = 0x0004
|
||||
DISABLE_NEWLINE_AUTO_RETURN: t.CDefine = 0x0008
|
||||
ENABLE_LVB_GRID_WORLDWIDE: t.CDefine = 0x0010
|
||||
FOREGROUND_BLUE: t.CDefine = 0x0001
|
||||
FOREGROUND_GREEN: t.CDefine = 0x0002
|
||||
FOREGROUND_RED: t.CDefine = 0x0004
|
||||
FOREGROUND_INTENSITY: t.CDefine = 0x0008
|
||||
BACKGROUND_BLUE: t.CDefine = 0x0010
|
||||
BACKGROUND_GREEN: t.CDefine = 0x0020
|
||||
BACKGROUND_RED: t.CDefine = 0x0040
|
||||
BACKGROUND_INTENSITY: t.CDefine = 0x0080
|
||||
KEY_EVENT: t.CDefine = 0x0001
|
||||
MOUSE_EVENT: t.CDefine = 0x0002
|
||||
WINDOW_BUFFER_SIZE_EVENT: t.CDefine = 0x0004
|
||||
MENU_EVENT: t.CDefine = 0x0008
|
||||
FOCUS_EVENT: t.CDefine = 0x0010
|
||||
|
||||
class COORD:
|
||||
X: SHORT
|
||||
Y: SHORT
|
||||
class SMALL_RECT:
|
||||
Left: SHORT
|
||||
Top: SHORT
|
||||
Right: SHORT
|
||||
Bottom: SHORT
|
||||
class CONSOLE_SCREEN_BUFFER_INFO:
|
||||
dwSize: COORD
|
||||
dwCursorPosition: COORD
|
||||
wAttributes: WORD
|
||||
srWindow: SMALL_RECT
|
||||
dwMaximumWindowSize: COORD
|
||||
class CONSOLE_CURSOR_INFO:
|
||||
dwSize: ULONG
|
||||
bVisible: BOOL
|
||||
class CHAR_INFO:
|
||||
UnicodeChar: WCHAR
|
||||
Attributes: WORD
|
||||
class KEY_EVENT_RECORD:
|
||||
bKeyDown: BOOL
|
||||
wRepeatCount: WORD
|
||||
wVirtualKeyCode: WORD
|
||||
wVirtualScanCode: WORD
|
||||
uChar: WCHAR
|
||||
dwControlKeyState: ULONG
|
||||
class MOUSE_EVENT_RECORD:
|
||||
dwMousePosition: COORD
|
||||
dwButtonState: ULONG
|
||||
dwControlKeyState: ULONG
|
||||
dwEventFlags: ULONG
|
||||
class WINDOW_BUFFER_SIZE_RECORD:
|
||||
dwSize: COORD
|
||||
class INPUT_RECORD:
|
||||
EventType: WORD
|
||||
Event: KEY_EVENT_RECORD
|
||||
|
||||
def SetConsoleOutputCP(codepage: UINT) -> BOOL | t.State: pass
|
||||
|
||||
def SetConsoleCP(codepage: UINT) -> BOOL | t.State: pass
|
||||
|
||||
def GetConsoleCP() -> UINT | t.State: pass
|
||||
|
||||
def GetConsoleOutputCP() -> UINT | t.State: pass
|
||||
|
||||
def GetConsoleScreenBufferInfo(hConsoleOutput: HANDLE, lpConsoleScreenBufferInfo: CONSOLE_SCREEN_BUFFER_INFO | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def SetConsoleScreenBufferSize(hConsoleOutput: HANDLE, dwSize: COORD) -> BOOL | t.State: pass
|
||||
|
||||
def SetConsoleCursorPosition(hConsoleOutput: HANDLE, dwCursorPosition: COORD) -> BOOL | t.State: pass
|
||||
|
||||
def GetConsoleCursorInfo(hConsoleOutput: HANDLE, lpConsoleCursorInfo: CONSOLE_CURSOR_INFO | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def SetConsoleCursorInfo(hConsoleOutput: HANDLE, lpConsoleCursorInfo: CONSOLE_CURSOR_INFO | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def SetConsoleTextAttribute(hConsoleOutput: HANDLE, wAttributes: WORD) -> BOOL | t.State: pass
|
||||
|
||||
def FillConsoleOutputCharacterA(hConsoleOutput: HANDLE, cCharacter: t.CChar, nLength: ULONG, dwWriteCoord: COORD, lpNumberOfCharsWritten: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def FillConsoleOutputCharacterW(hConsoleOutput: HANDLE, cCharacter: WCHAR, nLength: ULONG, dwWriteCoord: COORD, lpNumberOfCharsWritten: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def FillConsoleOutputAttribute(hConsoleOutput: HANDLE, wAttribute: WORD, nLength: ULONG, dwWriteCoord: COORD, lpNumberOfAttrsWritten: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def WriteConsoleA(hConsoleOutput: HANDLE, lpBuffer: t.CConst | VOIDPTR, nNumberOfCharsToWrite: ULONG, lpNumberOfCharsWritten: ULONG | t.CPtr, lpReserved: VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def WriteConsoleW(hConsoleOutput: HANDLE, lpBuffer: t.CConst | VOIDPTR, nNumberOfCharsToWrite: ULONG, lpNumberOfCharsWritten: ULONG | t.CPtr, lpReserved: VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def ReadConsoleA(hConsoleInput: HANDLE, lpBuffer: VOIDPTR, nNumberOfCharsToRead: ULONG, lpNumberOfCharsRead: ULONG | t.CPtr, pInputControl: VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def ReadConsoleW(hConsoleInput: HANDLE, lpBuffer: VOIDPTR, nNumberOfCharsToRead: ULONG, lpNumberOfCharsRead: ULONG | t.CPtr, pInputControl: VOIDPTR) -> BOOL | t.State: pass
|
||||
|
||||
def GetConsoleMode(hConsoleHandle: HANDLE, lpMode: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def SetConsoleMode(hConsoleHandle: HANDLE, dwMode: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def ReadConsoleInputA(hConsoleInput: HANDLE, lpBuffer: INPUT_RECORD | t.CPtr, nLength: ULONG, lpNumberOfEventsRead: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def ReadConsoleInputW(hConsoleInput: HANDLE, lpBuffer: INPUT_RECORD | t.CPtr, nLength: ULONG, lpNumberOfEventsRead: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def GetNumberOfConsoleInputEvents(hConsoleInput: HANDLE, lpNumberOfEvents: ULONG | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def FlushConsoleInputBuffer(hConsoleInput: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def SetConsoleTitleA(lpConsoleTitle: LPCSTR) -> BOOL | t.State: pass
|
||||
|
||||
def SetConsoleTitleW(lpConsoleTitle: LPCWSTR) -> BOOL | t.State: pass
|
||||
|
||||
def GetConsoleTitleA(lpConsoleTitle: CHARPTR, nSize: ULONG) -> ULONG | t.State: pass
|
||||
|
||||
def GetConsoleTitleW(lpConsoleTitle: WCHARPTR, nSize: ULONG) -> ULONG | t.State: pass
|
||||
|
||||
def AllocConsole() -> BOOL | t.State: pass
|
||||
|
||||
def FreeConsole() -> BOOL | t.State: pass
|
||||
|
||||
def SetConsoleWindowInfo(hConsoleOutput: HANDLE, bAbsolute: BOOL, lpConsoleWindow: SMALL_RECT | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def ScrollConsoleScreenBufferA(hConsoleOutput: HANDLE, lpScrollRectangle: SMALL_RECT | t.CPtr, lpClipRectangle: SMALL_RECT | t.CPtr, dwDestinationOrigin: COORD, lpFill: CHAR_INFO | t.CPtr) -> BOOL | t.State: pass
|
||||
23
Test/AstTest/temp/c3b259b4059f8668.pyi
Normal file
23
Test/AstTest/temp/c3b259b4059f8668.pyi
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
Auto-generated Python stub file from viperlib.py
|
||||
Module: viperlib
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
import viperio
|
||||
from stdarg import arg, va_arg
|
||||
|
||||
TEMP_BUF_SIZE: t.CDefine = 68
|
||||
|
||||
def get_digit_count(num: t.CUnsignedInt, base: t.CInt) -> t.CStatic | t.CInt: pass
|
||||
|
||||
def sprintf(buf: t.CChar | t.CPtr, rule: str, *args) -> t.CVoid | t.CExport: pass
|
||||
|
||||
def vsprintf(buf: t.CChar | t.CPtr, rule: str, *args) -> t.CInt: pass
|
||||
|
||||
def snprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, *args) -> t.CInt | t.CExport: pass
|
||||
|
||||
def _check_special_float(fv: t.CDouble) -> t.CInt: pass
|
||||
|
||||
def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.CPtr) -> t.CInt | t.CExport: pass
|
||||
22
Test/AstTest/temp/c9f4be41ca1cc2b4.pyi
Normal file
22
Test/AstTest/temp/c9f4be41ca1cc2b4.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
"""
|
||||
Auto-generated Python stub file from viperio.py
|
||||
Module: viperio
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
|
||||
class Buf:
|
||||
data: t.CChar | t.CPtr
|
||||
length: t.CSizeT
|
||||
capacity: t.CSizeT
|
||||
owned: bool
|
||||
def __init__(self: Buf, data: t.CChar | t.CPtr, capacity: t.CSizeT, length: t.CSizeT, owned: bool) -> t.CInt: pass
|
||||
def clear(self: Buf) -> t.CInt: pass
|
||||
def write(self: Buf, src: t.CChar | t.CPtr, count: t.CSizeT) -> t.CSizeT: pass
|
||||
def cstr(self: Buf) -> t.CChar | t.CPtr: pass
|
||||
def reset(self: Buf) -> t.CInt: pass
|
||||
def __enter__(self: Buf) -> 'Buf' | t.CPtr: pass
|
||||
def __exit__(self: Buf) -> t.CInt: pass
|
||||
def free(self: Buf) -> t.CInt: pass
|
||||
81
Test/AstTest/temp/ee084e9fc6ee413a.pyi
Normal file
81
Test/AstTest/temp/ee084e9fc6ee413a.pyi
Normal file
@@ -0,0 +1,81 @@
|
||||
"""
|
||||
Auto-generated Python stub file from memhub.py
|
||||
Module: memhub
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import string
|
||||
import atom
|
||||
import viperio
|
||||
|
||||
MEMHUB_ALIGN: t.CDefine = 8
|
||||
MEMSLAB_MIN_BLOCK: t.CDefine = 16
|
||||
MEMSLAB_BITMAP_BYTES: t.CDefine = 256
|
||||
MEMBUDDY_MIN_BLOCK: t.CDefine = 32
|
||||
MEMBUDDY_MAX_ORDERS: t.CDefine = 32
|
||||
MEMBUDDY_HEADER_SIZE: t.CDefine = 8
|
||||
|
||||
def _align_up(val: t.CSizeT, align: t.CSizeT) -> t.CSizeT: pass
|
||||
|
||||
def _largest_pow2_le(val: t.CSizeT) -> t.CSizeT: pass
|
||||
|
||||
def _block_size_at_order(order: t.CInt) -> t.CSizeT: pass
|
||||
|
||||
|
||||
@t.CVTable
|
||||
class MemManager:
|
||||
__provides__: list[str] = ['__memmgr__']
|
||||
base: t.CVoid | t.CPtr
|
||||
size: t.CSizeT
|
||||
def __init__(self: MemManager, base: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
def alloc(self: MemManager, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemManager, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemManager) -> t.CInt: pass
|
||||
def calloc(self: MemManager, count: t.CSizeT, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def realloc(self: MemManager, ptr: t.CVoid | t.CPtr, old_size: t.CSizeT, new_size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def __enter__(self: MemManager) -> 'MemManager' | t.CPtr: pass
|
||||
def __exit__(self: MemManager) -> t.CInt: pass
|
||||
def alloc_buf(self: MemManager, capacity: t.CSizeT) -> viperio.Buf | t.CPtr: pass
|
||||
class MemPool(MemManager):
|
||||
offset: t.CSizeT
|
||||
high_water: t.CSizeT
|
||||
def __init__(self: MemPool, base: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
def alloc(self: MemPool, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemPool, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemPool) -> t.CInt: pass
|
||||
class MemSlab(MemManager):
|
||||
block_size: t.CSizeT
|
||||
block_count: t.CSizeT
|
||||
used_count: t.CSizeT
|
||||
free_list: t.CVoid | t.CPtr
|
||||
alloc_map: t.CUInt8T | t.CPtr
|
||||
alloc_map_size: t.CSizeT
|
||||
usable: t.CVoid | t.CPtr
|
||||
usable_size: t.CSizeT
|
||||
def __init__(self: MemSlab, base: t.CVoid | t.CPtr, size: t.CSizeT, block_size: t.CSizeT) -> t.CInt: pass
|
||||
def alloc(self: MemSlab, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemSlab, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemSlab) -> t.CInt: pass
|
||||
class MemBuddy(MemManager):
|
||||
max_order: t.CInt
|
||||
free_lists: t.CUInt64T | t.CPtr
|
||||
lock_val: t.CVolatile | t.CInt
|
||||
usable: t.CVoid | t.CPtr
|
||||
usable_size: t.CSizeT
|
||||
def __init__(self: MemBuddy, base: t.CVoid | t.CPtr, size: t.CSizeT) -> t.CInt: pass
|
||||
def _fl_push(self: MemBuddy, order: t.CInt, block: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def _fl_pop(self: MemBuddy, order: t.CInt) -> t.CVoid | t.CPtr: pass
|
||||
def _fl_find_and_remove(self: MemBuddy, order: t.CInt, target: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def _buddy_of(self: MemBuddy, block: t.CVoid | t.CPtr, order: t.CInt) -> t.CVoid | t.CPtr: pass
|
||||
def _order_for_size(self: MemBuddy, size: t.CSizeT) -> t.CInt: pass
|
||||
def _split_to_order(self: MemBuddy, to_order: t.CInt) -> t.CVoid | t.CPtr: pass
|
||||
def _coalesce(self: MemBuddy, block: t.CVoid | t.CPtr, order: t.CInt) -> t.CInt: pass
|
||||
def _is_valid_ptr(self: MemBuddy, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def _lock(self: MemBuddy) -> t.CInt: pass
|
||||
def _unlock(self: MemBuddy) -> t.CInt: pass
|
||||
def alloc(self: MemBuddy, size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
def free(self: MemBuddy, ptr: t.CVoid | t.CPtr) -> t.CInt: pass
|
||||
def reset(self: MemBuddy) -> t.CInt: pass
|
||||
def realloc(self: MemBuddy, ptr: t.CVoid | t.CPtr, old_size: t.CSizeT, new_size: t.CSizeT) -> t.CVoid | t.CPtr: pass
|
||||
215
Test/AstTest/temp/ee52c08239684346.pyi
Normal file
215
Test/AstTest/temp/ee52c08239684346.pyi
Normal file
@@ -0,0 +1,215 @@
|
||||
"""
|
||||
Auto-generated Python stub file from ast.parser.py
|
||||
Module: ast.parser
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
from stdint import *
|
||||
import memhub
|
||||
import string
|
||||
from .tokens import Token, TokenType, Keyword, TokOp
|
||||
from .base import AST, ASTCtx, ASTKind, OpKind, ASTFlag, _set_pos, _binop_from_op, _augop_from_op, _cmpop_from_op, _copy_str, _inherit_pos, _init_ast, CONST_INT, CONST_FLOAT, CONST_STR, CONST_BOOL, CONST_NONE, FLAG_IS_ASYNC
|
||||
from .exprs import BoolOp, BinOp, UnaryOp, Lambda, IfExp, Dict, Set, ListComp, SetComp, DictComp, GeneratorExp, Await, Yield, YieldFrom, FormattedValue, JoinedStr, Constant, NamedExpr, Attribute, Subscript, Starred, Name, List, Tuple, Slice, Call, Compare, OpNode
|
||||
from .stmts import Module, Expression, Interactive, FunctionType, FunctionDef, ClassDef, Return, Delete, Assign, AugAssign, AnnAssign, For, While, If, With, Raise, Try, Assert, Global, Nonlocal, Pass, Break, Continue, Expr, Import, ImportFrom, Match
|
||||
from .astaux import ExceptHandler, Arguments, Arg, Keyword as KwNode, Alias, WithItem, Comprehension
|
||||
from .match import MatchCase, MatchValue, MatchSingleton, MatchSequence, MatchMapping, MatchClass, MatchStar, MatchAs, MatchOr
|
||||
from .lexer import Lexer, _lexer_init, tokenize, new_lexer
|
||||
|
||||
class Parser:
|
||||
tokens: Token | t.CPtr
|
||||
cur: Token | t.CPtr
|
||||
pool: memhub.MemManager | t.CPtr
|
||||
error_count: t.CInt
|
||||
pending_decorators: list[AST | t.CPtr] | t.CPtr
|
||||
def __new__(self: Parser, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def new_parser(pool: memhub.MemManager | t.CPtr) -> Parser | t.CPtr: pass
|
||||
|
||||
def _parser_init(ps: Parser | t.CPtr, tokens: Token | t.CPtr, pool: memhub.MemManager | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _advance(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _cur_type(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _cur_op(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _cur_kw(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _cur_str(ps: Parser | t.CPtr) -> str: pass
|
||||
|
||||
def _cur_lineno(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _cur_col(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _skip_nl(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _skip_nls_and_newlines(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _expect_type(ps: Parser | t.CPtr, ttype: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _expect_op(ps: Parser | t.CPtr, op_id: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _match_op(ps: Parser | t.CPtr, op_id: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _accept_op(ps: Parser | t.CPtr, op_id: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _new_const_int(pool: memhub.MemManager | t.CPtr, val: t.CInt64T, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _new_const_float(pool: memhub.MemManager | t.CPtr, val: t.CDouble, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _new_const_str(pool: memhub.MemManager | t.CPtr, val: str, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _new_const_bool(pool: memhub.MemManager | t.CPtr, val: t.CInt, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _new_const_none(pool: memhub.MemManager | t.CPtr, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _set_ctx(node: AST | t.CPtr, ctx: t.CInt) -> t.CInt: pass
|
||||
|
||||
def _fix_store_ctx(node: AST | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _parse_expr(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_namedexpr(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_test(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_lambda(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_or_test(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_and_test(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_not_test(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_comparison(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _match_comp_op(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _advance_comp_op(ps: Parser | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _parse_bitor(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_bitxor(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_bitand(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_shift(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_arith(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_term(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_factor(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_power(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_atom_expr(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_call(ps: Parser | t.CPtr, func: AST | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_subscript(ps: Parser | t.CPtr, value: AST | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_slice(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_atom(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_paren(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_list(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_brace(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_sub_expr(ps: Parser | t.CPtr, src: str) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_fstring(ps: Parser | t.CPtr, content: str, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_comprehension(ps: Parser | t.CPtr, elt: AST | t.CPtr, vtype: t.CInt, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_comp_for(ps: Parser | t.CPtr) -> list[AST | t.CPtr] | t.CPtr: pass
|
||||
|
||||
def _parse_target_list(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_target(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_yield(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_varargslist(ps: Parser | t.CPtr, is_lambda: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_arg_def(ps: Parser | t.CPtr, is_lambda: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_suite_into_children(ps: Parser | t.CPtr, parent: AST | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _parse_statement_into(ps: Parser | t.CPtr, parent: AST | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _parse_simple_stmt_into(ps: Parser | t.CPtr, parent: AST | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def _parse_small_stmt(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _maybe_tuple(ps: Parser | t.CPtr, first: AST | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_testlist(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_expr_stmt(ps: Parser | t.CPtr, first: AST | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_return(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_raise(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_global(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_nonlocal(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_import(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_from_import(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_alias_list(ps: Parser | t.CPtr) -> list[AST | t.CPtr] | t.CPtr: pass
|
||||
|
||||
def _parse_del(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_assert(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_compound(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_if(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_if_tail(ps: Parser | t.CPtr) -> list[AST | t.CPtr] | t.CPtr: pass
|
||||
|
||||
def _parse_while(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_for(ps: Parser | t.CPtr, is_async: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_try(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_except_handler(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_with(ps: Parser | t.CPtr, is_async: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_with_item(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_funcdef(ps: Parser | t.CPtr, is_async: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_classdef(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_match(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _make_name_ast(pool: memhub.MemManager | t.CPtr, node: Name | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_pattern(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_closed_pattern(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_sequence_pattern(ps: Parser | t.CPtr, close_op: t.CInt, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_mapping_pattern(ps: Parser | t.CPtr, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_class_pattern(ps: Parser | t.CPtr, cls: AST | t.CPtr, lineno: t.CInt, col: t.CInt) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_match_case(ps: Parser | t.CPtr) -> AST | t.CPtr: pass
|
||||
|
||||
def _parse_decorators(ps: Parser | t.CPtr) -> list[AST | t.CPtr] | t.CPtr: pass
|
||||
|
||||
def _parse_module_body(ps: Parser | t.CPtr, module_node: AST | t.CPtr) -> t.CInt: pass
|
||||
|
||||
def parse_tokens(pool: memhub.MemManager | t.CPtr, tokens: Token | t.CPtr) -> AST | t.CPtr: pass
|
||||
100
Test/AstTest/temp/f5522571bcce7bcb.pyi
Normal file
100
Test/AstTest/temp/f5522571bcce7bcb.pyi
Normal file
@@ -0,0 +1,100 @@
|
||||
"""
|
||||
Auto-generated Python stub file from stdint.py
|
||||
Module: stdint
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
|
||||
INT: t.CTypedef = t.CInt
|
||||
INTPTR: t.CTypedef = t.CInt | t.CPtr
|
||||
BOOL: t.CTypedef = t.CInt
|
||||
UINT: t.CTypedef = t.CUnsignedInt
|
||||
UINTPTR: t.CTypedef = UINT | t.CPtr
|
||||
BYTE: t.CTypedef = t.CUnsignedChar
|
||||
BYTEPTR: t.CTypedef = BYTE | t.CPtr
|
||||
WORD: t.CTypedef = t.CUInt16T
|
||||
DWORD: t.CTypedef = t.CUInt32T
|
||||
QWORD: t.CTypedef = t.CUInt64T
|
||||
TCHAR: t.CTypedef = t.CChar
|
||||
CHARLIST: t.CTypedef = str | t.CPtr
|
||||
VOID: t.CTypedef = t.CVoid
|
||||
SHORT: t.CTypedef = t.CShort
|
||||
SHORTPTR: t.CTypedef = t.CShort | t.CPtr
|
||||
USHORT: t.CTypedef = t.CUnsignedShort
|
||||
USHORTPTR: t.CTypedef = t.CUnsignedShort | t.CPtr
|
||||
LONGLONG: t.CTypedef = t.CLongLong
|
||||
ULONGLONG: t.CTypedef = t.CUnsignedLongLong
|
||||
LONG: t.CTypedef = t.CLong
|
||||
ULONG: t.CTypedef = t.CUnsignedLong
|
||||
WCHAR: t.CTypedef = WORD
|
||||
WCHARPTR: t.CTypedef = WORD | t.CPtr
|
||||
CHARPTR: t.CTypedef = t.CChar | t.CPtr
|
||||
FSIZE_t: t.CTypedef = DWORD
|
||||
LBA_t: t.CTypedef = DWORD
|
||||
VOIDPTR: t.CTypedef = t.CVoid | t.CPtr
|
||||
FLOAT: t.CTypedef = t.CFloat
|
||||
DOUBLE: t.CTypedef = t.CDouble
|
||||
FLOAT8: t.CTypedef = t.CFloat8T
|
||||
FLOAT16: t.CTypedef = t.CFloat16T
|
||||
FLOAT32: t.CTypedef = t.CFloat32T
|
||||
FLOAT64: t.CTypedef = t.CFloat64T
|
||||
FLOAT128: t.CTypedef = t.CFloat128T
|
||||
INT8: t.CTypedef = t.CInt8T
|
||||
INT16: t.CTypedef = t.CInt16T
|
||||
INT32: t.CTypedef = t.CInt32T
|
||||
INT64: t.CTypedef = t.CInt64T
|
||||
UINT8: t.CTypedef = t.CUInt8T
|
||||
UINT16: t.CTypedef = t.CUInt16T
|
||||
UINT32: t.CTypedef = t.CUInt32T
|
||||
UINT64: t.CTypedef = t.CUInt64T
|
||||
INT8PTR: t.CTypedef = t.CInt8T | t.CPtr
|
||||
INT16PTR: t.CTypedef = t.CInt16T | t.CPtr
|
||||
INT32PTR: t.CTypedef = t.CInt32T | t.CPtr
|
||||
INT64PTR: t.CTypedef = t.CInt64T | t.CPtr
|
||||
UINT8PTR: t.CTypedef = t.CUInt8T | t.CPtr
|
||||
UINT16PTR: t.CTypedef = t.CUInt16T | t.CPtr
|
||||
UINT32PTR: t.CTypedef = t.CUInt32T | t.CPtr
|
||||
UINT64PTR: t.CTypedef = t.CUInt64T | t.CPtr
|
||||
CHAR8: t.CTypedef = t.CChar8T
|
||||
CHAR16: t.CTypedef = t.CChar16T
|
||||
CHAR32: t.CTypedef = t.CChar32T
|
||||
CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr
|
||||
CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr
|
||||
CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr
|
||||
i8: t.CTypedef = t.CInt8T
|
||||
i16: t.CTypedef = t.CInt16T
|
||||
i32: t.CTypedef = t.CInt32T
|
||||
i64: t.CTypedef = t.CInt64T
|
||||
u8: t.CTypedef = t.CUInt8T
|
||||
u16: t.CTypedef = t.CUInt16T
|
||||
u32: t.CTypedef = t.CUInt32T
|
||||
u64: t.CTypedef = t.CUInt64T
|
||||
SIZE_T: t.CTypedef = t.CSizeT
|
||||
SSIZE_T: t.CTypedef = t.CPtrDiffT
|
||||
PTRDIFF_T: t.CTypedef = t.CPtrDiffT
|
||||
int8_t: t.CTypedef = t.CInt8T
|
||||
int16_t: t.CTypedef = t.CInt16T
|
||||
int32_t: t.CTypedef = t.CInt32T
|
||||
int64_t: t.CTypedef = t.CInt64T
|
||||
uint8_t: t.CTypedef = t.CUInt8T
|
||||
uint16_t: t.CTypedef = t.CUInt16T
|
||||
uint32_t: t.CTypedef = t.CUInt32T
|
||||
uint64_t: t.CTypedef = t.CUInt64T
|
||||
size_t: t.CTypedef = t.CSizeT
|
||||
ssize_t: t.CTypedef = t.CPtrDiffT
|
||||
ptrdiff_t: t.CTypedef = t.CPtrDiffT
|
||||
intptr_t: t.CTypedef = t.CIntPtrT
|
||||
uintptr_t: t.CTypedef = t.CUIntPtrT
|
||||
wchar_t: t.CTypedef = t.CWCharT
|
||||
char8_t: t.CTypedef = t.CChar8T
|
||||
char16_t: t.CTypedef = t.CChar16T
|
||||
char32_t: t.CTypedef = t.CChar32T
|
||||
float8_t: t.CTypedef = t.CFloat8T
|
||||
float16_t: t.CTypedef = t.CFloat16T
|
||||
float32_t: t.CTypedef = t.CFloat32T
|
||||
float64_t: t.CTypedef = t.CFloat64T
|
||||
float128_t: t.CTypedef = t.CFloat128T
|
||||
_Bool: t.CTypedef = t.CBool
|
||||
192
Test/AstTest/temp/f6b51804a0ba8ff0.pyi
Normal file
192
Test/AstTest/temp/f6b51804a0ba8ff0.pyi
Normal file
@@ -0,0 +1,192 @@
|
||||
"""
|
||||
Auto-generated Python stub file from w32.win32file.py
|
||||
Module: w32.win32file
|
||||
"""
|
||||
|
||||
import c
|
||||
|
||||
|
||||
import t
|
||||
from stdint import *
|
||||
from w32.win32base import *
|
||||
|
||||
GENERIC_READ: t.CDefine = 0x80000000
|
||||
GENERIC_WRITE: t.CDefine = 0x40000000
|
||||
GENERIC_EXECUTE: t.CDefine = 0x20000000
|
||||
GENERIC_ALL: t.CDefine = 0x10000000
|
||||
FILE_SHARE_READ: t.CDefine = 0x00000001
|
||||
FILE_SHARE_WRITE: t.CDefine = 0x00000002
|
||||
FILE_SHARE_DELETE: t.CDefine = 0x00000004
|
||||
CREATE_NEW: t.CDefine = 1
|
||||
CREATE_ALWAYS: t.CDefine = 2
|
||||
OPEN_EXISTING: t.CDefine = 3
|
||||
OPEN_ALWAYS: t.CDefine = 4
|
||||
TRUNCATE_EXISTING: t.CDefine = 5
|
||||
FILE_ATTRIBUTE_READONLY: t.CDefine = 0x00000001
|
||||
FILE_ATTRIBUTE_HIDDEN: t.CDefine = 0x00000002
|
||||
FILE_ATTRIBUTE_SYSTEM: t.CDefine = 0x00000004
|
||||
FILE_ATTRIBUTE_DIRECTORY: t.CDefine = 0x00000010
|
||||
FILE_ATTRIBUTE_ARCHIVE: t.CDefine = 0x00000020
|
||||
FILE_ATTRIBUTE_NORMAL: t.CDefine = 0x00000080
|
||||
FILE_ATTRIBUTE_TEMPORARY: t.CDefine = 0x00000100
|
||||
FILE_ATTRIBUTE_COMPRESSED: t.CDefine = 0x00000800
|
||||
FILE_ATTRIBUTE_OFFLINE: t.CDefine = 0x00001000
|
||||
FILE_ATTRIBUTE_ENCRYPTED: t.CDefine = 0x00004000
|
||||
FILE_FLAG_WRITE_THROUGH: t.CDefine = 0x80000000
|
||||
FILE_FLAG_OVERLAPPED: t.CDefine = 0x40000000
|
||||
FILE_FLAG_NO_BUFFERING: t.CDefine = 0x20000000
|
||||
FILE_FLAG_RANDOM_ACCESS: t.CDefine = 0x10000000
|
||||
FILE_FLAG_SEQUENTIAL_SCAN: t.CDefine = 0x08000000
|
||||
FILE_FLAG_DELETE_ON_CLOSE: t.CDefine = 0x04000000
|
||||
FILE_FLAG_BACKUP_SEMANTICS: t.CDefine = 0x02000000
|
||||
FILE_FLAG_POSIX_SEMANTICS: t.CDefine = 0x01000000
|
||||
FILE_BEGIN: t.CDefine = 0
|
||||
FILE_CURRENT: t.CDefine = 1
|
||||
FILE_END: t.CDefine = 2
|
||||
STD_INPUT_HANDLE: t.CDefine = t.CUnsignedLong(-10)
|
||||
STD_OUTPUT_HANDLE: t.CDefine = t.CUnsignedLong(-11)
|
||||
STD_ERROR_HANDLE: t.CDefine = t.CUnsignedLong(-12)
|
||||
MOVEFILE_REPLACE_EXISTING: t.CDefine = 0x00000001
|
||||
MOVEFILE_COPY_ALLOWED: t.CDefine = 0x00000002
|
||||
MOVEFILE_WRITE_THROUGH: t.CDefine = 0x00000008
|
||||
|
||||
class BY_HANDLE_FILE_INFORMATION:
|
||||
dwFileAttributes: ULONG
|
||||
ftCreationTime: FILETIME
|
||||
ftLastAccessTime: FILETIME
|
||||
ftLastWriteTime: FILETIME
|
||||
dwVolumeSerialNumber: ULONG
|
||||
nFileSizeHigh: ULONG
|
||||
nFileSizeLow: ULONG
|
||||
nNumberOfLinks: ULONG
|
||||
nFileIndexHigh: ULONG
|
||||
nFileIndexLow: ULONG
|
||||
class WIN32_FIND_DATAA:
|
||||
dwFileAttributes: ULONG
|
||||
ftCreationTime: FILETIME
|
||||
ftLastAccessTime: FILETIME
|
||||
ftLastWriteTime: FILETIME
|
||||
nFileSizeHigh: ULONG
|
||||
nFileSizeLow: ULONG
|
||||
dwReserved0: ULONG
|
||||
dwReserved1: ULONG
|
||||
cFileName: t.CArray[t.CChar, 260]
|
||||
cAlternateFileName: t.CArray[t.CChar, 14]
|
||||
class WIN32_FIND_DATAW:
|
||||
dwFileAttributes: ULONG
|
||||
ftCreationTime: FILETIME
|
||||
ftLastAccessTime: FILETIME
|
||||
ftLastWriteTime: FILETIME
|
||||
nFileSizeHigh: ULONG
|
||||
nFileSizeLow: ULONG
|
||||
dwReserved0: ULONG
|
||||
dwReserved1: ULONG
|
||||
cFileName: t.CArray[t.CUInt16T, 260]
|
||||
cAlternateFileName: t.CArray[t.CUInt16T, 14]
|
||||
|
||||
def CreateFileA(lpFileName: LPCSTR, dwDesiredAccess: ULONG, dwShareMode: ULONG, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr, dwCreationDisposition: ULONG, dwFlagsAndAttributes: ULONG, hTemplateFile: HANDLE) -> HANDLE | t.State: pass
|
||||
|
||||
def CreateFileW(lpFileName: LPCWSTR, dwDesiredAccess: ULONG, dwShareMode: ULONG, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr, dwCreationDisposition: ULONG, dwFlagsAndAttributes: ULONG, hTemplateFile: HANDLE) -> HANDLE | t.State: pass
|
||||
|
||||
def ReadFile(hFile: HANDLE, lpBuffer: VOIDPTR, nNumberOfBytesToRead: ULONG, lpNumberOfBytesRead: ULONG | t.CPtr, lpOverlapped: OVERLAPPED | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def WriteFile(hFile: HANDLE, lpBuffer: t.CConst | VOIDPTR, nNumberOfBytesToWrite: ULONG, lpNumberOfBytesWritten: ULONG | t.CPtr, lpOverlapped: OVERLAPPED | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def SetFilePointer(hFile: HANDLE, lDistanceToMove: LONG, lpDistanceToMoveHigh: LONG | t.CPtr, dwMoveMethod: ULONG) -> LONG | t.State: pass
|
||||
|
||||
def SetFilePointerEx(hFile: HANDLE, liDistanceToMove: LARGE_INTEGER | t.CPtr, lpNewFilePointer: LARGE_INTEGER | t.CPtr, dwMoveMethod: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def GetFileSize(hFile: HANDLE, lpFileSizeHigh: ULONG | t.CPtr) -> ULONG | t.State: pass
|
||||
|
||||
def GetFileSizeEx(hFile: HANDLE, lpFileSize: LARGE_INTEGER | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def SetEndOfFile(hFile: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def FlushFileBuffers(hFile: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def GetFileType(hFile: HANDLE) -> ULONG | t.State: pass
|
||||
|
||||
def GetFileAttributesA(lpFileName: LPCSTR) -> ULONG | t.State: pass
|
||||
|
||||
def GetFileAttributesW(lpFileName: LPCWSTR) -> ULONG | t.State: pass
|
||||
|
||||
def SetFileAttributesA(lpFileName: LPCSTR, dwFileAttributes: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def SetFileAttributesW(lpFileName: LPCWSTR, dwFileAttributes: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def DeleteFileA(lpFileName: LPCSTR) -> BOOL | t.State: pass
|
||||
|
||||
def DeleteFileW(lpFileName: LPCWSTR) -> BOOL | t.State: pass
|
||||
|
||||
def MoveFileA(lpExistingFileName: LPCSTR, lpNewFileName: LPCSTR) -> BOOL | t.State: pass
|
||||
|
||||
def MoveFileW(lpExistingFileName: LPCWSTR, lpNewFileName: LPCWSTR) -> BOOL | t.State: pass
|
||||
|
||||
def MoveFileExA(lpExistingFileName: LPCSTR, lpNewFileName: LPCSTR, dwFlags: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def MoveFileExW(lpExistingFileName: LPCWSTR, lpNewFileName: LPCWSTR, dwFlags: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def CopyFileA(lpExistingFileName: LPCSTR, lpNewFileName: LPCSTR, bFailIfExists: BOOL) -> BOOL | t.State: pass
|
||||
|
||||
def CopyFileW(lpExistingFileName: LPCWSTR, lpNewFileName: LPCWSTR, bFailIfExists: BOOL) -> BOOL | t.State: pass
|
||||
|
||||
def CreateDirectoryA(lpPathName: LPCSTR, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def CreateDirectoryW(lpPathName: LPCWSTR, lpSecurityAttributes: SECURITY_ATTRIBUTES | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def RemoveDirectoryA(lpPathName: LPCSTR) -> BOOL | t.State: pass
|
||||
|
||||
def RemoveDirectoryW(lpPathName: LPCWSTR) -> BOOL | t.State: pass
|
||||
|
||||
def FindFirstFileA(lpFileName: LPCSTR, lpFindFileData: WIN32_FIND_DATAA | t.CPtr) -> HANDLE | t.State: pass
|
||||
|
||||
def FindFirstFileW(lpFileName: LPCWSTR, lpFindFileData: WIN32_FIND_DATAW | t.CPtr) -> HANDLE | t.State: pass
|
||||
|
||||
def FindNextFileA(hFindFile: HANDLE, lpFindFileData: WIN32_FIND_DATAA | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def FindNextFileW(hFindFile: HANDLE, lpFindFileData: WIN32_FIND_DATAW | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def FindClose(hFindFile: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def GetStdHandle(nStdHandle: ULONG) -> HANDLE | t.State: pass
|
||||
|
||||
def SetStdHandle(nStdHandle: ULONG, hHandle: HANDLE) -> BOOL | t.State: pass
|
||||
|
||||
def GetFileInformationByHandle(hFile: HANDLE, lpFileInformation: BY_HANDLE_FILE_INFORMATION | t.CPtr) -> BOOL | t.State: pass
|
||||
|
||||
def LockFile(hFile: HANDLE, dwFileOffsetLow: ULONG, dwFileOffsetHigh: ULONG, nNumberOfBytesToLockLow: ULONG, nNumberOfBytesToLockHigh: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def UnlockFile(hFile: HANDLE, dwFileOffsetLow: ULONG, dwFileOffsetHigh: ULONG, nNumberOfBytesToUnlockLow: ULONG, nNumberOfBytesToUnlockHigh: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def GetTempPathA(nBufferLength: ULONG, lpBuffer: CHARPTR) -> ULONG | t.State: pass
|
||||
|
||||
def GetTempPathW(nBufferLength: ULONG, lpBuffer: WCHARPTR) -> ULONG | t.State: pass
|
||||
|
||||
def GetTempFileNameA(lpPathName: LPCSTR, lpPrefixString: LPCSTR, uUnique: UINT, lpTempFileName: CHARPTR) -> UINT | t.State: pass
|
||||
|
||||
def GetTempFileNameW(lpPathName: LPCWSTR, lpPrefixString: LPCWSTR, uUnique: UINT, lpTempFileName: WCHARPTR) -> UINT | t.State: pass
|
||||
|
||||
def GetCurrentDirectoryA(nBufferLength: ULONG, lpBuffer: CHARPTR) -> ULONG | t.State: pass
|
||||
|
||||
def GetCurrentDirectoryW(nBufferLength: ULONG, lpBuffer: WCHARPTR) -> ULONG | t.State: pass
|
||||
|
||||
def SetCurrentDirectoryA(lpPathName: LPCSTR) -> BOOL | t.State: pass
|
||||
|
||||
def SetCurrentDirectoryW(lpPathName: LPCWSTR) -> BOOL | t.State: pass
|
||||
|
||||
def GetModuleFileNameA(hModule: HANDLE, lpFilename: CHARPTR, nSize: ULONG) -> ULONG | t.State: pass
|
||||
|
||||
def GetModuleFileNameW(hModule: HANDLE, lpFilename: WCHARPTR, nSize: ULONG) -> ULONG | t.State: pass
|
||||
|
||||
|
||||
HANDLE_FLAG_INHERIT: t.CDefine = 0x00000001
|
||||
HANDLE_FLAG_PROTECT_FROM_CLOSE: t.CDefine = 0x00000002
|
||||
|
||||
def CreatePipe(hReadPipe: HANDLE | t.CPtr, hWritePipe: HANDLE | t.CPtr, lpPipeAttributes: SECURITY_ATTRIBUTES | t.CPtr, nSize: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def SetHandleInformation(hObject: HANDLE, dwMask: ULONG, dwFlags: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
def DuplicateHandle(hSourceProcessHandle: HANDLE, hSourceHandle: HANDLE, hTargetProcessHandle: HANDLE, lpTargetHandle: HANDLE | t.CPtr, dwDesiredAccess: ULONG, bInheritHandle: BOOL, dwOptions: ULONG) -> BOOL | t.State: pass
|
||||
|
||||
|
||||
DUPLICATE_SAME_ACCESS: t.CDefine = 0x00000002
|
||||
Reference in New Issue
Block a user