Re: [GSoC][RFC/PATCH] userdiff: added support for diffing shell scripts
- From
- Kapil Jain <jkapil.cs@gmail.com>
- Date
- Mar 24, 2019, 10:04 UTC
- Message-ID
- <CAMknYENJ+U4urtSEtwDSLpdwGe=x=uq_HdSs-cT9Z+PT5ZQiLg@mail.gmail.com>
- In-Reply-To
- <CAP8UFD0cWSTZPqqVwTFyYL06S+6aT_EiLPW6jUE0AH9puxevmg@mail.gmail.com>
On Sun, Mar 24, 2019 at 2:49 PM Christian Couder <christian.couder@gmail.com> wrote:
> > The test_language_driver() function used to test the regexps is > ... > GIT_TEST_CMP which is usually either "diff -u" or "diff -c".
Thanks.
please provide some insights on the regex mentioned below:
+
+PATTERNS("shell",
+ /* Function Names */
+ "([A-Za-z_][A-Za-z0-9_]*)[[:space:]]*\\([[:space:]]*\\)[[:space:]]*\\{",
+ /* Words */
+ "([$#@A-Za-z_\"\'][$#@A-Za-z0-9_\"\']*)"),
+reference mail: https://public-inbox.org/git/20190324084523.8744-1-jkapil.cs@gmail.com/. please let me know if the regex is not self explanatory.