NuSymbol
The Nu symbol class.
Superclass: NSObject
Declared in: objc/symbol.h
Instances of NuSymbol are used to uniquely represent strings in parsed Nu expressions.
NuSymbol objects are used as keys in local evaluation contexts (typically of type NSMutableDictionary)
and each NuSymbol may also have a global value bound to it.
Symbols ending in a colon (':') are considered "labels" which evaluate to themselves without error,
and when a label is found at the head of the list,
the list is considered to be a special type of list called a property list.
Each member of a property list is evaluated and the resulting list is returned with no further evaluation.
Methods
| - |
(NSComparisonResult) |
compare: |
(NuSymbol *) anotherSymbol |
Compare a symbol with another symbol by name. This allows arrays of symbols to be easily sorted.
in objc/symbol.h
| - |
(NSString *) |
description |
Get a description of a symbol. This is equivalent to a call to stringValue.
in objc/symbol.h
| - |
(id) |
evalWithContext: |
(NSMutableDictionary *) context |
Evaluate a symbol in a specified context.
in objc/symbol.h
Returns true if a symbol is to be replaced by a generated symbol (which only occurs during macro evaluation).
in objc/symbol.h
If a symbol is a label, get a string representing its name. This string omits the final colon (':').
in objc/symbol.h
| - |
(void) |
setValue: |
(id) v |
Set the global value of a symbol.
in objc/symbol.h
| - |
(NSString *) |
stringValue |
Get an object of type NSString representing the symbol.
in objc/symbol.h