[cpl] [Tema1] Teste IfStatement fara thenExpr

Stefan-Adrian Popa stefanpopa2209 at gmail.com
Fri Dec 29 18:58:41 EET 2017


Trebuie sa te asiguri ca atunci cand creezi un lcpl::IfStatement, thenExpr
e un bloc gol si nu nullptr.

2017-12-29 16:48 GMT+02:00 Alexandru Elisei via cpl <cpl at cursuri.cs.pub.ro>:

> In testele tests/complex/compiler.lcpl (liniile 348-349, 365-366) si
> tests/complex/database.lcpl (liniile 36-37, 44-45) avem expresie 'if'
> fara bloc pe ramura 'then'.
>
> In lcpl-AST/src/ASTSerialization.cpp (linia 506) avem:
>
> assert(thenExpr && "If doesn't have then branch");
>
> Am incercat sa imi modific gramatica sa recunoasca expresii 'if' cu
> ramura 'then' goala, dar primesc eroare la linia de mai sus din
> ASTSerialization.cpp.
>
> Este ceva gresit la gramatica mea sau in fisierul de serializare? Sau
> lcpl nu suporta expresii 'if' fara bloc pe ramura 'then' si sunt
> gresite testele?
> _______________________________________________
> cpl mailing list
> cpl at cursuri.cs.pub.ro
> http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/cpl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cursuri.cs.pub.ro/pipermail/cpl/attachments/20171229/d5bfde20/attachment.html>


More information about the cpl mailing list