-
Notifications
You must be signed in to change notification settings - Fork 39
enhance: 再帰下降LLパーサーの実装 #360
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
全部見るのは大変だと思うので、十分時間を見て特に問題が上がってこなければマージします |
|
issueの方で言われていたような変更点があったと思うので、CHANGELOGに記載をお願いします。 |
|
仮にいくつかの問題があったとしても個別に対応できると思うので、 |
|
YOSASOU |
これってそうした理由何かある? |
|
とりあえず一般的なパーサーやトークナイザのスタイルに今は合わせた形 スペースの有無を厳密に確認したいならスペースもトークンとして扱えば可能かもしれない |
|
できれば厳密に確認したいけどめんどくさそうならこのままでも良さそう |
|
いや確認したい意図があるなら、確認するように一回考えてみるよ |
|
あーminifyされることが増えていることを考えるとスペース厳密に確認しない方が良いかも |
|
一旦このままいくか |
|
マージは一旦様子を見ます |
|
Syntax Error時の行・列の情報をAiScriptSyntaxErrorオブジェクトに入れることは可能ですか? |
|
その際、出来ればAiScriptSyntaxError自体を // import { Loc } from './node.js'
export class AiScriptSyntaxError extends AiScriptError {
public name = 'Syntax';
constructor(message: string, public loc: Loc, info?: any) {
super(`${message} (Line ${loc.line}, Column ${loc.column}`, info);
}
}のように書き換えて頂けると助かります。 |
|
別のPRで対応します |
|
作業ブランチにマージする |
What
今のPEGで書かれたパーサーを手書きの再帰下降パーサーで置き換えます。
パーサーのpratt parsingの処理で完全なノードを生成するようになります
\を付けて改行することが必要になります。\とそれに続く1文字は全てエスケープシーケンスとして扱われるようになりました。Why
issue参照 #359
Additional info (optional)