aboutsummaryrefslogtreecommitdiff
path: root/test/test_jsinterp.py
AgeCommit message (Collapse)Author
2023-02-02[jsinterp] Improve parsingdirkf
* support subset `... else if ...` * support `while` * add `RegExp` class * generalise `new` support * limited more debug strings * matching test changes
2023-02-02Support `if` statementspukkandan
Fix for yt-dlp/yt_dlp#6131 Closes #31509
2022-09-01[jsinterp] Handle new YT players 113ca41c, c57c113cdirkf
* add NaN * allow any white-space character for `after_op` * align with yt-dlp f26af78a8ac11d9d617ed31ea5282cfaa5bcbcfa (charcodeAt and bitwise overflow) * allow escaping in regex, fixing player c57c113c
2022-08-26[jsinterp] Improve try/catch/finally supportdirkf
2022-08-25[jsinterp] Fix bug in operator precedencedirkf
* from https://github.com/yt-dlp/yt-dlp/commit/164b03c4864b0d44cfee5e7702f7c2317164a6cf * added tests
2022-08-19[jsinterp] Clean up and pull yt-dlp styledirkf
* add compat_re_Pattern * improve compat_collections_chain_map * use class JS_Undefined * remove unused code
2022-08-19[jsinterp] Handle regexp literals and throw/catch execution (#31182)dirkf
* based on https://github.com/yt-dlp/yt-dlp/commit/f6ca640b122239d5ab215f8c2564efb7ac3e8c65, thanks pukkandan * adds parse support for regexp flags
2022-08-17[jsinterp] Improve JS language support (#31175)dirkf
* operator ?? * operator ?. * operator ** * accurate operator functions * `undefined` handling * object literals {a: 1, "b": expr} * more tests for weird JS comparisons: see https://github.com/ytdl-org/youtube-dl/issues/31173#issuecomment-1217854397.
2022-08-14[jsinterp] Overhaul JSInterp to handle new YT players 4c3f79c5, 324f67b9 ↵dirkf
(#31170) * back-port from yt-dlp 8f53dc44a0cc1c2d98c35740b9293462c080f5d0, thanks pukkandan * also support void, improve <</>> precedence, improve expressions in comma-list * add more tests
2022-01-30Handle default in switch betterdf
Add https://github.com/yt-dlp/yt-dlp/commit/a1fc7ca0743c8df06416e68ee74b64e07dfe7135 Thanks coletdjnz
2022-01-30Back-port JS interpreter upgrade from yt-dlp PR #1437df
2016-11-17Update coding style after pycodestyle 2.1.0Yen Chi Hsuan
In pycodestyle 2.1.0, E305 was introduced, which requires two blank lines after top level declarations, too. See https://github.com/PyCQA/pycodestyle/issues/400 See also #10689; thanks @stepshal for first mentioning this issue and initial patches
2016-11-11[jsinterp] Fix function calls without arguments.Kacper Michajłow
2015-11-10[jsinterp] Support alternative function definition formYen Chi Hsuan
2015-02-18[jsinterp] Disable comment supportPhilipp Hagemeister
We need a proper lexer to be able to understand YouTube's code, which contains /* inside of strings. For now it's sufficient to just disable comment support altogether. Fixes #4976, fixes #4979, fixes #4980, fixes #4981, fixes #4982. Closes #4977.
2015-02-01[jsinterp] Beef up and add testsPhilipp Hagemeister
In preparation for #4822, extend jsinterp by a lot. (We may even have to/want to write a proper interpreter with actual parsing)