This repository has been archived by the owner on Jun 20, 2021. It is now read-only.
Fixes List Bug and Change the way list is printed in console #46
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
New Feature for..in
The new kind of for loop allows to iterate over the items in a list rather than the index e.g
Output :
it allows iterating over a list faster than using the index
list[index]
in a for loopList printing
prior to this PR the list are printed into the console in an unordered manner which make it difficult to visually review the list. The following list is printed in below manner before and after this PR
Before :
Now
Fixes issue #(issue-link )
Type Of Change
Briefly Explain Why This PR Should Be Merged.
How Has This Been Tested ?
This has been thouroughly tested with different kind of list, which include simple and stress test. The list demo example file has been updated to test the new features and fixes. Below is the screen shot of the output in terminal.
Checklist:
Note
While building the compiler will generated a lot of error from the vmdll.c file as it contains some fresh and yet unmanaged code which will be moved out soon. the warning does not in any way affect the simple-lang