[PATCH] Support RangeFrom ([x..]) and RangeFromTo ([x..y]) in the parser

2021-07-25 Thread Mark Wielaard
Parsing the .. (DOT_DOT) operator to get a range had two issues. Trying to compile: let block = [1,2,3,4,5]; let _rf = &block[1..]; let _rt = &block[..3]; let _rft = &block[2..4]; range.rs:4:23: error: found unexpected token ‘]’ in null denotation 4 | let _rf = &block[1..]; |

[PATCH] Support byte and byte string literals

2021-07-25 Thread Mark Wielaard
A byte literal is an u8 created as a ascii char or hex escape e.g. b'X'. A byte string literal is a string created from ascii or hex chars. bytes are represented as u8 and byte strings as str (with just ascii < 256 chars), but it should really be &'static [u8; n]. --- gcc/rust/backend/rust-compil