{"id":13872161,"url":"https://github.com/stevapple/package-syntax-parser","last_synced_at":"2025-08-08T06:39:42.403Z","repository":{"id":152417958,"uuid":"395531013","full_name":"stevapple/package-syntax-parser","owner":"stevapple","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-22T09:54:35.000Z","size":25,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-02T17:00:09.166Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stevapple.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-08-13T05:28:43.000Z","updated_at":"2023-08-26T01:54:57.000Z","dependencies_parsed_at":"2024-01-16T09:55:20.912Z","dependency_job_id":null,"html_url":"https://github.com/stevapple/package-syntax-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stevapple/package-syntax-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevapple%2Fpackage-syntax-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevapple%2Fpackage-syntax-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevapple%2Fpackage-syntax-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevapple%2Fpackage-syntax-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stevapple","download_url":"https://codeload.github.com/stevapple/package-syntax-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stevapple%2Fpackage-syntax-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269378467,"owners_count":24407314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T23:00:35.430Z","updated_at":"2025-08-08T06:39:42.356Z","avatar_url":"https://github.com/stevapple.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# `package-syntax-parser`\n\n`package-syntax-parser` is a temporary substitute for the proposed frontend parser for the new `@package` syntax in Swift, based on [`SwiftSyntax`](https://github.com/apple/swift-syntax). _This package is a part of [Google Summer of Code](https://summerofcode.withgoogle.com) 2021 project [SwiftPM support for Swift scripts](https://summerofcode.withgoogle.com/projects/#5240743418920960)._\n\n**NOTE: This tool is supposed to be deprecated once the corresponding frontend implementation is available.**\n\n## Usage\n\n```\nUSAGE: package-syntax-parser \u003cfile\u003e\n\nARGUMENTS:\n  \u003cfile\u003e\n\nOPTIONS:\n  -h, --help              Show help information.\n```\n\n## Output\n\nFor `test.swift`:\n```swift              \n@package(url: \"https://github.com/apple/swift-log.git\", from: \"1.0.0\")\nimport Logging\n\n@package(path: \"swift-argument-parser\")\nimport ArgumentParser\n\nstruct Count: ParsableCommand {\n    @Argument var inputFile: String\n    @Argument var outputFile: String\n\n    func run() throws {\n        let logger = Logger(label: \"com.example.Script.main\")\n        logger.info(\"\"\"\n            Counting words in '\\(inputFile)' \\\n            and writing the result into '\\(outputFile)'.\n            \"\"\")\n\n        // Read 'inputFile', count the words, and save to 'outputFile'.\n    }\n}\nCount.main()\n```\n\nThe output is:\n\n```json\n{\n  \"dependencies\" : [\n    {\n      \"package\" : {\n        \"raw\" : \"url:\\\"https:\\/\\/github.com\\/apple\\/swift-log.git\\\",from:\\\"1.0.0\\\"\",\n        \"url\" : \"https:\\/\\/github.com\\/apple\\/swift-log.git\"\n      },\n      \"modules\" : [\n        \"Logging\"\n      ]\n    },\n    {\n      \"package\" : {\n        \"raw\" : \"path:\\\"\\/Users\\/stavapple\\/Developer\\/swift-argument-parser\\\"\",\n        \"path\" : \"\\/Users\\/stavapple\\/Developer\\/swift-argument-parser\"\n      },\n      \"modules\" : [\n        \"ArgumentParser\"\n      ]\n    }\n  ],\n  \"sourceFile\" : \"\\/Users\\/stavapple\\/Developer\\/test.swift\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevapple%2Fpackage-syntax-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstevapple%2Fpackage-syntax-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstevapple%2Fpackage-syntax-parser/lists"}