C# Класс Pytocs.TypeInference.AnalyzerImpl

Analyzes a directory of Python files, collecting and inferring type information as it parses all the files.
Наследование: Analyzer
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
ModuleTable State
options object>.Dictionary

Открытые методы

Метод Описание
AddUncalled ( FunType cl ) : void
Analyze ( string path ) : void

Main entry to the analyzer

AnalyzerImpl ( IFileSystem fs, ILogger logger, object>.Dictionary options, System.DateTime startTime ) : System
AnalyzerImpl ( ILogger logger ) : System
ApplyUncalled ( ) : void
CreateBinding ( string id, Node node, DataType type, BindingKind kind ) : Binding
ExtendPath ( string path, string name ) : string
Finish ( ) : void
FormatTime ( System.TimeSpan span ) : string
GetAllBindings ( ) : List
GetDiagnosticsForFile ( string file ) : List
GetModuleBindings ( ) : IEnumerable
GetModuleQname ( string file ) : string
LoadFile ( string path ) : DataType
LoadFileRecursive ( string fullname ) : void

Load all Python source files recursively if the given fullname is a directory; otherwise just load a file. Looks at file extension to determine whether to load a given file.

LoadModule ( List name, State state ) : DataType
MakeQname ( List names ) : string
ModuleName ( string path ) : string

Given an absolute {@code path} to a file (not a directory), returns the module name for the file. If the file is an __init__.py, returns the last component of the file's parent directory, else returns the filename without path or extension.

Percent ( long num, long total ) : string
RegisterBinding ( Binding b ) : void
RemoveUncalled ( FunType f ) : void
ToString ( ) : string
addFileErr ( string file, int begin, int end, string msg ) : void
addPath ( string p ) : void
addPaths ( List p ) : void
addRef ( AttributeAccess attr, DataType targetType, ISet bs ) : void
banner ( string msg ) : string
close ( ) : void
countFileRecursive ( string fullname ) : int

Count number of .py files

getAnalysisSummary ( ) : string
getAstForFile ( string file ) : Module

Returns the syntax tree for {@code file}.

getBuiltinModule ( string qname ) : ModuleType
getLoadPath ( ) : List
getLoadedFiles ( ) : List
getReferences ( ) : List>.Dictionary
hasOption ( string option ) : bool
inImportStack ( object f ) : bool
inStack ( Exp f ) : bool
locateModule ( string headName ) : string

Find the path that contains modname. Used to find the starting point of locating a qname.

msg ( string m ) : void
msg_ ( string m ) : void
popImportStack ( object f ) : void
popStack ( Exp f ) : void
pushImportStack ( object f ) : void
pushStack ( Exp f ) : void
putProblem ( Node loc, string msg ) : void
putProblem ( string file, int begin, int end, string msg ) : void
putRef ( Node node, Binding b ) : void
putRef ( Node node, ICollection bs ) : void
setCWD ( string cd ) : void
setOption ( string option ) : void
setPath ( List path ) : void

Приватные методы

Метод Описание
AddPythonPath ( ) : void
CopyModels ( ) : void
CreateCacheDirectory ( ) : void
GetAstCache ( ) : AstCache
GetCachedModule ( string file ) : ModuleType
getFileErrs ( string file, Dictionary map ) : List
parseAndResolve ( string file ) : DataType

Описание методов

AddUncalled() публичный Метод

public AddUncalled ( FunType cl ) : void
cl FunType
Результат void

Analyze() публичный Метод

Main entry to the analyzer
public Analyze ( string path ) : void
path string
Результат void

AnalyzerImpl() публичный Метод

public AnalyzerImpl ( IFileSystem fs, ILogger logger, object>.Dictionary options, System.DateTime startTime ) : System
fs IFileSystem
logger ILogger
options object>.Dictionary
startTime System.DateTime
Результат System

AnalyzerImpl() публичный Метод

public AnalyzerImpl ( ILogger logger ) : System
logger ILogger
Результат System

ApplyUncalled() публичный Метод

public ApplyUncalled ( ) : void
Результат void

CreateBinding() публичный Метод

public CreateBinding ( string id, Node node, DataType type, BindingKind kind ) : Binding
id string
node Node
type DataType
kind BindingKind
Результат Binding

ExtendPath() публичный Метод

public ExtendPath ( string path, string name ) : string
path string
name string
Результат string

Finish() публичный Метод

public Finish ( ) : void
Результат void

FormatTime() публичный Метод

public FormatTime ( System.TimeSpan span ) : string
span System.TimeSpan
Результат string

GetAllBindings() публичный Метод

public GetAllBindings ( ) : List
Результат List

GetDiagnosticsForFile() публичный Метод

public GetDiagnosticsForFile ( string file ) : List
file string
Результат List

GetModuleBindings() публичный Метод

public GetModuleBindings ( ) : IEnumerable
Результат IEnumerable

GetModuleQname() публичный Метод

public GetModuleQname ( string file ) : string
file string
Результат string

LoadFile() публичный Метод

public LoadFile ( string path ) : DataType
path string
Результат DataType

LoadFileRecursive() публичный Метод

Load all Python source files recursively if the given fullname is a directory; otherwise just load a file. Looks at file extension to determine whether to load a given file.
public LoadFileRecursive ( string fullname ) : void
fullname string
Результат void

LoadModule() публичный Метод

public LoadModule ( List name, State state ) : DataType
name List
state State
Результат DataType

MakeQname() публичный Метод

public MakeQname ( List names ) : string
names List
Результат string

ModuleName() публичный Метод

Given an absolute {@code path} to a file (not a directory), returns the module name for the file. If the file is an __init__.py, returns the last component of the file's parent directory, else returns the filename without path or extension.
public ModuleName ( string path ) : string
path string
Результат string

Percent() публичный Метод

public Percent ( long num, long total ) : string
num long
total long
Результат string

RegisterBinding() публичный Метод

public RegisterBinding ( Binding b ) : void
b Binding
Результат void

RemoveUncalled() публичный Метод

public RemoveUncalled ( FunType f ) : void
f FunType
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

addFileErr() публичный Метод

public addFileErr ( string file, int begin, int end, string msg ) : void
file string
begin int
end int
msg string
Результат void

addPath() публичный Метод

public addPath ( string p ) : void
p string
Результат void

addPaths() публичный Метод

public addPaths ( List p ) : void
p List
Результат void

addRef() публичный Метод

public addRef ( AttributeAccess attr, DataType targetType, ISet bs ) : void
attr AttributeAccess
targetType DataType
bs ISet
Результат void

banner() публичный Метод

public banner ( string msg ) : string
msg string
Результат string

close() публичный Метод

public close ( ) : void
Результат void

countFileRecursive() публичный Метод

Count number of .py files
public countFileRecursive ( string fullname ) : int
fullname string
Результат int

getAnalysisSummary() публичный Метод

public getAnalysisSummary ( ) : string
Результат string

getAstForFile() публичный Метод

Returns the syntax tree for {@code file}.

public getAstForFile ( string file ) : Module
file string
Результат Pytocs.Syntax.Module

getBuiltinModule() публичный Метод

public getBuiltinModule ( string qname ) : ModuleType
qname string
Результат ModuleType

getLoadPath() публичный Метод

public getLoadPath ( ) : List
Результат List

getLoadedFiles() публичный Метод

public getLoadedFiles ( ) : List
Результат List

getReferences() публичный Метод

public getReferences ( ) : List>.Dictionary
Результат List>.Dictionary

hasOption() публичный Метод

public hasOption ( string option ) : bool
option string
Результат bool

inImportStack() публичный Метод

public inImportStack ( object f ) : bool
f object
Результат bool

inStack() публичный Метод

public inStack ( Exp f ) : bool
f Exp
Результат bool

locateModule() публичный Метод

Find the path that contains modname. Used to find the starting point of locating a qname.
public locateModule ( string headName ) : string
headName string first module name segment
Результат string

msg() публичный Метод

public msg ( string m ) : void
m string
Результат void

msg_() публичный Метод

public msg_ ( string m ) : void
m string
Результат void

popImportStack() публичный Метод

public popImportStack ( object f ) : void
f object
Результат void

popStack() публичный Метод

public popStack ( Exp f ) : void
f Exp
Результат void

pushImportStack() публичный Метод

public pushImportStack ( object f ) : void
f object
Результат void

pushStack() публичный Метод

public pushStack ( Exp f ) : void
f Exp
Результат void

putProblem() публичный Метод

public putProblem ( Node loc, string msg ) : void
loc Node
msg string
Результат void

putProblem() публичный Метод

public putProblem ( string file, int begin, int end, string msg ) : void
file string
begin int
end int
msg string
Результат void

putRef() публичный Метод

public putRef ( Node node, Binding b ) : void
node Node
b Binding
Результат void

putRef() публичный Метод

public putRef ( Node node, ICollection bs ) : void
node Node
bs ICollection
Результат void

setCWD() публичный Метод

public setCWD ( string cd ) : void
cd string
Результат void

setOption() публичный Метод

public setOption ( string option ) : void
option string
Результат void

setPath() публичный Метод

public setPath ( List path ) : void
path List
Результат void

Описание свойств

ModuleTable публичное свойство

public State,Pytocs.TypeInference ModuleTable
Результат State

options публичное свойство

public Dictionary options
Результат object>.Dictionary