The 'def' construct currently creates an actual new symbol, that is a clone of the right hand expression result. This works only for a few special cases, as seen in a2c_Def(); TK_VALUE, TK_REGISTER, TK_WAVE, TK_PROGRAM, and TK_STRING.
For example, TK_NAMESPACE will not work, nor is it a simple matter of adding it, because you can't clone a namespace symbol, as it contains the list head for the symbols within the namespace.
Maybe it's better to add an explicit alias symbol type, which the lexer automatically evaluates, returning the target symbol instead?
The 'def' construct currently creates an actual new symbol, that is a clone of the right hand expression result. This works only for a few special cases, as seen in a2c_Def(); TK_VALUE, TK_REGISTER, TK_WAVE, TK_PROGRAM, and TK_STRING.
For example, TK_NAMESPACE will not work, nor is it a simple matter of adding it, because you can't clone a namespace symbol, as it contains the list head for the symbols within the namespace.
Maybe it's better to add an explicit alias symbol type, which the lexer automatically evaluates, returning the target symbol instead?