Skip to content
New issue

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

もし、ならばの行末の判定判定の問題 #1015

Closed
kujirahand opened this issue Jun 12, 2021 · 2 comments
Closed

もし、ならばの行末の判定判定の問題 #1015

kujirahand opened this issue Jun 12, 2021 · 2 comments

Comments

@kujirahand
Copy link
Owner

http://nadesi.com/cgi/bug/mbbs.php?logid=2991&m=log より転載

【症状】

ブラウザ版v3で,もし~ならば の行末にスペースを入れるとエラーになります。
(全角スペースでも,半角スペースでも同じエラー)

しかし,
  もし,~ならば //
のように,空白と//を入れると,エラーになりません。

【再現方法】

次のソースを簡易エディタに貼り付けて,
行末の「//」を削除するとエラーになります。

A=4。
B=4。
もし,A=Bならば //
  「同じ」と表示。
違えば
  「違う」と表示。
ここまで。
@kujirahand
Copy link
Owner Author

デバッグモードのlexer後のソースを見ると、改行が削られています。字句解析の問題かと。

〜〜〜
  {
    "type": "ならば",
    "value": "ならば",
    "line": 2,
    "column": 5,
    "file": "a.nako3",
    "startOffset": 16,
    "endOffset": 19,
    "josi": "",
    "rawJosi": ""
  },
  {
    "type": "string",
    "value": "同じ",
    "file": "a.nako3",
    "josi": "と",
    "line": 3,
    "column": 2,
    "preprocessedCodeOffset": 23,
    "preprocessedCodeLength": 5,
    "startOffset": 23,
    "endOffset": 28,
    "rawJosi": "と"
  },
〜〜〜

@kujirahand
Copy link
Owner Author

こちら、かなり大きな問題でしたので、すぐにバージョンアップ作業しました。
報告のoza-jvさんに感謝!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant