mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-14 16:45:07 +01:00
array indexing and a bunch of other stuff
This commit is contained in:
parent
e7597dab07
commit
94229110cc
5 changed files with 172 additions and 20 deletions
|
|
@ -51,7 +51,8 @@ where
|
|||
lex: PeekMoreIterator<I>,
|
||||
}
|
||||
|
||||
macro_rules! expect {
|
||||
// HACK: It's called `_parser` as a workaround this being ambiguous with the `#[expect]` attribute
|
||||
macro_rules! expect_parser {
|
||||
($self:ident, $pat:pat) => {
|
||||
match $self.next_t()? {
|
||||
($pat, span) => span,
|
||||
|
|
@ -68,6 +69,8 @@ macro_rules! expect {
|
|||
};
|
||||
}
|
||||
|
||||
use expect_parser as expect;
|
||||
|
||||
macro_rules! eat {
|
||||
($self:ident, $pat:pat) => {
|
||||
match $self.peek_t() {
|
||||
|
|
@ -77,6 +80,8 @@ macro_rules! eat {
|
|||
};
|
||||
}
|
||||
|
||||
use eat;
|
||||
|
||||
/// Can be called for the start of a sequence of tokens that could be a type.
|
||||
#[rustfmt::skip]
|
||||
fn is_tok_start_of_ty(tok: &Tok<'_>) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue