{"id":15629690,"url":"https://github.com/anko/sexpr-plus","last_synced_at":"2025-04-22T19:55:24.220Z","repository":{"id":27681571,"uuid":"31167845","full_name":"anko/sexpr-plus","owner":"anko","description":"JS S-expression parser with quoting and comments","archived":false,"fork":false,"pushed_at":"2016-01-19T00:29:30.000Z","size":0,"stargazers_count":8,"open_issues_count":3,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-08T22:16:19.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"LiveScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-22T15:41:43.000Z","updated_at":"2020-05-02T12:11:49.000Z","dependencies_parsed_at":"2022-08-01T11:47:27.242Z","dependency_job_id":null,"html_url":"https://github.com/anko/sexpr-plus","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fsexpr-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fsexpr-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fsexpr-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anko%2Fsexpr-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anko","download_url":"https://codeload.github.com/anko/sexpr-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246223325,"owners_count":20743168,"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","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-10-03T10:28:10.701Z","updated_at":"2025-03-29T18:15:30.851Z","avatar_url":"https://github.com/anko.png","language":"LiveScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sexpr-plus [![npm package](https://img.shields.io/npm/v/sexpr-plus.svg?style=flat-square)][1] [![CI status](https://img.shields.io/travis/anko/sexpr-plus.svg?style=flat-square)][2]\n\nRecursive descent parser for S-expressions, with features useful for writing an\nS-expr-based programming language.  Written for [eslisp][3], but generalisable.\n\nOutputs an array containing objects representing parsed forms:\n\n-   Lists are parsed to `{ type: \"list\", content: [ \u003cother objects\u003e... ] }`.\n-   Atoms are parsed to `{ type: \"atom\", content: \"\u003catomName\u003e\" }`.\n-   Strings (delimited with `\"`s) are parsed to `{ type: \"string\", content:\n    \"\u003catomName\u003e\" }`.  They support the same escape sequences as JavaScript\n    strings: `\\\"`, `\\\\`, `\\n`, `\\r`, `\\t`, `\\f`, and `\\b`.\n-   Supports quote, quasiquote, unquote and unquote-splicing, with `'`, `` `\n    ``, `,` and `,@`.  They're turned into the appropriate atoms.\n-   Comments are from `;` til end of line.  They are not present in the output.\n\nEmpty inputs or inputs containing only comments produce an empty array.\n\nForked from the more minimal [fwg/s-expression][4].\n\n## Node locations\n\nAll output nodes also have a `location` property, showing where in the input\nthat node originated:\n\n    {\n        start : { offset, line, column },\n        end : { offset, line, column }\n    }\n\nAll are integers: `offset` is the number of characters since the input, `line`\nand `column` are 1-based and self-explanatory.\n\nThese may be handy for constructing source maps or showing more detailed error\nmessages.\n\n## Usage\n\n    npm i sexpr-plus\n\n```js\nvar parse = require(\"sexpr-plus\").parse;\n```\n\nCall `parse` with a string containing code to parse.\n\nIf you need to catch and distinguish between different types of `Error` with\n`instanceof` while parsing, the syntax error prototype is available at\n`require(\"sexpr-plus\").SyntaxError`.\n\n## License\n\n[MIT][5].\n\n[1]: https://www.npmjs.com/package/sexpr-plus\n[2]: https://travis-ci.org/anko/sexpr-plus\n[3]: https://github.com/anko/eslisp\n[4]: https://github.com/fwg/s-expression\n[5]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanko%2Fsexpr-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanko%2Fsexpr-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanko%2Fsexpr-plus/lists"}