Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ttcn: Skip comments correctly #3141

Merged
merged 1 commit into from
Aug 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Units/parser-ttcn.r/ttcn-types.d/input.ttcn
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ type record Tee
{
record of integer nestedIntegersRecord,
record length (0..5) of integer nestedRangedIntegersRecord,
/* a comment */
set of integer nestedIntegersSet,
// a comment
set length (2..4) of integer nestedRangerdIntegersSet,
enumerated {e_type1, e_type2} nestedEnum,
union {Type1 t1, Type2 t2} nestedUnion
Expand Down
2 changes: 2 additions & 0 deletions parsers/ttcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ static int getNonWhiteSpaceChar (void)
{
/* Line comment */
while (((c = getcFromInputFile()) != EOF) && (c != '\n'));
continue;
}
else if (c2=='*')
{
Expand All @@ -358,6 +359,7 @@ static int getNonWhiteSpaceChar (void)
ungetcToInputFile(c2);
}
}
continue;
}
else
{
Expand Down