amritrout / ArcaneScript

ArcaneScript is a custom programming language developed to explore language design and interpretation. This project includes the development of both the ArcaneScript language and its online Runner.
https://arcanescript.netlify.app/
6 stars 3 forks source link

Syntax Error When Calling Functions with Variable Assignments in ArcaneScript #4

Open thecloudcode opened 1 month ago

thecloudcode commented 1 month ago

Description:

When attempting to call a function that contains a variable assignment, ArcaneScript throws a syntax error. The function declaration is valid, but calling the function results in an error when it executes the variable assignment inside the function.

Steps to Reproduce:

  1. Declare a function using the following syntax:
    invoke ArcaneFunctionIssue() {
       thecloudcode = 7;
    }
  2. Call the function:
    ArcaneFunctionIssue();
  3. Observe that a syntax error occurs when trying to call the function.

Expected Behavior:

The function should execute, and the variable thecloudcode should be assigned the value 7. The output should indicate:

   Execution complete!

Actual Behavior:

A syntax error is shown when attempting to call the function.

Suggested Solution:

Priority: High

Since variable assignments are fundamental operations within functions, this issue must be resolved to allow proper function execution in ArcaneScript.

Let me know if you'd like to explore additional debugging strategies or test cases for this issue!

thecloudcode commented 1 month ago

Hi @amritrout , I have fixed the array iteration issue #1 , would love to fix this one as well. Kindly assign it to me under Hacktoberfest.