Skip to content

Commit

Permalink
Rename syntactic_closure::expression to form
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Aug 5, 2024
1 parent c6badae commit 1909ca9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Procedures for each standard are provided by the following R7RS-style libraries:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
make package
sudo apt install build/meevax_0.5.216_amd64.deb
sudo apt install build/meevax_0.5.217_amd64.deb
```

or
Expand Down Expand Up @@ -122,9 +122,9 @@ sudo rm -rf /usr/local/share/meevax

| Target Name | Description
|-------------|-------------
| `all` | Build shared-library `libmeevax.0.5.216.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.5.217.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.5.216_amd64.deb`
| `package` | Generate debian package `meevax_0.5.217_amd64.deb`
| `install` | Copy files into `/usr/local` directly

## Usage
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.216
0.5.217
22 changes: 11 additions & 11 deletions include/meevax/kernel/syntactic_environment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ inline namespace kernel
{
struct syntactic_closure : public identifier
{
let inner_environment, free_names, expression;
let inner_environment, free_names, form;

explicit syntactic_closure(let const& inner_environment,
let const& free_names,
let const& expression)
let const& form)
: inner_environment { inner_environment }
, free_names { free_names }
, expression { expression }
, form { form }
{
assert(inner_environment.is<syntactic_environment>());
}
Expand All @@ -56,7 +56,7 @@ inline namespace kernel

return inner_environment.as<syntactic_environment>()
.generate(inner_environment.as<syntactic_environment>()
.expand(inject(outer_environment, free_names, expression),
.expand(inject(outer_environment, free_names, form),
bound_variables,
free_variables),
bound_variables,
Expand Down Expand Up @@ -94,21 +94,21 @@ inline namespace kernel
as else in a cond clause. A macro definition for syntax-rules would
use free-identifier=? to look for literals in the input.
*/
return x.expression.template is_also<identifier>() and
y.expression.template is_also<identifier>() and
return x.form.template is_also<identifier>() and
y.form.template is_also<identifier>() and
eqv(x.inner_environment.template as<syntactic_environment>()
.identify(x.expression,
.identify(x.form,
car(x.inner_environment),
nullptr),
y.inner_environment.template as<syntactic_environment>()
.identify(y.expression,
.identify(y.form,
car(y.inner_environment),
nullptr));
}

friend auto operator <<(std::ostream & os, syntactic_closure const& datum) -> std::ostream &
{
return os << underline(datum.expression);
return os << underline(datum.form);
}
};

Expand Down Expand Up @@ -502,7 +502,7 @@ inline namespace kernel

static GENERATOR(quote)
{
return CONS(make(instruction::load_constant), car(expression).is<syntactic_closure>() ? car(expression).as<syntactic_closure>().expression
return CONS(make(instruction::load_constant), car(expression).is<syntactic_closure>() ? car(expression).as<syntactic_closure>().form
: car(expression),
continuation);
}
Expand Down Expand Up @@ -999,7 +999,7 @@ inline namespace kernel
return variable.as<syntactic_closure>()
.inner_environment
.template as<syntactic_environment>()
.identify(variable.as<syntactic_closure>().expression,
.identify(variable.as<syntactic_closure>().form,
unify(car(variable.as<syntactic_closure>().inner_environment),
bound_variables),
nullptr);
Expand Down

0 comments on commit 1909ca9

Please sign in to comment.