Skip to content

Commit

Permalink
add isListX methods to B1, B2, B3
Browse files Browse the repository at this point in the history
  • Loading branch information
axkr committed Sep 16, 2024
1 parent c2c575a commit 2be4c80
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ public IASTMutable copy() {
public final boolean isList() {
return true;
}

@Override
public boolean isList1() {
return true;
}
}

static class Log extends B1 {
Expand Down Expand Up @@ -780,6 +785,31 @@ public final boolean isBuiltInFunction() {
return true;
}

@Override
public boolean isList() {
return false;
}

@Override
public boolean isList1() {
return false;
}

@Override
public boolean isList2() {
return false;
}

@Override
public boolean isList3() {
return false;
}

@Override
public boolean isList4() {
return false;
}

/** {@inheritDoc} */
@Override
public final boolean isPlus() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,12 @@ public final IBuiltInSymbol topHead() {
public final boolean isList() {
return true;
}

@Override
public boolean isList2() {
return true;
}

}

static final class MemberQ extends B2 {
Expand Down Expand Up @@ -1348,6 +1354,31 @@ public boolean isFlatAST() {
return false;
}

@Override
public boolean isList() {
return false;
}

@Override
public boolean isList1() {
return false;
}

@Override
public boolean isList2() {
return false;
}

@Override
public boolean isList3() {
return false;
}

@Override
public boolean isList4() {
return false;
}

/** {@inheritDoc} */
@Override
public boolean isPlus() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public IASTMutable copy() {
public final boolean isList() {
return true;
}

@Override
public boolean isList3() {
return true;
}

}

static final class And extends B3 {
Expand Down Expand Up @@ -957,6 +963,31 @@ public boolean isFlatAST() {
return false;
}

@Override
public boolean isList() {
return false;
}

@Override
public boolean isList1() {
return false;
}

@Override
public boolean isList2() {
return false;
}

@Override
public boolean isList3() {
return false;
}

@Override
public boolean isList4() {
return false;
}

/** {@inheritDoc} */
@Override
public boolean isPlus() {
Expand Down

0 comments on commit 2be4c80

Please sign in to comment.