-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor and finish implementing trait preprocessing (#4)
* Rename indexing -> preprocessing * Refactor trait initialization * Refactor addMethod * Function arguments test * Return type test --------- Co-authored-by: Virgil Serbanuta <Virgil Serbanuta>
- Loading branch information
1 parent
a6b7eb7
commit 63da576
Showing
20 changed files
with
322 additions
and
267 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.build | ||
.DS_store | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
```k | ||
requires "preprocessing/crate.md" | ||
requires "preprocessing/configuration.md" | ||
requires "preprocessing/helpers.md" | ||
requires "preprocessing/initialization.md" | ||
requires "preprocessing/syntax.md" | ||
requires "preprocessing/trait.md" | ||
requires "preprocessing/trait-methods.md" | ||
module RUST-PREPROCESSING | ||
imports private CRATE | ||
imports private INITIALIZATION | ||
imports private TRAIT | ||
imports private TRAIT-METHODS | ||
endmodule | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
```k | ||
module RUST-PREPROCESSING-CONFIGURATION | ||
imports private RUST-REPRESENTATION | ||
imports private RUST-SHARED-SYNTAX | ||
syntax Identifier ::= "my_identifier" [token] | ||
configuration | ||
<preprocessed> | ||
<constants> | ||
<constant multiplicity="*" type="Map"> | ||
<constant-name> my_identifier </constant-name> | ||
<constant-value> tuple(.ValueList) </constant-value> | ||
</constant> | ||
</constants> | ||
<traits> | ||
<trait multiplicity="*" type="Map"> | ||
<trait-path> my_identifier:TypePath </trait-path> | ||
<methods> | ||
<method multiplicity="*" type="Map"> | ||
<method-name> my_identifier </method-name> | ||
<method-params> .NormalizedFunctionParameterList </method-params> | ||
<method-return-type> ():Type </method-return-type> | ||
<method-implementation> empty:FunctionBodyRepresentation </method-implementation> | ||
</method> | ||
</methods> | ||
</trait> | ||
</traits> | ||
</preprocessed> | ||
endmodule | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.