Dealing with literals

Made it to recognize constants and replace the literals with the
constants. Changed the range check to check the nodeType instead of the
tokenType