implement string type (rant) #143
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces comprehensive support for string variables in the
ast.cfile. It adds the ability to assign, evaluate, and use string variables in expressions, function calls, and I/O operations, while refactoring type checking and assignment logic to be more generic and extensible. The changes also streamline the handling of type promotion and assignment for all supported variable types.String variable support and type system improvements:
set_string_variable), expression evaluation (evaluate_expression_string), and function call return values. [1] [2] [3] [4]is_expressionmethod, replacing multiple type-specific checks and updating all usage sites for assignments, I/O, and evaluation. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]handle_identifier, ensuring correct value retrieval and conversion for all supported types. [1] [2] [3]execute_yapping_call,execute_yappin_call,execute_slorp_call) to correctly process string variables and avoid invalid type errors. [1] [2] [3]These changes collectively make the interpreter more robust and extensible, especially for string handling and type-specific operations.
Related Issue
Type of Change
Checklist