{"id":27642017,"url":"https://github.com/bathos/wast-sublime-syntax","last_synced_at":"2026-01-24T17:32:57.781Z","repository":{"id":79705660,"uuid":"136468777","full_name":"bathos/wast-sublime-syntax","owner":"bathos","description":"wast (web assembly text format) sublime syntax definition","archived":false,"fork":false,"pushed_at":"2024-12-30T16:01:26.000Z","size":1199,"stargazers_count":7,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T23:52:04.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/bathos.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-07T11:40:41.000Z","updated_at":"2025-01-02T01:57:07.000Z","dependencies_parsed_at":"2023-05-29T17:15:30.511Z","dependency_job_id":null,"html_url":"https://github.com/bathos/wast-sublime-syntax","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bathos%2Fwast-sublime-syntax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bathos%2Fwast-sublime-syntax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bathos%2Fwast-sublime-syntax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bathos%2Fwast-sublime-syntax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bathos","download_url":"https://codeload.github.com/bathos/wast-sublime-syntax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250535081,"owners_count":21446506,"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":"2025-04-23T23:52:11.168Z","updated_at":"2026-01-24T17:32:57.771Z","avatar_url":"https://github.com/bathos.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# wast-sublime-syntax\n\nWAST, the [text format][1] of [WebAssembly][2], is a very low-level but\nhuman-readable and writable stack-based language. It is a tree of\n[s-expressions][3], generally, though instructions can also be written linearly.\n\nThis is a [Sublime Syntax][4] definition for WAST. It requires\n[Sublime Text version 3][5] or greater.\n\n\u003c!-- MarkdownTOC autolink=true --\u003e\n\n- [Highlighting examples](#highlighting-examples)\n- [Symbols](#symbols)\n- [Other meta-features](#other-meta-features)\n- [Scopes](#scopes)\n- [Limitations](#limitations)\n\n\u003c!-- /MarkdownTOC --\u003e\n\n## Highlighting examples\n\nUsing the themes Monokai, Propeller, Welded, and Excelsior\n(from [ES Sublime][6]) respectively:\n\n![Using Monokai](https://github.com/bathos/wast-sublime-syntax/raw/master/examples/monokai.png)\n![Using Propeller](https://github.com/bathos/wast-sublime-syntax/raw/master/examples/propeller.png)\n![Using Welded](https://github.com/bathos/wast-sublime-syntax/raw/master/examples/welded.png)\n![Using Excelsior](https://github.com/bathos/wast-sublime-syntax/raw/master/examples/excelsior.png)\n\nI haven’t included any customized themes presently. I may add one later that\nhighlights s-expressions by depth, since I think it would be an interesting\nexperiment.\n\n## Symbols\n\nFunctions, globals and types will appear in the local symbol list if they have\nbeen given names, but not if they’re anonymous (that is, only referenced by\nindex).\n\nExports will appear in both the local and global symbol lists.\n\n## Other meta-features\n\nThere is a definition for comments but, presently, no definition for indents. I\nstill don’t know quite what that should look like — there seem to be some very\ndifferent approaches to formatting s-expressions in the wild and I don’t have\nenough context yet to know which to choose. (Feedback or PRs welcome.)\n\n## Scopes\n\nThe following scopes are provided. Mostly this sticks to TextMate conventions\nbut with additional precision in some cases and, for certain stuff, minor abuse\nof not-quite-applicable-but-common scopes in order to help improve compatibility\nwith existing color schemes. In particular, I used `storage.type.constant` in\norder to force distinct coloring for some things that are semantically not all\n“constant”.\n\n- `comment.block.wast`\n- `comment.line.wast`\n- `constant.character.escape.byte.wast`\n- `constant.character.escape.char.wast`\n- `constant.numeric.float.wast`\n- `constant.numeric.integer.wast`\n- `entity.name.export.wast`\n- `entity.name.function.wast`\n- `entity.name.memory.wast`\n- `entity.name.module.import.wast`\n- `entity.name.module.wast`\n- `entity.name.statement.wast`\n- `entity.name.table.wast`\n- `entity.name.type.wast`\n- `invalid.illegal.wast`\n- `keyword.control.conditional.wast`\n- `keyword.control.flow.wast`\n- `keyword.declaration.offset.wast`\n- `keyword.operator.assignment.wast`\n- `keyword.operator.word.wast`\n- `keyword.other.export.wast`\n- `keyword.other.import.wast`\n- `keyword.other.module.wast`\n- `keyword.other.offset.wast`\n- `keyword.other.start.wast`\n- `meta.block.conditional.wast`\n- `meta.block.loop.wast`\n- `meta.block.wast`\n- `meta.function-call.wast`\n- `meta.group.limit.wast`\n- `meta.invocation.wast`\n- `meta.s-expression.data.wast`\n- `meta.s-expression.elem.wast`\n- `meta.s-expression.export-description.wast`\n- `meta.s-expression.export.wast`\n- `meta.s-expression.expression.wast`\n- `meta.s-expression.function.wast`\n- `meta.s-expression.functype.wast`\n- `meta.s-expression.global.wast`\n- `meta.s-expression.globaltype.wast`\n- `meta.s-expression.import.wast`\n- `meta.s-expression.instruction.wast`\n- `meta.s-expression.local.wast`\n- `meta.s-expression.memory.wast`\n- `meta.s-expression.module.wast`\n- `meta.s-expression.offset.wast`\n- `meta.s-expression.param.wast`\n- `meta.s-expression.result.wast`\n- `meta.s-expression.start.begin.wast`\n- `meta.s-expression.table.wast`\n- `meta.s-expression.type.wast`\n- `meta.s-expression.typeuse.wast`\n- `punctuation.definition.block.begin.wast`\n- `punctuation.definition.block.conditional.begin.wast`\n- `punctuation.definition.block.conditional.end.wast`\n- `punctuation.definition.block.end.wast`\n- `punctuation.definition.block.loop.begin.wast`\n- `punctuation.definition.block.loop.end.wast`\n- `punctuation.definition.comment.begin.wast`\n- `punctuation.definition.comment.end.wast`\n- `punctuation.definition.data.begin.wast`\n- `punctuation.definition.data.end.wast`\n- `punctuation.definition.elem.begin.wast`\n- `punctuation.definition.elem.end.wast`\n- `punctuation.definition.export.begin.wast`\n- `punctuation.definition.export.end.wast`\n- `punctuation.definition.exportdesc.begin.wast`\n- `punctuation.definition.exportdesc.end.wast`\n- `punctuation.definition.expression.begin.wast`\n- `punctuation.definition.expression.end.wast`\n- `punctuation.definition.function.begin.wast`\n- `punctuation.definition.function.end.wast`\n- `punctuation.definition.functype.begin.wast`\n- `punctuation.definition.functype.end.wast`\n- `punctuation.definition.global.begin.wast`\n- `punctuation.definition.global.end.wast`\n- `punctuation.definition.globaltype.begin.wast`\n- `punctuation.definition.globaltype.end.wast`\n- `punctuation.definition.import.begin.wast`\n- `punctuation.definition.import.end.wast`\n- `punctuation.definition.instruction.begin.wast`\n- `punctuation.definition.instruction.end.wast`\n- `punctuation.definition.local.begin.wast`\n- `punctuation.definition.local.end.wast`\n- `punctuation.definition.memory.begin.wast`\n- `punctuation.definition.memory.end.wast`\n- `punctuation.definition.module.begin.wast`\n- `punctuation.definition.module.end.wast`\n- `punctuation.definition.offset.begin.wast`\n- `punctuation.definition.offset.end.wast`\n- `punctuation.definition.param.begin.wast`\n- `punctuation.definition.param.end.wast`\n- `punctuation.definition.result.begin.wast`\n- `punctuation.definition.result.end.wast`\n- `punctuation.definition.start.begin.wast`\n- `punctuation.definition.start.end.wast`\n- `punctuation.definition.string.begin.wast`\n- `punctuation.definition.string.end.wast`\n- `punctuation.definition.table.begin.wast`\n- `punctuation.definition.table.end.wast`\n- `punctuation.definition.type.begin.wast`\n- `punctuation.definition.type.end.wast`\n- `punctuation.definition.typeuse.begin.wast`\n- `punctuation.definition.typeuse.end.wast`\n- `source.wast`\n- `storage.modifier.mutable.wast`\n- `storage.modifier.result.wast`\n- `storage.modifier.type.wast`\n- `storage.modifier.wast`\n- `storage.type.constant.wast`\n- `storage.type.data.wast`\n- `storage.type.elem.wast`\n- `storage.type.function.wast`\n- `storage.type.global.wast`\n- `storage.type.local.wast`\n- `storage.type.memory.wast`\n- `storage.type.param.wast`\n- `storage.type.table.wast`\n- `storage.type.type.wast`\n- `string.quoted.double.wast`\n- `support.function.memory.wast`\n- `support.function.numeric.wast`\n- `support.function.variable.wast`\n- `support.type.wast`\n- `variable.other.index.wast`\n- `variable.other.readwrite.wast`\n- `variable.other.wast`\n- `variable.parameter.wast`\n\n## Limitations\n\nAs with most languages, Sublime Syntax and Text Mate syntax definitions can\nmodel WAST correctly at the lexical level, but newline blindness prevents ideal\nscoping of some constructs.\n\nIn this case, however, there are not many issues that arise from this — really\nthere’s just one. Whenever \"(\" is followed by a keyword, if there is a newline\nor a multiline comment between them, this syntax definition will not match that\ns-expression correctly. Since it would be unusual/unreadable if there really\nwere newlines or comments in that position, I haven’t included any special\nrecovery logic, only this caveat emptor.\n\nSome higher level syntactic constraints are applied, like only allowing one\n_start_ field, but plenty of other well-formedness constraints are not applied,\neven where they technically could be expressed in terms of Sublime Syntax.\n\n[1]: https://webassembly.github.io/spec/core/text/index.html\n[2]: https://webassembly.github.io/spec/core/index.html\n[3]: https://en.wikipedia.org/wiki/S-expression\n[4]: https://www.sublimetext.com/docs/3/syntax.html\n[5]: https://www.sublimetext.com/3\n[6]: https://github.com/bathos/Ecmascript-Sublime\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbathos%2Fwast-sublime-syntax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbathos%2Fwast-sublime-syntax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbathos%2Fwast-sublime-syntax/lists"}