diff --git a/etk-asm/src/parse/asm.pest b/etk-asm/src/parse/asm.pest index d814eb3b..a3ae55e7 100644 --- a/etk-asm/src/parse/asm.pest +++ b/etk-asm/src/parse/asm.pest @@ -37,9 +37,11 @@ decimal = @{ ASCII_DIGIT+ } hex = @{ "0x" ~ ASCII_HEX_DIGIT ~ ASCII_HEX_DIGIT+ } number = _{ binary | octal | hex | decimal } +no_spaces_in_selector = @{ !WHITESPACE ~ ASCII_ALPHANUMERIC } +no_spaces_before_selector = @{ !WHITESPACE ~ ASCII_ALPHA } selector = { "selector(\"" ~ function_declaration ~ "\")" } -function_declaration = { function_name ~ "(" ~ ASCII_ALPHANUMERIC* ~ ("," ~ ASCII_ALPHANUMERIC+)* ~ ")" } -function_name = @{ ( ASCII_ALPHA | "_" ) ~ ( ASCII_ALPHANUMERIC | "_" )* } +function_declaration = { function_name ~ "(" ~ no_spaces_in_selector* ~ ("," ~ no_spaces_in_selector+)* ~ ")" } +function_name = { (no_spaces_before_selector | "_" ) ~ ( no_spaces_in_selector | "_" )* } label = @{ ASCII_ALPHA ~ (ASCII_ALPHANUMERIC | "_")* } label_defn = { label ~ ":" }