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

Create calculate(string) function #48

Merged
merged 10 commits into from
Nov 30, 2023

Conversation

Victorcorcos
Copy link
Contributor

Description ✍️

The the calculate(string) function responsible to evaluate an equation and return it's result

$ ./example
parsec> calculate("1+1")
Result (type: 's'):
ans = "2"
parsec> exit

$ ./example
parsec> number(calculate("1+1"))
Result (type: 'i'):
ans = 2

$ ./example
parsec> calculate("number(calculate(\"1 + 1\")) + 1")
Result (type: 's'):
ans = "3"

@Victorcorcos Victorcorcos added the enhancement New feature or request label Nov 28, 2023
@Victorcorcos Victorcorcos self-assigned this Nov 28, 2023
Consider multiple correct expects in tests.sh
@Victorcorcos Victorcorcos force-pushed the add_calculate_function branch from 139e7c6 to f783c57 Compare November 28, 2023 18:28
Copy link
Member

@EduardoRSeifert EduardoRSeifert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems correct!

@Victorcorcos
Copy link
Contributor Author

@EduardoRSeifert Can you approve it again?

The merging is still blocked and looks like it is still blocked because I didn't request your review. Now I requested!

Screen Shot 2023-11-29 at 00 01 37

Copy link
Member

@EduardoRSeifert EduardoRSeifert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✔️

@Victorcorcos Victorcorcos merged commit 39d949b into oxeanbits:master Nov 30, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants