fix: parse number literal using strtol and handle invalid input in compiler

Replace the hardcoded constant value 234 with actual parsing of the token's numeric string via strtol, adding error handling for invalid number literals and a TODO for truncation when casting long to int. Also add a newline after printing the interpreted value in main.c.
This commit is contained in:
Bob Nystrom
2013-10-22 20:37:53 +00:00
parent 911b7183a0
commit 6670e2f94c
3 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
2
21212