Skip to content

Compiler executable 1#9

Merged
SkymanOne merged 10 commits intomainfrom
bin
Mar 25, 2024
Merged

Compiler executable 1#9
SkymanOne merged 10 commits intomainfrom
bin

Conversation

@SkymanOne
Copy link
Owner

@SkymanOne SkymanOne commented Mar 25, 2024

Summary

Introduces a basic executable that can be used to init a new project and check for parser, semantic and type errors.

  • folidity new <project_name> - initialise a new counter project in the destination directory.
  • folidty check <file_name> - check the source code for parser, semantic and type errors.

We use ariadne and yansi for pretty display of errors.

There are also minor fixes to semantic analyser to correctly detect scopes:

  • DeclarationBounds - contains variables that have been defined in declarations directly (e.g. fields, params, state bounds, attribute members
  • FunctionBody - Body of the function
  • ... - same as above.

If the original scope is DeclarationBounds then we can only access the variables in this scope context.
Otherwise, we can access variables that can only be defined in the function body + from state bound since this is the parameter injected into the function.

This PR also adds changelog.

@SkymanOne SkymanOne changed the title Executable 1 Compiler executable 1 Mar 25, 2024
@SkymanOne SkymanOne merged commit 3bd02fa into main Mar 25, 2024
@SkymanOne SkymanOne deleted the bin branch March 25, 2024 13:33
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