Formats an error message based on the error kind and info
(kind, info2)
| 3374 | } |
| 3375 | /** Formats an error message based on the error kind and info */ |
| 3376 | static formatMessage(kind, info2) { |
| 3377 | switch (kind) { |
| 3378 | case QueryErrorKind.NodeName: |
| 3379 | return `Bad node name '${info2.word}'`; |
| 3380 | case QueryErrorKind.FieldName: |
| 3381 | return `Bad field name '${info2.word}'`; |
| 3382 | case QueryErrorKind.CaptureName: |
| 3383 | return `Bad capture name @${info2.word}`; |
| 3384 | case QueryErrorKind.PatternStructure: |
| 3385 | return `Bad pattern structure at offset ${info2.suffix}`; |
| 3386 | case QueryErrorKind.Syntax: |
| 3387 | return `Bad syntax at offset ${info2.suffix}`; |
| 3388 | } |
| 3389 | } |
| 3390 | }; |
| 3391 | function parseAnyPredicate(steps, index, operator, textPredicates) { |
| 3392 | if (steps.length !== 3) { |