3 Nov 2007 09:52
Re: Fwd: [ jedit-Bugs-1809234 ] JavaScript edit mode: if/while/for highlighted as functions
Matthieu Casanova <chocolat.mou <at> gmail.com>
2007-11-03 08:52:13 GMT
2007-11-03 08:52:13 GMT
Hi, I think the problem is in the edit mode, did you check the changes
in javascript.xml in SVN ?
Matthieu
On Nov 1, 2007 10:14 PM, Ben Schilke <bschilke.biz <at> gmail.com> wrote:
> Working on this defect and trying to compare what is happening differently
> for the 'if' token and the 'else' token in the attached code (see attached
> .jpg).
>
> One difference I've noticed is that for the each character in the 'else'
> token (the token that has the correct text color), match.lookingAt( ) is
> returning false (and therefore hitting the 'return false' line). The 'if'
> token, however, is returning true for match.lookingAt( ). I'm not sure what
> the text (the segment from the TokenMarker.line) is getting compared to.
> checkRule.startRegexp.pattern.value is the same in both cases. Anyone have
> any idea?
>
> // from TokenMarker.handleRule(ParserRule, boolean, boolean), line ~475
>
> charSeq = new SegmentCharSequence(line, pos - line.offset,
> line.count - (pos - line.offset));
> match = checkRule.startRegexp.matcher(charSeq);
> if(!match.lookingAt())
> {
> return false;
> }
>
>
> On 11/1/07, Ben Schilke <bschilke.biz <at> gmail.com > wrote:
>
> >
> >
> >
> >
> > On Oct 8, 2007 12:58 AM, SourceForge.net <noreply <at> sourceforge.net > wrote:
> >
> > > Bugs item #1809234, was opened at 2007-10-08 00:58
> > > Message generated for change (Tracker Item Submitted) made by Item
> Submitter
> > > You can respond by visiting:
> > >
> https://sourceforge.net/tracker/?func=detail&atid=100588&aid=1809234&group_id=588
> > >
> > > 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: text area and syntax packages
> > > Group: None
> > > Status: Open
> > > Resolution: None
> > > Priority: 5
> > > Private: No
> > > Submitted By: Jeffery To (coderjeff)
> > > Assigned to: Nobody/Anonymous (nobody)
> > > Summary: JavaScript edit mode: if/while/for highlighted as functions
> > >
> > > Initial Comment:
> > > In 4.3pre11 (actually this existed in 4.3pre10 as well), for JavaScript
> code like:
> > >
> > > if (condition) {
> > > ...
> > > }
> > >
> > > or:
> > >
> > > for (i in obj) {
> > > ...
> > > }
> > >
> > > the "if (...)" and "for (...)" are highlighted as functions. ("if" by
> itself is correctly identified as a keyword, but "if (...)" with the
> brackets are interpreted as a function)
> > >
> > > I believe this goes back to patch 1701737 (javascript.xml in revision
> 9527). (And I'm not really sure how functions/brackets were broken before
> that patch.)
> > >
> > > ----------------------------------------------------------------------
> > >
> > > You can respond by visiting:
> > >
> https://sourceforge.net/tracker/?func=detail&atid=100588&aid=1809234&group_id=588
> > >
> > >
> -------------------------------------------------------------------------
> > > This SF.net email is sponsored by: Splunk Inc.
> > > Still grepping through log files to find problems? Stop.
> > > Now Search log events and configuration files using AJAX and a browser.
> > > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > > --
> > > -----------------------------------------------
> > > jEdit Developers' List
> > > jEdit-devel <at> lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/jedit-devel
> > >
> >
> >
>
>
>
> --
> "I couldn't imagine somebody like Osama bin Laden understanding the joy of
> Hanukkah."
> - Dubya, December 2001
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> --
> -----------------------------------------------
> jEdit Developers' List
> jEdit-devel <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jedit-devel
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
--
--
-----------------------------------------------
jEdit Developers' List
jEdit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-devel
RSS Feed