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

DevX: Incorrect error message when there are mismatched parentheses and brackets #1329

Open
ccinelli opened this issue May 15, 2019 · 1 comment

Comments

@ccinelli
Copy link
Contributor

Marko Version: 4.16..0

Error:

Mismatched group. A ")" character was found when "{" was expected.at line 17 col 5

Code:

style.less {
	.aclass {
    	color: #000;
    }
    .aclass1 {
    	color: #000;
    }
    .aclass2 {
    	color: #000;
    }
    .aclass3 {
    	color: #000;
    }
}


class {
  onCreate() {
  	this.state = {
    	v : null
    }; 
    
    //More stuff
    if (this.state.v)) { // Error is here!!!!
    }
    this.anothervar = {
    	what: 3
    };
  }
  onLanguageSelect() {
    const el = this.getEl("languageSelect");
    const selected = el.options[el.selectedIndex].value;
    this.emit("select-language", selected);
  }
}

<div>
</div>

Expected Behavior

The error should point at ))

Actual Behavior

Mismatched group. A ")" character was found when "{" was expected.at line 17 col 5

Steps to Reproduce

Copy the code in https://markojs.com/try-online

@dominikstoetter
Copy link

hey, i just stumbled across your issue and had a hard time figuring out what your problem was. If i understood correctly you are pointing out, that the error points to the line where class is defined. But the actuall error happens at the if condition that has a unnecessary closing )?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants