npm.io
0.3.0 • Published 4 years ago

scope-tree

Licence
MIT
Version
0.3.0
Deps
1
Size
22 kB
Vulns
0
Weekly
0

Scope Tree

Module scope

const moduleScope = new ModuleScope()
moduleScope.addImport('any', 'Banana', Banana)

Function scope

const functionScope = new FunctionScope()
functionScope.addVariable('const', 'any', 'banana', 'Banana')
Class scope
const classScope = new ClassScope()
classScope.addMethod('any', 'getFruit', [
  ['any', 'name']
])

Keywords