Skip to content

Scope

[Source]

class val Scope

Constructors

create

[Source]

new ref create(
  kind': (PackageScope val | FileScope val | ClassScope val | 
    MethodScope val | BlockScope val | QualifierScope val),
  name': String val,
  canonical_path': FilePath val,
  range': (USize val , USize val , USize val , 
    USize val),
  index': USize val,
  parent': (Scope box | None val) = reference)
: Scope ref^

Parameters

Returns


Public fields

let kind: (PackageScope val | FileScope val | ClassScope val | MethodScope val | BlockScope val | QualifierScope val)

[Source]


let name: String val

[Source]


let canonical_path: FilePath val

[Source]


var range: (USize val , USize val , USize val , USize val)

[Source]


let index: USize val

[Source]


var parent: (Scope box | None val)

[Source]


let imports: Array[(USize val , String val , String val)] ref

[Source]


let definitions: HashMap[String val, Array[(USize val , String val , String val)] ref, HashEq[String val] val] ref

[Source]


let children: Array[Scope box] ref

[Source]


Public Functions

get_child_range

[Source]

fun box get_child_range()
: (USize val , USize val , USize val , 
    USize val)

Returns


add_import

[Source]

fun ref add_import(
  node_index: USize val,
  identifier: String val,
  path: String val)
: None val

Parameters

Returns


add_definition

[Source]

fun ref add_definition(
  node_index: USize val,
  identifier: String val,
  docs: (Array[NodeWith[DocString val] val] val | String val))
: None val

Parameters

Returns


add_child

[Source]

fun ref add_child(
  child: Scope box)
: None val

Parameters

Returns


get_json

[Source]

fun box get_json()
: Object ref

Returns