view.go 474 B

12345678910111213141516171819202122
  1. package hhccli
  2. import "git.swzry.com/zry/go-hhc-cli/hhc_ast"
  3. type CliView interface {
  4. GetSDTRoot() *hhc_ast.SyntaxDefinitionTreeRoot
  5. }
  6. type EmptyCliView struct {
  7. SyntaxDefineTree *hhc_ast.SyntaxDefinitionTreeRoot
  8. }
  9. func NewEmptyCliView(sdtroot *hhc_ast.SyntaxDefinitionTreeRoot) *EmptyCliView {
  10. cv := &EmptyCliView{
  11. SyntaxDefineTree: sdtroot,
  12. }
  13. return cv
  14. }
  15. func (emc *EmptyCliView) GetSDTRoot() *hhc_ast.SyntaxDefinitionTreeRoot {
  16. return emc.SyntaxDefineTree
  17. }