From bdce4ab6c60935d539cc506c9d449ab52d5a1e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 4 Jul 2022 18:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AF=8D=E6=B3=95=E5=92=8C?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- define.go | 31 +++++++++++++++++++++++++++++++ lexical.go | 1 + 2 files changed, 32 insertions(+) create mode 100644 define.go diff --git a/define.go b/define.go new file mode 100644 index 0000000..723714d --- /dev/null +++ b/define.go @@ -0,0 +1,31 @@ +// Package filter ... +// +// Description : filter ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2022-07-04 18:02 +package filter + +// jsonNode json语法树节点定义 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 18:06 2022/7/4 +type jsonNode struct { + Name string // 节点名称 + Parent *jsonNode // 父节点 + Son *jsonNode // 子节点 + Brother *jsonNode // 兄弟节点 + Val interface{} // 节点的值 +} + +// lexicalNode 词法分析的节点 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 18:02 2022/7/4 +type lexicalNode struct { + Val string // 词法分析出来的词 + IsToken bool // 是否为关键字 +} diff --git a/lexical.go b/lexical.go index 3d61dfa..57ef9b2 100644 --- a/lexical.go +++ b/lexical.go @@ -6,3 +6,4 @@ // // Date : 2022-07-04 17:52 package filter +