NaturalDocs::Languages::Advanced::Scope

A class used to store a scope level.

Summary
NaturalDocs::Languages::Advanced::ScopeA class used to store a scope level.
Constants
ImplementationThe object is implemented as a blessed arrayref.
Functions
NewCreates and returns a new object.
ClosingSymbolReturns the closing symbol character of the scope.
PackageReturns the package SymbolString of the scope, or undef if none.
SetPackageSets the package SymbolString of the scope.
UsingReturns an arrayref of SymbolStrings for using statements, or undef if none
AddUsingAdds a SymbolString to the Using() array.

Constants

Implementation

The object is implemented as a blessed arrayref.  The constants below are used as indexes.

CLOSING_SYMBOLThe closing symbol character of the scope.
PACKAGEThe package SymbolString of the scope.
USINGAn arrayref of SymbolStrings for using statements, or undef if none.

Functions

New

sub New #(closingSymbol,
package,
using)

Creates and returns a new object.

Parameters

closingSymbolThe closing symbol character of the scope.
packageThe package SymbolString of the scope.
usingAn arrayref of using SymbolStrings, or undef if none.  The contents of the array will be duplicated.

If package is set to undef, it is assumed that it inherits the value of the previous scope on the stack.

ClosingSymbol

sub ClosingSymbol

Returns the closing symbol character of the scope.

Package

sub Package

Returns the package SymbolString of the scope, or undef if none.

SetPackage

sub SetPackage #(package)

Sets the package SymbolString of the scope.

Using

sub Using

Returns an arrayref of SymbolStrings for using statements, or undef if none

AddUsing

sub AddUsing #(using)

Adds a SymbolString to the Using() array.

sub New #(closingSymbol,
package,
using)
Creates and returns a new object.
sub ClosingSymbol
Returns the closing symbol character of the scope.
sub Package
Returns the package SymbolString of the scope, or undef if none.
A scalar which encodes a normalized array of identifier strings representing a full or partially-resolved symbol.
sub SetPackage #(package)
Sets the package SymbolString of the scope.
sub Using
Returns an arrayref of SymbolStrings for using statements, or undef if none
sub AddUsing #(using)
Adds a SymbolString to the Using() array.
Close