Skip to content

Commit b21fe7c

Browse files
committed
Lubos directs to link C/C++ identifiers of length=1
Also: - fix reported line number in printDiffs()
1 parent 563c66a commit b21fe7c

File tree

4 files changed

+24
-34
lines changed

4 files changed

+24
-34
lines changed

src/org/opensolaris/opengrok/analysis/c/CXref.lex

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ File = [a-zA-Z]{FNameChar}* "." ([cChHsStT] | [Cc][Oo][Nn][Ff] |
7878

7979
{Identifier} {
8080
String id = yytext();
81-
// For historical reasons, CXref does not link Identifiers of length=1
82-
if (id.length() > 1) {
83-
writeSymbol(id, Consts.kwd, yyline);
84-
} else {
85-
out.write(id);
86-
}
81+
writeSymbol(id, Consts.kwd, yyline);
8782
}
8883

8984
"#" {WhspChar}* "include" {WhspChar}* ("<"[^>\n\r]+">" | \"[^\"\n\r]+\") {

src/org/opensolaris/opengrok/analysis/c/CxxXref.lex

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,7 @@ File = [a-zA-Z]{FNameChar}* "." ([cChHsStT] | [Cc][Oo][Nn][Ff] |
7878

7979
{Identifier} {
8080
String id = yytext();
81-
// For historical reasons, CxxXref does not link identifiers of length=1
82-
if (id.length() > 1) {
83-
writeSymbol(id, CxxConsts.kwd, yyline);
84-
} else {
85-
out.write(id);
86-
}
81+
writeSymbol(id, CxxConsts.kwd, yyline);
8782
}
8883

8984
"#" {WhspChar}* "include" {WhspChar}* ("<"[^>\n\r]+">" | \"[^\"\n\r]+\") {

0 commit comments

Comments
 (0)