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:
+1
-1
@@ -1 +1 @@
|
||||
2
|
||||
21212
|
||||
|
||||
Reference in New Issue
Block a user