1
1
mirror of https://github.com/anoma/juvix.git synced 2024-08-16 11:40:36 +03:00
juvix/tests
Paul Cadman 52a3eed162
Support extract-module-statements attribute in juvix code blocks (#2734)
This PR adds support for the `extract-module-statements` attribute for
Juvix code blocks:

So if you write something like the following block in a Juvix markdown
file:

````
```juvix extract-module-statements
module Foo;
   type T := t;
end;
```
````

The statement `type T := t;` from the body of the module is rendered in
the output. The `module Foo;` , and `end;` lines are not rendered in the
output.

A block with the `extract-module-statements` must contain a single local
module statement and nothing else. An error is reported if this is not
the case.

The `extract-module-statements` attribute also takes an optional
argument. It sets the number of statements from the module body to drop
from the output.

In the following example, the output will contain the single line `a : T
:= t;`.

````
```juvix extract-module-statements 1
module Foo;
   type T := t;
   a : T  := t;
end;
```
````

---------

Co-authored-by: Jan Mas Rovira <janmasrovira@gmail.com>
2024-04-18 17:01:59 +01:00
..
Anoma/Compilation Support compilation of Anoma transactions in nockma backend (#2693) 2024-03-22 23:03:38 +01:00
Asm JuvixReg to CASM translation (#2671) 2024-03-20 12:14:12 +01:00
benchmark Fix benchmarks test compilation (#2552) 2023-12-10 12:13:56 +01:00
Casm Cairo Poseidon hash builtin support (#2723) 2024-04-18 14:11:57 +02:00
Compilation Cairo field compatibility (#2712) 2024-04-09 10:15:47 +02:00
Core Cairo field compatibility (#2712) 2024-04-09 10:15:47 +02:00
examplesExpected Add a test suite for milestone examples (#1920) 2023-03-24 13:16:26 +00:00
Geb/positive Read Package on demand and cache it (#2548) 2023-12-06 18:24:59 +01:00
Internal Per-module compilation (#2468) 2023-12-30 20:15:35 +01:00
negative Support extract-module-statements attribute in juvix code blocks (#2734) 2024-04-18 17:01:59 +01:00
nockma/positive Fix bugs in the Nockma prettyprinter and parser (#2632) 2024-02-09 14:59:42 +01:00
positive Support extract-module-statements attribute in juvix code blocks (#2734) 2024-04-18 17:01:59 +01:00
Reg/positive Fix memory access order in the JuvixReg to CASM translation. (#2697) 2024-03-27 10:40:24 +01:00
runtime/positive Merge stack and temporary variable groups in JuvixReg (#2579) 2024-01-17 19:11:40 +01:00
smoke/Commands refactor --target into subcommands for dev tree compile and other improvements (#2713) 2024-04-16 17:32:44 +02:00
Tree Fix memory access order in the JuvixReg to CASM translation. (#2697) 2024-03-27 10:40:24 +01:00
VampIR Add PackageDescription.Basic module Package variant (#2509) 2023-11-13 17:36:18 +00:00
WithoutPackageFile Fix #2510 (#2512) 2023-11-17 16:10:38 +01:00
.gitattributes Juvix C runtime (#1580) 2022-11-03 09:38:09 +01:00