SeedV / SeedLang

An embeddable and visualizable scripting engine for .Net and Unity.
https://seedv.github.io/SeedLang/
Apache License 2.0
9 stars 1 forks source link

"[[" "[[[" "]]" "]]]", ... cannot be parsed correctly #166

Closed wixette closed 2 years ago

wixette commented 2 years ago
SeedLang.Shell 0.2.0-preview20220410022950
Copyright 2021-2022 The SeedV Lab.

>>> a = [[[1]]]
---------- Source ----------
1     a = [[[1]]]
---------- Run ----------
1     a = [[[1]]]
20220410103000855 Fatal (SeedLang.X) <> [Ln 1, Col 4 - Ln 1, Col 5] 38: SyntaxErrorUnwantedToken '[[' {'True', 'False', 'None', 'not', '+', '-', '(', '[', '{', NAME, NUMBER, STRING}
1     a = [[[1]]]
20220410103000855 Fatal (SeedLang.X) <> [Ln 1, Col 6 - Ln 1, Col 9] 37: SyntaxErrorNoViableAlternative '[1]]'
1     a = [[[1]]]
20220410103000856 Fatal (SeedLang.X) <> [Ln 1, Col 8 - Ln 1, Col 9] 35: SyntaxErrorInputMismatch ']]' {';', NEWLINE}
>>> a = [[1]]  
---------- Source ----------
1     a = [[1]]
---------- Run ----------
1     a = [[1]]
20220410103007671 Fatal (SeedLang.X) <> [Ln 1, Col 4 - Ln 1, Col 5] 38: SyntaxErrorUnwantedToken '[[' {'True', 'False', 'None', 'not', '+', '-', '(', '[', '{', NAME, NUMBER, STRING}
1     a = [[1]]
20220410103007671 Fatal (SeedLang.X) <> [Ln 1, Col 7 - Ln 1, Col 8] 38: SyntaxErrorUnwantedToken ']]' {';', NEWLINE}

As a comparison:

>>> a = [ [1] ]
---------- Source ----------
1     a = [ [1] ]
---------- Run ----------
>>> a = [ [ [1] ] ]
---------- Source ----------
1     a = [ [ [1] ] ]
---------- Run ----------