ctags
ctags copied to clipboard
TypeScript: extract a member with no type
[yamato@dev64 ts-class-member-with-props.d]$ cat input2.ts
cat input2.ts
class C {
a
b
}
[yamato@dev64 ts-class-member-with-props.d]$ tsc input2.ts
tsc input2.ts
[yamato@dev64 ts-class-member-with-props.d]$ ~/bin/ctags -o - input2.ts
~/bin/ctags -o - input2.ts
C input2.ts /^class C {$/;" c
b input2.ts /^ b$/;" p class:C
a is not extracted.
diff --git a/parsers/typescript.c b/parsers/typescript.c
index f168de622..db470742e 100644
--- a/parsers/typescript.c
+++ b/parsers/typescript.c
@@ -1813,6 +1813,7 @@ static void parseClassBody (const int scope, tokenInfo *const token)
case TOKEN_COLON:
uwiUngetC (':');
parsePropertyType (token);
+ case TOKEN_NL:
case TOKEN_SEMICOLON:
if (member)
{