diff options
author | Ting-Wei Lan <tingwei.lan@cobinhood.com> | 2019-03-06 15:55:05 +0800 |
---|---|---|
committer | Jhih-Ming Huang <jm.huang@cobinhood.com> | 2019-05-06 10:44:04 +0800 |
commit | ed13a910c7c90ff437b3de3c8fdb0828fc0dbe2f (patch) | |
tree | a31463b92244b5559be08fdabf30250f46b6b863 /core/vm/sqlvm/parser/internal/grammar.peg | |
parent | 69ae71c94f17ecc04121e3c8bf51399303ddf355 (diff) | |
download | dexon-ed13a910c7c90ff437b3de3c8fdb0828fc0dbe2f.tar dexon-ed13a910c7c90ff437b3de3c8fdb0828fc0dbe2f.tar.gz dexon-ed13a910c7c90ff437b3de3c8fdb0828fc0dbe2f.tar.bz2 dexon-ed13a910c7c90ff437b3de3c8fdb0828fc0dbe2f.tar.lz dexon-ed13a910c7c90ff437b3de3c8fdb0828fc0dbe2f.tar.xz dexon-ed13a910c7c90ff437b3de3c8fdb0828fc0dbe2f.tar.zst dexon-ed13a910c7c90ff437b3de3c8fdb0828fc0dbe2f.zip |
core: vm: sqlvm: errors: remove token field
Now both position and length are both recorded in the error struct,
recording the token in the error struct no longer provides any benefit.
It is easy to find the token when position and length are known, but
requiring all error locations to fill the field is complicated because
they have to access the source code to find the token.
Diffstat (limited to 'core/vm/sqlvm/parser/internal/grammar.peg')
-rw-r--r-- | core/vm/sqlvm/parser/internal/grammar.peg | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/core/vm/sqlvm/parser/internal/grammar.peg b/core/vm/sqlvm/parser/internal/grammar.peg index c0ec46d6a..bc2da0566 100644 --- a/core/vm/sqlvm/parser/internal/grammar.peg +++ b/core/vm/sqlvm/parser/internal/grammar.peg @@ -697,7 +697,6 @@ UIntType Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "UIntType", Message: fmt.Sprintf("cannot parse %s as uint32: %v", s, code), } @@ -721,7 +720,6 @@ IntType Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "IntType", Message: fmt.Sprintf("cannot parse %s as uint32: %v", s, code), } @@ -745,7 +743,6 @@ UFixedType Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "UFixedType", Message: fmt.Sprintf("cannot parse %s as uint32: %v", s, code), } @@ -758,7 +755,6 @@ UFixedType Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "UFixedType", Message: fmt.Sprintf("cannot parse %s as uint32: %v", t, code), } @@ -783,7 +779,6 @@ FixedType Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "FixedType", Message: fmt.Sprintf("cannot parse %s as uint32: %v", s, code), } @@ -796,7 +791,6 @@ FixedType Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "FixedType", Message: fmt.Sprintf("cannot parse %s as uint32: %v", t, code), } @@ -820,7 +814,6 @@ FixedBytesType Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "FixedBytesType", Message: fmt.Sprintf("cannot parse %s as uint32: %v", s, code), } @@ -935,7 +928,6 @@ Integer Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "Integer", Message: fmt.Sprintf("cannot parse %s as decimal: %v", c.text, code), } @@ -967,7 +959,6 @@ Decimal Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "Decimal", Message: fmt.Sprintf("cannot parse %s as decimal: %v", c.text, code), } @@ -1016,7 +1007,6 @@ NormalString Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "NormalString", Message: msg, } @@ -1199,7 +1189,6 @@ StringIdentifier Length: uint32(len(c.text)), Category: se.ErrorCategoryGrammar, Code: code, - Token: string(c.text), Prefix: "StringIdentifier", Message: msg, } |