mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-14 16:45:07 +01:00
comments // hello
This commit is contained in:
parent
ca33e5f0c5
commit
1f7078f80d
1 changed files with 13 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
//! Contrary to popular belief, Dennis Ritchie did not invent the C grammar.
|
||||
//! The C grammar was brought to Dennis Ritchie by a demon in hos worst dreams
|
||||
//! The C grammar was brought to Dennis Ritchie by a demon in his worst dreams
|
||||
|
||||
pub enum PToken {
|
||||
HeaderName(Vec<u8>),
|
||||
|
|
@ -207,6 +207,18 @@ where
|
|||
b'"' => return Some(self.string_literal()),
|
||||
b'[' => return Some(PToken::Punctuator(Punctuator::BraceOpen)),
|
||||
c if c.is_ascii_whitespace() => {}
|
||||
b'/' if self.src.peek() == Some(&b'*') => {
|
||||
loop {
|
||||
let first = self.src.next()?;
|
||||
let second = self.src.peek();
|
||||
if first == b'*' && second == Some(&b'/') {
|
||||
self.src.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
b'/' if self.src.peek() == Some(&b'/') => {
|
||||
while self.src.next() != Some(b'\n') {}
|
||||
}
|
||||
c => return Some(PToken::OtherNonWs(c)),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue