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
一部のP-Codeの文法とJavaScriptの正規表現のトークンが重複しているので、\ を入れないと展開・実行できない場合がある
\
The text was updated successfully, but these errors were encountered:
確かにそうですね。具体的には「^」と「*」でしょうか。「v」と「x」でも大丈夫なように、P-Codeの方を拡張するだとか?(エイリアス的に)
Sorry, something went wrong.
実は地味に結構ぶつかっていて、P-Code的にクリティカルなのは既に挙げてもらっている ^、* 以外にも
^
*
[
-
+
/[a-z]+/
.
*0.5
などがあります。
https://developer.mozilla.org/ja/docs/Web/JavaScript/Guide/Regular_Expressions
厳密にはまだありそうですが、randexp.js の使い方的に、JavaScriptでサポートしてる全ての文法をサポートしなくても良いかなとは思っています。 現状だと何だかんだで \ でエスケープするのが明示的に書き分けが出来て手っ取り早そうかなと。
エイリアス作ってしまうのもありかなとは思いますが、あとは、
#
とかですかね。パッと思いつくものだと..
なるほど、確かに演算子や小数点もすべてアウトですね(汗)。となると、ここはへたにエイリアスでしのぐのではなく、稲福さんのいうように、 ・エスケープする ・文法自体の書き換えができるようにする の二本立てでいくのはよさそうですね。あと、モードも面白いアイデアですね!このあたり、考えること自体がけっこう楽しいかも:-P
No branches or pull requests
一部のP-Codeの文法とJavaScriptの正規表現のトークンが重複しているので、
\
を入れないと展開・実行できない場合があるThe text was updated successfully, but these errors were encountered: