Skip to content
Snippets Groups Projects
  • erwan's avatar
    6e914d04
    Better handling of real constants substraction. · 6e914d04
    erwan authored
    Indeed, expressions such as "3.0-42.5" caused a syntax error, as the unary minus
    of real constant was in hard in the lexer.  "3.0- 42.5" worked, but still.
    
    The problem then was that LicEvalConst refused to eval "- 3.14", that was
    parsed directly as a constant, and that is now a call to the unary minus.
    I've added specific code to handle this case.
    6e914d04
    History
    Better handling of real constants substraction.
    erwan authored
    Indeed, expressions such as "3.0-42.5" caused a syntax error, as the unary minus
    of real constant was in hard in the lexer.  "3.0- 42.5" worked, but still.
    
    The problem then was that LicEvalConst refused to eval "- 3.14", that was
    parsed directly as a constant, and that is now a call to the unary minus.
    I've added specific code to handle this case.