Skip to content

Commit

Permalink
Add some support for percent identifiers to fix #129.
Browse files Browse the repository at this point in the history
  • Loading branch information
corywalker committed May 29, 2018
1 parent 1f358fd commit ccca051
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions expreduce/interp.go
Expand Up @@ -463,6 +463,18 @@ func ParserExprConv(expr *wl.Expression) Ex {
ParserTagConv(expr.Tag),
E(S("Rule"), S("LongForm"), S("False")),
)
case 145:
if expr.Token.Val == "%" {
return E(
S("Out"),
E(S("Plus"), S("$Line"), NewInt(-1)),
)
} else if expr.Token.Val == "%%" {
return E(
S("Out"),
E(S("Plus"), S("$Line"), NewInt(-2)),
)
}
}
log.Fatalf("System`UnParsed: %+v %+v %+v", expr.Token, expr.Case, expr)
return nil
Expand Down

0 comments on commit ccca051

Please sign in to comment.