polemy.value
Authors: 
k.inaba
  
License: 
NYSL 0.9982 http://www.kmonos.net/nysl/
  
 Runtime data structures for Polemy programming language.
  
- abstract class 
Value
;
 
- Runtime values of Polemy
  
 
- class 
IntValue
: polemy.value.Value;
 
  
 
- class 
StrValue
: polemy.value.Value;
 
  
 
- class 
UndefinedValue
: polemy.value.Value;
 
  
 
- abstract class 
FunValue
: polemy.value.Value;
 
  
 
- class 
Table
: polemy.value.Value;
 
- Context (variable environment)
 Simlar to prototype chain of ECMAScript etc.
 But extended with the notion of "Layer"
  
- void 
set
(string i, Layer lay, Value v);
 
- Set the value v to the index i of layer lay
  
 
- const bool 
has
(string i, Layer lay);
 
- True if index i 
has
 value in layer lay
  
 
- Value 
get
(string i, Layer lay, LexPosition pos = null);
 
- Return the value of index i at layer lay. Throws if it is not set
  
 
- T 
access
(T, S...)(Layer lay, string path, S rest);
 
- t.
access
!T(lay,a,b,...) returns t.get(a,lay).get(b,lay).... if exists
 and has type T. Returns null otherwise
  
 
- bool 
empty
();
 
- Is this an 
empty
 table?
  
 
- bool 
isList
();
 
- Can be seen as a cons-list?
  
 
- Value[] 
toList
();
 
- Regard table as a cons-list and convert to an array
  
 
- Tuple!(string,string,Value)[] 
direct_entries
();
 
- Get the list of direct entries ignoring prototypes in sorted order
  
 
- Tuple!(string,string,Value)[] 
entries
();
 
- Get the whole list of observable 
entries
 in unspecified order
  
 
 
 
 
 |