We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
command_pattern
応答するコマンド全てにマッチする正規表現を返す 正規表現を一度生成したら、以後コマンドの登録はできないようにする https://yard.bcdice.org/BCDice/Base.html#command_pattern-class_method
command_patternはBCDiceで処理できるかもしれないコマンドかどうかを、 外部のツールから判定するために用意されている正規表現だと認識しています。
が、システム固有のコマンドの一部に対しては、Preprocessorによって処理された後のパターンしか登録されていません。 そのため、Preprocessorで処理(括弧数式展開)される前のコマンドがcommand_patternにマッチしないことがあります。 例としては下記のようなものなどです
Preprocessor
register_prefix('IP\d+')
input = "IP(1+2)"
調査のために下記のような変更を入れてみたところ、現状では4システムが発見できます。 blhsrwznrghfzpr@d7fee31 テストケースに書かれていないものも含めるともっと多いかと思います。
command_patternがPreprocessorで前処理する前のコマンドに対しても利用できるように強制するようなテストなどを用意できたりしないでしょうか?
The text was updated successfully, but these errors were encountered:
ありがとうございます。 command_pattern の活用にはこの問題の解決が必須だと思うので、まずは何をゴールとするか考えてみます。
Sorry, something went wrong.
数式の事前展開があるときにマッチしないprefixを修正
414e4e5
Ref. #412
ysakasin
No branches or pull requests
command_pattern
command_pattern
はBCDiceで処理できるかもしれないコマンドかどうかを、外部のツールから判定するために用意されている正規表現だと認識しています。
が、システム固有のコマンドの一部に対しては、
Preprocessor
によって処理された後のパターンしか登録されていません。そのため、
Preprocessor
で処理(括弧数式展開)される前のコマンドがcommand_pattern
にマッチしないことがあります。例としては下記のようなものなどです
調査のために下記のような変更を入れてみたところ、現状では4システムが発見できます。
blhsrwznrghfzpr@d7fee31
テストケースに書かれていないものも含めるともっと多いかと思います。
command_pattern
がPreprocessor
で前処理する前のコマンドに対しても利用できるように強制するようなテストなどを用意できたりしないでしょうか?The text was updated successfully, but these errors were encountered: