ligasgr / intellij-xquery

Plugin to support XQuery in Intellij Idea
Apache License 2.0
35 stars 23 forks source link

Error incorrectly reported for an empty object-node. #175

Closed rhdunn closed 8 years ago

rhdunn commented 8 years ago

Given:

let $_ := object-node {}
let $_ := array-node {}
return ()

the following error is reported by intellij-xquery:

let $_ := object-node {}
                       ^----- <expr single> expected, got '}'

This is a valid construct in MarkLogic (equivalent to the json string {}).

NOTE: array-node {} does not generate an error in this case, but does if object-node {} is replaced by object-node(). This affects detecting used imports for functions referenced after the error, and possibly other things -- this would be resolved by better error recovery.