-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add type checking module #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall changes look fine.
|
||
export const check = (node: Node): Result => { | ||
switch (node.kind) { | ||
case "BinaryExpression": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps can consider creating a function for each case in the future so that the code will not be too nested and the whole switch statement will become more concise and easier to review.
The current implementation supports type checking for
AssignmentStatements
ofint
andString
type only.