Skip to content

Commit cd3b1fa

Browse files
committed
Continued working on C statement parsing, and refactored some C parse error handling code
1 parent 6a6613b commit cd3b1fa

File tree

3 files changed

+149
-206
lines changed

3 files changed

+149
-206
lines changed

Diff for: src/c/parser/input.rs

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ impl<'a> Input<'a> {
5151
self.tokens.last().unwrap()
5252
}
5353

54+
pub fn here(&self) -> Source {
55+
self.peek().source
56+
}
57+
5458
pub fn peek(&self) -> &CToken {
5559
self.tokens
5660
.get(*self.stack.last().unwrap())

0 commit comments

Comments
 (0)