Skip to content

Commit

Permalink
Rename pattern-rule for optional immediates
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Jun 26, 2017
1 parent 41d1942 commit fc1a023
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions grammars/webassembly.cson
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,10 @@ repository:
{include: "#number"}
{include: "#name"}
{include: "#string"}
{include: "#assignment"}
{include: "#optional-immediate"}
]


# Assignment (e.g.: offset=0 align=4)
assignment:
match: "(?<!\\w)(align|offset)(=)(?=[-+]?(?:\\d|0x[\\dA-Fa-f]))"
captures:
1: name: "variable.parameter.$1.webassembly"
2: name: "keyword.operator.assignment.webassembly"


# ;; Single-line comment
"comment-line":
name: "comment.line.semicolon.webassembly"
Expand Down Expand Up @@ -215,6 +207,14 @@ repository:
match: "(?<!\\w)[-+]?\\d+"
}]


# Optional immediate following load/store operators (e.g.: offset=0 align=4)
"optional-immediate":
match: "(?<!\\w)(align|offset)(=)(?=[-+]?(?:\\d|0x[\\dA-Fa-f]))"
captures:
1: name: "variable.parameter.$1.webassembly"
2: name: "keyword.operator.assignment.webassembly"


# Quoted string
string:
Expand Down

0 comments on commit fc1a023

Please sign in to comment.