Skip to content

Commit

Permalink
Corrects skeleton for matrices, vectors and cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
zorkow committed Nov 28, 2023
1 parent ef0b94f commit 6224968
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ts/semantic_tree/semantic_skeleton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,22 @@ export class SemanticSkeleton {
return content.concat(children);
case SemanticType.POSTFIXOP:
return children.concat(content);
case SemanticType.MATRIX:
case SemanticType.VECTOR:
case SemanticType.FENCED:
children.unshift(content[0]);
children.push(content[1]);
return children;
case SemanticType.CASES:
children.unshift(content[0]);
return children;
case SemanticType.APPL:
return [children[0], content[0], children[1]];
case SemanticType.ROOT:
return [children[0], children[1]];
case SemanticType.ROW:
case SemanticType.LINE:
// Adding the labels to the skeleton for explorative access.
if (content.length) {
children.unshift(content[0]);
}
Expand Down

0 comments on commit 6224968

Please sign in to comment.