Skip to content
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

Merged
merged 12 commits into from
Oct 17, 2023
Merged

Add type checking module #10

merged 12 commits into from
Oct 17, 2023

Conversation

bryanlohxz
Copy link
Contributor

The current implementation supports type checking for AssignmentStatements of int and String type only.

Copy link
Contributor

@1001mei 1001mei left a 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": {
Copy link
Contributor

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.

@bryanlohxz bryanlohxz merged commit b1c647a into main Oct 17, 2023
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.

2 participants