Explorar el Código

gen_ir.py: fix last comment character being ommitted

Andre Weissflog hace 6 meses
padre
commit
4daf0a26d2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      bindgen/gen_ir.py

+ 1 - 1
bindgen/gen_ir.py

@@ -20,7 +20,7 @@ def strip_comments(items):
     return [i for i in items if i['kind'] != 'FullComment']
 
 def extract_comment(comment, source):
-    return source[comment['range']['begin']['offset']:comment['range']['end']['offset']]
+    return source[comment['range']['begin']['offset']:comment['range']['end']['offset']+1].rstrip()
 
 def is_dep_decl(decl, dep_prefixes):
     for prefix in dep_prefixes: