Some refactoring

This commit is contained in:
2022-03-16 23:47:20 -05:00
parent ab2b0d3f86
commit 36dc5d5ed4
3 changed files with 104 additions and 128 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ sign = { "+" | "-" }
term_op = { "/" | "*" | "%" }
expr = { term ~ (sign ~ term)* }
term = { fact ~ (term_op ~ fact)* }
fact = { ("(" ~ expr ~ ")") | (number | relative_line_offset | relative_label | absolute_line_offset | label) }
fact = { ("(" ~ expr ~ ")") | number | relative_line_offset | relative_label | absolute_line_offset | label }
// Likewise, .db would get tedious quick without a string syntax, so, let's define one of those. An escape
// sequence is a backslash followed by certain other characters: