浏览代码

Fix parsing of TermList

Isaac Woods 5 年之前
父节点
当前提交
ad1b910adc
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      aml_parser/src/term_object.rs

+ 4 - 2
aml_parser/src/term_object.rs

@@ -14,10 +14,12 @@ pub fn term_list<'a>(list_length: PkgLength) -> impl Parser<'a, ()> {
     /*
      * TermList := Nothing | <TermObj TermList>
      */
-    move |input: &'a [u8]| -> ParseResult<'a, ()> {
+    move |mut input: &'a [u8]| -> ParseResult<'a, ()> {
         while list_length.still_parsing(input) {
-            let (input, ()) = term_object().parse(input)?;
+            let (new_input, ()) = term_object().parse(input)?;
+            input = new_input;
         }
+
         Ok((input, ()))
     }
 }