Crash with invalid code

Issue #37 resolved
Christian Budde created an issue

Hello,

the invalid code below will crash the compiler.

const CText = 'foo'''./bar.';

Comments (3)

  1. Anders Melander

    I haven't tried your fix, but isn't it still vulnerable to the same problem?

    ReadConstImmediateValue will add the expression to UnifiedConstList via TUnifiedConstExpr.CreateUnified.

    An exception in FTok.Test(ttDOT) will cause the expression to be destroyed without removing it from the list. Same as before.

    What am I missing?

  2. Eric Grange repo owner

    It was not discerning between an exception in the Test() and an exception in the ReadSymbol(), when the expr is passed to ReadSymbol() it becomes the responsability of ReadSymbol

  3. Log in to comment