Sibling tokens are tokens that should end up at the same depth in the CST, such as ( and ). Right now, that is not the case. Take for example the following statement:
ALTER TABLE products ALTER COLUMN price TYPE numeric(10,2);
The brackets of numeric are not on the same level:
To fix this, we have to keep track the depth at which tokens are "opened". If the closing token is encountered, we apply it at the same depth as its sibling.
A SiblingToken struct already exists from past implementations. It should be reused.
Sibling tokens are tokens that should end up at the same depth in the CST, such as
(
and)
. Right now, that is not the case. Take for example the following statement:The brackets of numeric are not on the same level:
To fix this, we have to keep track the depth at which tokens are "opened". If the closing token is encountered, we apply it at the same depth as its sibling.
A
SiblingToken
struct already exists from past implementations. It should be reused.