Skip to content
New issue

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

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

Already on GitHub? # to your account

Semicolons not handled as expected #61

Closed
keeptyping opened this issue Nov 7, 2017 · 1 comment
Closed

Semicolons not handled as expected #61

keeptyping opened this issue Nov 7, 2017 · 1 comment

Comments

@keeptyping
Copy link

keeptyping commented Nov 7, 2017

Issue Summary

Semicolons not handled as expected.

Environment

  • OS Info: macOS Version 10.13.1 (Build 17B48)
  • Yanagiba/swift-ast version: 0.4.1

Reproduction Steps

Every const_decl/var_decl which ends with a semicolon is treated as an error.

Sample code

struct SemicolonIssue {
    
    private let issue = "";
    
}

Command to run swift-ast with the code above:
swift-ast SemicolonIssue.swift

Expected Result

A successfully parsed TopLevelDeclaration.

Actual Behavior

The parser failed with a badDeclaration error.

SemicolonIssue.swift:13:25 fatal: badDeclaration
@keeptyping keeptyping changed the title Semicolons not handled as expected. Semicolons not handled as expected Nov 7, 2017
@petermichaux
Copy link

petermichaux commented Nov 21, 2017

I'm using SwiftKotlin (https://github.com/angelolloqui/SwiftKotlin) and unfortunately it does not accept semicolons in swift code (see angelolloqui/SwiftKotlin#45). I think it because swift-ast does not accept semicolons. I hope swift-ast can be adjusted to accept semicolons.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants