Rename library to nomo
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
d691fb9198
commit
d2e0405033
28 changed files with 92 additions and 92 deletions
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: parsed
|
||||
input_file: tests/cases/identifiers.temple
|
||||
input_file: tests/cases/identifiers.nomo
|
||||
---
|
||||
ParsedTemplate {
|
||||
tokens: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: parsed
|
||||
input_file: tests/cases/interpolation.temple
|
||||
input_file: tests/cases/interpolation.nomo
|
||||
---
|
||||
ParsedTemplate {
|
||||
tokens: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: parsed
|
||||
input_file: tests/cases/multiple.temple
|
||||
input_file: tests/cases/multiple.nomo
|
||||
---
|
||||
ParsedTemplate {
|
||||
tokens: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: parsed
|
||||
input_file: tests/cases/simple.temple
|
||||
input_file: tests/cases/simple.nomo
|
||||
---
|
||||
ParsedTemplate {
|
||||
tokens: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: ast
|
||||
input_file: tests/cases/identifiers.temple
|
||||
input_file: tests/cases/identifiers.nomo
|
||||
---
|
||||
TemplateAst {
|
||||
root: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: ast
|
||||
input_file: tests/cases/interpolation.temple
|
||||
input_file: tests/cases/interpolation.nomo
|
||||
---
|
||||
TemplateAst {
|
||||
root: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: ast
|
||||
input_file: tests/cases/multiple.temple
|
||||
input_file: tests/cases/multiple.nomo
|
||||
---
|
||||
TemplateAst {
|
||||
root: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: ast
|
||||
input_file: tests/cases/simple.temple
|
||||
input_file: tests/cases/simple.nomo
|
||||
---
|
||||
TemplateAst {
|
||||
root: [
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: emit
|
||||
input_file: tests/cases/identifiers.temple
|
||||
input_file: tests/cases/identifiers.nomo
|
||||
---
|
||||
[
|
||||
LoadFromContextToSlot {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: emit
|
||||
input_file: tests/cases/interpolation.temple
|
||||
input_file: tests/cases/interpolation.nomo
|
||||
---
|
||||
[
|
||||
AppendContent {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: emit
|
||||
input_file: tests/cases/multiple.temple
|
||||
input_file: tests/cases/multiple.nomo
|
||||
---
|
||||
[
|
||||
AppendContent {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: emit
|
||||
input_file: tests/cases/simple.temple
|
||||
input_file: tests/cases/simple.nomo
|
||||
---
|
||||
[
|
||||
AppendContent {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: output
|
||||
input_file: tests/cases/identifiers.temple
|
||||
input_file: tests/cases/identifiers.nomo
|
||||
---
|
||||
"Foo\nFoo\nFoo\nFoo\nFoo\nFoo"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: output
|
||||
input_file: tests/cases/interpolation.temple
|
||||
input_file: tests/cases/interpolation.nomo
|
||||
---
|
||||
"Hello! I'm Hemera"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: output
|
||||
input_file: tests/cases/multiple.temple
|
||||
input_file: tests/cases/multiple.nomo
|
||||
---
|
||||
"Hi there! My name is Hemera Green"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
source: tests/file_tests.rs
|
||||
expression: output
|
||||
input_file: tests/cases/simple.temple
|
||||
input_file: tests/cases/simple.nomo
|
||||
---
|
||||
"Hello World!"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use temple::Context;
|
||||
use nomo::Context;
|
||||
|
||||
#[test]
|
||||
fn check_cases() {
|
||||
insta::glob!("cases/*.temple", |path| {
|
||||
insta::glob!("cases/*.nomo", |path| {
|
||||
let mut settings = insta::Settings::clone_current();
|
||||
settings.set_snapshot_path("cases");
|
||||
settings.set_snapshot_suffix(path.file_stem().unwrap().display().to_string());
|
||||
|
|
@ -27,19 +27,19 @@ fn check_cases() {
|
|||
context.insert(k, v);
|
||||
}
|
||||
|
||||
let parsed = temple::parser::parse(input.into()).unwrap();
|
||||
let parsed = nomo::parser::parse(input.into()).unwrap();
|
||||
|
||||
insta::assert_debug_snapshot!("1-parsed", parsed);
|
||||
|
||||
let ast = temple::ast::parse(parsed.tokens()).unwrap();
|
||||
let ast = nomo::ast::parse(parsed.tokens()).unwrap();
|
||||
|
||||
insta::assert_debug_snapshot!("2-ast", ast);
|
||||
|
||||
let emit = temple::emit::emit_machine(ast);
|
||||
let emit = nomo::emit::emit_machine(ast);
|
||||
|
||||
insta::assert_debug_snapshot!("3-instructions", emit);
|
||||
|
||||
let output = temple::eval::execute(&emit, &context).unwrap();
|
||||
let output = nomo::eval::execute(&emit, &context).unwrap();
|
||||
|
||||
insta::assert_debug_snapshot!("4-output", output);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue