Closed GreasySlug closed 1 year ago
Could you please check the translation again when this PR is ready from the draft? @C-BJ
It's fine about 2 failing checks I'll fix them
OK
对不起,这个PR仍在进行中 我建议你先不要翻译它,因为我正在做破坏性的修改 能否请你在这份PR从草稿中准备好后再检查一下翻译 如果你想知道,到目前为止,你的翻译并没有引起任何冲突,所以这不是一个问题 @C-BJ
oh, sorry. I read it wrong.
70% of the work has been done
The parser seems to erase class attributes.
C = Class {x = Int;}
C.
x = 1 # no-linebreak
$ cargo r -- --mode parse test.er
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Running `target\debug\erg.exe --mode parse test.er`
C =
::Class:
{::x =
::Int; }
$
Please ask me to review the translation again when it is finished @GreasySlug
Please ask me to review the translation again when it is finished @GreasySlug
I have finished writing the error messages, so if there are any translation errors or good translations in the Chinese ones please correct them, @C-BJ
Congrats & thank you so much!
Currently, many of the errors in the parser use
simple_syntax_error
( orskip_and_throw_syntax_err
). This causes almost all errors to generateinvalid syntax error
, making them difficult to understand. This lets you know howinvalid syntax
is.In addition, add doc comment.
Changes proposed in this PR:
Define specify error
Use following errors
Internal error(parser bug)
It is a high possibility of the parser bug if it coccus
Invalid/unintended syntax error
Some sentences are written in Parser They are not listed here
syntax error of parsing
from
toto
var
ordef
can be used inrecord
different record type element declarations:=
should be added non-default argument follows default argumentbracket
type
is not closed with thebracket
Minor adjustment
next_expr()
/line()
are used, put log!()@mtshiba