mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Changing the regex for stripping multi-line comments because on Windows the old one was overflowing the stack. (Switched from a non-greedy to a greedy regexp.)
This commit is contained in:
parent
df4eb665b0
commit
db7a06aaf2
@ -99,7 +99,7 @@ public class PdePreprocessor {
|
||||
// whitespace
|
||||
"\\s+" + "|" +
|
||||
// multi-line comment
|
||||
"(/\\*(?:.|\\n)*?\\*/)" + "|" +
|
||||
"(/\\*[^*]*(?:\\*(?!/)[^*]*)*\\*/)" + "|" +
|
||||
// single-line comment
|
||||
"(//.*?$)" + "|" +
|
||||
// pre-processor directive
|
||||
@ -134,7 +134,7 @@ public class PdePreprocessor {
|
||||
// double-quoted string
|
||||
"(\"(?:[^\"\\\\]|\\\\.)*\")" + "|" +
|
||||
// multi-line comment
|
||||
"(/\\*(?:.|\\n)*?\\*/)" + "|" +
|
||||
"(/\\*[^*]*(?:\\*(?!/)[^*]*)*\\*/)" + "|" +
|
||||
// single-line comment
|
||||
"(//.*?$)" + "|" +
|
||||
// pre-processor directive
|
||||
@ -183,7 +183,7 @@ public class PdePreprocessor {
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
private List prototypes(String in) throws MalformedPatternException {
|
||||
public List prototypes(String in) throws MalformedPatternException {
|
||||
in = collapseBraces(strip(in));
|
||||
|
||||
PatternMatcherInput input = new PatternMatcherInput(in);
|
||||
|
Loading…
x
Reference in New Issue
Block a user