Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
G
geany
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
geany
Commits
b016e132
Kaydet (Commit)
b016e132
authored
Tem 15, 2013
tarafından
Colomban Wendling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Java: Report enums and fix parsing them
üst
80ad5c14
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
8 deletions
+48
-8
symbols.c
src/symbols.c
+1
-0
c.c
tagmanager/ctags/c.c
+21
-8
enum.java.tags
tests/ctags/enum.java.tags
+10
-0
java_enum.java
tests/ctags/java_enum.java
+5
-0
java_enum.java.tags
tests/ctags/java_enum.java.tags
+11
-0
No files found.
src/symbols.c
Dosyayı görüntüle @
b016e132
...
...
@@ -905,6 +905,7 @@ static void add_top_level_items(GeanyDocument *doc)
&
(
tv_iters
.
tag_class
),
_
(
"Classes"
),
"classviewer-class"
,
&
(
tv_iters
.
tag_function
),
_
(
"Methods"
),
"classviewer-method"
,
&
(
tv_iters
.
tag_member
),
_
(
"Members"
),
"classviewer-member"
,
&
(
tv_iters
.
tag_type
),
_
(
"Enums"
),
"classviewer-struct"
,
&
(
tv_iters
.
tag_other
),
_
(
"Other"
),
"classviewer-other"
,
NULL
);
break
;
...
...
tagmanager/ctags/c.c
Dosyayı görüntüle @
b016e132
...
...
@@ -204,6 +204,7 @@ typedef struct sStatementInfo
boolean
haveQualifyingName
;
/* do we have a name we are considering? */
boolean
gotParenName
;
/* was a name inside parentheses parsed yet? */
boolean
gotArgs
;
/* was a list of parameters parsed yet? */
unsigned
int
nSemicolons
;
/* how many semicolons did we see in that statement */
impType
implementation
;
/* abstract or concrete implementation? */
unsigned
int
tokenIndex
;
/* currently active token */
tokenInfo
*
token
[((
int
)
NumTokens
)];
...
...
@@ -327,7 +328,7 @@ typedef enum
{
JK_UNDEFINED
=
-
1
,
JK_CLASS
,
JK_FIELD
,
JK_INTERFACE
,
JK_METHOD
,
JK_PACKAGE
JK_PACKAGE
,
JK_ENUMERATOR
,
JK_ENUMERATION
}
javaKind
;
static
kindOption
JavaKinds
[]
=
{
...
...
@@ -336,6 +337,8 @@ static kindOption JavaKinds [] = {
{
TRUE
,
'i'
,
"interface"
,
"interfaces"
},
{
TRUE
,
'm'
,
"method"
,
"methods"
},
{
TRUE
,
'p'
,
"package"
,
"packages"
},
{
TRUE
,
'e'
,
"enumerator"
,
"enumerators (values inside an enumeration)"
},
{
TRUE
,
'g'
,
"enum"
,
"enumeration names"
},
};
typedef
enum
...
...
@@ -940,6 +943,7 @@ static void reinitStatement (statementInfo *const st, const boolean partial)
st
->
implementation
=
IMP_DEFAULT
;
st
->
gotArgs
=
FALSE
;
st
->
gotName
=
FALSE
;
st
->
nSemicolons
=
0
;
st
->
haveQualifyingName
=
FALSE
;
st
->
argEndPosition
=
0
;
...
...
@@ -1089,11 +1093,13 @@ static javaKind javaTagKind (const tagType type)
javaKind
result
=
JK_UNDEFINED
;
switch
(
type
)
{
case
TAG_CLASS
:
result
=
JK_CLASS
;
break
;
case
TAG_FIELD
:
result
=
JK_FIELD
;
break
;
case
TAG_INTERFACE
:
result
=
JK_INTERFACE
;
break
;
case
TAG_METHOD
:
result
=
JK_METHOD
;
break
;
case
TAG_PACKAGE
:
result
=
JK_PACKAGE
;
break
;
case
TAG_CLASS
:
result
=
JK_CLASS
;
break
;
case
TAG_FIELD
:
result
=
JK_FIELD
;
break
;
case
TAG_INTERFACE
:
result
=
JK_INTERFACE
;
break
;
case
TAG_METHOD
:
result
=
JK_METHOD
;
break
;
case
TAG_PACKAGE
:
result
=
JK_PACKAGE
;
break
;
case
TAG_ENUM
:
result
=
JK_ENUMERATION
;
break
;
case
TAG_ENUMERATOR
:
result
=
JK_ENUMERATOR
;
break
;
default:
Assert
(
"Bad Java tag type"
==
NULL
);
break
;
}
...
...
@@ -2786,6 +2792,9 @@ static void nextToken (statementInfo *const st)
}
}
while
(
isType
(
token
,
TOKEN_NONE
));
if
(
isType
(
token
,
TOKEN_SEMICOLON
)
&&
st
->
parent
)
st
->
parent
->
nSemicolons
++
;
/* We want to know about non-keyword variable types */
if
(
TOKEN_NONE
==
st
->
firstToken
->
type
)
{
...
...
@@ -2913,7 +2922,9 @@ static void tagCheck (statementInfo *const st)
{
case
TOKEN_NAME
:
{
if
(
insideEnumBody
(
st
))
if
(
insideEnumBody
(
st
)
&&
/* Java enumerations can contain members after a semicolon */
(
!
isLanguage
(
Lang_java
)
||
st
->
parent
->
nSemicolons
<
1
))
qualifyEnumeratorTag
(
st
,
token
);
break
;
}
...
...
@@ -3022,7 +3033,9 @@ static void tagCheck (statementInfo *const st)
case
TOKEN_SEMICOLON
:
case
TOKEN_COMMA
:
{
if
(
insideEnumBody
(
st
))
if
(
insideEnumBody
(
st
)
&&
/* Java enumerations can contain members after a semicolon */
(
!
isLanguage
(
Lang_java
)
||
st
->
parent
->
nSemicolons
<
2
))
;
else
if
(
isType
(
prev
,
TOKEN_NAME
))
{
...
...
tests/ctags/enum.java.tags
Dosyayı görüntüle @
b016e132
# format=tagmanager
A4e0
B4e0
C4e0
D4e0
E4e0
F4e0
e20
getShape128()e0public final Shape
getString128()e0public String
shape8e0Shape
string8e0String
twoKeywordsInARow8e0boolean
tests/ctags/java_enum.java
Dosyayı görüntüle @
b016e132
...
...
@@ -12,4 +12,9 @@ public class C {
void
m
()
{
}
}
public
enum
FancyEnum2
{
X
,
Y
;
void
m2
()
{
}
}
}
tests/ctags/java_enum.java.tags
Dosyayı görüntüle @
b016e132
# format=tagmanager
A4C.FancyEnum0
B4C.FancyEnum0
C10
FIRST_VALUE4C.TrivialEnum0
FancyEnum2C0
FancyEnum128(int i)C.FancyEnum0
FancyEnum22C0
SECOND_VALUE4C.TrivialEnum0
TrivialEnum2C0
X4C.FancyEnum20
Y4C.FancyEnum20
i8C.FancyEnum0int
m128()C.FancyEnum0void
m2128()C.FancyEnum20void
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment