2022-07-04 18:00:22 +08:00
|
|
|
// Package filter ...
|
|
|
|
//
|
|
|
|
// Description : 语法分析
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 2022-07-04 17:53
|
|
|
|
package filter
|
2022-07-05 14:42:43 +08:00
|
|
|
|
|
|
|
// NewSyntax 构建JSON语法树
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 14:33 2022/7/5
|
2022-07-05 14:55:50 +08:00
|
|
|
func NewSyntax(jsonData string) *syntax {
|
2022-07-05 16:36:58 +08:00
|
|
|
return &syntax{
|
|
|
|
lexicalInstance: NewLexical(jsonData),
|
|
|
|
}
|
2022-07-05 14:42:43 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type syntax struct {
|
2022-07-05 16:36:58 +08:00
|
|
|
// 词法分析实例
|
2022-07-05 14:55:50 +08:00
|
|
|
lexicalInstance *lexical
|
2022-07-05 14:42:43 +08:00
|
|
|
}
|
2022-07-05 16:36:58 +08:00
|
|
|
|
|
|
|
// Parse 构建语法树
|
|
|
|
//
|
|
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
|
|
//
|
|
|
|
// Date : 16:35 2022/7/5
|
|
|
|
func (s *syntax) Parse() error {
|
|
|
|
return nil
|
|
|
|
}
|