Skip to content

Commit

Permalink
fix missing kseq
Browse files Browse the repository at this point in the history
  • Loading branch information
h0nzZik committed Mar 27, 2020
1 parent 6e7a52c commit cb00bae
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions clang-tools/ClangKast/ClangKast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,31 @@ string Kast::KToken::escape(const string & str) {
// *** Kast::KSequence

void Kast::KSequence::print(Sort parentSort, function<void (Sort)> printChild) const {
if (size == 0) {
cout << (Kore ? "dotk{}()" : ".K");
}
for (int i = 0; i < size; i++) {
printChild(Sort::KITEM);
if (i != size - 1) {
cout << (Kore ? ", " : "~>");

if (Kore) {
for (int i = 0; i < size; i++) {
cout << "kseq{}(";
printChild(Sort::KITEM);
cout << ", ";
}

cout << "dotk{}()";

for (int i = 0; i < size; i++) {
cout << ")";
}

} else {
if (size == 0) {
cout << ".K";
}
for (int i = 0; i < size; i++) {
printChild(Sort::KITEM);
if (i != size - 1) {
cout << "~>";
}
}

}
}

Expand Down

0 comments on commit cb00bae

Please sign in to comment.