mirror of
https://github.com/encounter/decomp-permuter.git
synced 2026-07-10 03:18:46 -07:00
Update pycparser stubs
This commit is contained in:
+2
-1
@@ -6,7 +6,8 @@ from random import Random
|
||||
import re
|
||||
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, TYPE_CHECKING, Union
|
||||
|
||||
from pycparser import CParser, c_ast as ca, c_generator
|
||||
from pycparser import c_ast as ca, c_generator
|
||||
from pycparser.c_parser import CParser
|
||||
from pycparser.plyparser import ParseError
|
||||
|
||||
from .error import CandidateConstructionFailure
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#-----------------------------------------------------------------
|
||||
# pycparser: __init__.py
|
||||
#
|
||||
# This package file exports some convenience functions for
|
||||
# interacting with pycparser
|
||||
#
|
||||
# Eli Bendersky [https://eli.thegreenplace.net/]
|
||||
# License: BSD
|
||||
#-----------------------------------------------------------------
|
||||
__all__ = ['c_parser', 'c_ast']
|
||||
__version__ = '2.19'
|
||||
|
||||
from typing import Any, List, Union
|
||||
from . import c_ast
|
||||
from .c_parser import CParser
|
||||
|
||||
def preprocess_file(filename: str, cpp_path: str='cpp', cpp_args: Union[List[str], str]='') -> str: ...
|
||||
def parse_file(filename: str, use_cpp: bool=False, cpp_path: str='cpp', cpp_args: str='', parser: Any=None) -> c_ast.FileAST: ...
|
||||
@@ -0,0 +1,26 @@
|
||||
# -----------------------------------------------------------------
|
||||
# pycparser: __init__.py
|
||||
#
|
||||
# This package file exports some convenience functions for
|
||||
# interacting with pycparser
|
||||
#
|
||||
# Eli Bendersky [https://eli.thegreenplace.net/]
|
||||
# License: BSD
|
||||
# -----------------------------------------------------------------
|
||||
__all__ = ["c_parser", "c_ast"]
|
||||
__version__ = "2.19"
|
||||
|
||||
from typing import Any, List, Optional, Union
|
||||
from . import c_ast
|
||||
from .c_parser import CParser
|
||||
|
||||
def preprocess_file(
|
||||
filename: str, cpp_path: str = "cpp", cpp_args: Union[List[str], str] = ""
|
||||
) -> str: ...
|
||||
def parse_file(
|
||||
filename: str,
|
||||
use_cpp: bool = False,
|
||||
cpp_path: str = "cpp",
|
||||
cpp_args: str = "",
|
||||
parser: Optional[CParser] = None,
|
||||
) -> c_ast.FileAST: ...
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# ------------------------------------------------------------------------------
|
||||
# pycparser: c_generator.py
|
||||
#
|
||||
# C code generator from pycparser AST nodes.
|
||||
#
|
||||
# Eli Bendersky [https://eli.thegreenplace.net/]
|
||||
# License: BSD
|
||||
#------------------------------------------------------------------------------
|
||||
# ------------------------------------------------------------------------------
|
||||
from . import c_ast
|
||||
|
||||
class CGenerator:
|
||||
@@ -1,15 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# pycparser: c_parser.py
|
||||
#
|
||||
# CParser class: Parser and AST builder for the C language
|
||||
#
|
||||
# Eli Bendersky [https://eli.thegreenplace.net/]
|
||||
# License: BSD
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
from . import c_ast
|
||||
|
||||
class CParser:
|
||||
def __init__(self) -> None: ...
|
||||
def parse(self, text: str, filename: str='', debuglevel: int=0) -> c_ast.FileAST: ...
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# pycparser: c_parser.py
|
||||
#
|
||||
# CParser class: Parser and AST builder for the C language
|
||||
#
|
||||
# Eli Bendersky [https://eli.thegreenplace.net/]
|
||||
# License: BSD
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
from . import c_ast
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
class CParser:
|
||||
clex: Any # CLexer
|
||||
cparser: Any # LRParser
|
||||
_scope_stack: List[Dict[str, bool]]
|
||||
_last_yielded_token: Optional[Any]
|
||||
|
||||
def __init__(self) -> None: ...
|
||||
def parse(
|
||||
self, text: str, filename: str = "", debuglevel: int = 0
|
||||
) -> c_ast.FileAST: ...
|
||||
@@ -10,18 +10,13 @@
|
||||
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class Coord:
|
||||
file: str
|
||||
line: int
|
||||
column: Optional[int]
|
||||
|
||||
def __init__(self, file: str, line: int, column: Optional[int] = None):
|
||||
...
|
||||
|
||||
def __str__(self) -> str:
|
||||
...
|
||||
|
||||
def __init__(self, file: str, line: int, column: Optional[int] = None): ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
class ParseError(Exception):
|
||||
pass
|
||||
Reference in New Issue
Block a user