Skip to content

Commit

Permalink
Update nand.lm
Browse files Browse the repository at this point in the history
  • Loading branch information
KajizukaTaichi committed Jan 11, 2025
1 parent fb455c5 commit 59e769a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions example/nand.lm
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ let parse = fn(source ->
fault "invaild value"
}
};
if (len tokenList >= 2) {
let op = tokenList[len tokenList - 2];
if (trim op == "nand") {
if (len tokenList >= 2 & (tokenList[len tokenList - 2])) {
if (trim it == "nand") {
AST + @{
"class": #Nand,
"value": [parse (join tokenList[0 ~ (len tokenList - 2)] " "), token]
Expand Down

0 comments on commit 59e769a

Please sign in to comment.