Skip to content

Commit

Permalink
Add support for pop instruction.
Browse files Browse the repository at this point in the history
It's not strictly limited to exception handling but is currently
only necessary in catch blocks.
  • Loading branch information
whitequark committed Feb 24, 2023
1 parent 6c8d335 commit ab69ecd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions wast.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,21 @@ contexts:
- instructions
- resulttype
- label
- match: '(\(){{WHITES}}*(pop){{IDTERM}}'
captures:
1: punctuation.definition.instruction.begin.wast
2: support.function.numeric.wast
push:
- - meta_scope: meta.s-expression.instruction.wast
- match: '\)'
scope: punctuation.definition.instruction.end.wast
pop: true
- match: '.'
scope: invalid.illegal.wast
- - match: '{{VALTYP}}'
scope: support.type.wast
- match: '(?=.)'
pop: true
# The lookahead here is a hack for if-then to avoid more copypasta contexts
- match: '\((?!{{WHITES}}*then{{IDTERM}})'
scope: punctuation.definition.instruction.begin.wast
Expand Down

0 comments on commit ab69ecd

Please sign in to comment.