SQLite Forum

document nit chapter 2 section 3 literals
Login
Literals cannot be negative according to the diagram.  There are good reasons for this actually.

However the discussion talks about negative literals.

I suspect what's going on is that the negation operator is applied to the constant literal pretty early on in the processing creating a constant negative number which is the next best thing to a literal.

You have various choices for how to resolve this:

* do nothing, most people won't even notice or care
* add the possibility of negative integer literals which is sort of a lie but does help to explain the rules for when negative integers promote to floating point
* leave the diagram alone but mention that they are going to be combined with unary negation very quickly and at that time these rules will apply
  * do the above in a footnote

I wouldn't blame you if you choose the do nothing option if only for brevity. Maybe leave the extra details in a comment to documenters.