Skip to content

Implemented Typeof + conversion system#118

Merged
dolphinau merged 9 commits intomainfrom
typeof
Apr 17, 2026
Merged

Implemented Typeof + conversion system#118
dolphinau merged 9 commits intomainfrom
typeof

Conversation

@UwUDev
Copy link
Copy Markdown
Collaborator

@UwUDev UwUDev commented Apr 15, 2026

Added:

  • Typeof rule
  • .typeof() that convert any JavaScript value to their type name
  • PosNeg rule (basically -... and +...)
  • .as_js_num() that convert any JavaScript value to a Raw(Num(n)) or Nan
  • Substract (basically ... - ...)

Updated:

  • NotBool to handle any JavaScript values
  • Many utils functions to work with the new .as_js_num()
  • CombineArrays to handle more additions

Fixed:

  • .as_bool() for Bytes()

Removed:

  • NegInt rule (now handled by PosNeg)
  • StringPlusMinus rule (now handled by PosNeg)
  • BoolPlusMinus rule (now handled by PosNeg)
  • substract from CombineArrays (now hadled by Substract)
  • substract from AddBool (now hadled by Substract)

Comment thread core/src/js/tests/jsfuck.rs Outdated
@dolphinau dolphinau merged commit 369f568 into main Apr 17, 2026
3 checks passed
@dolphinau dolphinau deleted the typeof branch April 17, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a to_number() -> Option<f64>, for all the JavaScript to handle any cases in binary ops Add typeof support

2 participants