shiika
shiika copied to clipboard
Allow a line starts with `.`
GIven
123
.to_s
Expected
no error
Actual
Error: Error: unexpected token: Dot
╭─[a.sk:8:3]
│
8 │ .to_s
· ─
·
───╯
)
Test case 2:
p 123
+ 345
Test case 3 (from #385):
p 123 # comment
+ 345
Test case 4 (same as test case 1) but from #241 (we can close that issue I guess)
p [1,2,3]
.select{|i: Int| i % 2 == 0}
.map<Int>{|i: Int| i * 2}
It's good to start after #534 was merged. Because #534 introduce Token::Semicolon and Token::Newline.
By using those tokens, we could easily implement this feature allowing a line starts with dot.
I have willingness to implement this later.
#534 was merged. So I'm going to work on this issue.