End-of-Line comment support for keyword line in clause #95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要
JOIN句のキーワードと同行の行末コメントをサポートしました。
副作用
もとはJOIN句のキーワード行末にコメントを書けるようにするタスクでしたが、句をパースしているClause一般の処理へ変更を加えた(commit: Add trailing comment support for a keyword line in Clause)ため、Clauseを利用するほかのフォーマット処理の挙動が変わります。
具体的には次のようになります:
-- after keyword
)-- next line
)入力:
変更前の挙動:
変更後の挙動:
既存のテストケースから確認された範囲では、
where
,union
, CASE式のwhen
,then
,else
で同様の挙動変化が見られます。そのほかにもClauseを利用して処理されている部分では(visitor側でコメントが考慮されていれば)キーワードと同行の行末コメントが書けるようになります。