feat(validator): parsing and typechecking for double validators

This commit is contained in:
rvcas
2023-03-16 18:33:57 -04:00
parent 3eccc349aa
commit ed92869fb9
8 changed files with 259 additions and 94 deletions

View File

@@ -53,8 +53,8 @@ fn check_validator(
#[test]
fn validator_illegal_return_type() {
let source_code = r#"
validator foo {
fn(d, r, c) {
validator {
fn foo(d, r, c) {
1
}
}
@@ -69,8 +69,8 @@ fn validator_illegal_return_type() {
#[test]
fn validator_illegal_arity() {
let source_code = r#"
validator foo {
fn(c) {
validator {
fn foo(c) {
True
}
}
@@ -85,8 +85,8 @@ fn validator_illegal_arity() {
#[test]
fn validator_correct_form() {
let source_code = r#"
validator foo {
fn(d, r, c) {
validator {
fn foo(d, r, c) {
True
}
}
@@ -98,8 +98,8 @@ fn validator_correct_form() {
#[test]
fn validator_in_lib_warning() {
let source_code = r#"
validator foo {
fn(c) {
validator {
fn foo(c) {
True
}
}