Added variable symbols using .set

git-svn-id: svn://svn.cc65.org/cc65/trunk@3510 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2005-05-11 08:31:42 +00:00
parent f06dc5dfa3
commit 945bbe2b50
8 changed files with 182 additions and 60 deletions

View File

@@ -305,8 +305,15 @@ static ExprNode* Symbol (SymEntry* S)
} else {
/* Mark the symbol as referenced */
SymRef (S);
/* Create symbol node */
return GenSymExpr (S);
/* If the symbol is a variable, return just its value, otherwise
* return a reference to the symbol.
*/
if (SymIsVar (S)) {
return CloneExpr (GetSymExpr (S));
} else {
/* Create symbol node */
return GenSymExpr (S);
}
}
}