[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.pdt] Re: PHP inside of Javascript in a .php file



Micah wrote:
if (parentValue)
{
	<?php echo $function;?>
}

What is the value of $function?

gives me these errors:
Multiple annotations found at this line:
	- Syntax error on token "<", invalid Expression
	- Syntax error on token "?", invalid Expression
	- Syntax error on token ">", FullPostfixExpression expected after this
	 token
	- Syntax error on token "echo", : expected
	- syntax error, unexpected 'EOF'

It seems like the Javascript parser has trouble with the PHP inside the
javascript, even though the javascript is in a PHP file.

You might want to open a bug against PDT (or maybe this is a DLTK issue?) explaining what you've tried and what workarounds (if any) work to clear the reported errors.


Sounds like there are parser usecases not yet implemented.

Have you tried doing your javascript in a separate file so that it can be parsed w/ a JS editor, rather than a PHP editor?

--
Nick Boldt :: http://wiki.eclipse.org/User:Nickb