record TSymbolReference

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSymbolReference = record

Description

This type defines the location of a symbol: both its scope (the symbol table to which it belongs) and its index within that table. It is returned by a call to ASymbol.reference.

When symbols are written to a stream, their position within their symbol table is recorded by writing the scope – the index of their symbol table within the master list of symbol tables – and index within that table.

When symbols are read from a binary stream, such as an intermediate code stream, it is assumed that parsing has already been done and so there is no further need to look up symbols by name. Thus, symbol tables are not normally reconstituted as a dictionary; instead, they are generally read into an array (an instance of ASymbolVector, where each symbol is sorted based on its index. Each array of symbols is, in turned, placed in an array. Thus this definition may be thought of as the absolute address of a given symbol.

All symbol references written to a binary stream are usually converted to scope:index references; this is done automatically by ASymbol and its descendants when ASymbol.writeSelfTo is called.

Overview

Fields

scope: TSymbolScope;
index: integer;

Description

Fields

scope: TSymbolScope;

Refers to the scope of the symbol (the symbol table to which it belongs).

index: integer;

Refers to the index of the symbol (its position within the symbol table).


Generated by PasDoc 0.13.0 on 2015-06-25 11:12:03