From ed5ccbec275855765ae79e764e8483d27eac09fd Mon Sep 17 00:00:00 2001 From: "Magomed Kostoev (mkostoevr)" Date: Tue, 29 Jun 2021 09:25:51 +0000 Subject: [PATCH] [asmxygen][parse_variable] No reason to read comments by hand anymore git-svn-id: svn://kolibrios.org@8961 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/asmxygen.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/kernel/trunk/asmxygen.py b/kernel/trunk/asmxygen.py index 5c7a85734f..d67c654dfb 100644 --- a/kernel/trunk/asmxygen.py +++ b/kernel/trunk/asmxygen.py @@ -1646,15 +1646,10 @@ def parse_variable(r, first_word = None): value += r.step() # Skip spaces after the value r.skip_spaces() - # Read a comment if any - comment = '' - if r.curr() == ';': - # Skip the ';' + # Read till end of the line to get a comment from the reader + while r.curr() != '': r.step() - # Read the comment - while r.curr() != '': - comment += r.step() - # Postprocess type + # Build the result return AsmVariable(location, name, r.comment, var_type, value) def parse_after_struct(r, as_union = True):