Mercurial > hg > octave-nkf
comparison src/symtab.h @ 4208:e96f52432059
[project @ 2002-12-03 19:48:57 by jwe]
author | jwe |
---|---|
date | Tue, 03 Dec 2002 19:48:57 +0000 |
parents | fa3482b34599 |
children | b9317f3973ec |
comparison
equal
deleted
inserted
replaced
4207:fa3482b34599 | 4208:e96f52432059 |
---|---|
60 UNKNOWN = 0, | 60 UNKNOWN = 0, |
61 USER_FUNCTION = 1, | 61 USER_FUNCTION = 1, |
62 USER_VARIABLE = 2, | 62 USER_VARIABLE = 2, |
63 DLD_FUNCTION = 4, | 63 DLD_FUNCTION = 4, |
64 BUILTIN_FUNCTION = 8, | 64 BUILTIN_FUNCTION = 8, |
65 TEXT_FUNCTION = 16, | 65 COMMAND = 16, |
66 MAPPER_FUNCTION = 32, | 66 MAPPER_FUNCTION = 32, |
67 BUILTIN_VARIABLE = 64, | 67 BUILTIN_VARIABLE = 64, |
68 BUILTIN_CONSTANT = 128 | 68 BUILTIN_CONSTANT = 128 |
69 }; | 69 }; |
70 | 70 |
90 { | 90 { |
91 return (symbol_type & symbol_record::USER_VARIABLE | 91 return (symbol_type & symbol_record::USER_VARIABLE |
92 || symbol_type & symbol_record::BUILTIN_VARIABLE); | 92 || symbol_type & symbol_record::BUILTIN_VARIABLE); |
93 } | 93 } |
94 | 94 |
95 // It's not necessary to check for TEXT_FUNCTION and MAPPER_FUNCTION | 95 // It's not necessary to check for COMMAND and MAPPER_FUNCTION |
96 // here. Those tags are just used as additional qualifiers for | 96 // here. Those tags are just used as additional qualifiers for |
97 // the other types of functions. | 97 // the other types of functions. |
98 | 98 |
99 bool is_function (void) const | 99 bool is_function (void) const |
100 { | 100 { |
104 } | 104 } |
105 | 105 |
106 bool is_user_variable (void) const | 106 bool is_user_variable (void) const |
107 { return (symbol_type & symbol_record::USER_VARIABLE); } | 107 { return (symbol_type & symbol_record::USER_VARIABLE); } |
108 | 108 |
109 void mark_as_text_function (void) | 109 void mark_as_command (void) |
110 { symbol_type |= symbol_record::TEXT_FUNCTION; } | 110 { symbol_type |= symbol_record::COMMAND; } |
111 | 111 |
112 void unmark_text_function (void) | 112 void unmark_command (void) |
113 { symbol_type &= ~symbol_record::TEXT_FUNCTION; } | 113 { symbol_type &= ~symbol_record::COMMAND; } |
114 | 114 |
115 bool is_text_function (void) const | 115 bool is_command (void) const |
116 { return (symbol_type & symbol_record::TEXT_FUNCTION); } | 116 { return (symbol_type & symbol_record::COMMAND); } |
117 | 117 |
118 bool is_mapper_function (void) const | 118 bool is_mapper_function (void) const |
119 { return (symbol_type & symbol_record::MAPPER_FUNCTION); } | 119 { return (symbol_type & symbol_record::MAPPER_FUNCTION); } |
120 | 120 |
121 bool is_user_function (void) const | 121 bool is_user_function (void) const |
241 void rename (const std::string& new_name); | 241 void rename (const std::string& new_name); |
242 | 242 |
243 bool is_function (void) const | 243 bool is_function (void) const |
244 { return definition->is_function (); } | 244 { return definition->is_function (); } |
245 | 245 |
246 void mark_as_text_function (void) | 246 void mark_as_command (void) |
247 { definition->mark_as_text_function (); } | 247 { definition->mark_as_command (); } |
248 | 248 |
249 void unmark_text_function (void) | 249 void unmark_command (void) |
250 { definition->unmark_text_function (); } | 250 { definition->unmark_command (); } |
251 | 251 |
252 bool is_text_function (void) const | 252 bool is_command (void) const |
253 { return definition->is_text_function (); } | 253 { return definition->is_command (); } |
254 | 254 |
255 bool is_mapper_function (void) const | 255 bool is_mapper_function (void) const |
256 { return definition->is_mapper_function (); } | 256 { return definition->is_mapper_function (); } |
257 | 257 |
258 bool is_user_function (void) const | 258 bool is_user_function (void) const |
388 | 388 |
389 #define SYMTAB_ALL_TYPES (symbol_record::USER_FUNCTION \ | 389 #define SYMTAB_ALL_TYPES (symbol_record::USER_FUNCTION \ |
390 | symbol_record::USER_VARIABLE \ | 390 | symbol_record::USER_VARIABLE \ |
391 | symbol_record::DLD_FUNCTION \ | 391 | symbol_record::DLD_FUNCTION \ |
392 | symbol_record::BUILTIN_FUNCTION \ | 392 | symbol_record::BUILTIN_FUNCTION \ |
393 | symbol_record::TEXT_FUNCTION \ | 393 | symbol_record::COMMAND \ |
394 | symbol_record::MAPPER_FUNCTION \ | 394 | symbol_record::MAPPER_FUNCTION \ |
395 | symbol_record::BUILTIN_VARIABLE \ | 395 | symbol_record::BUILTIN_VARIABLE \ |
396 | symbol_record::BUILTIN_CONSTANT) | 396 | symbol_record::BUILTIN_CONSTANT) |
397 | 397 |
398 #define SYMTAB_VARIABLES (symbol_record::USER_VARIABLE \ | 398 #define SYMTAB_VARIABLES (symbol_record::USER_VARIABLE \ |