Skip to content

Feature execute code#12

Open
sir-onze wants to merge 2 commits intoStrumenta:masterfrom
sir-onze:feature-execute-code
Open

Feature execute code#12
sir-onze wants to merge 2 commits intoStrumenta:masterfrom
sir-onze:feature-execute-code

Conversation

@sir-onze
Copy link
Copy Markdown

@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