Java Script warning in custom language plugin

My custom language plugin shows me these warnings with the highlighting below:

"Expression statement is not assignment or call

This inspection reports expression statements which are not assignments or calls. Such statements have no dubious semantics, are normally the result of programmer error."

The plugin handles HTML and rythm. But how can I implement Java Script?

I think this would solve these warnings.

 

Thanks for any help.

0
8 comments

Looks like JavaScript is parsed, but the content of the `script` tag is split at random(?) places, so the JS parser cannot fully parse it. How does PSI tree look for the given file?

0

You're right. After I changed something in my JFlex file some errors disappeared. But there are still some errors.

0

Can you expand HTML file subtree on the left?

0

Here is the HTML file subtree:

0

Ok, it looks like the JS content is in one piece.

I believe there's an extra closing brace on the line 3 right before curly one, that's causing all these errors

0

And again you're right. Thanks Dennis. :)

It still shows me this warning. :/

0

There's also an extra semicolon at the end of the line 5 :)

0

You're great!

But I noticed after I've changed the JFlex file, my BraceMatcher does not work propely.

0

Please sign in to leave a comment.