Skip to content

Commit

Permalink
Making an exclusive module for the constant lookup rule and importing…
Browse files Browse the repository at this point in the history
… it for both preprocessing and execution
  • Loading branch information
ACassimiro committed Sep 4, 2024
1 parent 569fb69 commit 2b2771a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
2 changes: 2 additions & 0 deletions rust-semantics/expression.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
```k
requires "expression/constants.md"
requires "expression/casts.md"
requires "expression/literals.md"
requires "expression/variables.md"
Expand All @@ -7,5 +8,6 @@ module RUST-EXPRESSION
imports private RUST-CASTS
imports private RUST-EXPRESSION-LITERALS
imports private RUST-EXPRESSION-VARIABLES
imports private RUST-EXPRESSION-CONSTANTS
endmodule
```
14 changes: 14 additions & 0 deletions rust-semantics/expression/constants.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```k
module RUST-EXPRESSION-CONSTANTS
imports private COMMON-K-CELL
imports private RUST-SHARED-SYNTAX
imports private RUST-REPRESENTATION
imports private RUST-PREPROCESSING-CONFIGURATION
rule <k> Name:Identifier::.PathExprSegments => V ... </k>
<constant-name> Name </constant-name>
<constant-value> V:Value </constant-value>
endmodule
```
5 changes: 0 additions & 5 deletions rust-semantics/preprocessing/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,5 @@ module RUST-CONSTANTS
</constant>
...
</constants>
rule <k> Name:Identifier::.PathExprSegments => V ... </k>
<constant-name> Name </constant-name>
<constant-value> V:Value </constant-value>
endmodule
```
2 changes: 2 additions & 0 deletions rust-semantics/targets/preprocessing/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ requires "configuration.md"
requires "../../preprocessing.md"
requires "../../representation.md"
requires "../../expression/casts.md"
requires "../../expression/constants.md"
requires "../../expression/literals.md"
requires "../../rust-common-syntax.md"
Expand All @@ -13,6 +14,7 @@ endmodule
module RUST
imports private RUST-EXPRESSION-LITERALS
imports private RUST-EXPRESSION-CONSTANTS
imports private RUST-PREPROCESSING
imports private RUST-RUNNING-CONFIGURATION
endmodule
Expand Down

0 comments on commit 2b2771a

Please sign in to comment.