Quantcast

[ jEdit-devel ] [jedit:patches] #592 Patch for groovy mode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ jEdit-devel ] [jedit:patches] #592 Patch for groovy mode

Egor Abramovich

[patches:#592] Patch for groovy mode

Status: open
Group:
Created: Tue Sep 06, 2016 05:44 PM UTC by Egor Abramovich
Last Updated: Tue Sep 06, 2016 05:44 PM UTC
Owner: nobody
Attachments:

Problem:
Regular expressions in Groovy break highlighting.
For example, see the following code that would be highlighted incorrectly:

def matcher = s =~ /\'([a-zA-Z_]+)\'/
if (matcher.size()==0) {
println "Skipping line $lno: $t"
} else {
result.add(matcher[0][1]);
}

Fix:
Regexp delimiters should be added to "groovy.xml":

<SPAN TYPE="LITERAL1" ESCAPE="\\">
<BEGIN>/</BEGIN>
<END>/</END>
</SPAN>


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/jedit/patches/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------

--
-----------------------------------------------
jEdit Developers' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ jEdit-devel ] [jedit:patches] #592 Patch for groovy mode

Egor Abramovich

Just noticed that the patch above breaks one-line comments. This should be handled the same way as in JavaScript. Patch should be

<EOL_SPAN TYPE="COMMENT1">//</EOL_SPAN>

<SEQ_REGEXP TYPE="MARKUP" HASH_CHAR="/" AT_WORD_START="TRUE">/[^\p{Blank}]*?/</SEQ_REGEXP>

Attachments:


[patches:#592] Patch for groovy mode

Status: open
Group:
Created: Tue Sep 06, 2016 05:44 PM UTC by Egor Abramovich
Last Updated: Tue Sep 06, 2016 05:44 PM UTC
Owner: nobody
Attachments:

Problem:
Regular expressions in Groovy break highlighting.
For example, see the following code that would be highlighted incorrectly:

def matcher = s =~ /\'([a-zA-Z_]+)\'/
if (matcher.size()==0) {
println "Skipping line $lno: $t"
} else {
result.add(matcher[0][1]);
}

Fix:
Regexp delimiters should be added to "groovy.xml":

<SPAN TYPE="LITERAL1" ESCAPE="\\">
<BEGIN>/</BEGIN>
<END>/</END>
</SPAN>


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/jedit/patches/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------

--
-----------------------------------------------
jEdit Developers' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ jEdit-devel ] [jedit:patches] #592 Patch for groovy mode

Alan Ezust-2
In reply to this post by Egor Abramovich
  • status: open --> closed-accepted
  • assigned_to: Alan Ezust
  • Group: -->
  • Comment:

Committed 24658


[patches:#592] Patch for groovy mode

Status: closed-accepted
Group:
Created: Tue Sep 06, 2016 05:44 PM UTC by Egor Abramovich
Last Updated: Wed Sep 14, 2016 08:40 AM UTC
Owner: Alan Ezust
Attachments:

Problem:
Regular expressions in Groovy break highlighting.
For example, see the following code that would be highlighted incorrectly:

def matcher = s =~ /\'([a-zA-Z_]+)\'/
if (matcher.size()==0) {
println "Skipping line $lno: $t"
} else {
result.add(matcher[0][1]);
}

Fix:
Regexp delimiters should be added to "groovy.xml":

<SPAN TYPE="LITERAL1" ESCAPE="\\">
<BEGIN>/</BEGIN>
<END>/</END>
</SPAN>


Sent from sourceforge.net because [hidden email] is subscribed to https://sourceforge.net/p/jedit/patches/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/patches/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--
-----------------------------------------------
jEdit Developers' List
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
Loading...