From 6e75655c467534a4b978a87cc854cc8fe3998f08 Mon Sep 17 00:00:00 2001 From: Catherine Date: Fri, 24 Feb 2023 06:36:48 +0000 Subject: [PATCH] Update syntax for memory and variable instructions. --- wast.sublime-syntax | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wast.sublime-syntax b/wast.sublime-syntax index 4016aaa..687851b 100644 --- a/wast.sublime-syntax +++ b/wast.sublime-syntax @@ -27,13 +27,13 @@ variables: INTERG: '[+-]?(?:0x{{HEXNUM}}|{{DECNUM}}){{IDTERM}}' INTERO: 'i32\.(?:reinterpret_f32|trunc_f(?:32|64)_[su]|wrap_i64)|i64\.(?:extend_i32_[su]|trunc_f(?:32|64)_[su]|reinterpret[/_]f64)' MEMOPS: '(?:f(?:32|64)\.(?:load|store)|i(?:32|64)\.(?:load(?:(?:8_|16_)[su])?|store(?:8|16)?)|i64\.(?:load32_[su]|store32)){{IDTERM}}' - MEMOP2: '(memory\.(?:grow|size)|grow_memory|current_memory){{IDTERM}}' + MEMOP2: 'memory\.(?:grow|size){{IDTERM}}' NCONST: '[fi](?:32|64)\.const{{IDTERM}}' NUMOPS: '(?:{{FLOATC}}|{{FLOATO}}|{{INTERC}}|{{INTERO}}){{IDTERM}}' STARTS: '(\(){{WHITES}}*(start){{IDTERM}}' UINTER: '(?:0x{{HEXNUM}}|{{DECNUM}}){{IDTERM}}' VALTYP: '[fi](?:32|64){{IDTERM}}' - VAROPS: '(?:[gs]et_(?:glob|loc)al|tee_local)|(?:(?:global|local)\.(?:get|set))|(?:local\.tee){{IDTERM}}' + VAROPS: '(?:(?:global|local)\.(?:get|set))|(?:local\.tee){{IDTERM}}' WHITES: '[ \n\r\t]' contexts: @@ -80,7 +80,7 @@ contexts: push: comment_block constant_expression: # This is a narrow subset of "expression" permitting only one "constant" or - # "get_global" instruction. There are a few places where the grammar + # "global.get" instruction. There are a few places where the grammar # indicates "expression" but where this constraint is then enforced at a # higher level. For simplicity I’ve added this artificial production; even # though the constraint it describes is technically not syntactic, it @@ -97,7 +97,7 @@ contexts: - - include: constant_expression_instr - include: constant_expression_instr constant_expression_instr: - - match: 'get_global{{IDTERM}}' + - match: 'global.get{{IDTERM}}' scope: support.function.variable.wast set: reference - match: '{{NCONST}}'