Skip to content

Commit

Permalink
allow unused functions in the meantime
Browse files Browse the repository at this point in the history
  • Loading branch information
orpuente-MS committed Jan 30, 2025
1 parent ae88ec1 commit 9f379db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/qsc_qasm3/src/lex.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(unused)]

pub mod cooked;
pub mod raw;

use enum_iterator::Sequence;

pub(super) use cooked::{Error, Lexer, Token, TokenKind};
Expand Down
6 changes: 3 additions & 3 deletions compiler/qsc_qasm3/src/lex/cooked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ impl<'a> Lexer<'a> {
let mut iter = tokens.iter();
while self.next_if_eq(*(iter.next().expect("tokens should have at least one token"))) {
for token in iter {
self.expect(*token, complete)?
self.expect(*token, complete)?;
}
iter = tokens.iter();
}
Expand All @@ -482,7 +482,7 @@ impl<'a> Lexer<'a> {
}
raw::TokenKind::Ident => {
let ident = &self.input[(token.offset as usize)..(self.offset() as usize)];
Ok(Some(self.ident(ident)))
Ok(Some(Self::ident(ident)))
}
raw::TokenKind::HardwareQubit => Ok(Some(TokenKind::HardwareQubit)),
raw::TokenKind::LiteralFragment(_) => {
Expand Down Expand Up @@ -650,7 +650,7 @@ impl<'a> Lexer<'a> {
}
}

fn ident(&mut self, ident: &str) -> TokenKind {
fn ident(ident: &str) -> TokenKind {
match ident {
"gphase" => TokenKind::GPhase,
"inv" => TokenKind::Inv,
Expand Down

0 comments on commit 9f379db

Please sign in to comment.