Skip to content

Commit

Permalink
parser: treat node_id and node_stats as tidb keyword (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
WangXiangUSTC authored and tiancaiamao committed Mar 27, 2019
1 parent cc0fa08 commit cc00daf
Show file tree
Hide file tree
Showing 5 changed files with 5,121 additions and 5,104 deletions.
8 changes: 4 additions & 4 deletions consistent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ func (s *testConsistentSuite) TestKeywordConsistent(c *C) {
c.Assert(err, IsNil)
content := string(data)

reservedKeywordStartMarker := "\t/* The following tokens belong to ReservedKeyword. */"
unreservedKeywordStartMarker := "\t/* The following tokens belong to UnReservedKeyword. */"
notKeywordTokenStartMarker := "\t/* The following tokens belong to NotKeywordToken. */"
tidbKeywordStartMarker := "\t/* The following tokens belong to TiDBKeyword. */"
reservedKeywordStartMarker := "\t/* The following tokens belong to ReservedKeyword. Notice: make sure these tokens are contained in ReservedKeyword. */"
unreservedKeywordStartMarker := "\t/* The following tokens belong to UnReservedKeyword. Notice: make sure these tokens are contained in UnReservedKeyword. */"
notKeywordTokenStartMarker := "\t/* The following tokens belong to NotKeywordToken. Notice: make sure these tokens are contained in NotKeywordToken. */"
tidbKeywordStartMarker := "\t/* The following tokens belong to TiDBKeyword. Notice: make sure these tokens are contained in TiDBKeyword. */"
identTokenEndMarker := "%token\t<item>"

reservedKeywords := extractKeywords(content, reservedKeywordStartMarker, unreservedKeywordStartMarker)
Expand Down
4 changes: 2 additions & 2 deletions misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ var tokenMap = map[string]int{
"NEXT_ROW_ID": next_row_id,
"NO": no,
"NO_WRITE_TO_BINLOG": noWriteToBinLog,
"NODE_ID": node_id,
"NODE_STATE": node_state,
"NODE_ID": nodeID,
"NODE_STATE": nodeState,
"NONE": none,
"NOT": not,
"NOW": now,
Expand Down
Loading

0 comments on commit cc00daf

Please sign in to comment.