Skip to content

Commit

Permalink
Limit hardforks to ASCII_ALPHA
Browse files Browse the repository at this point in the history
  • Loading branch information
gzanitti committed Oct 26, 2023
1 parent 4e472c9 commit 3fecdd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion etk-asm/src/parse/asm.pest
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ gt = { ">" }
lt = { "<" }
gte = { ">=" }
lte = { "<=" }
hardfork_name = { string_char* }
hardfork_name = { ASCII_ALPHA* }

string = @{ "\"" ~ string_char* ~ "\"" }
string_char = _{ "\\\\" | "\\\"" | (!"\\" ~ !"\"" ~ ANY) }
Expand Down
4 changes: 2 additions & 2 deletions etk-asm/src/parse/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ pub(crate) fn parse_builtin(pair: Pair<Rule>) -> Result<Node, ParseError> {
let mut directive = inner.into_inner();
let operator = match directive.next() {
Some(operator) => {
let operator = operator.as_str().into();
Some(operator)
let op = operator.as_str().into();
Some(op)
}
None => None,
};
Expand Down

0 comments on commit 3fecdd1

Please sign in to comment.