-
Notifications
You must be signed in to change notification settings - Fork 37
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
Parse error when file does not end in newline or semicolon #166
Comments
nmote
added a commit
to nmote/tree-sitter-swift
that referenced
this issue
Apr 27, 2022
See alex-pinkus#166 ``` $ echo -n "print(3)" > nonewline.swift $ npx tree-sitter parse nonewline.swift # No parse error ```
alex-pinkus
pushed a commit
that referenced
this issue
Apr 28, 2022
See #166 ``` $ echo -n "print(3)" > nonewline.swift $ npx tree-sitter parse nonewline.swift # No parse error ```
Thank you for both finding and fixing this! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This came up because basic Semgrep patterns are often given on only one line, so it's a problem if they can't be parsed.
Steps to reproduce:
$ echo -n "print(3)" > nonewline.swift
$ npx tree-sitter parse nonewline.swift # Parse error
$ swift nonewline.swift # prints 3
The text was updated successfully, but these errors were encountered: