Description
The compiler currently reads the input source file into a fixed-size buffer:
If the source file exceeds 1023 bytes, the input is silently truncated. No error or warning is reported to the user.
This can lead to incomplete tokenization, invalid parsing results, and unpredictable compiler behavior.
Current Behavior
- Source file size is limited to 1023 bytes
- Larger files are silently truncated
- Remaining input is ignored
- No error message is produced
Expected Behavior
- Compiler should support arbitrarily sized source files
- Input buffer should grow dynamically as needed
- Alternatively, an explicit error should be reported for oversized input
Suggested Direction
- Read the file dynamically using
fseek / ftell
- Or read incrementally using a growing buffer
- Avoid fixed-size limits in source loading
Description
The compiler currently reads the input source file into a fixed-size buffer:
If the source file exceeds 1023 bytes, the input is silently truncated. No error or warning is reported to the user.
This can lead to incomplete tokenization, invalid parsing results, and unpredictable compiler behavior.
Current Behavior
Expected Behavior
Suggested Direction
fseek/ftell