Support negative bit indexes.

Allow arbitrary characters in symbols (to make '-' work.)
Final merge from negative_lsb branch.
This commit is contained in:
Wilson Snyder
2008-10-06 09:59:22 -04:00
parent cdd6ea8e60
commit 3b1929259a
18 changed files with 230 additions and 114 deletions
+8
View File
@@ -111,6 +111,14 @@ string AstNode::encodeName(const string& namein) {
return out;
}
string AstNode::encodeNumber(vlsint64_t num) {
if (num < 0) {
return "__2D"+cvtToStr(-num); // 2D=-
} else {
return cvtToStr(num);
}
}
string AstNode::shortName() const {
string pretty = name();
string::size_type pos;