You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which, it should actually have token and value instead of undefined.
In the Parser's _parseSliceExpression() function, it looks like this:
var t = this._lookahead(0);
var error = new Error("Syntax error, unexpected token: " +
t.value + "(" + t.type + ")");
Solution: it should use this._lookaheadToken() instead of this._lookahead(). The this._lookaheadToken() will return a token object that will actually contain .type and .value properties
The text was updated successfully, but these errors were encountered:
@David-Yuen you may want to use the JMESPath Community fork of this library. While being fully standards compliant, it includes many improvements and bug fixes.
That particular issue is included in the community port of this library.
When the jmespath parser handles a syntax error related to parsing slice expressions, it's throwing an error message:
Which, it should actually have token and value instead of
undefined
.In the Parser's
_parseSliceExpression()
function, it looks like this:Solution: it should use
this._lookaheadToken()
instead ofthis._lookahead()
. The this._lookaheadToken() will return a token object that will actually contain .type and .value propertiesThe text was updated successfully, but these errors were encountered: