-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow trailing semi-colon after typedef #7
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added support for trailing semicolons after typedef and const definitions, improving compatibility with other Thrift parsers.
- Modified
parseTypedef
insrc/main/parser.ts
to consume optional trailing semicolons - Added new test fixtures and solutions in
src/tests/parser
andsrc/tests/scanner
to verify the new behavior - Updated
src/tests/parser/parser.spec.ts
andsrc/tests/scanner/scanner.spec.ts
with new test cases for trailing semicolons - Implemented changes consistently across parser and scanner components
7 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings
const string test = 'asdf'; | ||
typedef i32 MyInteger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Duplicate const declaration on line 3
@@ -0,0 +1,4 @@ | |||
const string test = 'asdf'; | |||
typedef i32 MyInteger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Duplicate typedef declaration on line 4
const string test = 'asdf' | ||
typedef i32 MyInteger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Inconsistent use of semicolons
} | ||
} | ||
}, | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Missing semicolon after const definition
This is not exactly in the spec, but most Thrift parsers allow trailing semi-colon after typedef.