# README
How to refactor a large and long process function to provide flexible customization to the user?
The problem is about refactoring. To refactor, we have the following tools:
- Patterns
- Recognize the nature of the problem, and reorganize
The original large process function relies on some parameters, and some steps.
So the first is to try to propose at least 2 or more scenarios that will fit into this process, and find what is shared among these usages.
This is a down-to-top solution.
Refactor
Closing ranges, shrink size of the target function.
Provide chances for user to customize some process
Make these customization reasonable, and simple.
Core
The most important thing we do is connect, connect components with their meaningful context.
For example, build a parent map for all ast nodes, so that we can lookup a node's file without knowing its context.
# Functions
from child to parent.
like filter, first hook gets firstly executed.
like filter, first hook gets firstly executed.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
pkgs: starter packages.
No description provided by the author
No description provided by the author
No description provided by the author
NewRegistry must.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
joining them together makes a complete statement, in string format.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
TypeExpr represents Type appeared inside a package.
# Interfaces
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
only used in build stage.
TODO: handle "." case.
No description provided by the author
No description provided by the author
Node defines basic abstraction known implementations: Pkg,File,Func.
No description provided by the author
Registry is an immutable mapping that holds the ast Node to their convienent wrapper types appear here meaning they have special support it is effectively an AST node factory.
No description provided by the author
No description provided by the author