Skip to content

Conversation

@deepanshu1422
Copy link

This adds support for character literals using single quotes. Example: 'A' instead of 65

Implementation:

  • Detects single quote (') in tokenizer
  • Reads the character and returns its ASCII value
  • Treats character literals as numeric tokens
  • Updates linter to recognize and validate character literals
  • Updates grammar documentation
  • Adds test example demonstrating character literals

Impact: Still fits within 512-byte boot sector
The feature adds approximately 18 bytes of code, which fits comfortably in the available space.

This adds support for character literals using single quotes.
Example: 'A' instead of 65

Implementation:
- Detects single quote (') in tokenizer
- Reads the character and returns its ASCII value
- Treats character literals as numeric tokens
- Updates linter to recognize and validate character literals
- Updates grammar documentation
- Adds test example demonstrating character literals

Impact: Still fits within 512-byte boot sector
The feature adds approximately 18 bytes of code, which fits
comfortably in the available space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant