Skip to content

Commit

Permalink
Allow equality between different token types
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdean-digicatapult committed Nov 24, 2023
1 parent e491404 commit 7d404d8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/lang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "dscp-lang"
authors = ['Digital Catapult <https://www.digicatapult.org.uk>']
version = "0.1.0"
version = "0.1.1"
edition = "2021"

[dependencies]
Expand Down
16 changes: 0 additions & 16 deletions tools/lang/src/compiler/condition_transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,22 +274,6 @@ pub fn transform_condition_to_program(
}),
}?;

if input.arg.token_type.value != output.arg.token_type.value {
return Err(CompilationError {
stage: crate::compiler::CompilationStage::GenerateRestrictions,
exit_code: exitcode::DATAERR,
inner: PestError::new_from_span(
ErrorVariant::CustomError {
message: format!(
"Invalid comparison between token type {} and {}",
input.arg.token_type.value, output.arg.token_type.value
),
},
span,
),
});
}

let original_key = TokenMetadataKey::try_from(ORIGINAL_ID_KEY.to_vec()).unwrap();
let result = vec![
BooleanExpressionSymbol::Restriction(Restriction::MatchInputOutputMetadataValue {
Expand Down

0 comments on commit 7d404d8

Please sign in to comment.