Skip to content

Commit

Permalink
rotation and mirroring
Browse files Browse the repository at this point in the history
  • Loading branch information
G3Kappa committed May 9, 2024
1 parent 9956dba commit 01898cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Ergo/Interpreter/Libraries/Expansions/Expansions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ public IEnumerable<Either<ExpansionResult, ITerm>> ExpandTerm(ITerm term, Interp
{
if (term is Variable)
yield break;
// Special case: don't expand huge terms
if (term is Lang.Ast.List { Contents: { Length: var len } }
&& len > 50)
{
yield break;
}
// If this is an abstract term we expand it through its canonical form, then we parse the result again
// through its owner parser.
if (term is AbstractTerm abs)
Expand Down

0 comments on commit 01898cc

Please sign in to comment.