Skip to content

Commit

Permalink
Fixing #42: Call to pos-modified token
Browse files Browse the repository at this point in the history
  • Loading branch information
phorward committed Apr 25, 2022
1 parent d5f3fab commit 893959c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/compiler/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,15 +1040,15 @@ fn traverse_node(compiler: &mut Compiler, node: &Dict) -> ImlResult {
RefValue::from(Token::Chars(ccl)).into(),
);

if parts[2] == "pos" {
return chars;
let mut ops =
ImlOp::from_vec(chars.into_ops(compiler, true));

if parts[2] == "kle" {
// mod_kle on Token::Char becomes Token::Chars.into_optional()
ops = ops.into_optional();
}

// mod_kle on Token::Char becomes Token::Chars.into_optional()
return ImlResult::Ops(vec![ImlOp::from_vec(
chars.into_ops(compiler, true),
)
.into_optional()]);
return ImlResult::Ops(vec![ops]);
}

// mod_not on Token::Char becomes negated Token::Char
Expand Down

0 comments on commit 893959c

Please sign in to comment.