-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2646 from masatake/readtags-fix-if-special-form
dsl: fix `if' special form
- Loading branch information
Showing
7 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
enum MUTEX_E { mutex_a, mutex_b, mutex }; | ||
|
||
#define mutex mutex | ||
|
||
int mutex; | ||
|
||
struct MUTEX_S { | ||
int mutex; | ||
}; | ||
|
||
typedef mutex int; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ | ||
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ | ||
!_TAG_OUTPUT_FILESEP slash /slash or backslash/ | ||
!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ | ||
!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ | ||
!_TAG_PROGRAM_AUTHOR Universal Ctags Team // | ||
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ | ||
!_TAG_PROGRAM_URL https://ctags.io/ /official site/ | ||
!_TAG_PROGRAM_VERSION 0.0.0 /717028d4/ | ||
MUTEX_E input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" g language:C file: | ||
MUTEX_S input.c /^struct MUTEX_S {$/;" s language:C file: | ||
mutex input.c /^ int mutex;$/;" m language:C struct:MUTEX_S typeref:typename:int file: | ||
mutex input.c /^#define mutex /;" d language:C file: | ||
mutex input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" e language:C enum:MUTEX_E file: | ||
mutex input.c /^int mutex;$/;" v language:C typeref:typename:int | ||
mutex input.c /^typedef mutex int;$/;" t language:C typeref:typename:int file: | ||
mutex_a input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" e language:C enum:MUTEX_E file: | ||
mutex_b input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" e language:C enum:MUTEX_E file: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/sh | ||
|
||
# Copyright: 2020 Masatake YAMATO | ||
# License: GPL-2 | ||
|
||
READTAGS=$3 | ||
|
||
. ../utils.sh | ||
|
||
#V="valgrind --leak-check=full -v" | ||
V= | ||
|
||
if ! [ -x "${READTAGS}" ]; then | ||
skip "no readtags" | ||
fi | ||
|
||
if ! ( "${READTAGS}" -h | grep -q -e -S ); then | ||
skip "no sorter function in readtags" | ||
fi | ||
|
||
${READTAGS} -t output.tags -ne -S '(if (eq? $kind &kind) | ||
0 | ||
(+ | ||
(if (or (eq? $kind "t")) | ||
-4 | ||
(if (eq? $kind "v") | ||
-3 | ||
(if (eq? $kind "d") | ||
-2 | ||
(if (eq? $kind "e") | ||
-1 | ||
0)))) | ||
(if (or (eq? &kind "t")) | ||
4 | ||
(if (eq? &kind "v") | ||
3 | ||
(if (eq? &kind "d") | ||
2 | ||
(if (eq? &kind "e") | ||
1 | ||
0))))))' mutex |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mutex input.c /^typedef mutex int;$/;" kind:t file: language:C typeref:typename:int | ||
mutex input.c /^int mutex;$/;" kind:v language:C typeref:typename:int | ||
mutex input.c /^#define mutex /;" kind:d file: language:C | ||
mutex input.c /^enum MUTEX_E { mutex_a, mutex_b, mutex };$/;" kind:e file: language:C enum:MUTEX_E | ||
mutex input.c /^ int mutex;$/;" kind:m file: language:C struct:MUTEX_S typeref:typename:int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters