immutable class IDENT < $HASH |
---|
**** | Representation of identifiers in the Sather compiler. A immutable class with one attribute: a pointer to a string containing the identifier. The string objects are uniquely associated with the string, so SI_IDENT equality can be used to test for string equality. Note that IDENTs use a shared (global) table, so they aren't reentrant. |
$HASH | $IS_EQ |
attr str:STR; |
---|
**** | The string represented by self. |
shared tmp_count:INT; |
---|
shared tmp_count:INT; |
---|
create(s:STR):IDENT |
---|
**** | The identifier corresonding to the string `s'. |
hash:INT |
---|
**** | MBK, SYS::id(str) by itself not that good a hash. |
is_eq(i:SAME):BOOL |
---|
**** | Test whether self is the same identifier as `i'. |
is_iter:BOOL |
---|
**** | True if self is the name of an iter (ends with a "!"). |
is_neq(i:SAME):BOOL |
---|
**** | Test whether self is the same identifier as `i'. |
next_tmp(oldident:STR):STR |
---|
str(i:INT): STR |
---|
**** | Returns a name with a list of empty parameters. |
str_in(s:FSTR):FSTR |
---|
**** | Append the string represented by self to `s'. |
shared ident_tbl:IDENT_TBL; |
---|
shared ident_tbl:IDENT_TBL; |
---|
attr str:STR; |
---|
**** | The string represented by self. |