The token constructors each contain calls to the table static instance function so that the set token or set token code function can be called. These two table functions set the code, type and data type of the token. Now that tokens always contain a code (and later a table entry pointer), the type and data type members will be the same as the table entry (with one exception for data type). So it is not necessary for the token to contain these members.
The type member was removed from the token class (the data type member will have to wait until that one exception is eliminated). The type and is type access functions were modified to read from the table using a new table access function (which for now uses the code to get the table entry pointer). The set type access function was removed as it was only used when the token was created. A type access function was added to the table entry class.
These changes required some refactoring of header files. The token header file include statement in the table file needed to be removed since the token header file needs to access the table entry. The table header file include statement was removed from the token header file. This required the Type enumeration to be moved from the token class to the table header file. This enumeration was not renamed since it will soon be replaced with the new code type enumeration.
[branch table commit 68593c2dde]
Sunday, January 4, 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)