1 | from __future__ import print_function
|
2 | """
|
3 | fmt.py: Stub for code formatter.
|
4 |
|
5 | See doc/pretty-printing.md.
|
6 | """
|
7 |
|
8 | from mycpp import mylib
|
9 | from tools import ysh_ify
|
10 |
|
11 | from typing import TYPE_CHECKING
|
12 | if TYPE_CHECKING:
|
13 | from _devbuild.gen.syntax_asdl import command_t
|
14 | from core import alloc
|
15 |
|
16 |
|
17 | def Format(arena, node):
|
18 | # type: (alloc.Arena, command_t) -> None
|
19 | """
|
20 | Stub that prints, copied from ysh_ify.LosslessCat
|
21 |
|
22 | TODO: implement formatter (on a coarse tree)
|
23 | """
|
24 | cursor = ysh_ify.Cursor(arena, mylib.Stdout())
|
25 | cursor.PrintUntilEnd()
|