UNPKG

scope-tree

Version:

Module scope tree for CodeInspector

28 lines (19 loc) 412 B
Scope Tree ========== ### Module scope ```coffee const moduleScope = new ModuleScope() moduleScope.addImport('any', 'Banana', Banana) ``` ### Function scope ```coffee const functionScope = new FunctionScope() functionScope.addVariable('const', 'any', 'banana', 'Banana') ``` ### Class scope ```coffee const classScope = new ClassScope() classScope.addMethod('any', 'getFruit', [ ['any', 'name'] ]) ```