-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix typing for Binary, Unary, and Logical Expressions #24
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No functionality.
Changes: - Changed `Playground` component to a statefull one (extends `React.Component) - add property `playgroundCode` to IApplicationState (bad practice, change to a slice of the state instead) - add interface `IPlaygroundProps` to denote the properties passed to Playground
Once again, this is a WIP. Text typed into the playground editor will stay in the playground (or rather, appear again) after leaving and coming back. Changes: - added of action, actionCreator (updatePlaygroundCode) - added a reducer under application's `reducer` function Possible problems: - Location of reducer - Location of playgroundCode stored (as in previous commit)
Made a compromise by including an IPlaygroundState as part of IApplicationProps
This is a copy over of the current state of `./frontend/src/toolchain` at source-academy/source-academy2 67d9184. It includes only source chapter 1, a new specification (see [PR 6 at the source-academy/source-academy2](source-academy/source-academy2#6) repository).
The react types were added as a result of the `yarn add` command.
Next, change display so that if playground.output array is empty, initialise.
This is because the Output SFC tries to access an undefined output.consoleLogs. output.consoleLogs is undefined after an Eval button click, because EVAL_INTERPRETER_(SUCCESS|ERRORS) will try to access the last element of playground.outputs, but the last element after playground.outputs is always a CodeOutput for Eval button presses; and CodeOutput doesn't have a consoleLogs property, so EVAL_INTERPRETER_(SUCCESS|ERRORS) copies over undefined as the new ResultOutput or ErrorOutput's consoleLog property.
RTTC errors (type errors found at runtime) will now interrupt execution of the program and return an error immediately. Checks for unary expression arguments have been implemented.
Function type checks not yet implemented
ning-y
added
Bug
Something isn't working
slang
blocked
Something else needs pass review first
labels
May 22, 2018
evansb
approved these changes
May 26, 2018
=== and !== no longer raises errors.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This branch is blocking for #29, which uses the convenience function
isBool
and test filesrc/slang/utils/__tests__/rttc.ts
added here.Features
For example,
Issues fixed
Issues raised