WHITESPACE = _{ WHITE_SPACE } COMMENT = _{ "#" ~ (!NEWLINE ~ ANY)* } DELIM = _{ &")" | &"}" | &"," | &WHITESPACE | &EOI } operator = _{ "+" | "-" | "*" | "/" | "//" | "%" | "**" | "^" } unicode_ident = _{ XID_START ~ XID_CONTINUE* } ident = @{ unicode_ident | operator } delimited_digits = _{ ( ASCII_DIGIT | "_" ~ &ASCII_DIGIT )* } num = @{ "-"? ~ ( "0" | '1'..'9' ~ delimited_digits ) ~ ( "." ~ ASCII_DIGIT ~ delimited_digits )? ~ ( "E" ~ "-"? ~ ASCII_DIGIT ~ delimited_digits )? } raw_string_inner = { (!PEEK ~ ANY)* } raw_string = @{ PUSH("'"+) ~ raw_string_inner ~ POP } string_inner = { (!"\"" ~ ANY)* } string = @{ "\"" ~ string_inner ~ "\""} literal = { num | string | raw_string } anon_exp = ${ literal | ident } parens = { "(" ~ list ~ ")" } block = { "{" ~ list ~ "}" } apply = ${ anon_exp ~ parens } block_apply = ${ anon_exp ~ block } walk = { anon_exp ~ "." ~ ident } pipe = { anon_exp ~ ( ">>" ~ anon_exp )*} named_exp = { pipe ~ "->" ~ ident } exp = { named_exp | pipe } list = { ( exp ~ ","? )* } file = { SOI ~ list ~ &EOI }