Skip to content

Commit

Permalink
Fix pinned use-path
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed May 20, 2024
1 parent 8da2b21 commit 444168b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion WIT.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,13 @@ contexts:
1: support.interface.wit
2: punctuation.separator.path.wit
# used interface (top-level use item, only)
- match: ({{id}})(?:(@)({{semver}}))?
- match: ({{id}})(?:(@)({{semver}})(\.)?)?
scope: meta.path.wit
captures:
1: support.interface.wit
2: punctuation.separator.version.wit
3: constant.numeric.version.wit
4: punctuation.separator.path.wit
pop: 1
- include: else-pop

Expand Down
19 changes: 19 additions & 0 deletions tests/syntax_test_scopes.wit
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,25 @@ use wasi:clocks.wall-clock.{datetime}
// ^^^^^^^^ variable.other.wit
// ^ punctuation.section.sequence.end.wit

use wasi:io/poll@0.2.0.{pollable};
// <- meta.statement.use.wit keyword.control.use.wit
//^ meta.statement.use.wit keyword.control.use.wit
// ^ meta.statement.use.path.wit - meta.path - support - keyword - variable
// ^^^^^^^^^^^^^^^^^^^ meta.statement.use.path.wit meta.path.wit
// ^^^^^^^^^^ meta.statement.use.items.wit meta.sequence.list.names.wit
// ^^^^ support.namespace.wit
// ^ punctuation.separator.path.wit
// ^^ support.namespace.package.wit
// ^ punctuation.separator.path.wit
// ^^^^ support.interface.wit
// ^ punctuation.separator.version.wit
// ^^^^^ constant.numeric.version.wit
// ^ punctuation.separator.path.wit
// ^ punctuation.section.sequence.begin.wit
// ^^^^^^^^ variable.other.wit
// ^ punctuation.section.sequence.end.wit
// ^ punctuation.terminator.statement.wit


/// World Declarations ////////////////////////////////////////////////////////

Expand Down

0 comments on commit 444168b

Please sign in to comment.