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.

8 comments
Comment actions Permalink

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
Comment actions Permalink

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

0
Comment actions Permalink

Can you expand HTML file subtree on the left?

0
Comment actions Permalink

Here is the HTML file subtree:

0
Comment actions Permalink

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
Comment actions Permalink

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

It still shows me this warning. :/

0
Comment actions Permalink

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

0
Comment actions Permalink

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.