Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested if statements / curly braces cause issues with compiler (iOS) #143

Open
mvan231 opened this issue Aug 1, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@mvan231
Copy link

mvan231 commented Aug 1, 2024

Describe the bug

when nesting if statements or other items that have curly braces, the compiler gets confused and is looking for RegEx

To Reproduce

Steps to reproduce the behavior:

  1. Make an if statement
  2. Inside the if statement, make another if statement

Expected behavior

compiling should happen without issue with nested if statements

Screenshots

IMG_2798
IMG_2797
IMG_2799

Information

  • Device: iPhone 14

  • OS: 17.5.1

  • Jellycuts Version: 2.3(0)

  • Jailbroken? No

Additional context

Add any other context about the problem here.

@mvan231 mvan231 added the bug Something isn't working label Aug 1, 2024
@chrysaora-achlyos
Copy link

Note: there was talk on discord regarding nested ifs being "fixed" in Open-Jellycore. I have verified that the program below, compiles without syntax errors in Open-Jellycore

import Shortcuts
dictionary() >> d0
setValue(dictionary: d0, key: "a", value: "a0") >> d1
setValue(dictionary: d1, key: "b", value: "b0") >> d2
valueFor(dictionary: d2, key: "a") >> xa
valueFor(dictionary: d2, key: "b") >> xb
//
if(xa != nil) {
  if(xb != nil) {
  }
}

@chrysaora-achlyos
Copy link

simplier program shows the same syntax error

import Shortcuts
var xa = "a"
if(xa != nil) {
  if(xa != nil) {
  }
}

@mvan231
Copy link
Author

mvan231 commented Aug 2, 2024

Note: there was talk on discord regarding nested ifs being "fixed" in Open-Jellycore. I have verified that the program below, compiles without syntax errors in Open-Jellycore import Shortcuts dictionary() >> d0 setValue(dictionary: d0, key: "a", value: "a0") >> d1 setValue(dictionary: d1, key: "b", value: "b0") >> d2 valueFor(dictionary: d2, key: "a") >> xa valueFor(dictionary: d2, key: "b") >> xb // if(xa != nil) {   if(xb != nil) {   } }

We can't use open jellycore in iOS though, can we?

@chrysaora-achlyos
Copy link

Open-Jellycore is used by Open-Jellycuts https://github.com/openjelly/open-jellycuts an iOS app.

That said, Open-Jellycuts is far behind the AppStore version of Jellycuts, and you would be likely to encounter many other issues of things that work in Jellycuts but don't work in Open-Jellycuts.

My comments intended as context for whomever was going be fixing the nested if issue and has access to both source code bases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants