Skip to content

Commit 6e75655

Browse files
committed
Update syntax for memory and variable instructions.
1 parent ab69ecd commit 6e75655

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

wast.sublime-syntax

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ variables:
2727
INTERG: '[+-]?(?:0x{{HEXNUM}}|{{DECNUM}}){{IDTERM}}'
2828
INTERO: 'i32\.(?:reinterpret_f32|trunc_f(?:32|64)_[su]|wrap_i64)|i64\.(?:extend_i32_[su]|trunc_f(?:32|64)_[su]|reinterpret[/_]f64)'
2929
MEMOPS: '(?:f(?:32|64)\.(?:load|store)|i(?:32|64)\.(?:load(?:(?:8_|16_)[su])?|store(?:8|16)?)|i64\.(?:load32_[su]|store32)){{IDTERM}}'
30-
MEMOP2: '(memory\.(?:grow|size)|grow_memory|current_memory){{IDTERM}}'
30+
MEMOP2: 'memory\.(?:grow|size){{IDTERM}}'
3131
NCONST: '[fi](?:32|64)\.const{{IDTERM}}'
3232
NUMOPS: '(?:{{FLOATC}}|{{FLOATO}}|{{INTERC}}|{{INTERO}}){{IDTERM}}'
3333
STARTS: '(\(){{WHITES}}*(start){{IDTERM}}'
3434
UINTER: '(?:0x{{HEXNUM}}|{{DECNUM}}){{IDTERM}}'
3535
VALTYP: '[fi](?:32|64){{IDTERM}}'
36-
VAROPS: '(?:[gs]et_(?:glob|loc)al|tee_local)|(?:(?:global|local)\.(?:get|set))|(?:local\.tee){{IDTERM}}'
36+
VAROPS: '(?:(?:global|local)\.(?:get|set))|(?:local\.tee){{IDTERM}}'
3737
WHITES: '[ \n\r\t]'
3838

3939
contexts:
@@ -80,7 +80,7 @@ contexts:
8080
push: comment_block
8181
constant_expression:
8282
# This is a narrow subset of "expression" permitting only one "constant" or
83-
# "get_global" instruction. There are a few places where the grammar
83+
# "global.get" instruction. There are a few places where the grammar
8484
# indicates "expression" but where this constraint is then enforced at a
8585
# higher level. For simplicity I’ve added this artificial production; even
8686
# though the constraint it describes is technically not syntactic, it
@@ -97,7 +97,7 @@ contexts:
9797
- - include: constant_expression_instr
9898
- include: constant_expression_instr
9999
constant_expression_instr:
100-
- match: 'get_global{{IDTERM}}'
100+
- match: 'global.get{{IDTERM}}'
101101
scope: support.function.variable.wast
102102
set: reference
103103
- match: '{{NCONST}}'

0 commit comments

Comments
 (0)