From ec2df9adadbd7380bde3a8a4cd9449d9a29bc327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Tue, 5 Jul 2022 14:55:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=8E=B7=E5=8F=96=E8=AF=8D?= =?UTF-8?q?=E6=B3=95=E5=88=86=E6=9E=90=E7=BB=93=E6=9E=9C=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lexical.go | 9 +++++++++ syntax.go | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lexical.go b/lexical.go index 314d9c6..334bd29 100644 --- a/lexical.go +++ b/lexical.go @@ -285,3 +285,12 @@ func (l *lexical) String() string { } return str } + +// Result 词法分析的结果 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 14:55 2022/7/5 +func (l *lexical) Result() []*lexicalNode { + return l.lexicalResult +} diff --git a/syntax.go b/syntax.go index 66b4d72..6a3db44 100644 --- a/syntax.go +++ b/syntax.go @@ -12,9 +12,11 @@ package filter // Author : go_developer@163.com<白茶清欢> // // Date : 14:33 2022/7/5 -func NewSyntax(lexical []*lexicalNode) *syntax { +func NewSyntax(jsonData string) *syntax { return &syntax{} } type syntax struct { + // 词法分 + lexicalInstance *lexical }