yantrajs / yantra

JavaScript Engine for .NET Standard
https://yantrajs.com
Apache License 2.0
222 stars 7 forks source link

Fix LinqJS parsing error #59

Closed ackava closed 2 years ago

ackava commented 2 years ago

YantraJS fails to parse https://cdn.jsdelivr.net/npm/linq@3.2.4/linq.js , most likely the RegExp parsing skips few tokens. Looks like token expression is mismatched against argArray.

ackava commented 2 years ago

Issue lies in following code,

var funcCache = { "": Functions.Identity };

This tries to create a KeyString for an empty string which is not allowed by StringMap, we need a workaround to map an empty string. This is an issue as this one overrides default NULL keyString, allowing every non existing strings to match to non non existent keys.