mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
* fix(rds-data): accept parameter names that start with a digit * fix(rds-data): do not treat array-slice bounds as numeric parameters * fix(rds-data): decide array slices at the opening bracket A [ right after a name other than ARRAY, a ] or a ) is a subscript, and a :digit directly inside it is a slice bound however it is spaced. ARRAY[:1] is a constructor, so :1 there stays a parameter. Tests use no var. * fix(rds-data): track the last operand to tell slice bounds from parameters Inside an array subscript a :digit is a slice bound only after an operand (or directly after the opening bracket) and a parameter after an operator, comma or paren, so arr[1 + :1] binds :1. The scan now remembers the last significant token, skipping comments, so arr /* note */ [1:2] is still a subscript. * fix(rds-data): drop clause words from the non-operand keyword list SET, BY, VALUES, SELECT, FROM, WHERE, ON and RETURNING never sit right before a [ or a :digit inside a subscript, and a column may carry such a name, so set[1:2] no longer turns :2 into a parameter. Make isNonOperandWord a switch expression.