CN-574 feat: 搜索组件重新实现

This commit is contained in:
chenjinsong
2022-06-06 17:34:55 +08:00
parent 2a05817a51
commit 0394a35a9f
13 changed files with 909 additions and 880 deletions

View File

@@ -0,0 +1,27 @@
export const errorTypes = {
illegalChar: 'parse.errorTip.illegalChar', // 非法字符
syntaxError: 'parse.errorTip.syntaxError', // 语法错误此i18n内容有占位符
typeError: 'parse.errorTip.typeError' // 类型错误
}
export const errorDesc = {
syntaxError: {
moreThan2Apostrophe: 'parse.errorTip.syntaxError.moreThan2Apostrophe', // 语法错误连续2个以上的单引号
unclosedApostrophe: 'parse.errorTip.syntaxError.unclosedApostrophe', // 语法错误,引号未闭合
unclosedBracket: 'parse.errorTip.syntaxError.unclosedBracket', // 语法错误,括号未闭合
unexpectedString: 'parse.errorTip.syntaxError.unexpectedString', // 期望之外的字符串
unexpectedOperator: 'parse.errorTip.syntaxError.unexpectedOperator',
unexpectedBracket: 'parse.errorTip.syntaxError.unexpectedBracket',
unexpectedConnection: 'parse.errorTip.syntaxError.unexpectedConnection'
},
typeError: {
str: 'parse.errorTip.typeError.expectString', // Expected parameter type is string
meta: 'parse.errorTip.typeError.expectMetaArray' // Expected parameter type is Meta array
}
}
export default class ParserError {
constructor (index, type, desc) {
this.index = index
this.type = type
this.desc = desc
}
}