C# 클래스 Pytocs.TypeInference.AnalyzerImpl

Analyzes a directory of Python files, collecting and inferring type information as it parses all the files.
상속: Analyzer
파일 보기 프로젝트 열기: uxmal/pytocs 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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