Skip to content

Feature execute code #12

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sir-onze
Copy link

@sir-onze sir-onze commented Jun 11, 2023

In sequence of the article's future work and Issue #1 this PR implements the ability to run code written in the web expressions editor. The development was done using antlr4 visitors, an initial traverse is done to collect the input variables and a second to calculate the expressions values.

It is now possible:

  • Assign values for each variable written in the input section via a modal (only numeric values);
  • Execute and calculate the expressions based on the inputs and operations;
  • Visualize the results in a section below the editor;
  • Visualize errors regarding operations (division by zero);
  • Visualize errors related to the use of not defined variables;

Added tests to cover the new visitors implementation.

imagem imagem

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.

1 participant