[ phpeclipse-Bugs-1493165 ] phpeclise highlighting fails when using special echo "<<<"
"SourceForge.net" <[email protected]> Sat, 31 Mar 2007 19:20:07 -0700
| Newsgroups | gmane.comp.ide.eclipse.phpeclipse.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1493165, was opened at 2006-05-22 13:10
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1493165&group_id=57621
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: PHP Parser
Group: None
>Status: Closed
Resolution: Accepted
Priority: 5
Private: No
Submitted By: Hertzel (emudojo)
Assigned to: Axel C. Kramer (axelcl)
Summary: phpeclise highlighting fails when using special echo "<<<"
Initial Comment:
When you use the echo form
echo <<< MY_WAT
line 1
line 2
line 3
MY_WAT;
all the rest of the code under this will not be parsed
at all!!
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2007-03-31 19:20
Message:
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Axel C. Kramer (axelcl)
Date: 2007-03-17 07:07
Message:
Logged In: YES
user_id=1143825
Originator: NO
Changed in CVS
----------------------------------------------------------------------
Comment By: Lutz Schwarz (yablacky)
Date: 2007-03-12 04:31
Message:
Logged In: YES
user_id=1696234
Originator: NO
> Sender: lmpmbernardo
> I think the most we
> can have here is the option of chosing the color inside the
> heredoc instead of using the default color.
Yes! Because otherwise there must be a way to tell, which syntax to use.
The heredoc could contain SQL statements or something else that has
nothing
to do with PHP nor HTML or is not even programming code at all.
----------------------------------------------------------------------
Comment By: Toshihiro (toshihiro)
Date: 2007-03-11 18:51
Message:
Logged In: YES
user_id=1527096
Originator: NO
This is because PHPPartitionScanner has no code to skip space between
'<<<' and identifier.
See
http://phpeclipse.cvs.sourceforge.net/phpeclipse/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/php/PHPPartitionScanner.java?revision=1.34&view=markup
Lines 141 to 159, and readUntilEscapedHEREDOC().
PTF for example.
307 private boolean readUntilEscapedHEREDOC() {
...(snip)...
316 ch = document.getChar(position++);
while (Character.isWhitespace(ch) && ch != '\r' && ch !=
'\n') {
ch = document.getChar(position++);
}
317 if (!Scanner.isPHPIdentifierStart(ch)) {
318 return false;
319 }
----------------------------------------------------------------------
Comment By: Lutz Schwarz (yablacky)
Date: 2007-01-19 04:07
Message:
Logged In: YES
user_id=1696234
Originator: NO
removing just the spaces behind <<< is a really great tip, thanks.
The goal, of course, is not so much to show the here doc itself
highlighted (althougth this would be appreciated). The goal is to continue
correct hightligthing of PHP code that follows the here document.
echo <<< AA
1
2
AA;
// the code from here up to end of file is no highlighted anymore...
----------------------------------------------------------------------
Comment By: Benjamin Hill (salamanders)
Date: 2006-11-01 09:39
Message:
Logged In: YES
user_id=370500
confirming this on 1.1.9.CVS-20060424
Interesting that single quotes change the highlighting from
black to blue - so it is still scanning the section, just
confused that it is in a big text block.
----------------------------------------------------------------------
Comment By: Luis Bernardo (lmpmbernardo)
Date: 2006-07-29 19:47
Message:
Logged In: YES
user_id=137011
the heredoc syntax is equivalent to the double-quoted
string; so having, for instance, HTML highlighting would not
be consistent with the highlighting one gets with having
HTML tags inside double quoted strings. I think the most we
can have here is the option of chosing the color inside the
heredoc instead of using the default color.
----------------------------------------------------------------------
Comment By: Edward Rudd (urkle)
Date: 2006-06-08 16:23
Message:
Logged In: YES
user_id=8488
If you remove the space(s) after the <<< and before the
MY_WAT then it woks correctly. (this is with PHP eclipse 1.1.8)
It however does no highligting of the actual content. I was
hoping for syntax highlighing of my HTML or SQL that is
between my
<<<EOHTML
EOHTML;
<<<EOSQL
EOSQL;
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1493165&group_id=57621
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV