diff --git a/lexical.go b/lexical.go new file mode 100644 index 0000000..3d61dfa --- /dev/null +++ b/lexical.go @@ -0,0 +1,8 @@ +// Package filter ... +// +// Description : JSON 词法分析 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2022-07-04 17:52 +package filter diff --git a/syntax.go b/syntax.go new file mode 100644 index 0000000..c98c5bf --- /dev/null +++ b/syntax.go @@ -0,0 +1,8 @@ +// Package filter ... +// +// Description : 语法分析 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2022-07-04 17:53 +package filter diff --git a/token.go b/token.go new file mode 100644 index 0000000..154b807 --- /dev/null +++ b/token.go @@ -0,0 +1,28 @@ +// Package filter ... +// +// Description : 关键词定义 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2022-07-04 17:53 +package filter + +const ( + // list 类型起始 + listLeftToken = "[" + // listRight list 类型结束 + listRightToken = "]" + // 对象起始 + objectLeftToken = "{" + // 对象结束 + objectRightToken = "}" + // key 值的起始 + keyLeftToken = "\"" + // key 值的结束 + keyRightToken = "\"" + // kvPairSplit kv 的分隔符 + kvPairSplitToken = ":" + // 转义符 + escapeCharacterToken = "\\" +) +