test(tests/playground/patch): do-nothing transformer
This commit is contained in:
parent
10a8822ac5
commit
849311af00
1 changed files with 16 additions and 0 deletions
16
tests/playground/patch.lean
Normal file
16
tests/playground/patch.lean
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import init.lean.parser
|
||||
open Lean
|
||||
open Lean.Parser
|
||||
|
||||
def fixEqnSyntax (stx : Syntax) : Syntax :=
|
||||
stx
|
||||
|
||||
def main (xs : List String) : IO Unit :=
|
||||
do
|
||||
[fname] ← pure xs | throw (IO.userError "usage `patch <file-name>`");
|
||||
env ← mkEmptyEnvironment;
|
||||
stx ← parseFile env fname;
|
||||
let stx := fixEqnSyntax stx;
|
||||
match stx.reprint with
|
||||
| some out => IO.print out
|
||||
| none => throw (IO.userError "failed to reprint")
|
||||
Loading…
Add table
Reference in a new issue